[r1]int lo0
[r1-LoopBack0]ip add 1.1.1.1 24
[r1]int g0/0/0
[r1-GigabitEthernet0/0/0]ip add 14.1.1.1 24
[r2]int lo0
[r2-LoopBack0]ip add 2.2.2.2 24
[r2]int g0/0/0
[r2-GigabitEthernet0/0/0]ip add 24.1.1.1 24
[r3]int lo0
[r3-LoopBack0]ip add 3.3.3.3 24
[r3]int g0/0/0
[r3-GigabitEthernet0/0/0]ip add 34.1.1.1 24
[r4]int lo0
[r4-LoopBack0]ip add 4.4.4.4 24
[r4]int g0/0/0
[r4-GigabitEthernet0/0/0]ip add 14.1.1.2 24
[r4]int g0/0/1
[r4-GigabitEthernet0/0/1]ip add 24.1.1.2 24
[r4]int g0/0/2
[r4-GigabitEthernet0/0/2]ip add 34.1.1.2 24
(查看)
[r1]rip 1
[r1-rip-1]ver 2
[r1-rip-1]network 14.0.0.0
[r1-rip-1]network 1.0.0.0
[r2]ospf 1 router-id 2.2.2.2
[r2-ospf-1]area 0
[r2-ospf-1-area-0.0.0.0]network 24.1.1.1 0.0.0.0
[r2-ospf-1-area-0.0.0.0]network 2.2.2.2 0.0.0.0
[r3]ospf 1 router-id 3.3.3.3
[r3-ospf-1]area 0 (进程只在本地有用)
[r3-ospf-1-area-0.0.0.0]network 34.1.1.1 0.0.0.0
[r3-ospf-1-area-0.0.0.0]network 3.3.3.3 0.0.0.0
[r4]rip 1
[r4-rip-1]ver 2
[r4-rip-1]network 14.0.0.0
[r4]ospf 1
[r4-ospf-1]area 0
[r4-ospf-1-area-0.0.0.0]network 24.1.1.2 0.0.0.0
[r4]ospf 2
[r4-ospf-2]area 0
[r4-ospf-2-area-0.0.0.0]network 34.1.1.2 0.0.0.0
(查看)
(1)重发布动态路由
[r4]rip 1
[r4-rip-1]import-route ospf 1
(定义总度量)
[r4-rip-1]import-route ospf 1 ?
cost Cost of the import route
route-policy Apply the specified route policy to filter route
[r4-rip-1]import-route ospf 1 cost 2
(2)重发布静态路由
[r4]ip route-static 0.0.0.0 0 LoopBack 0
[r4]ip route-static 99.1.1.0 24 LoopBack 0
[r4]rip 1
[r4-rip-1]import-route static
(3)重发布直连路由
[r4]rip 1
[r4-rip-1]import-route direct cost 6 (重发布直连路由优于其他重发布)
(1)重发布动态路由
[r4]ospf 1
[r4-ospf-1]import-route rip
[r4-ospf-1]import-route rip cost 2 type 1
(修改种子度量) 修改类型()
(2)重发布静态路由
[r4]ospf 1
[r4-ospf-1]import-route static
[r4-ospf-1]import-route static cost 2 type 1
(3)重发布直连路由
[r4]ospf 1
[r4-ospf-1]import-route direct
[r4-ospf-1]import-route direct cost 2 type 1