VXLAN分佈式BGP E***配置示例詳細

  1. 分佈式VXLAN網關配置思路

1).配置underlay網絡實現互聯互通

2).啓用vxlan功能

3).配置業務接入點

4).啓用E***功能

5).配置BGP對等體

6).配置E***實例

7).配置頭端複製列表

8).配置***實例

9).配置VBDIF並綁定***實例,配置發佈路由類型

10).配置BGP對等體路由類型

此次環境如下:

ensp 版本1.3.00.100

ce12800 版本V200R005C10SPC607B607

virtualbox 版本5.1.26

配置拓撲圖如下:

企業微信截圖_16091263464716.png

2.配置CE1-CE3使用OSPF實現三層互聯互通:

CE1:

[ce1]ospf 1 router-id 1.1.1.1 \\配置OSPF進程1

[ce1-ospf-1]area 0

[ce1-ospf-1-area-0.0.0.0]quit

[ce1-ospf-1]quit

[ce1]interface  g1/0/0

[ce1-ge1/0/0]undo shutdown

[ce1-ge1/0/0]undo portswitch

[ce1-ge1/0/0]ip address 192.168.12.1 255.255.255.0

[ce1-ge1/0/0]ospf enable 1 area 0 \\端口加入OSPF進程

[ce1-ge1/0/0]interface loopback 0 

[ce1-loopback1]ip address 1.1.1.1 255.255.255.255

[ce1-loopback1]ospf enable 1 area 0

[ce1-loopback1]interface g1/0/1

[ce1-ge1/0/1]undo shutdown

[ce1-ge1/0/1]undo portswitch

[ce1-ge1/0/1]ip address 192.168.13.1 255.255.255.255

[ce1-ge1/0/1]ospf enable 1 area 0

[ce1-ge1/0/1]quit

[ce1]commit


CE2:

[ce2]ospf 1 router-id 2.2.2.2

[ce2-ospf-1]area 0

[ce2-ospf-1-area-0.0.0.0]quit

[ce2-ospf-1]quit

[ce2]interface  g1/0/0

[ce2-ge1/0/0]undo shutdown

[ce2-ge1/0/0]undo portswitch

[ce2-ge1/0/0]ip address 192.168.12.2 255.255.255.0

[ce2-ge1/0/0]ospf enable 1 area 0

[ce2-ge1/0/0]interface loopback 0 

[ce2-loopback1]ip address 2.2.2.2 255.255.255.255

[ce2-loopback1]ospf enable 1 area 0

[ce2-loopback1]quit

[ce2]commit


CE3:

[ce3]ospf 1 router-id 3.3.3.3

[ce3-ospf-1]area 0

[ce3-ospf-1-area-0.0.0.0]quit

[ce3-ospf-1]quit

[ce3]interface  g1/0/0

[ce3-ge1/0/0]undo shutdown

[ce3-ge1/0/0]undo portswitch

[ce3-ge1/0/0]ip address 192.168.13.3 255.255.255.0

[ce3-ge1/0/0]ospf enable 1 area 0

[ce3-ge1/0/0]interface loopback 0

[ce3-loopback1]ip address 3.3.3.3 255.255.255.255

[ce3-loopback1]ospf enable 1 area 0

[ce3-loopback1]quit

[ce3]commit


配置注意點:

1)注意交換機端口默認狀態爲shutdown,需要手動undo shutdown

ce3上ospf狀態查看

CE3上OSPF狀態查看.PNG

3.配置vxlan隧道模式,並使能vxlan的acl擴展功能

ip tunnel mode vxlan \\配置隧道模式爲vxlan

assign forward nvo3 acl extend enable \\使能vxlan的ACL擴展功能,以防ACL疊加失敗

配置注意點:

此處模擬器不支持配置命令,實際環境還是要配置的,配置命令後交換機需要重啓。

4.配置LSW1 LSW2接入交換機vlan、trunk

lsw1:

[lsw1]vlan 10

[lsw1-vlan10]quit

[lsw1]vlan 20

[lsw1-vlan20]quit

[lsw1]interface  e0/0/2

[lsw1-ethernet0/0/2]port link-type access

[lsw1-ethernet0/0/2]port default vlan 10

[lsw1-ethernet0/0/2]interface  e0/0/3

