主要分为两大步骤:
首先配置路由协议(注意:rip只支持主类)
R3
rip 100
undo summary
version 2
network 34.0.0.0
network 3.0.0.0
R4
rip 100
undo summary
version 2
network 34.0.0.0
network 4.0.0.0
network 45.0.0.0
R5
rip 100
undo summary
version 2
network 45.0.0.0
network 5.0.0.0
接着配置ingress、tranmit 、egress
R3
static-lsp ingress 3to5 destination 5.5.5.5 32 outgoing-interface GigabitEtherne
t0/0/0 nexthop 34.1.1.4 out-label 304
R4
static-lsp transit 3to5 incoming-interface GigabitEthernet0/0/0 in-label 304 out
going-interface GigabitEthernet2/0/0 nexthop 45.1.1.5 out-label 405
R5
static-lsp egress 3to5 incoming-interface GigabitEthernet2/0/0 in-label 405
最后测试
<r3>ping -c 1 -a 3.3.3.3 5.5.5.5
PING 5.5.5.5: 56 data bytes, press CTRL_C to break
Reply from 5.5.5.5: bytes=56 Sequence=1 ttl=254 time=60 ms
--- 5.5.5.5 ping statistics ---
1 packet(s) transmitted
1 packet(s) received
0.00% packet loss
round-trip min/avg/max = 60/60/60 ms