1.6 BGP EVPN方式分布式网关外部路由的引入

图片[1]-1.6 BGP EVPN方式分布式网关外部路由的引入-大赛人网
图1-2 BGP EVPN方式分布式网关外部路由的引入配置网络拓扑

1.CE1开启EVPN,配置BGP协议

[~CE1]evpn-overlay enable 
[*CE1]bgp 100
[~CE1-bgp]peer 3.3.3.3 as-number 100
[*CE1-bgp]peer 3.3.3.3 connect-interface LoopBack 0
[*CE1-bgp]l2vpn-family evpn 
[*CE1-bgp-af-evpn]peer 3.3.3.3 enable 
[~CE1-bgp-af-evpn]peer 3.3.3.3 advertise irb
//开启通告irb路由功能

2.CE2开启EVPN,配置BGP协议

[~CE2]evpn-overlay enable
[*CE2]bgp 100
[~CE2-bgp]peer 3.3.3.3 as-number 100
[*CE2-bgp]peer 3.3.3.3 connect-interface LoopBack 0
[*CE2-bgp]l2vpn-family evpn
[*CE2-bgp-af-evpn]peer 3.3.3.3 enable 
[~CE2-bgp-af-evpn]peer 3.3.3.3 advertise irb
//开启通告irb路由功能

3.CE3开启EVPN,配置BGP协议,CE3配置RR client

[~CE3]evpn-overlay enable
[*CE3]bgp 100
[*CE3-bgp]peer 1.1.1.1 as-number 100
[*CE3-bgp]peer 1.1.1.1 connect-interface LoopBack 0
[*CE3-bgp]peer 2.2.2.2 as-number 100
[*CE3-bgp]peer 2.2.2.2 connect-interface LoopBack 0
[*CE3-bgp]l2vpn-family evpn
[*CE3-bgp-af-evpn]peer 1.1.1.1 enable
[*CE3-bgp-af-evpn]peer 2.2.2.2 enable 
[*CE3-bgp-af-evpn]peer 1.1.1.1 reflect-client           
[*CE3-bgp-af-evpn]peer 2.2.2.2 reflect-client
[*CE3-bgp-af-evpn]undo policy vpn-target 
//关闭RT策略过滤
[~CE3-bgp-af-evpn]peer 1.1.1.1 advertise irb
[*CE3-bgp-af-evpn]peer 2.2.2.2 advertise irb
//开启通告irb路由功能

4.CE1配置BD域,创建业务接入点,放入不同域中

[*CE1]bridge-domain 10
[*CE1-bd10]vxlan vni 10
[*CE1-bd10]evpn 
[*CE1-bd10-evpn]route-distinguisher 100:10
[*CE1-bd10-evpn]vpn-target 100:10

[*CE1]bridge-domain 20
[*CE1-bd20]vxlan vni 20
[*CE1-bd20]evpn
[*CE1-bd20-evpn]route-distinguisher 100:20
[*CE1-bd20-evpn]vpn-target 100:20

[*CE1]interface GE 1/0/0
[*CE1-GE1/0/0]undo shutdown 
[*CE1]interface GE 1/0/0.10 mode l2 
[*CE1-GE1/0/0.10]encapsulation dot1q vid 10
[*CE1-GE1/0/0.10]bridge-domain 10
[*CE1]interface GE 1/0/0.20  mode l2
[*CE1-GE1/0/0.20]encapsulation dot1q vid 20
[*CE1-GE1/0/0.20]bridge-domain 20

5.CE2配置BD域,创建业务接入点,放入不同域中

[*CE2]bridge-domain 10
[*CE2-bd10]vxlan vni 10
[*CE2-bd10]evpn
[*CE2-bd10-evpn]route-distinguisher 100:10
[*CE2-bd10-evpn]vpn-target 100:10

[*CE2]bridge-domain 20
[*CE2-bd20]vxlan vni 20
[*CE2-bd20]evpn
[*CE2-bd20-evpn]route-distinguisher 100:20
[*CE2-bd20-evpn]vpn-target 100:20

[*CE2]interface GE 1/0/0
[*CE2-GE1/0/0]undo shutdown 
[*CE2]interface GE 1/0/0.10 mode l2
[*CE2-GE1/0/0.10]encapsulation dot1q vid 10
[*CE2-GE1/0/0.10]bridge-domain 10
[*CE2]interface GE 1/0/0.20  mode l2
[*CE2-GE1/0/0.20]encapsulation dot1q vid 20
[*CE2-GE1/0/0.20]bridge-domain 20

6.CE1配置三层VPN实例

[*CE1]ip vpn-instance dsrw
[*CE1-vpn-instance-dsrw]vxlan vni 5010
[*CE1-vpn-instance-dsrw]route-distinguisher 100:200
[*CE1-vpn-instance-dsrw-af-ipv4]vpn-target 100:200
[*CE1-vpn-instance-dsrw-af-ipv4]vpn-target 100:200 evpn
[*CE1]bridge-domain 10
[*CE1-bd10]evpn 
[*CE1-bd10-evpn]vpn-target 100:200 export-extcommunity 
//增加三层的RT值,交叉生成路由
[*CE1]bridge-domain 20
[*CE1-bd20]evpn 
[*CE1-bd20-evpn]vpn-target 100:200 export-extcommunity
//增加三层的RT值,交叉生成路由

7.CE1配置VBD接口,开启VXLAN分布式网关