[lsw1-ethernet0/0/3]port link-type access

[lsw1-ethernet0/0/3]port default vlan 20

[lsw1-ethernet0/0/3]interface  e0/0/1

[lsw1-ethernet0/0/1]port link-type trunk

[lsw1-ethernet0/0/1]port trunk allow-pass vlan all


lsw2:

[lsw2]vlan 20

[lsw2-vlan20]quit

[lsw2]interface  e0/0/2

[lsw2-ethernet0/0/2]port link-type access

[lsw2-ethernet0/0/2]port default vlan 20

[lsw2-ethernet0/0/2]interface  e0/0/1

[lsw2-ethernet0/0/1]port link-type trunk

[lsw2-ethernet0/0/1]port trunk allow-pass vlan all


5.配置vxlan業務接入點,配置PC1 PC2 PC3所連交換機端口vxlan功能

CE2:

[ce2]vlan 10

[ce2-vlan10]quit

[ce2]vlan 20

[ce2-vlan20]quit

[ce2]commit

[ce2]bridge-domain 10

[ce2-bd10]quit

[ce2]bridge-domain 20

[ce2-bd20]quit

[ce2]interface g1/0/1

[ce2-ge1/0/1]undo shutdown \\主端口默認shutdown

[ce2-ge1/0/1]interface g1/0/1.1 mode l2

[ce2-ge1/0/1.1]encapsulation dot1q vid 10 \\配置封裝vlan10

[ce2-ge1/0/1.1]bridge-domain 10 \\關聯BD域

[ce2-ge1/0/1.1]interface g1/0/1.2 mode l2

[ce2-ge1/0/1.2]encapsulation dot1q vid 20 \\配置封裝vlan20

[ce2-ge1/0/1.2]bridge-domain 20 \\關聯BD域

[ce2-ge1/0/1.2]quit

[ce2]commit


CE3:

[ce3]vlan 20

[ce3-vlan20]quit

[ce3]bridge-domain 20

[ce3-bd20]quit

[ce3]interface g1/0/1

[ce3-ge1/0/1]undo shutdown

[ce3-ge1/0/1]interface g1/0/1.1 mode l2

[ce3-ge1/0/1.1]encapsulation dot1q vid 20

[ce3-ge1/0/1.1]bridge-domain 20

[ce3-ge1/0/1.1]quit

[ce3]commit


6.使能E***作爲vxlan控制平面功能

ce1:

[ce1]e***-overlay enable

[ce1]commit


ce2:

[ce2]e***-overlay enable

[ce2]commit


ce3:

[ce3]e***-overlay enable

[ce3]commit


7.配置BGP E***對等體關係

ce2:

[ce2]bgp 1

[ce2-bgp]router-id 2.2.2.2

[ce2-bgp]peer 3.3.3.3 as-number 1

[ce2-bgp]peeer 3.3.3.3 connect-interface loopback0

[ce2-bgp]l2***-family e***

[ce2-bgp-af-e***]peer 3.3.3.3 enable

[ce2-bgp-af-e***]quit

[ce2-bgp]quit

[ce2]commit


ce3:

[ce3]bgp 1

[ce3-bgp]router-id 3.3.3.3

[ce3-bgp]peer 2.2.2.2 as-number 1

[ce3-bgp]peeer 2.2.2.2 connect-interface 3.3.3.3

[ce3-bgp]l2***-family e***

[ce3-bgp-af-e***]peer 2.2.2.2 enable

[ce3-bgp-af-e***]quit

[ce3-bgp]quit

[ce3]commit


BGP E***對等體關係狀態查看。

CE3上查看BGP E***對等體關係.PNG

8.配置E***實例

ce2

[ce2]bridge-domain 10

[ce2-bd10]vxlan vni 1

[ce2-bd10]e***

[ce2-bd10-e***]route-distinguisher 1:1

[ce2-bd10-e***]***-target 1:1 both

[ce2-bd10-e***]***-target 1:10 export-extcommunity

[ce2-bd10-e***]quit

[ce2-bd10]quit

[ce2]bridge-domain 20

[ce2-bd20]vxlan vni 2

[ce2-bd20]e***

[ce2-bd20-e***]route-distinguisher 1:3

[ce2-bd20-e***]***-target 2:2 both

