Hi John,
I want to add access bvi like the example you given, but it doesn't work, the
config looks like following:
set interface l2 bridge GigabitEthernetd/0/0 10
set interface l2 tag-rewrite GigabitEthernetd/0/0 push dot1q 10
set interface state GigabitEthernetd/0/0 up
loop create
set int l2 bridge loop0 10 bvi
set int ip address loop0 192.168.10.1/24
set int state loop0 up
trace dpdk-input, we can get following log. when packet passed the link layer
packet header is wrong.
00:00:49:249362: dpdk-input
GigabitEthernetd/0/0 rx queue 0
buffer 0x4bba: current data 0, length 60, free-list 0, totlen-nifb 0, trace
0x0
PKT MBUF: port 0, nb_segs 1, pkt_len 60
buf_len 2176, data_len 60, ol_flags 0x180, data_off 128, phys_addr
0x75d2ad80
packet_type 0x0
Packet Offload Flags
PKT_RX_IP_CKSUM_GOOD (0x0080) IP cksum of RX pkt. is valid
PKT_RX_L4_CKSUM_GOOD (0x0100) L4 cksum of RX pkt. is valid
ARP: a0:36:9f:55:6e:88 -> ff:ff:ff:ff:ff:ff
request, type ethernet/IP4, address size 6/4
a0:36:9f:55:6e:88/192.168.10.100 -> 00:00:00:00:00:00/192.168.10.1
00:00:49:249375: ethernet-input
ARP: a0:36:9f:55:6e:88 -> ff:ff:ff:ff:ff:ff
00:00:49:249383: l2-input
l2-input: sw_if_index 1 dst ff:ff:ff:ff:ff:ff src a0:36:9f:55:6e:88
00:00:49:249386: l2-input-vtr
l2-input-vtr: sw_if_index 1 dst ff:ff:ff:ff:ff:ff src a0:36:9f:55:6e:88 data
81 00 00 0a 08 06 00 01 08 00 06 04
00:00:49:249389: l2-learn
l2-learn: sw_if_index 1 dst ff:ff:ff:ff:ff:ff src a0:36:9f:55:6e:88 bd_index 1
00:00:49:249392: l2-flood
l2-flood: sw_if_index 1 dst 00:01:08:00:06:04 src 00:01:a0:36:9f:55 bd_index 1
00:00:49:249396: arp-input
request, type ethernet/IP4, address size 6/4
a0:36:9f:55:6e:88/192.168.10.100 -> 00:00:00:00:00:00/192.168.10.1
00:00:49:249406: loop0-output
loop0
ARP: 00:00:81:00:00:0a -> 6e:88:de:ad:00:00
reply, type ethernet/IP4, address size 6/4
de:ad:00:00:00:00/192.168.10.1 -> a0:36:9f:55:6e:88/192.168.10.100
00:00:49:249414: l2-input
l2-input: sw_if_index 5 dst 6e:88:de:ad:00:00 src 00:00:81:00:00:0a
00:00:49:249416: l2-fwd
l2-fwd: sw_if_index 5 dst 6e:88:de:ad:00:00 src 00:00:81:00:00:0a bd_index 1
00:00:49:249418: l2-flood
l2-flood: sw_if_index 5 dst 6e:88:de:ad:00:00 src 00:00:81:00:00:0a bd_index 1
00:00:49:249420: l2-output
l2-output: sw_if_index 1 dst 6e:88:de:ad:00:00 src 00:00:81:00:00:0a
00:00:49:249422: error-drop
l2-output: L2 output tag rewrite drops
Am I using the wrong configuration lead to this result?
------------------ Original ------------------
From: "John Lo (loj)";<l...@cisco.com>;
Date: Fri, Jan 20, 2017 07:14 AM
To: "Alfa"<76278...@qq.com>; "vpp-dev"<vpp-dev@lists.fd.io>;
Subject: RE: [vpp-dev] How to setup BVI with a ip address?
The config for VPP will be something like the following. Let??s start with some
of your existing config (also excluding some others):
create sub GigabitEthernetd/0/0 100
create sub GigabitEthernetd/0/1 100
create sub GigabitEthernetd/0/0 200
create sub GigabitEthernetd/0/1 200
set int state GigabitEthernetd/0/0 up
set int state GigabitEthernetd/0/1 up
set int state GigabitEthernetd/0/0.100 up
set int state GigabitEthernetd/0/0.200 up
set int state GigabitEthernetd/0/1.100 up
set int state GigabitEthernetd/0/1.200 up
set interface l2 bridge GigabitEthernetd/0/0.100 100
set interface l2 bridge GigabitEthernetd/0/1.100 100
set interface l2 bridge GigabitEthernetd/0/0.200 200
set interface l2 bridge GigabitEthernetd/0/1.200 200
Now we have two BDs 100 and 200 each with two VLAN sub-interfaces. We need to
pop the VLAN tag as packets are received into the BD:
set int l2 tag-rewrite GigabitEthernetd/0/0.100 pop
set int l2 tag-rewrite GigabitEthernetd/0/0.200 pop
set int l2 tag-rewrite GigabitEthernetd/0/1.100 pop
set int l2 tag-rewrite GigabitEthernetd/0/1.200 pop
We add BVIs to each BD:
loop create
set int l2 bridge loop0 100 bvi
set int state loop0 up
set int ip address loop0 192.168.100.1/24
loop create
set int l2 bridge loop1 200 bvi
set int state loop1 up
set int ip address loop1 192.168.200.1/24
Now BVIs loop1 and loop2 can be utilized to route packets between BD 100 and BD
200. The reason we need to pop VLAN tags into BD is that BVI interface is main
and not VLAN sub-interfaces so cannot send packets into BD with VLAN tags.
HTH with regards,
John
From: vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io] On
Behalf Of Alfa
Sent: Thursday, January 19, 2017 9:18 AM
To: vpp-dev <vpp-dev@lists.fd.io>
Subject: [vpp-dev] How to setup BVI with a ip address?
Hi, guys, I want to set up topology like following:
----p4p1.100 ---- pc1 192.168.100.100/24, gw
192.168.100.1
|
br100----
|
----p4p2.100 ---- pc2 192.168.100.200/24, gw 192.168.100.1
----p4p1.200 ---- pc3 192.168.200.100/24, gw
192.168.200.1
|
br200----
|
----p4p2.200 ---- pc4 192.168.200.200, gw 192.168.200.1
in linux, we can got the desired topology using following cmd:
vconfig add p4p1 100
vconfig add p4p2 100
brctl add br br100
brctl addif br100 p4p1.100
brctl addif br100 p4p2.100
ifconfig br100 192.168.100.1
vconfig add p4p1 200
vconfig add p4p2 200
brctl add br br200
brctl addif br200 p4p1.200
brctl addif br200 p4p2.200
ifconfig br200 192.168.200.1
sysctl -w net.ipv4.ip_forward=1
finally, we can ping from any pc to other pc.
I want to get the same topology like above, so I add following cmd in vpp,
which config g/0/0 and g/0/1 to a trunk port with native vlan 1 and allowed
vlan 100, 200.
How can I config svi(Switch Virtual Interface) of vlan 100 and vlan 200 in vpp?
Could you plz give some reference to study? Thank you in advance!
create sub GigabitEthernetd/0/0 100
create sub GigabitEthernetd/0/1 100
create sub GigabitEthernetd/0/0 200
create sub GigabitEthernetd/0/1 200
set int state GigabitEthernetd/0/0 up
set int state GigabitEthernetd/0/1 up
set int state GigabitEthernetd/0/0.100 up
set int state GigabitEthernetd/0/0.200 up
set int state GigabitEthernetd/0/1.100 up
set int state GigabitEthernetd/0/1.200 up
# GigabitEthernetd/0/0 native vlan 1, allowed vlan 100, 200
# GigabitEthernetd/0/1 native vlan 1, allowed vlan 100, 200
set interface l2 bridge GigabitEthernetd/0/0 1
set interface l2 tag-rewrite GigabitEthernetd/0/0 push dot1q 1
set interface l2 bridge GigabitEthernetd/0/1 1
set interface l2 tag-rewrite GigabitEthernetd/0/1 push dot1q 1
set interface l2 bridge GigabitEthernetd/0/0.100 100
set interface l2 bridge GigabitEthernetd/0/1.100 100
set interface l2 bridge GigabitEthernetd/0/0.200 200
set interface l2 bridge GigabitEthernetd/0/1.200 200
_______________________________________________
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev