cumulus vx3.4.2的EVPN測(cè)試

右側(cè)MGMT交換機(jī)為管理cumuls及ubuntu host用的

Cumulus-1的接口配置

root@cumulus-1:~# cat /etc/network/interfaces

auto lo

iface lo inet loopback

address 1.1.1.1/32

auto eth0

iface eth0 inet static

address 10.5.39.241

netmask 255.255.255.0

gateway 10.5.39.254

auto swp1

iface swp1 inet static

address 10.50.39.241

netmask 255.255.255.0

auto swp2

iface swp2

auto bridge

iface bridge

bridge-ports swp2 vxlan100 vxlan200

bridge-vids 100 200

bridge-vlan-aware yes

auto vlan100

iface vlan100

address 10.10.10.1/24

address-virtual 00:00:00:00:00:1a 10.10.10.254/24

vlan-id 100

vlan-raw-device bridge

auto vlan200

iface vlan200

address 20.20.20.1/24

address-virtual 00:00:00:00:00:2a 20.20.20.254/24

vlan-id 200

vlan-raw-device bridge

auto vxlan100

iface vxlan100

bridge-access 100

bridge-arp-nd-suppress on

bridge-learning off

mstpctl-bpduguard yes

mstpctl-portbpdufilter yes

vxlan-id 100

vxlan-local-tunnelip 1.1.1.1

auto vxlan200

iface vxlan200

bridge-access 200

bridge-arp-nd-suppress on

bridge-learning off

mstpctl-bpduguard yes

mstpctl-portbpdufilter yes

vxlan-id 200

vxlan-local-tunnelip 1.1.1.1

Cumulus-2的接口配置

root@cumulus-2:~# cat /etc/network/interfaces

auto lo

iface lo inet loopback

address 2.2.2.2/32

auto eth0

iface eth0 inet static

address 10.5.39.242

netmask 255.255.255.0

gateway 10.5.39.254

auto swp1

iface swp1 inet static

address 10.50.39.242

netmask 255.255.255.0

auto swp2

iface swp2

auto bridge

iface bridge

bridge-ports swp2 vxlan100 vxlan200

bridge-vids 100 200

bridge-vlan-aware yes

auto vlan100

iface vlan100

address 10.10.10.1/24

address-virtual 00:00:00:00:00:1a 10.10.10.254/24

vlan-id 100

vlan-raw-device bridge

auto vlan200

iface vlan200

address 20.20.20.1/24

address-virtual 00:00:00:00:00:2a 20.20.20.254/24

vlan-id 200

vlan-raw-device bridge

auto vxlan100

iface vxlan100

bridge-access 100

bridge-arp-nd-suppress on

bridge-learning off

mstpctl-bpduguard yes

mstpctl-portbpdufilter yes

vxlan-id 100

vxlan-local-tunnelip 2.2.2.2

auto vxlan200

iface vxlan200

bridge-access 200

bridge-arp-nd-suppress on

bridge-learning off

mstpctl-bpduguard yes

mstpctl-portbpdufilter yes

vxlan-id 200

vxlan-local-tunnelip 2.2.2.2

Cumulus-1的VXLAN及MP-IBGP配置

net add vlan 100 ip address-virtual 00:00:00:00:00:1a 10.10.10.254/24

net add vlan 100 ip address 10.10.10.1/24

net add vxlan vxlan100 vxlan id 100

net add vxlan vxlan100 vxlan local-tunnelip 1.1.1.1

net add vxlan vxlan100 bridge access 100

net add vxlan vxlan100 bridge learning off

net add vxlan vxlan100 bridge arp-nd-suppress on

net add vlan 200 ip address-virtual 00:00:00:00:00:2a 20.20.20.254/24

net add vlan 200 ip address 20.20.20.1/24

net add vxlan vxlan200 vxlan id 200

net add vxlan vxlan200 vxlan local-tunnelip 1.1.1.1

net add vxlan vxlan200 bridge access 200

