PE2: PE2(config)#router ospf 1 vrf vpn2 PE2(config)#redistribute bgp 100 subnets //將 BGP 重分發(fā)入 OSPF 中 PE2(config)#network 172.16.1.1 0.0.0.0 area 0 將 B2 的 OSPF 重分發(fā)入 MP-BGP 中: PE2(config)#router bgp 100 PE2(config-router)#address-family ipv4 vrf vpn2 PE2(config-router-af)#redistribute ospf 1 vrf vpn2 配置 CE 與 PE 端的 BGP 路由協(xié)議: R5: R5(config)#int l0 R5(config-if)#ip add 8.8.8.8 255.255.255.0 R5(config)#router bgp 200 R5(config-router)#neighbor 66.66.66.66 remote-as 100 R5(config-router)#neighbor 66.66.66.66 ebgp-multihop 10 R5(config-router)#neighbor 66.66.66.66 update-source Loopback R5(config)#ip route 66.66.66.0 255.255.255.0 Serial1/0 PE2(直接通過(guò) MP-BGP 學(xué)習(xí)對(duì)方路由): PE2(config)#int l0 PE2(config-if)#ip vrf forwarding vpn3 PE2(config-if)#ip add 66.66.66.66 255.255.255.0 PE2(config)#router bgp 200 PE2(config-router)#address-family ipv4 vrf vpn3 PE2(config-router-af)#neighbor 8.8.8.8 remote-as 200 PE2(config-router-af)#neighbor 8.8.8.8 ebgp-multihop 10 PE2(config-router-af)#neighbor 8.8.8.8 update-source Loopback1 PE2(config-router-af)#neighbor 8.8.8.8 activate PE2(config-router-af)#network 192.168.1.0 mask 255.255.255.0 PE2(config)#ip route vrf vpn3 8.8.8.0 255.255.255.0 Serial1/2 查看 A 公司的路由表: R1#show ip rou Gateway of last resort is not set 172.16.0.0/24 is subnetted, 2 subnets R 172.16.1.0 [120/1] via 10.1.1.1, 00:00:02, Serial1/0 10.0.0.0/24 is subnetted, 2 subnets C 10.2.2.0 is directly connected, Loopback0 C 10.1.1.0 is directly connected, Serial1/0 R 192.168.1.0/24 [120/1] via 10.1.1.1, 00:00:02, Serial1/0 R4#show ip rou Gateway of last resort is not set 172.16.0.0/24 is subnetted, 2 subnets C 172.16.1.0 is directly connected, Serial1/0 C 172.16.2.0 is directly connected, Loopback0 10.0.0.0/24 is subnetted, 2 subnets R 10.1.1.0 [120/1] via 172.16.1.1, 00:00:21, Serial1/0 R5#show ip rou Gateway of last resort is not set 66.0.0.0/24 is subnetted, 1 subnets S 66.66.66.0 is directly connected, Serial1/0 8.0.0.0/24 is subnetted, 1 subnets C 8.8.8.0 is directly connected, Loopback0 10.0.0.0/24 is subnetted, 2 subnets B 10.1.1.0 [20/0] via 66.66.66.66, 00:18:48 C 192.168.1.0/24 is directly connected, Serial1/0 總部 A1 通過(guò) MPLS-VPN 學(xué)到了兩個(gè)A 公司分部的路由,分部 A2 和A3 只學(xué)到了總部 A1 的路由。因此 A2 和A3 可以和A1 通信,但它們相互之間不能通信。 6、配置 B 公司總分部之間的幀中繼 FR-SW: FR-SW(config)#frame-relay switching FR-SW(config)#interface Serial1/0 FR-SW(config-if)#encapsulation frame-relay FR-SW(config-if)#frame-relay intf-type dce FR-SW(config-if)#frame-relay route 201 interface Serial1/1 102 FR-SW(config)#interface Serial1/1 FR-SW(config-if)#encapsulation frame-relay FR-SW(config-if)#frame-relay intf-type dce FR-SW(config-if)#frame-relay route 102 interface Serial1/0 201 R7: R7(config)#interface Serial1/1 R7(config-if)#ip address 10.2.1.1 255.255.255.0 R7(config-if)#encapsulation frame-relay R7(config-if)#ip ospf network point-to-point //在幀中繼環(huán)境下設(shè)置為 OSPF 點(diǎn)到點(diǎn)模式 R7(config-if)#ip ospf 1 area 0 R7(config-if)#frame-relay map ip 10.2.1.2 102 broadcast R7(config-if)#no frame-relay inverse-arp R6: R6(config)#interface Serial1/1 R6(config-if)#ip address 10.2.1.2 255.255.255.0 R6(config-if)#encapsulation frame-relay R6(config-if)#ip ospf network point-to-point //在幀中繼環(huán)境下設(shè)置為 OSPF 點(diǎn)到點(diǎn)模式 R6(config-if)#ip ospf 1 area 0 R6(config-if)#frame-relay map ip 10.2.1.1 201 broadcast R6(config-if)#no frame-relay inverse-arp 查看幀中繼建立情況: R10#show frame-relay rou Input Intf Input Dlci Output Intf Output Dlci Status Serial1/0 201 Serial1/1 102 active Serial1/1 102 Serial1/0 201 active 查看 B 公司路由表: R7#show ip rou Gateway of last resort is not set 3.0.0.0/24 is subnetted, 1 subnets C 3.3.3.0 is directly connected, Loopback0 172.16.0.0/24 is subnetted, 1 subnets O 172.16.1.0 [110/164] via 10.2.1.2, 00:22:15, Serial1/1 9.0.0.0/32 is subnetted, 1 subnets O 9.9.9.9 [110/101] via 10.2.1.2, 00:22:15, Serial1/1 10.0.0.0/24 is subnetted, 2 subnets C 10.2.1.0 is directly connected, Serial1/1 C 10.1.1.0 is directly connected, Serial1/0 7、確保 B 公司更傾向于走 MPLS –VPN 由于 B 公司的 MPLS VPN 和幀中繼都是起的 OSPF,所以可以通過(guò)修改鏈路的 OSPF 開(kāi)銷(xiāo)值來(lái) 決定數(shù)據(jù)走哪一條鏈路,哪條開(kāi)銷(xiāo)值小走哪一條。 R7(config)#interface Serial1/1 R7(config-if)#ip ospf cost 100 R6(config)#interface Serial1/1 R6(config-if)#ip ospf cost 100 通過(guò) traceroute 查看數(shù)據(jù)走哪一條鏈路: R3#traceroute 9.9.9.9 source 3.3.3.3 Type escape sequence to abort. Tracing the route to 9.9.9.9 1 10.1.1.1 556 msec 160 msec 576 msec 2 100.1.1.2 1532 msec 1028 msec 2004 msec 3 100.2.2.2 1264 msec 1296 msec 2072 msec 4 172.16.1.1 1348 msec 1404 msec 1140 msec 5 172.16.1.2 1860 msec 1516 msec 1640 msec 可以發(fā)現(xiàn) B 公司的流量是優(yōu)先通過(guò) MPLS VPN 傳輸?shù)? |
南寧市大學(xué)東路162號(hào)東盟財(cái)經(jīng)廣場(chǎng)1402
0771-3185755(服務(wù)時(shí)間:9:00-17:30)
admin@sail-lab.net
前 臺(tái):0771-3185755
培訓(xùn)部:15994437962
認(rèn)證部:15994437962
技術(shù)部:15578317196