PE-CE间路由协议
拓扑
接口配置
R1
Router>en
Router
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)
R1(config)
R1(config-if)
R1(config-if)
R1(config-if)
R1(config-if)
R2
Router>en
Router
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)
R2(config)
R2(config-if)
R2(config-if)
R2(config-if)
R2(config-if)
R2(config-if)
R2(config-if)
R2(config-if)
R3
Router>en
Router
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)
R3(config)
R3(config-if)
R3(config-if)
R3(config-if)
R3(config-if)
R3(config-if)
R3(config-if)
R3(config-if)
R4
Router>en
Router
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)
R4(config)
R4(config-if)
R4(config-if)
R4(config-if)
R4(config-if)
R4(config-if)
R4(config-if)
R4(config-if)
R5
Router>en
Router
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)
R5(config)
R5(config-if)
R5(config-if)
R5(config-if)
R5(config-if)
MPLS域配置eigrp
MPLS域之间配置eigrp进行保证环回口可以通讯
R2
R2(config)
R2(config-router)
R2(config-router)
R2(config-router)
R3
R3(config)
R3(config-router)
R3(config-router)
R3(config-router)
R3(config-router)
R4
R4(config)
R4(config-router)
R4(config-router)
R4(config-router)
配置MPLS域
R2
R2(config)
R2(config)
R2(config)
R2(config)
R2(config)
R2(config-if)
R3
R3(config)
R3(config)
R3(config)
R3(config)
R3(config)
R3(config-if)
R3(config-if)
R3(config-if)
R4
R4(config)
R4(config)
R4(config)
R4(config)
R4(config)
R4(config-if)
查看mpls域配置情况
R2
R2
Interface IP Tunnel Operational
FastEthernet0/1 Yes (ldp) No Yes
R2
Peer LDP Ident: 3.3.3.3:0; Local LDP Ident 2.2.2.2:0
TCP connection: 3.3.3.3.57787 - 2.2.2.2.646
State: Oper; Msgs sent/rcvd: 17/16; Downstream
Up time: 00:07:26
LDP discovery sources:
FastEthernet0/1, Src IP addr: 23.1.1.3
Addresses bound to peer LDP Ident:
23.1.1.3 34.1.1.3 3.3.3.3
R2
tib entry: 2.2.2.2/32, rev 4
local binding: tag: imp-null
remote binding: tsr: 3.3.3.3:0, tag: 16
tib entry: 3.3.3.3/32, rev 6
local binding: tag: 17
remote binding: tsr: 3.3.3.3:0, tag: imp-null
tib entry: 4.4.4.4/32, rev 8
local binding: tag: 18
remote binding: tsr: 3.3.3.3:0, tag: 17
tib entry: 12.1.1.0/24, rev 12
local binding: tag: imp-null
tib entry: 23.1.1.0/24, rev 10
local binding: tag: imp-null
remote binding: tsr: 3.3.3.3:0, tag: imp-null
tib entry: 34.1.1.0/24, rev 2
local binding: tag: 16
remote binding: tsr: 3.3.3.3:0, tag: imp-null
R2
Local Outgoing Prefix Bytes tag Outgoing Next Hop
tag tag or VC or Tunnel Id switched interface
16 Pop tag 34.1.1.0/24 0 Fa0/1 23.1.1.3
17 Pop tag 3.3.3.3/32 0 Fa0/1 23.1.1.3
18 17 4.4.4.4/32 0 Fa0/1 23.1.1.3
R3
R3
Interface IP Tunnel Operational
FastEthernet0/0 Yes (ldp) No Yes
FastEthernet0/1 Yes (ldp) No Yes
R3
Peer LDP Ident: 2.2.2.2:0; Local LDP Ident 3.3.3.3:0
TCP connection: 2.2.2.2.646 - 3.3.3.3.57787
State: Oper; Msgs sent/rcvd: 16/17; Downstream
Up time: 00:07:05
LDP discovery sources:
FastEthernet0/0, Src IP addr: 23.1.1.2
Addresses bound to peer LDP Ident:
12.1.1.2 23.1.1.2 2.2.2.2
Peer LDP Ident: 4.4.4.4:0; Local LDP Ident 3.3.3.3:0
TCP connection: 4.4.4.4.63273 - 3.3.3.3.646
State: Oper; Msgs sent/rcvd: 14/15; Downstream
Up time: 00:05:20
LDP discovery sources:
FastEthernet0/1, Src IP addr: 34.1.1.4
Addresses bound to peer LDP Ident:
45.1.1.4 34.1.1.4 4.4.4.4
R3
tib entry: 2.2.2.2/32, rev 4
local binding: tag: 16
remote binding: tsr: 2.2.2.2:0, tag: imp-null
remote binding: tsr: 4.4.4.4:0, tag: 16
tib entry: 3.3.3.3/32, rev 6
local binding: tag: imp-null
remote binding: tsr: 2.2.2.2:0, tag: 17
remote binding: tsr: 4.4.4.4:0, tag: 17
tib entry: 4.4.4.4/32, rev 8
local binding: tag: 17
remote binding: tsr: 2.2.2.2:0, tag: 18
remote binding: tsr: 4.4.4.4:0, tag: imp-null
tib entry: 12.1.1.0/24, rev 11
remote binding: tsr: 2.2.2.2:0, tag: imp-null
tib entry: 23.1.1.0/24, rev 10
local binding: tag: imp-null
remote binding: tsr: 2.2.2.2:0, tag: imp-null
remote binding: tsr: 4.4.4.4:0, tag: 18
tib entry: 34.1.1.0/24, rev 2
local binding: tag: imp-null
remote binding: tsr: 2.2.2.2:0, tag: 16
remote binding: tsr: 4.4.4.4:0, tag: imp-null
tib entry: 45.1.1.0/24, rev 12
remote binding: tsr: 4.4.4.4:0, tag: imp-null
R3
Local Outgoing Prefix Bytes tag Outgoing Next Hop
tag tag or VC or Tunnel Id switched interface
16 Pop tag 2.2.2.2/32 0 Fa0/0 23.1.1.2
17 Pop tag 4.4.4.4/32 0 Fa0/1 34.1.1.4
R4
R4
Interface IP Tunnel Operational
FastEthernet0/1 Yes (ldp) No Yes
R4
Peer LDP Ident: 3.3.3.3:0; Local LDP Ident 4.4.4.4:0
TCP connection: 3.3.3.3.646 - 4.4.4.4.63273
State: Oper; Msgs sent/rcvd: 14/13; Downstream
Up time: 00:05:03
LDP discovery sources:
FastEthernet0/1, Src IP addr: 34.1.1.3
Addresses bound to peer LDP Ident:
23.1.1.3 34.1.1.3 3.3.3.3
R4
tib entry: 2.2.2.2/32, rev 4
local binding: tag: 16
remote binding: tsr: 3.3.3.3:0, tag: 16
tib entry: 3.3.3.3/32, rev 6
local binding: tag: 17
remote binding: tsr: 3.3.3.3:0, tag: imp-null
tib entry: 4.4.4.4/32, rev 8
local binding: tag: imp-null
remote binding: tsr: 3.3.3.3:0, tag: 17
tib entry: 23.1.1.0/24, rev 10
local binding: tag: 18
remote binding: tsr: 3.3.3.3:0, tag: imp-null
tib entry: 34.1.1.0/24, rev 2
local binding: tag: imp-null
remote binding: tsr: 3.3.3.3:0, tag: imp-null
tib entry: 45.1.1.0/24, rev 12
local binding: tag: imp-null
R4
Local Outgoing Prefix Bytes tag Outgoing Next Hop
tag tag or VC or Tunnel Id switched interface
16 16 2.2.2.2/32 0 Fa0/1 34.1.1.3
17 Pop tag 3.3.3.3/32 0 Fa0/1 34.1.1.3
18 Pop tag 23.1.1.0/24 0 Fa0/1 34.1.1.3
PE设备配置VRF
配置RD:RT信息
R2
R2(config)
R2(config-vrf)
R2(config-vrf)
R2(config-vrf)
R2(config-vrf)
R2(config)
R2(config-if)
% Interface FastEthernet0/0 IP address 12.1.1.2 removed due to enabling VRF SITE1 //由于地址被删除了需要重新配置
R2(config-if)
R4
R4(config)
R4(config-vrf)
R4(config-vrf)
R4(config-vrf)
R4(config-vrf)
R4(config)
R4(config-if)
R4(config-if)
PE-CE间路由协议-Static
配置PE-CE路由(static)
R2
R2(config)
R4
R4(config)
R1
R1(config)
R5
R5(config)
查看路由情况
R2
R2
Routing Table: SITE1
Codes: C - connected, S - static, 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
i - IS-IS, su - IS-IS summary, 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 not set
12.0.0.0/24 is subnetted, 1 subnets
C 12.1.1.0 is directly connected, FastEthernet0/0
S 192.168.1.0/24 [1/0] via 12.1.1.1
R4
R4
Routing Table: SITE2
Codes: C - connected, S - static, 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
i - IS-IS, su - IS-IS summary, 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 not set
S 192.168.5.0/24 [1/0] via 45.1.1.5
45.0.0.0/24 is subnetted, 1 subnets
C 45.1.1.0 is directly connected, FastEthernet0/0
配置VPNV4
R2
R2(config)
R2(config-router)
R2(config-router)
R2(config-router)
R2(config-router)
R2(config-router)
R2(config-router-af)
R4
R4(config)
R4(config-router)
R4(config-router)
R4(config-router)
R4(config-router)
R4(config-router)
R4(config-router-af)
查看邻居状态
####R2
R2
BGP router identifier 2.2.2.2, local AS number 100
BGP table version is 1, main routing table version 1
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
4.4.4.4 4 100 26 26 1 0 0 00:22:32 0
R4
R4
BGP router identifier 4.4.4.4, local AS number 100
BGP table version is 1, main routing table version 1
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
2.2.2.2 4 100 26 26 1 0 0 00:22:28 0
重分布
R2
R2(config)
R2(config-router)
R2(config-router-af)
R4
R4(config)
R4(config-router)
R4(config-router-af)
查看重分布后的路由情况
R2
R2
Routing Table: SITE1
Codes: C - connected, S - static, 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
i - IS-IS, su - IS-IS summary, 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 not set
B 192.168.5.0/24 [200/0] via 4.4.4.4, 00:02:02
12.0.0.0/24 is subnetted, 1 subnets
C 12.1.1.0 is directly connected, FastEthernet0/0
S 192.168.1.0/24 [1/0] via 12.1.1.1
R4
R4
Routing Table: SITE2
Codes: C - connected, S - static, 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
i - IS-IS, su - IS-IS summary, 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 not set
S 192.168.5.0/24 [1/0] via 45.1.1.5
B 192.168.1.0/24 [200/0] via 2.2.2.2, 00:01:34
45.0.0.0/24 is subnetted, 1 subnets
C 45.1.1.0 is directly connected, FastEthernet0/0
vpn测试
R1
R1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.5.5, timeout is 2 seconds:
Packet sent with a source address of 192.168.1.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 52/63/88 ms
R5
R5
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:
Packet sent with a source address of 192.168.5.5
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 124/149/172 ms
标签情况
R2
Network Next Hop In label/Out label
Route Distinguisher: 1:1 (SITE1)
192.168.1.0 12.1.1.1 19/nolabel //这里是19是
192.168.5.0 4.4.4.4 nolabel/19
Route Distinguisher: 2:2
192.168.5.0 4.4.4.4 nolabel/19 //这里是4.4.4.4送过来的
R4
Network Next Hop In label/Out label
Route Distinguisher: 1:1
192.168.1.0 2.2.2.2 nolabel/19
Route Distinguisher: 2:2 (SITE2)
192.168.1.0 2.2.2.2 nolabel/19
192.168.5.0 45.1.1.5 19/nolabel
R3
Local Outgoing Prefix Bytes tag Outgoing Next Hop
tag tag or VC or Tunnel Id switched interface
16 Pop tag 2.2.2.2/32 3208 Fa0/0 23.1.1.2
17 Pop tag 4.4.4.4/32 7704 Fa0/1 34.1.1.4
PE-CE间路由协议-OSPF
配置PE-CE路由(ospf)
R2
R2(config)
R2(config-router)
R4
R4(config)
R4(config-router)
R1
R1(config)
R1(config-router)
R1(config-router)
R5
R5(config)
R5(config-router)
R5(config-router)
查看路由情况
R2
R2
Neighbor ID Pri State Dead Time Address Interface
192.168.1.1 1 FULL/DR 00:00:33 12.1.1.1 FastEthernet0/0
R4
R4
Neighbor ID Pri State Dead Time Address Interface
192.168.5.5 1 FULL/DR 00:00:37 45.1.1.5 FastEthernet0/0
配置VPNV4
R2
R2(config)
R2(config-router)
R2(config-router)
R2(config-router)
R2(config-router)
R2(config-router)
R2(config-router-af)
R4
R4(config)
R4(config-router)
R4(config-router)
R4(config-router)
R4(config-router)
R4(config-router)
R4(config-router-af)
查看邻居状态
R2
R2
BGP router identifier 2.2.2.2, local AS number 100
BGP table version is 8, main routing table version 8
3 network entries using 420 bytes of memory
3 path entries using 204 bytes of memory
3/2 BGP path/bestpath attribute entries using 372 bytes of memory
2 BGP extended community entries using 48 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
Bitfield cache entries: current 1 (at peak 2) using 32 bytes of memory
BGP using 1076 total bytes of memory
BGP activity 4/1 prefixes, 4/1 paths, scan interval 15 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
4.4.4.4 4 100 68 67 8 0 0 00:37:13 1
R4
R4
BGP router identifier 4.4.4.4, local AS number 100
BGP table version is 5, main routing table version 5
3 network entries using 420 bytes of memory
3 path entries using 204 bytes of memory
3/2 BGP path/bestpath attribute entries using 372 bytes of memory
2 BGP extended community entries using 48 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
Bitfield cache entries: current 1 (at peak 1) using 32 bytes of memory
BGP using 1076 total bytes of memory
BGP activity 3/0 prefixes, 3/0 paths, scan interval 15 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
2.2.2.2 4 100 42 43 5 0 0 00:37:21 1
重分布
R2
R2(config)
R2(config-router)
R2(config-router-af)
R2(config)
R2(config-router)
R4
R4(config)
R4(config-router)
R4(config-router-af)
R4(config)
R4(config-router)
vpn测试
R1
R1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.5.5, timeout is 2 seconds:
Packet sent with a source address of 192.168.1.1
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 24/53/76 ms
R5
R5
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:
Packet sent with a source address of 192.168.5.5
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 44/52/60 ms
标签情况
R2
Network Next Hop In label/Out label
Route Distinguisher: 1:1 (SITE1)
12.1.1.0/24 0.0.0.0 19/aggregate(SITE1)
45.1.1.0/24 4.4.4.4 nolabel/20
192.168.1.1/32 12.1.1.1 20/nolabel
192.168.5.5/32 4.4.4.4 nolabel/19
Route Distinguisher: 2:2
45.1.1.0/24 4.4.4.4 nolabel/20
192.168.5.5/32 4.4.4.4 nolabel/19
R4
Network Next Hop In label/Out label
Route Distinguisher: 1:1
12.1.1.0/24 2.2.2.2 nolabel/19
192.168.1.1/32 2.2.2.2 nolabel/20
Route Distinguisher: 2:2 (SITE2)
12.1.1.0/24 2.2.2.2 nolabel/19
45.1.1.0/24 0.0.0.0 20/aggregate(SITE2)
192.168.1.1/32 2.2.2.2 nolabel/20
192.168.5.5/32 45.1.1.5 19/nolabel
R3
Local Outgoing Prefix Bytes tag Outgoing Next Hop
tag tag or VC or Tunnel Id switched interface
16 Pop tag 2.2.2.2/32 9381 Fa0/0 23.1.1.2
17 Pop tag 4.4.4.4/32 16803 Fa0/1 34.1.1.4
PE-CE间路由协议-BGP
配置VPNV4
R2
R2(config)
R2(config-router)
R2(config-router)
R2(config-router)
R2(config-router)
R2(config-router)
R2(config-router-af)
R4
R4(config)
R4(config-router)
R4(config-router)
R4(config-router)
R4(config-router)
R4(config-router)
R4(config-router-af)
配置PE-CE路由(bgp)
R2
R2(config)
R2(config-router)
R2(config-router-af)
R2(config-router-af)
R4
R4(config)
R4(config-router)
R4(config-router-af)
R4(config-router-af)
R1
R1(config)
R1(config-router)
R1(config-router)
R1(config-router)
R1(config-router)
R5
R5(config)
R5(config-router)
R5(config-router)
R5(config-router)
R5(config-router)
查看邻居状态
R2
R2
BGP router identifier 2.2.2.2, local AS number 100
BGP table version is 29, main routing table version 29
3 network entries using 420 bytes of memory
3 path entries using 204 bytes of memory
4/2 BGP path/bestpath attribute entries using 496 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
2 BGP extended community entries using 48 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
Bitfield cache entries: current 2 (at peak 2) using 64 bytes of memory
BGP using 1256 total bytes of memory
BGP activity 13/10 prefixes, 13/10 paths, scan interval 15 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
4.4.4.4 4 100 162 161 29 0 0 02:03:39 1
12.1.1.1 4 200 20 20 29 0 0 00:15:58 1
R4
R4
BGP router identifier 4.4.4.4, local AS number 100
BGP table version is 26, main routing table version 26
3 network entries using 420 bytes of memory
3 path entries using 204 bytes of memory
4/2 BGP path/bestpath attribute entries using 496 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
2 BGP extended community entries using 48 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
Bitfield cache entries: current 2 (at peak 2) using 64 bytes of memory
BGP using 1256 total bytes of memory
BGP activity 12/9 prefixes, 12/9 paths, scan interval 15 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
2.2.2.2 4 100 137 138 26 0 0 02:04:33 1
45.1.1.5 4 200 21 21 26 0 0 00:16:45 1
配置bgp是不需要配置重分布,但是在我们的设计的时候两边的as号是一样的都是200,默认是不接收与自己相同as号的路由条目,解决方式
1、As-override:把AS-PATH含有的和CE AS号相同的AS号,全部替换成自己的AS号。(在PE设备配置)
R2
R2(config)
R2(config-router)
R2(config-router-af)
R4
R4(config)
R4(config-router)
R4(config-router-af)
2、Allowas-in 表示允许接收BGP条目中含有几次自己的AS-PATH (在CE设备配置)
R1
R1(config)
R1(config-router)
R5
R5(config)
R5(config-router)
vpn测试
R1
R1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.5.5, timeout is 2 seconds:
Packet sent with a source address of 192.168.1.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 60/73/92 ms
R5
R5
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:
Packet sent with a source address of 192.168.5.5
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 40/57/76 ms
标签情况
R2
Network Next Hop In label/Out label
Route Distinguisher: 1:1 (SITE1)
192.168.1.0 12.1.1.1 20/nolabel
192.168.5.0 4.4.4.4 nolabel/19
Route Distinguisher: 2:2
192.168.5.0 4.4.4.4 nolabel/19
R4
Network Next Hop In label/Out label
Route Distinguisher: 1:1
192.168.1.0 2.2.2.2 nolabel/20
Route Distinguisher: 2:2 (SITE2)
192.168.1.0 2.2.2.2 nolabel/20
192.168.5.0 45.1.1.5 19/nolabel
R3
Local Outgoing Prefix Bytes tag Outgoing Next Hop
tag tag or VC or Tunnel Id switched interface
16 Pop tag 2.2.2.2/32 16621 Fa0/0 23.1.1.2
17 Pop tag 4.4.4.4/32 27607 Fa0/1 34.1.1.4
PE-CE间路由协议-RIP
配置PE-CE路由(rip)
R2
R2(config)
R2(config-router)
R2(config-router-af)
R2(config-router-af)
R2(config-router-af)
R4
R4(config)
R4(config-router)
R4(config-router-af)
R4(config-router-af)
R4(config-router-af)
R1
R1(config)
R1(config-router)
R1(config-router)
R1(config-router)
R1(config-router)
R5
R5(config)
R5(config-router)
R5(config-router)
R5(config-router)
R5(config-router)
配置VPNV4
R2
R2(config)
R2(config-router)
R2(config-router)
R2(config-router)
R2(config-router)
R2(config-router)
R2(config-router-af)
R4
R4(config)
R4(config-router)
R4(config-router)
R4(config-router)
R4(config-router)
R4(config-router)
R4(config-router-af)
查看邻居状态
R2
R2
BGP router identifier 2.2.2.2, local AS number 100
BGP table version is 16, main routing table version 16
6 network entries using 840 bytes of memory
6 path entries using 408 bytes of memory
5/4 BGP path/bestpath attribute entries using 620 bytes of memory
2 BGP extended community entries using 48 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
Bitfield cache entries: current 1 (at peak 2) using 32 bytes of memory
BGP using 1948 total bytes of memory
BGP activity 9/3 prefixes, 9/3 paths, scan interval 15 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
4.4.4.4 4 100 28 28 16 0 0 00:18:13 2
R4
R4
BGP router identifier 4.4.4.4, local AS number 100
BGP table version is 16, main routing table version 16
6 network entries using 840 bytes of memory
6 path entries using 408 bytes of memory
5/4 BGP path/bestpath attribute entries using 620 bytes of memory
2 BGP extended community entries using 48 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
Bitfield cache entries: current 1 (at peak 2) using 32 bytes of memory
BGP using 1948 total bytes of memory
BGP activity 9/3 prefixes, 9/3 paths, scan interval 15 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
2.2.2.2 4 100 28 28 16 0 0 00:18:18 2
重分布
R2
R2(config)
R2(config-router)
R2(config-router-af)
R2(config)
R2(config-router)
R2(config-router-af)
R4
R4(config)
R4(config-router)
R4(config-router-af)
R4(config)
R4(config-router)
R4(config-router-af)
查看重分布之后的路由情况
R2
R2
BGP table version is 16, local router ID is 2.2.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
Route Distinguisher: 1:1 (default for vrf SITE1)
*> 12.1.1.0/24 0.0.0.0 0 32768 ?
*>i45.1.1.0/24 4.4.4.4 0 100 0 ?
*> 192.168.1.0 12.1.1.1 1 32768 ?
*>i192.168.5.0 4.4.4.4 1 100 0 ?
R4
R4
BGP table version is 16, local router ID is 4.4.4.4
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
Route Distinguisher: 2:2 (default for vrf SITE2)
*>i12.1.1.0/24 2.2.2.2 0 100 0 ?
*> 45.1.1.0/24 0.0.0.0 0 32768 ?
*>i192.168.1.0 2.2.2.2 1 100 0 ?
*> 192.168.5.0 45.1.1.5 1 32768 ?
vpn测试
R1
R1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.5.5, timeout is 2 seconds:
Packet sent with a source address of 192.168.1.1
.!!!
Success rate is 60 percent (3/5), round-trip min/avg/max = 20/46/72 ms
R5
R5
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:
Packet sent with a source address of 192.168.5.5
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 52/64/72 ms
标签情况
R2
Network Next Hop In label/Out label
Route Distinguisher: 1:1 (SITE1)
12.1.1.0/24 0.0.0.0 19/aggregate(SITE1)
45.1.1.0/24 4.4.4.4 nolabel/20
192.168.1.0 12.1.1.1 20/nolabel
192.168.5.0 4.4.4.4 nolabel/19
Route Distinguisher: 2:2
45.1.1.0/24 4.4.4.4 nolabel/20
192.168.5.0 4.4.4.4 nolabel/19
R4
Network Next Hop In label/Out label
Route Distinguisher: 1:1
12.1.1.0/24 2.2.2.2 nolabel/19
192.168.1.0 2.2.2.2 nolabel/20
Route Distinguisher: 2:2 (SITE2)
12.1.1.0/24 2.2.2.2 nolabel/19
45.1.1.0/24 0.0.0.0 20/aggregate(SITE2)
192.168.1.0 2.2.2.2 nolabel/20
192.168.5.0 45.1.1.5 19/nolabel
R3
Local Outgoing Prefix Bytes tag Outgoing Next Hop
tag tag or VC or Tunnel Id switched interface
16 Pop tag 2.2.2.2/32 5562 Fa0/0 23.1.1.2
17 Pop tag 4.4.4.4/32 4384 Fa0/1 34.1.1.4
PE-CE间路由协议-EIGRP
配置PE-CE路由(eigrp)
R2
R2(config)
R2(config-router)
R2(config-router)
R2(config-router-af)
R2(config-router-af)
R2(config-router-af)
R4
R4(config)
R4(config-router)
R4(config-router)
R4(config-router-af)
R4(config-router-af)
R4(config-router-af)
R1
R1(config)
R1(config)
R1(config-router)
R1(config-router)
R1(config-router)
R5
R5(config)
R5(config-router)
R5(config-router)
R5(config-router)
配置VPNV4
R2
R2(config)
R2(config-router)
R2(config-router)
R2(config-router)
R2(config-router)
R2(config-router)
R2(config-router-af)
R4
R4(config)
R4(config-router)
R4(config-router)
R4(config-router)
R4(config-router)
R4(config-router)
R4(config-router-af)
查看邻居状态
R2
R2
IP-EIGRP neighbors for process 100
H Address Interface Hold Uptime SRTT RTO Q Seq
(sec) (ms) Cnt Num
0 23.1.1.3 Fa0/1 13 00:35:51 23 675 0 19
####R4
R4
IP-EIGRP neighbors for process 100
H Address Interface Hold Uptime SRTT RTO Q Seq
(sec) (ms) Cnt Num
0 34.1.1.3 Fa0/1 12 00:36:43 20 200 0 17
重分布
R2
R2(config)
R2(config-router)
R2(config-router-af)
R2(config-router-af)
R2(config-router)
R2(config-router-af)
R4
R4(config)
R4(config-router)
R4(config-router-af)
R4(config-router-af)
R4(config-router)
R4(config-router-af)
查看重分布之后的路由情况
R2
R2
Routing Table: SITE1
Codes: C - connected, S - static, 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
i - IS-IS, su - IS-IS summary, 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 not set
B 192.168.5.0/24 [200/409600] via 4.4.4.4, 00:03:02
12.0.0.0/24 is subnetted, 1 subnets
C 12.1.1.0 is directly connected, FastEthernet0/0
D 192.168.1.0/24 [90/409600] via 12.1.1.1, 00:13:21, FastEthernet0/0
45.0.0.0/24 is subnetted, 1 subnets
B 45.1.1.0 [200/0] via 4.4.4.4, 00:03:02
R4
R4
*Mar 1 00:44:18.223: %SYS-5-CONFIG_I: Configured from console by console
Routing Table: SITE2
Codes: C - connected, S - static, 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
i - IS-IS, su - IS-IS summary, 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 not set
D 192.168.5.0/24 [90/409600] via 45.1.1.5, 00:13:37, FastEthernet0/0
12.0.0.0/24 is subnetted, 1 subnets
B 12.1.1.0 [200/0] via 2.2.2.2, 00:05:53
B 192.168.1.0/24 [200/409600] via 2.2.2.2, 00:05:53
45.0.0.0/24 is subnetted, 1 subnets
C 45.1.1.0 is directly connected, FastEthernet0/0
vpn测试
R1
R1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.5.5, timeout is 2 seconds:
Packet sent with a source address of 192.168.1.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 136/148/172 ms
R5
R5
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:
Packet sent with a source address of 192.168.5.5
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 32/52/72 ms
标签情况
R1
Type escape sequence to abort.
Tracing the route to 192.168.5.5
1 12.1.1.2 56 msec 60 msec 84 msec
2 23.1.1.3 [MPLS: Labels 17/19 Exp 0] 144 msec 176 msec 168 msec
3 45.1.1.4 [MPLS: Label 19 Exp 0] 152 msec 100 msec 100 msec
4 45.1.1.5 152 msec 112 msec *
|