net add vxlan vxlan200 bridge learning off

net add vxlan vxlan200 bridge arp-nd-suppress on

net add bgp router-id 1.1.1.1

net add bgp autonomous-system 65000

net add bgp neighbor swp1 remote-as internal

net add bgp neighbor swp1 update-source swp1

net add bgp ipv4 unicast network 1.1.1.1/32

net add bgp evpn neighbor swp1 activate

net add bgp evpn advertise-all-vni

net add bridge bridge ports swp2 #添加向下的業(yè)務(wù)接口,封裝為802.1Q

net pending

net commit

形成以下/etc/frr/frr.conf配置

root@cumulus-1:~# cat /etc/frr/frr.conf

router bgp 65000

bgp router-id 1.1.1.1

neighbor swp1 interface remote-as internal

address-family ipv4 unicast

network 1.1.1.1/32

exit-address-family

address-family l2vpn evpn

neighbor swp1 activate

advertise-all-vni

exit-address-family

Cumulus-2的VXLAN及MP-IBGP配置

net add vlan 100 ip address-virtual 00:00:00:00:00:1a 10.10.10.254/24

net add vlan 100 ip address 10.10.10.1/24

net add vxlan vxlan100 vxlan id 100

net add vxlan vxlan100 vxlan local-tunnelip 2.2.2.2

net add vxlan vxlan100 bridge access 100

net add vxlan vxlan100 bridge learning off

net add vxlan vxlan100 bridge arp-nd-suppress on

net add vlan 200 ip address-virtual 00:00:00:00:00:2a 20.20.20.254/24

net add vlan 200 ip address 20.20.20.1/24

net add vxlan vxlan200 vxlan id 200

net add vxlan vxlan200 vxlan local-tunnelip 2.2.2.2

net add vxlan vxlan200 bridge access 200

net add vxlan vxlan200 bridge learning off

net add vxlan vxlan200 bridge arp-nd-suppress on

net add bgp router-id 2.2.2.2

net add bgp autonomous-system 65000

net add bgp neighbor swp1 remote-as internal

net add bgp neighbor swp1 update-source swp1

net add bgp ipv4 unicast network 2.2.2.2/32

net add bgp evpn neighbor swp1 activate

net add bgp evpn advertise-all-vni

net add bridge bridge ports swp2 #添加向下的業(yè)務(wù)接口,封裝為802.1Q

net pending

net commit

形成以下/etc/frr/frr.conf配置

root@cumulus-2:~# cat /etc/frr/frr.conf

router bgp 65000

bgp router-id 2.2.2.2

neighbor swp1 interface remote-as internal

address-family ipv4 unicast

network 2.2.2.2/32

exit-address-family

address-family l2vpn evpn

neighbor swp1 activate

advertise-all-vni

exit-address-family

計(jì)算節(jié)點(diǎn)HOST1和HOST2的接口配置

root@host-1:~# cat /etc/network/interfaces.d/50-cloud-init.cfg

auto lo

iface lo inet loopback

auto ens3

iface ens3 inet static

address 10.5.39.248

netmask 255.255.255.0

gateway 10.5.39.254

dns-nameservers 10.5.17.36

auto ens4

iface ens4

root@host-2:~# cat /etc/network/interfaces.d/50-cloud-init.cfg

auto lo

iface lo inet loopback

auto ens3

iface ens3 inet static

address 10.5.39.249

netmask 255.255.255.0

gateway 10.5.39.254

dns-nameservers 10.5.17.36

auto ens4

iface ens4

HOST1上netns testA及testB配置

root@host-1:~# cat /root/test.sh

ip link add link ens4 name ens4.100 type vlan id 100

ip link add link ens4 name ens4.200 type vlan id 200

ip link set ens4 up

ip link add vethA type veth peer name vethAA

ip link set vethA up

ip netns add testA

ip link set vethAA netns testA

ip netns exec testA ip link set dev vethAA address 00:01:01:01:01:01