[ce2-bd20-e***]***-target 1:10 export-extcommunity

[ce2-bd20-e***]quit

[ce2-bd20]quit

[ce2]commit


ce3

[ce3]bridge-domain 20

[ce3-bd20]vxlan vni 2

[ce3-bd20]e***

[ce3-bd20-e***]route-distinguisher 1:5

[ce3-bd20-e***]***-target 2:2

[ce3-bd20-e***]***-target 1:10 export-extcommunity

[ce3-bd20-e***]quit

[ce3-bd20]quit

[ce3]commit


9.配置頭端複製列表,


ce2:

[ce2]interface nve1

[ce2-nve1]source 2.2.2.2

[ce2-nve1]vni 1 head-end peer-list protocol bgp

[ce2-nve1]vni 2 head-end peer-list protocol bgp

[ce2-nve1]quit

[ce2]commit


ce3:

[ce3]interface nve1

[ce3-nve1]source 3.3.3.3

[ce3-nve1]vni 2 head-end peer-list protocol bgp

[ce3-nve1]quit

[ce3]commit


10.配置***實例

CE2:

[ce2]ip ***-instance bd10

[ce2-***-instance-bd10]vxlan vni 10

[ce2-***-instance-bd10]ipv4-family

[ce2-***-instance-bd10-af-ipv4]route-distinguisher 1:2

[ce2-***-instance-bd10-af-ipv4]***-target 1:10 e***

[ce2-***-instance-bd10-af-ipv4]quit

[ce2-***-instance-bd10]quit

[ce2]commit


CE3:

[ce3]ip ***-instance bd10

[ce3-***-instance-bd10]vxlan vni 10

[ce3-***-instance-bd10]ipv4-family

[ce3-***-instance-bd10-af-ipv4]route-distinguisher 1:6

[ce3-***-instance-bd10-af-ipv4]***-target 1:10 e***

[ce3-***-instance-bd10-af-ipv4]quit

[ce3-***-instance-bd10]quit

[ce3]commit


11.配置VBDIF並綁定***實例,配置發佈路由類型

ce2

[ce2]interface vbdif 10

[ce2-vbdif10]ip binding ***-instance bd10

[ce2-vbdif10]ip address 10.1.1.254 255.255.255.0

[ce2-vbdif10]vxlan anycast-gateway enable

[ce2-vbdif10]arp collect host enable

[ce2-vbdif10]quit

[ce2]interface vbdif 20

[ce2-vbdif20]ip binding ***-instance bd10

[ce2-vbdif20]ip address 10.2.2.254 255.255.255.0

[ce2-vbdif20]mac-address 0000-1111-0001    \\實機使用0000-5e00-000X來做虛擬MAC

[ce2-vbdif20]vxlan anycast-gateway enable

[ce2-vbdif20]arp collect host enable

[ce2-vbdif20]quit

[ce2]commit


ce3

[ce3]interface vbdif 20

[ce3-vbdif20]ip binding ***-instance bd10

[ce3-vbdif20]ip address 10.2.2.254 255.255.255.0

[ce3-vbdif20]mac-address 0000-1111-0001

[ce3-vbdif20]vxlan anycast-gateway enable

[ce3-vbdif20]arp collect host enable

[ce3-vbdif20]quit

[ce3]commit


12.配置BGP對等體路由類型

ce2

[ce2]bgp 1

[ce2-bgp]l2***-family e***

[ce2-bgp-af-e***]peer 3.3.3.3 advertise irb

[ce2-bgp-af-e***]quit

[ce2-bgp]quit

[ce2]commit


ce3

[ce3]bgp 1

[ce3-bgp]l2***-family e***

[ce3-bgp-af-e***]peer 2.2.2.2 advertise irb

[ce3-bgp-af-e***]quit

[ce3-bgp]quit

[ce3]commit

13.狀態檢查

1)ce3上隧道狀態查看

CE3上查看隧道狀態.PNG

2)PC3連通性測試

PC3連通性測試.PNG

3)CE2上查看主機路由信息

CE2查看主機路由信息.PNG

3)CE3上查看主機路由信息

CE3上查看主機路由信息.PNG

這是一個基本的VXLAN分佈式網關示例。

如有資料需要和實驗討論還請查看我的簽名信息,進行聯繫。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章