vpp# show interface Name Idx State MTU (L3/IP4/IP6/MPLS) Counter Count GigabitEthernet13/0/0 2 down 9000/0/0/0 GigabitEthernetb/0/0 1 down 9000/0/0/0 local0 0 down 0/0/0/0 vpp#
开启端口
1 2 3 4 5 6 7 8 9 10 11 12 13 14
vpp# set interface state GigabitEthernet13/0/0 up vpp# set interface state GigabitEthernetb/0/0 up vpp# show interface Name Idx State MTU (L3/IP4/IP6/MPLS) Counter Count GigabitEthernet13/0/0 2 up 9000/0/0/0 rx packets 1 rx bytes 60 drops 1 ip4 1 GigabitEthernetb/0/0 1 up 9000/0/0/0 rx packets 4 rx bytes 240 drops 4 ip4 1 local0 0 down 0/0/0/0 vpp#
配置为switch模式
1 2 3 4 5
vpp# set interface l2 bridge GigabitEthernet13/0/0 1 vpp# set interface l2 bridge GigabitEthernetb/0/0 1 vpp# show bridge-domain BD-ID Index BSN Age(min) Learning U-Forwrd UU-Flood Flooding ARP-Term BVI-Intf 1 1 0 off on on flood on off N/A
测试连通性
c2s
Host1: 192.168.0.2/24
Host2: 192.168.0.3/24
通过host1 ping host2
配置loopback口测试连通性
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
vpp# create loopback interface loop0 vpp# set interface ip address loop0 192.168.0.1/24 vpp# set interface state loop0 up vpp# set interface l2 bridge loop0 1 bvi vpp# show bridge-domain BD-ID Index BSN Age(min) Learning U-Forwrd UU-Flood Flooding ARP-Term BVI-Intf 1 1 0 off on on flood on off loop0 vpp# ping 192.168.0.2 116 bytes from 192.168.0.2: icmp_seq=2 ttl=64 time=.8704 ms 116 bytes from 192.168.0.2: icmp_seq=3 ttl=64 time=.2564 ms 116 bytes from 192.168.0.2: icmp_seq=4 ttl=64 time=.2653 ms 116 bytes from 192.168.0.2: icmp_seq=5 ttl=64 time=.3413 ms
Statistics: 5 sent, 4 received, 20% packet loss
set interface l2 bridge loop0 1 bvi中的bvi意味着这个接口将用来接收、发送以及转发该bridge domain的报文