ip netns exec testA ip add add 10.10.10.10/24 dev vethAA

ip netns exec testA ip link set vethAA up

ip netns exec testA ip link set lo up

brctl addbr br100

brctl stp br100 off

ip link set br100 up

brctl addif br100 vethA

brctl addif br100 ens4.100

ip link add vethB type veth peer name vethBB

ip link set vethB up

ip netns add testB

ip link set vethBB netns testB

ip netns exec testB ip link set dev vethBB address 00:02:02:02:02:02

ip netns exec testB ip add add 20.20.20.20/24 dev vethBB

ip netns exec testB ip link set vethBB up

ip netns exec testB ip link set lo up

brctl addbr br200

brctl stp br200 off

ip link set br200 up

brctl addif br200 vethB

brctl addif br200 ens4.200

ip netns exec testA ip route add default via 10.10.10.254

ip netns exec testB ip route add default via 20.20.20.254

HOST2上netns testA及testB配置

root@host-2:~# cat /root/test.sh

ip link add link ens4 name ens4.100 type vlan id 100

ip link add link ens4 name ens4.200 type vlan id 200

ip link set ens4 up

ip link add vethA type veth peer name vethAA

ip link set vethA up

ip netns add testA

ip link set vethAA netns testA

ip netns exec testA ip link set dev vethAA address 00:01:01:01:01:88

ip netns exec testA ip add add 10.10.10.88/24 dev vethAA

ip netns exec testA ip link set vethAA up

ip netns exec testA ip link set lo up

brctl addbr br100

brctl stp br100 off

ip link set br100 up

brctl addif br100 vethA

brctl addif br100 ens4.100

ip link add vethB type veth peer name vethBB

ip link set vethB up

ip netns add testB

ip link set vethBB netns testB

ip netns exec testB ip link set dev vethBB address 00:02:02:02:02:88

ip netns exec testB ip add add 20.20.20.88/24 dev vethBB

ip netns exec testB ip link set vethBB up

ip netns exec testB ip link set lo up

brctl addbr br200

brctl stp br200 off

ip link set br200 up

brctl addif br200 vethB

brctl addif br200 ens4.200

ip netns exec testA ip route add default via 10.10.10.254

ip netns exec testB ip route add default via 20.20.20.254

測(cè)試

root@host-2:~# ip netns exec testB ping 20.20.20.20 -c 2

PING 20.20.20.20 (20.20.20.20) 56(84) bytes of data.

64 bytes from 20.20.20.20: icmp_seq=1 ttl=64 time=1.34 ms

64 bytes from 20.20.20.20: icmp_seq=2 ttl=64 time=1.32 ms

--- 20.20.20.20 ping statistics ---

2 packets transmitted, 2 received, 0% packet loss, time 1001ms

rtt min/avg/max/mdev = 1.321/1.331/1.341/0.010 ms

root@host-2:~#

root@host-2:~#

root@host-2:~# ip netns exec testB ping 10.10.10.10 -c 2

PING 10.10.10.10 (10.10.10.10) 56(84) bytes of data.

64 bytes from 10.10.10.10: icmp_seq=1 ttl=63 time=1.18 ms

64 bytes from 10.10.10.10: icmp_seq=2 ttl=63 time=1.39 ms

--- 10.10.10.10 ping statistics ---

2 packets transmitted, 2 received, 0% packet loss, time 1001ms

rtt min/avg/max/mdev = 1.181/1.286/1.392/0.111 ms

