实验目的:R1、R4、R5会产生环路风险,采用Soo技术避免环路。
说明:Ra与Rb的直连IP设置为ab.1.1.a/24与ab.1.1.b/24
例 R1的g0/0/0设为12.1.1.1/24 R2的g0/0/0设为12.1.1.2/24
各路由设备都有lo0:x.x.x.x /32
例 R1的lo0为 1.1.1.1/32
1.配置IGP (可采用is-is或ospf 解法略)
检查环回地址可通
2.配置MPLS LDP (mpls lsr-id 采用lo0地址 解法略)
检查标签
3.建立R1与R3的vpnv4邻居
R1:
bgp 100
router-id 1.1.1.1
undo default ipv4-unicast \\关闭ipv4-family地址族避免建立不必要的邻居关系
peer 3.3.3.3 as-number 100
peer 3.3.3.3 connect-interface LoopBack0
ipv4-family vpnv4
peer 3.3.3.3 enable
R3:
bgp 100
router-id 3.3.3.3
undo default ipv4-unicast
peer 1.1.1.1 as-number 100
peer 1.1.1.1 connect-interface LoopBack0
ipv4-family vpnv4
peer 1.1.1.1 enable
检查邻居关系 (Established 代表建立完成)
4.建立实例
R1:
ip vpn-instance 1 \\建立实例1
ipv4-family
route-distinguisher 1:1 \\建立RD值 1:1
vpn-target 45:6 export-extcommunity \\建立RT值 45:6 发
vpn-target 6:45 import-extcommunity \\建立RT值 6:45 收
R3:
ip vpn-instance 3
ipv4-family
route-distinguisher 3:3
vpn-target 6:45 export-extcommunity \\建立RT值 6:45 发
vpn-target 45:6 import-extcommunity \\建立RT值 45:6 收
5.接口绑定实例并配IP (会清除接口以配地址)
R1:
R3:
6.建立EBGP邻居(R1与R4、R5# R3与R6)
R1:
bgp 100
ipv4-family vpn-instance 1
peer 14.1.1.4 as-number 65001
peer 15.1.1.5 as-number 65001
R4:
bgp 65001
router-id 4.4.4.4
peer 14.1.1.1 as-number 100
R5:
bgp 65001
router-id 5.5.5.5
peer 15.1.1.1 as-number 100
R3:
bgp 100
ipv4-family vpn-instance 3
peer 36.1.1.6 as-number 65001
R6:
bgp 65001
router-id 6.6.6.6
peer 36.1.1.3 as-number 100
检查邻居关系
7:R4与R5建立IGP并建立公网bgp邻居 (略)
8:R6发布6.6.6.6/32 路由
R6:
bgp 65001
ipv4-family unicast
network 6.6.6.6 255.255.255.255
检查设备是否收到6.6.6.6路由
9:使用peer x.x.x.x substitute-as 替换as号 使得相同as号路由可以专递
R1:
bgp 100
ipv4-family vpn-instance 1
peer 14.1.1.4 substitute-as
peer 15.1.1.5 substitute-as
R3:
bgp 100
ipv4-family vpn-instance 3
peer 36.1.1.6 substitute-as
10:至此R4、R5可以收到6.6.6.6的路由
11:新问题产生。在R4上建立环回口lo1 :10.4.4.4/32 并发布路由;R1在收到10.4.4.4路由后又发给R5,产生路由环路
12.解决路由环路
R1:
ipv4-family vpn-instance 1
peer 14.1.1.4 as-number 65001
peer 14.1.1.4 soo 100:1
peer 15.1.1.5 as-number 65001
peer 15.1.1.5 soo 100:1