mpls traffic-eng tunnels no mpls traffic-eng auto-bw timers frequency 0 tag-switching tdp router-id Loopback0 ! ! ! ! interface Loopback0 ip address 10.10.10.1 255.255.255.255 no ip directed-broadcast ! interface Tunnel1 ip unnumbered Loopback0 no ip directed-broadcast tunnel source Loopback0 tunnel destination 10.10.20.2 tunnel mode mpls traffic-eng tunnel mpls traffic-eng PRiority 7 7 tunnel mpls traffic-eng bandwidth 200 tunnel mpls traffic-eng path-option 1 dynamic ! interface Tunnel2 ip unnumbered Loopback0 no ip directed-broadcast tunnel source Loopback0 tunnel destination 10.10.20.2 tunnel mode mpls traffic-eng tunnel mpls traffic-eng priority 7 7 tunnel mpls traffic-eng bandwidth 300 tunnel mpls traffic-eng path-option 1 dynamic ! interface Multilink1 ip address 10.10.12.1 255.255.255.0 no ip directed-broadcast mpls traffic-eng tunnels tag-switching ip ppp multilink multilink-group 1 ip rsvp bandwidth 300 300
router ospf 1 router-id 10.10.10.1 log-adjacency-changes nsf area 1 stub passive-interface Loopback0 network 10.10.10.0 0.0.0.255 area 0 network 10.10.11.0 0.0.0.255 area 0 network 10.10.12.0 0.0.0.255 area 0 network 10.10.13.0 0.0.0.255 area 0 network 10.10.15.0 0.0.0.255 area 1 mpls traffic-eng router-id Loopback0 mpls traffic-eng area 0 ! router rip version 2 network 100.0.0.0 network 222.222.222.0 ! router bgp 100 no synchronization bgp log-neighbor-changes neighbor 10.10.20.2 remote-as 100 neighbor 10.10.20.2 update-source Loopback0 neighbor 10.10.30.3 remote-as 100 neighbor 10.10.30.3 update-source Loopback0 no auto-summary !
ip classless ip route 10.10.24.44 255.255.255.255 Tunnel2 ip route 10.10.40.4 255.255.255.255 Tunnel1 ! ! logging 10.10.3.99 access-list 101 permit ip 100.100.100.0 0.0.0.255 200.200.200.0 0.0.0.255 route-map MPLStunnel permit 10 match interface FastEthernet2/0/0 set interface Tunnel2 ! route-map MPLStunnel permit 20 match interface FastEthernet2/0/1 set interface Tunnel1 !
5. 确认:
1. OSPF 流量工程:
R1#sh ip rou Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area * - candidate default, U - per-user static route, o - ODR
Gateway of last resort is not set
222.222.222.0/24 is variably subnetted, 2 subnets, 2 masks C 222.222.222.2/32 is directly connected, Serial4/1/3 C 222.222.222.0/24 is directly connected, Serial4/1/3 100.0.0.0/24 is subnetted, 2 subnets C 100.100.100.0 is directly connected, FastEthernet10/0/0 C 100.100.110.0 is directly connected, FastEthernet10/0/1 10.0.0.0/8 is variably subnetted, 19 subnets, 2 masks O 10.10.3.0/24 [110/2] via 10.10.13.3, 00:02:25, POS4/0/0 C 10.10.11.0/24 is directly connected, FastEthernet2/0/0 C 10.10.10.1/32 is directly connected, Loopback0 C 10.10.12.0/24 is directly connected, Multilink1 C 10.10.13.0/24 is directly connected, POS4/0/0 C 10.10.12.2/32 is directly connected, Multilink1 C 10.10.15.0/24 is directly connected, FastEthernet2/0/1 --More-- O IA 10.10.22.0/24 [110/3] via 10.10.13.3, 00:02:26, POS4/0/0 O 10.10.20.2/32 [110/3] via 10.10.13.3, 00:02:26, POS4/0/0 O 10.10.23.0/24 [110/2] via 10.10.13.3, 00:02:26, POS4/0/0 O 10.10.24.0/24 [110/3] via 10.10.13.3, 00:02:26, POS4/0/0 O IA 10.10.26.0/24 [110/18] via 10.10.13.3, 00:02:26, POS4/0/0 O 10.10.30.3/32 [110/2] via 10.10.13.3, 00:02:26, POS4/0/0 O 10.10.33.0/24 [110/2] via 10.10.13.3, 00:02:26, POS4/0/0 S 10.10.40.4/32 is directly connected, Tunnel1 S 10.10.24.44/32 is directly connected, Tunnel2 O 10.10.50.5/32 [110/2] via 10.10.15.5, 00:04:51, FastEthernet2/0/1 O E2 10.10.99.0/24 [110/20] via 10.10.13.3, 00:02:26, POS4/0/0 O 10.10.100.0/24 [110/3] via 10.10.13.3, 00:02:27, POS4/0/0 R1# sh mpls tr R1# sh mpls traffic-eng tu
Name: R1_t1 (Tunnel1) Destination: 10.10.20.2 Status: Admin: up Oper: up Path: valid Signalling: connected
path option 1, type dynamic (Basis for Setup, path weight 21)
Type escape sequence to abort. Tracing the route to 10.10.24.44
1 10.10.15.1 [MPLS: Label 20 Exp 0] 0 msec 0 msec 4 msec 2 10.10.13.3 [MPLS: Label 22 Exp 0] 0 msec 0 msec 4 msec 3 10.10.23.2 0 msec 0 msec 4 msec 4 10.10.24.44 0 msec 0 msec * R5-3640#sh ip rou Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area * - candidate default, U - per-user static route, o - ODR P - periodic downloaded static route
Gateway of last resort is 10.10.15.1 to network 0.0.0.0
10.0.0.0/8 is variably subnetted, 16 subnets, 2 masks O IA 10.10.3.0/24 [110/3] via 10.10.15.1, 00:07:55, FastEthernet0/0 O IA 10.10.11.0/24 [110/2] via 10.10.15.1, 00:07:55, FastEthernet0/0 O IA 10.10.10.1/32 [110/2] via 10.10.15.1, 00:07:55, FastEthernet0/0 O IA 10.10.12.0/24 [110/22] via 10.10.15.1, 00:07:55, FastEthernet0/0 O IA 10.10.13.0/24 [110/2] via 10.10.15.1, 00:07:55, FastEthernet0/0 C 10.10.15.0/24 is directly connected, FastEthernet0/0 O IA 10.10.22.0/24 [110/4] via 10.10.15.1, 00:07:55, FastEthernet0/0 O IA 10.10.20.2/32 [110/4] via 10.10.15.1, 00:07:55, FastEthernet0/0 O IA 10.10.23.0/24 [110/3] via 10.10.15.1, 00:07:55, FastEthernet0/0 O IA 10.10.24.0/24 [110/4] via 10.10.15.1, 00:07:55, FastEthernet0/0 O IA 10.10.26.0/24 [110/19] via 10.10.15.1, 00:07:55, FastEthernet0/0 O IA 10.10.30.3/32 [110/3] via 10.10.15.1, 00:07:55, FastEthernet0/0 O IA 10.10.33.0/24 [110/3] via 10.10.15.1, 00:07:56, FastEthernet0/0 O IA 10.10.40.4/32 [110/5] via 10.10.15.1, 00:07:56, FastEthernet0/0 C 10.10.50.0/24 is directly connected, Loopback0 O IA 10.10.100.0/24 [110/4] via 10.10.15.1, 00:07:56, FastEthernet0/0 O*IA 0.0.0.0/0 [110/2] via 10.10.15.1, 00:07:56, FastEthernet0/0
2. OSPF:
R5-3640#sh ip rou Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area * - candidate default, U - per-user static route, o - ODR P - periodic downloaded static route
Gateway of last resort is 10.10.15.1 to network 0.0.0.0
10.0.0.0/8 is variably subnetted, 16 subnets, 2 masks O IA 10.10.3.0/24 [110/3] via 10.10.15.1, 00:07:55, FastEthernet0/0 O IA 10.10.11.0/24 [110/2] via 10.10.15.1, 00:07:55, FastEthernet0/0 O IA 10.10.10.1/32 [110/2] via 10.10.15.1, 00:07:55, FastEthernet0/0 O IA 10.10.12.0/24 [110/22] via 10.10.15.1, 00:07:55, FastEthernet0/0 O IA 10.10.13.0/24 [110/2] via 10.10.15.1, 00:07:55, FastEthernet0/0 C 10.10.15.0/24 is directly connected, FastEthernet0/0 O IA 10.10.22.0/24 [110/4] via 10.10.15.1, 00:07:55, FastEthernet0/0 O IA 10.10.20.2/32 [110/4] via 10.10.15.1, 00:07:55, FastEthernet0/0 O IA 10.10.23.0/24 [110/3] via 10.10.15.1, 00:07:55, FastEthernet0/0 O IA 10.10.24.0/24 [110/4] via 10.10.15.1, 00:07:55, FastEthernet0/0 O IA 10.10.26.0/24 [110/19] via 10.10.15.1, 00:07:55, FastEthernet0/0 O IA 10.10.30.3/32 [110/3] via 10.10.15.1, 00:07:55, FastEthernet0/0 O IA 10.10.33.0/24 [110/3] via 10.10.15.1, 00:07:56, FastEthernet0/0 O IA 10.10.40.4/32 [110/5] via 10.10.15.1, 00:07:56, FastEthernet0/0 C 10.10.50.0/24 is directly connected, Loopback0 O IA 10.10.100.0/24 [110/4] via 10.10.15.1, 00:07:56, FastEthernet0/0 O*IA 0.0.0.0/0 [110/2] via 10.10.15.1, 00:07:56, FastEthernet0/0 R5-3640#sh ip pos ospf da
OSPF Router with ID (10.10.50.5) (Process ID 1)
Router Link States (Area 1)
Link ID ADV Router Age Seq# Checksum Link count 10.10.10.1 10.10.10.1 500 0x80000010 0x8D0D 1 10.10.50.5 10.10.50.5 504 0x80000011 0x7F62 2
Net Link States (Area 1)
Link ID ADV Router Age Seq# Checksum 10.10.15.5 10.10.50.5 504 0x80000001 0xC697
[Connection to 10.10.50.5 closed by foreign host] R1#sh ip rou Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area * - candidate default, U - per-user static route, o - ODR
Gateway of last resort is not set
222.222.222.0/24 is variably subnetted, 2 subnets, 2 masks C 222.222.222.2/32 is directly connected, Serial4/1/3 C 222.222.222.0/24 is directly connected, Serial4/1/3 100.0.0.0/24 is subnetted, 2 subnets C 100.100.100.0 is directly connected, FastEthernet10/0/0 C 100.100.110.0 is directly connected, FastEthernet10/0/1 10.0.0.0/8 is variably subnetted, 19 subnets, 2 masks O 10.10.3.0/24 [110/2] via 10.10.13.3, 00:05:57, POS4/0/0 C 10.10.11.0/24 is directly connected, FastEthernet2/0/0 C 10.10.10.1/32 is directly connected, Loopback0 C 10.10.12.0/24 is directly connected, Multilink1 C 10.10.13.0/24 is directly connected, POS4/0/0 C 10.10.12.2/32 is directly connected, Multilink1 C 10.10.15.0/24 is directly connected, FastEthernet2/0/1 --More-- O IA 10.10.22.0/24 [110/3] via 10.10.13.3, 00:05:58, POS4/0/0 O 10.10.20.2/32 [110/3] via 10.10.13.3, 00:05:58, POS4/0/0 O 10.10.23.0/24 [110/2] via 10.10.13.3, 00:05:58, POS4/0/0 O 10.10.24.0/24 [110/3] via 10.10.13.3, 00:05:58, POS4/0/0 O IA 10.10.26.0/24 [110/18] via 10.10.13.3, 00:05:58, POS4/0/0 O 10.10.30.3/32 [110/2] via 10.10.13.3, 00:05:58, POS4/0/0 O 10.10.33.0/24 [110/2] via 10.10.13.3, 00:05:58, POS4/0/0 S 10.10.40.4/32 is directly connected, Tunnel1 S 10.10.24.44/32 is directly connected, Tunnel2 O 10.10.50.5/32 [110/2] via 10.10.15.5, 00:08:23, FastEthernet2/0/1 O E2 10.10.99.0/24 [110/20] via 10.10.13.3, 00:05:58, POS4/0/0 O 10.10.100.0/24 [110/3] via 10.10.13.3, 00:05:59, POS4/0/0 R1#sh ip ospf nei
Neighbor ID Pri State Dead Time Address Interface 10.10.20.2 0 FULL/ - 00:00:36 10.10.12.2 Multilink1 10.10.30.3 0 FULL/ - 00:00:39 10.10.13.3 POS4/0/0 10.10.50.5 1 FULL/DR 00:00:38 10.10.15.5 FastEthernet2/0/1 R1#sh ip ospf inter Multilink1 is up, line protocol is up Internet Address 10.10.12.1/24, Area 0 Process ID 1, Router ID 10.10.10.1, Network Type POINT_TO_POINT, Cost: 21 Transmit Delay is 1 sec, State POINT_TO_POINT, Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5 Hello due in 00:00:03 Index 5/5, flood queue length 0 Next 0x0(0)/0x0(0) Last flood scan length is 1, maximum is 14 Last flood scan time is 0 msec, maximum is 0 msec Neighbor Count is 1, Adjacent neighbor count is 1
3. EBGP/IBGP
R2#sh ip bgp sum BGP router identifier 10.10.20.2, local AS number 100 BGP table version is 100001, main routing table version 100001 100000 network entries and 100000 paths using 14500000 bytes of memory 1 BGP path attribute entries using 56 bytes of memory 1 BGP AS-PATH entries using 24 bytes of memory 0 BGP route-map cache entries using 0 bytes of memory 0 BGP filter-list cache entries using 0 bytes of memory BGP activity 100000/476 prefixes, 100000/0 paths, scan interval 60 secs
R2#10.10.10.1 Trying 10.10.10.1 ... % Connection refused by remote host
R3#sh ip bgp sum BGP router identifier 10.10.30.3, local AS number 100 BGP table version is 1, main routing table version 1 100000 network entries and 100000 paths using 14500000 bytes of memory 1 BGP path attribute entries using 56 bytes of memory 1 BGP AS-PATH entries using 24 bytes of memory 0 BGP route-map cache entries using 0 bytes of memory 0 BGP filter-list cache entries using 0 bytes of memory BGP activity 100000/390 prefixes, 100000/0 paths, scan interval 60 secs
[Connection to 10.10.30.3 closed by foreign host] R1#sh ip bgp sum BGP router identifier 10.10.10.1, local AS number 100 BGP table version is 1, main routing table version 1 100000 network entries and 100000 paths using 14500000 bytes of memory 1 BGP path attribute entries using 56 bytes of memory 1 BGP AS-PATH entries using 24 bytes of memory 0 BGP route-map cache entries using 0 bytes of memory 0 BGP filter-list cache entries using 0 bytes of memory BGP activity 100000/112 prefixes, 100000/0 paths, scan interval 60 secs