注意測(cè)試arp和nd的抑制

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
  • 序言:七十年代末拦耐,一起剝皮案震驚了整個(gè)濱河市芙粱,隨后出現(xiàn)的幾起案子廓译,更是在濱河造成了極大的恐慌膘茎,老刑警劉巖递递,帶你破解...
    沈念sama閱讀 206,378評(píng)論 6 481
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件混驰,死亡現(xiàn)場離奇詭異,居然都是意外死亡通熄,警方通過查閱死者的電腦和手機(jī)耙旦,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 88,356評(píng)論 2 382
  • 文/潘曉璐 我一進(jìn)店門喉恋,熙熙樓的掌柜王于貴愁眉苦臉地迎上來,“玉大人母廷,你說我怎么就攤上這事『簦” “怎么了琴昆?”我有些...
    開封第一講書人閱讀 152,702評(píng)論 0 342
  • 文/不壞的土叔 我叫張陵,是天一觀的道長馆揉。 經(jīng)常有香客問我业舍,道長,這世上最難降的妖魔是什么升酣? 我笑而不...
    開封第一講書人閱讀 55,259評(píng)論 1 279
  • 正文 為了忘掉前任舷暮,我火速辦了婚禮,結(jié)果婚禮上噩茄,老公的妹妹穿的比我還像新娘下面。我一直安慰自己,他們只是感情好绩聘,可當(dāng)我...
    茶點(diǎn)故事閱讀 64,263評(píng)論 5 371
  • 文/花漫 我一把揭開白布沥割。 她就那樣靜靜地躺著,像睡著了一般凿菩。 火紅的嫁衣襯著肌膚如雪机杜。 梳的紋絲不亂的頭發(fā)上,一...
    開封第一講書人閱讀 49,036評(píng)論 1 285
  • 那天衅谷,我揣著相機(jī)與錄音椒拗,去河邊找鬼。 笑死获黔,一個(gè)胖子當(dāng)著我的面吹牛蚀苛,可吹牛的內(nèi)容都是我干的。 我是一名探鬼主播玷氏,決...
    沈念sama閱讀 38,349評(píng)論 3 400
  • 文/蒼蘭香墨 我猛地睜開眼枉阵,長吁一口氣:“原來是場噩夢(mèng)啊……” “哼!你這毒婦竟也來了预茄?” 一聲冷哼從身側(cè)響起兴溜,我...
    開封第一講書人閱讀 36,979評(píng)論 0 259
  • 序言:老撾萬榮一對(duì)情侶失蹤侦厚,失蹤者是張志新(化名)和其女友劉穎,沒想到半個(gè)月后拙徽,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體刨沦,經(jīng)...
    沈念sama閱讀 43,469評(píng)論 1 300
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 35,938評(píng)論 2 323
  • 正文 我和宋清朗相戀三年膘怕,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了想诅。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片。...
    茶點(diǎn)故事閱讀 38,059評(píng)論 1 333
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡岛心,死狀恐怖来破,靈堂內(nèi)的尸體忽然破棺而出,到底是詐尸還是另有隱情忘古,我是刑警寧澤徘禁,帶...
    沈念sama閱讀 33,703評(píng)論 4 323
  • 正文 年R本政府宣布,位于F島的核電站髓堪,受9級(jí)特大地震影響送朱,放射性物質(zhì)發(fā)生泄漏。R本人自食惡果不足惜干旁,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 39,257評(píng)論 3 307
  • 文/蒙蒙 一驶沼、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧争群,春花似錦回怜、人聲如沸。這莊子的主人今日做“春日...
    開封第一講書人閱讀 30,262評(píng)論 0 19
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽。三九已至专控,卻和暖如春抹凳,著一層夾襖步出監(jiān)牢的瞬間,已是汗流浹背伦腐。 一陣腳步聲響...
    開封第一講書人閱讀 31,485評(píng)論 1 262
  • 我被黑心中介騙來泰國打工赢底, 沒想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留,地道東北人柏蘑。 一個(gè)月前我還...
    沈念sama閱讀 45,501評(píng)論 2 354
  • 正文 我出身青樓幸冻,卻偏偏與公主長得像,于是被迫代替她去往敵國和親咳焚。 傳聞我的和親對(duì)象是個(gè)殘疾皇子洽损,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 42,792評(píng)論 2 345

推薦閱讀更多精彩內(nèi)容