[*CE1]interface Vbdif 10
[*CE1-Vbdif10]ip binding vpn-instance dsrw
[*CE1-Vbdif10]ip address 192.168.10.254 24
[*CE1-Vbdif10]mac-address 000-005e-0001
[*CE1-Vbdif10]vxlan anycast-gateway enable 
[*CE1-Vbdif10]arp collect host enable 

[*CE1]interface Vbdif 20
[*CE1-Vbdif20]ip binding vpn-instance dsrw
[*CE1-Vbdif20]ip address 192.168.20.254 24
[*CE1-Vbdif20]mac-address 000-005e-0002
[*CE1-Vbdif20]vxlan anycast-gateway enable
[*CE1-Vbdif20]arp collect host enable 

8.CE2配置三层VPN实例

[*CE2]ip vpn-instance dsrw
[*CE2-vpn-instance-dsrw]vxlan vni 5010
[*CE2-vpn-instance-dsrw]route-distinguisher 100:200
[*CE2-vpn-instance-dsrw-af-ipv4]vpn-target 100:200
[*CE2-vpn-instance-dsrw-af-ipv4]vpn-target 100:200 evpn
[*CE2]bridge-domain 10
[*CE2-bd10]evpn 
[*CE2-bd10-evpn]vpn-target 100:200 export-extcommunity 
[*CE2]bridge-domain 20
[*CE2-bd20]evpn
[*CE2-bd20-evpn]vpn-target 100:200 export-extcommunity

9.CE2配置VBD接口,开启VXLAN分布式网关

[*CE2]interface Vbdif 10
[*CE2-Vbdif10]ip binding vpn-instance dsrw
[*CE2-Vbdif10]ip address 192.168.10.254 24
[*CE2-Vbdif10]mac-address 000-005e-0001
[*CE2-Vbdif10]vxlan anycast-gateway enable 
[*CE2-Vbdif10]arp collect host enable 

[*CE2]interface Vbdif 20
[*CE2-Vbdif20]ip binding vpn-instance dsrw
[*CE2-Vbdif20]ip address 192.168.20.254 24
[*CE2-Vbdif20]mac-address 000-005e-0002
[*CE2-Vbdif20]vxlan anycast-gateway enable
[*CE2-Vbdif20]arp collect host enable 

10.CE1配置VXLAN隧道

[*CE1]interface Nve 1
[*CE1-Nve1]source 1.1.1.1
[*CE1-Nve1]vni 10 head-end peer-list protocol bgp 
[*CE1-Nve1]vni 20 head-end peer-list protocol bgp 
[*CE1]commit

11.CE2配置VXLAN隧道

[*CE2]interface Nve 1
[*CE2-Nve1]source 2.2.2.2
[*CE2-Nve1]vni 10 head-end peer-list protocol bgp
[*CE2-Nve1]vni 20 head-end peer-list protocol bgp
[*CE2]commit

12.CE3配置三层VPN实例,服务器接口和R1接口划入VPN

[~CE3]ip vpn-instance dsrw
[*CE3-vpn-instance-dsrw]vxlan vni 5020
[*CE3-vpn-instance-dsrw]route-distinguisher 100:300
[*CE3-vpn-instance-dsrw-af-ipv4]vpn-target 100:200
[*CE3-vpn-instance-dsrw-af-ipv4]vpn-target 100:200 evpn
[*CE3]interface GE 1/0/0
[*CE3-GE1/0/0]undo portswitch 
[*CE3-GE1/0/0]undo shutdown 
[*CE3-GE1/0/0]ip binding vpn-instance dsrw
[*CE3-GE1/0/0]ip address 10.1.1.254 24
[*CE3]interface GE 1/0/3
[*CE3-GE1/0/3]undo portswitch 
[*CE3-GE1/0/3]ip binding vpn-instance dsrw
[*CE3-GE1/0/3]ip address 172.16.1.254 24
[*CE3-GE1/0/3]undo shutdown

13.CE3配置静态路由

[~CE3]ip route-static vpn-instance dsrw 0.0.0.0 0.0.0.0 172.16.1.2

14.R1配置静态路由

[R1]interface GigabitEthernet 0/0/0
[R1-GigabitEthernet0/0/0]IP address 172.16.1.2 24
[R1]interface LoopBack 0
[R1-LoopBack0]IP address 11.11.11.11 32
[R1]ip route-static 192.168.0.0 16 172.16.1.1

15.CE3将直连路由和静态路由引入EVPN,配置NVE

[*CE3]bgp 100
[*CE3-bgp]ipv4-family vpn-instance dsrw 
[*CE3-bgp-dsrw]import-route direct 
[*CE3-bgp-dsrw]import-route static 
[*CE3-bgp-dsrw]advertise l2vpn evpn 
[*CE3]interface Nve 1
[*CE3-Nve1]source 3.3.3.3
[*CE3-Nve1]vni 10 head-end peer-list protocol bgp 
[*CE3-Nve1]vni 20 head-end peer-list protocol bgp 
[*CE3]commit

16.CE1、CE2、CE3的OSPF配置,SW1、SW2配置同上

17.PC1连通性测试

PC1>ping 11.11.11.11
Ping 11.11.11.11: 32 data bytes, Press Ctrl_C to break
From 11.11.11.11: bytes=32 seq=2 ttl=253 time=63 ms
PC1>ping 10.1.1.1
Ping 10.1.1.1: 32 data bytes, Press Ctrl_C to break
From 10.1.1.1: bytes=32 seq=2 ttl=253 time=31 ms
© 版权声明
THE END
喜欢就支持一下吧
点赞10 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称

    请登录后查看评论内容