本案例采用ENSP模拟器的路由器产品来部署L3VPN的OPTION-A跨域的开局,具体需求如下:
(1)CE1与CE2同处于一个VPN中。
(2)采用OPTION-A跨域实现L3VPN。
(1)按照网络拓扑图配置IP地址和基础路由。
(2)ASBR-PE1与ASBR-PE2都做为对端是本端的CE设备。
(3)ASBR-PE与PE建立MP-BGP邻居关系。
(1)基础网络配置:
CE1:
<Huawei>u t m
Info: Current terminal monitor is off.
<Huawei>u t d
Info: Current terminal debugging is off.
<Huawei>system
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname CE1
[CE1]int eth 0/0/0
[CE1-Ethernet0/0/0]ip address 10.0.0.1 30
[CE1-Ethernet0/0/0]quit
[CE1]bgp 100
[CE1-bgp]router-id 10.0.0.1
[CE1-bgp]peer 10.0.0.2 as-number 200
[CE1-bgp]peer 10.0.0.2 connect-interface eth 0/0/0
[CE1-bgp]ipv4-family unicast
[CE1-bgp-af-ipv4]peer 10.0.0.2 enable
[CE1-bgp-af-ipv4]import-route direct
[CE1-bgp-af-ipv4]quit
[CE1-bgp]quit
CE2:
<Huawei>u t m
Info: Current terminal monitor is off.
<Huawei>u t d
Info: Current terminal debugging is off.
<Huawei>system
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname CE2
[CE2]int eth 0/0/0
[CE2-Ethernet0/0/0]ip address 10.0.0.5 30
[CE2-Ethernet0/0/0]quit
[CE2]bgp 101
[CE2-bgp]router-id 10.0.0.5
[CE2-bgp]peer 10.0.0.6 as-number 201
[CE2-bgp]peer 10.0.0.6 connect-interface eth 0/0/0
[CE2-bgp]ipv4-family unicast
[CE2-bgp-af-ipv4]peer 10.0.0.6 enable
[CE2-bgp-af-ipv4]import-route direct
[CE2-bgp-af-ipv4]quit
[CE2-bgp]quit
PE1:
<Huawei>u t m
Info: Current terminal monitor is off.
<Huawei>u t d
Info: Current terminal debugging is off.
<Huawei>system
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname PE1
[PE1]int loopback 0
[PE1-LoopBack0]ip address 1.1.1.1 32
[PE1-LoopBack0]quit
[PE1]int eth 0/0/1
[PE1-Ethernet0/0/1]ip address 10.1.1.1 30
[PE1-Ethernet0/0/1]quit
[PE1]ospf 1 router-id 1.1.1.1
[PE1-ospf-1]area 0.0.0.0
[PE1-ospf-1-area-0.0.0.0]network 10.1.1.0 0.0.0.3
[PE1-ospf-1-area-0.0.0.0]network 1.1.1.1 0.0.0.0
[PE1-ospf-1-area-0.0.0.0]quit
[PE1-ospf-1]quit
PE2:
<Huawei>u t m
Info: Current terminal monitor is off.
<Huawei>u t d
Info: Current terminal debugging is off.
<Huawei>system
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname PE2
[PE2]int loopback 0
[PE2-LoopBack0]ip address 4.4.4.4 32
[PE2-LoopBack0]quit
[PE2]int eth 0/0/1
[PE2-Ethernet0/0/1]ip address 10.1.1.9 30
[PE2-Ethernet0/0/1]quit
[PE2]ospf 1 router-id 4.4.4.4
[PE2-ospf-1]area 0.0.0.0
[PE2-ospf-1-area-0.0.0.0]network 10.1.1.8 0.0.0.3
[PE2-ospf-1-area-0.0.0.0]network 4.4.4.4 0.0.0.0
[PE2-ospf-1-area-0.0.0.0]quit
[PE2-ospf-1]quit
ASBR-PE1:
<Huawei>u t m
Info: Current terminal monitor is off.
<Huawei>u t d
Info: Current terminal debugging is off.
<Huawei>system
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname ASBR-PE1
[ASBR-PE1]int loopback 0
[ASBR-PE1-LoopBack0]ip address 2.2.2.2 32
[ASBR-PE1-LoopBack0]quit
[ASBR-PE1]int eth 0/0/1
[ASBR-PE1-Ethernet0/0/1]ip address 10.1.1.2 30
[ASBR-PE1-Ethernet0/0/1]quit
[ASBR-PE1]ospf 1 router-id 2.2.2.2
[ASBR-PE1-ospf-1]area 0.0.0.0
[ASBR-PE1-ospf-1-area-0.0.0.0]network 10.1.1.0 0.0.0.3
[ASBR-PE1-ospf-1-area-0.0.0.0]network 2.2.2.2 0.0.0.0
[ASBR-PE1-ospf-1-area-0.0.0.0]quit
[ASBR-PE1-ospf-1]quit
ASBR-PE2:
<Huawei>u t m
Info: Current terminal monitor is off.
<Huawei>u t d
Info: Current terminal debugging is off.
<Huawei>system
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname ASBR-PE2
[ASBR-PE2]int loopback 0
[ASBR-PE2-LoopBack0]ip address 3.3.3.3 32
[ASBR-PE2-LoopBack0]quit
[ASBR-PE2]int eth 0/0/1
[ASBR-PE2-Ethernet0/0/1]ip address 10.1.1.10 30
[ASBR-PE2-Ethernet0/0/1]quit
[ASBR-PE2]ospf 1 router-id 3.3.3.3
[ASBR-PE2-ospf-1]area 0.0.0.0
[ASBR-PE2]ospf 1
[ASBR-PE2-ospf-1]area 0.0.0.0
[ASBR-PE2-ospf-1-area-0.0.0.0]network 10.1.1.8 0.0.0.3
[ASBR-PE2-ospf-1-area-0.0.0.0]network 3.3.3.3 0.0.0.0
[ASBR-PE2-ospf-1-area-0.0.0.0]quit
[ASBR-PE2-ospf-1]quit
(2)配置PE1、PE2、ASBR-PE1、ASBR-PE2的MPLS和MPLS LDP。
PE1:
[PE1]mpls lsr-id 1.1.1.1
[PE1]mpls
[PE1-mpls]mpls ldp
[PE1-mpls-ldp]quit
[PE1]int eth 0/0/1
[PE1-Ethernet0/0/1]mpls
[PE1-Ethernet0/0/1]mpls ldp
[PE1-Ethernet0/0/1]quit
PE2:
[PE2]mpls lsr-id 4.4.4.4
[PE2]mpls
[PE2-mpls]mpls ldp
[PE2-mpls-ldp]quit
[PE2]int eth 0/0/1
[PE2-Ethernet0/0/1]mpls
[PE2-Ethernet0/0/1]mpls ldp
[PE2-Ethernet0/0/1]quit
ASBR-PE1:
[ASBR-PE1]mpls
[ASBR-PE1-mpls]mpls ldp
[ASBR-PE1-mpls-ldp]quit
[ASBR-PE1]int eth 0/0/1
[ASBR-PE1-Ethernet0/0/1]mpls
[ASBR-PE1-Ethernet0/0/1]mpls ldp
[ASBR-PE1-Ethernet0/0/1]quit
ASBR-PE2:
[ASBR-PE2]mpls lsr-id 3.3.3.3
[ASBR-PE2]mpls
[ASBR-PE2-mpls]mpls ldp
[ASBR-PE2-mpls-ldp]quit
[ASBR-PE2]int eth 0/0/1
[ASBR-PE2-Ethernet0/0/1]mpls
[ASBR-PE2-Ethernet0/0/1]mpls ldp
[ASBR-PE2-Ethernet0/0/1]quit
(3)配置PE1与CE1的互联。
[PE1]ip vpn-instance vpn1
[PE1-vpn-instance-vpn1]route-distinguisher 100:1
[PE1-vpn-instance-vpn1-af-ipv4]vpn-target 100:1 both
[PE1-vpn-instance-vpn1-af-ipv4]quit
[PE1-vpn-instance-vpn1]quit
[PE1]int eth 0/0/0
[PE1-Ethernet0/0/0]ip binding vpn-instance vpn1
[PE1-Ethernet0/0/0]ip address 10.0.0.2 30
[PE1-Ethernet0/0/0]quit
[PE1]bgp 200
[PE1-bgp]router-id 1.1.1.1
[PE1-bgp]ipv4-family vpn-instance vpn1
[PE1-bgp-vpn1]router-id 10.0.0.2
[PE1-bgp-vpn1]peer 10.0.0.1 as-number 100
[PE1-bgp-vpn1]peer 10.0.0.1 connect-interface eth 0/0/0
[PE1-bgp-vpn1]import-route direct
[PE1-bgp-vpn1]quit
[PE1-bgp]quit
(4)配置PE2与CE2的互联。
PE2:
<PE2>sys
Enter system view, return user view with Ctrl+Z.
[PE2]ip vpn-instance vpn1
[PE2-vpn-instance-vpn1]route-distinguisher 100:1
[PE2-vpn-instance-vpn1-af-ipv4]vpn-target 100:1 both
[PE2-vpn-instance-vpn1-af-ipv4]quit
[PE2-vpn-instance-vpn1]quit
[PE2]int eth 0/0/0
[PE2-Ethernet0/0/0]ip binding vpn-instance vpn1
[PE2-Ethernet0/0/0]ip address 10.0.0.6 30
[PE2-Ethernet0/0/0]quit
[PE2]bgp 201
[PE2-bgp]ipv4-family vpn-instance vpn1
[PE2-bgp-vpn1]router-id 10.0.0.6
[PE2-bgp-vpn1]peer 10.0.0.5 as-number 101
[PE2-bgp-vpn1]peer 10.0.0.5 connect-interface eth 0/0/0
[PE2-bgp-vpn1]import-route direct
[PE2-bgp-vpn1]quit
[PE2-bgp]quit
(5)配置ASBR-PE1与ASBR-PE2的互联。
ASBR-PE1:
[ASBR-PE1]ip vpn-instance vpn1
[ASBR-PE1-vpn-instance-vpn1]route-distinguisher 100:1
[ASBR-PE1-vpn-instance-vpn1-af-ipv4]vpn-target 100:1 both
[ASBR-PE1-vpn-instance-vpn1-af-ipv4]quit
[ASBR-PE1-vpn-instance-vpn1]quit
[ASBR-PE1]int eth 0/0/0
[ASBR-PE1-Ethernet0/0/0]ip binding vpn-instance vpn1
[ASBR-PE1-Ethernet0/0/0]ip address 10.1.1.5 30
[ASBR-PE1-Ethernet0/0/0]quit
[ASBR-PE1]bgp 200
[ASBR-PE1-bgp]router-id 2.2.2.2
[ASBR-PE1-bgp]ipv4-family vpn-instance vpn1
[ASBR-PE1-bgp-vpn1]router-id 10.1.1.5
[ASBR-PE1-bgp-vpn1]peer 10.1.1.6 as-number 201
[ASBR-PE1-bgp-vpn1]peer 10.1.1.6 connect-interface eth 0/0/0
[ASBR-PE1-bgp-vpn1]import-route direct
[ASBR-PE1-bgp-vpn1]quit
[ASBR-PE1-bgp]quit
ASBR-PE2:
[ASBR-PE2]ip vpn-instance vpn1
[ASBR-PE2-vpn-instance-vpn1]route-distinguisher 100:1
[ASBR-PE2-vpn-instance-vpn1-af-ipv4]vpn-target 100:1 both
[ASBR-PE2-vpn-instance-vpn1-af-ipv4]quit
[ASBR-PE2-vpn-instance-vpn1]quit
[ASBR-PE2]int eth 0/0/0
[ASBR-PE2-Ethernet0/0/0]ip binding vpn-instance vpn1
[ASBR-PE2-Ethernet0/0/0]ip address 10.1.1.6 30
[ASBR-PE2-Ethernet0/0/0]quit
[ASBR-PE2]bgp 201
[ASBR-PE2-bgp]router-id 3.3.3.3
[ASBR-PE2-bgp]ipv4-family vpn-instance vpn1
[ASBR-PE2-bgp-vpn1]router-id 10.1.1.6
[ASBR-PE2-bgp-vpn1]peer 10.1.1.5 as-number 200
[ASBR-PE2-bgp-vpn1]peer 10.1.1.5 connect-interface eth 0/0/0
[ASBR-PE2-bgp-vpn1]import-route direct
[ASBR-PE2-bgp-vpn1]quit
[ASBR-PE2-bgp]quit
(6)配置PE1与ASBR-PE1的MP-BGP。
PE1:
[PE1]bgp 200
[PE1-bgp]peer 2.2.2.2 as-number 200
[PE1-bgp]peer 2.2.2.2 connect-interface LoopBack 0
[PE1-bgp]ipv4-family vpnv4
[PE1-bgp-af-vpnv4]peer 2.2.2.2 enable
[PE1-bgp-af-vpnv4]quit
[PE1-bgp]quit
ASBR-PE1:
[ASBR-PE1]bgp 200
[ASBR-PE1-bgp]peer 1.1.1.1 as-number 200
[ASBR-PE1-bgp]peer 1.1.1.1 connect-interface LoopBack0
[ASBR-PE1-bgp]ipv4-family vpnv4
[ASBR-PE1-bgp-af-vpnv4]peer 1.1.1.1 enable
[ASBR-PE1-bgp-af-vpnv4]quit
[ASBR-PE1-bgp]quit
(7)配置PE2与ASBR-PE2的MP-BGP。
PE2:
[PE2]bgp 201
[PE2-bgp]peer 3.3.3.3 as-number 201
[PE2-bgp]peer 3.3.3.3 connect-interface loopback 0
[PE2-bgp]ipv4-family vpnv4
[PE2-bgp-af-vpnv4]peer 3.3.3.3 enable
[PE2-bgp-af-vpnv4]quit
[PE2-bgp]quit
ASBR-PE2:
[ASBR-PE2]bgp 201
[ASBR-PE2-bgp]peer 4.4.4.4 as-number 201
[ASBR-PE2-bgp]peer 4.4.4.4 connect-interface loopback 0
[ASBR-PE2-bgp]ipv4-family vpnv4
[ASBR-PE2-bgp-af-vpnv4]peer 4.4.4.4 enable
[ASBR-PE2-bgp-af-vpnv4]quit
[ASBR-PE2-bgp]quit
(8)业务测试。
CE1与CE2能相互PING通。
查看CE1、CE2的路由表,均能看到对端传递过来的路由。
(9)显示信息查看。
使用dis bgp vpnv4 all peer命令分别查看所有PE设备的BGP邻居建立情况,均已完成建立。
使用dis bgp peer命令分别查看CE与PE的BGP邻居建立情况,已完成相应的建立。
至此,华为路由器MPLS VPN OPTION-A典型组网配置案例已完成!
该案例暂时没有网友评论
✖
案例意见反馈
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作