IP靜態(tài)浮動路由 Floating Static Route
本文主要給大家主要介紹了對于路由器的IP浮動靜態(tài)路由如何進行設置,并且給出了原理圖和具體的而配置命令行,下面文章將給你詳細介紹。
Intention:使用浮動靜態(tài)路由(Floating Static Route)讓全網(wǎng)互聯(lián),正常情況下,R1 發(fā)往R3的數(shù)據(jù)包
從e0/0(192.168.12.0)走,當e0/0斷開后,R1會自動切換到e0/1(192.168.21.0),當e0/0
開啟后,R1又會自動切換到浮動靜態(tài)路由e0/0口。
(R1 Configuration:)
!
!
interface Loopback0
ip address 1.1.1.1 255.255.255.255
!
interface Ethernet0/0
ip address 192.168.12.1 255.255.255.0
shutdown
half-duplex
!
interface Ethernet0/1
ip address 192.168.21.1 255.255.255.0
half-duplex
!
ip route 3.3.3.3 255.255.255.255 192.168.12.2
ip route 3.3.3.3 255.255.255.255 192.168.21.2 50
ip route 192.168.23.0 255.255.255.0 192.168.12.2
ip route 192.168.23.0 255.255.255.0 192.168.21.2 50
!
!
(R2 Configuration:)
!
interface Ethernet0/0
ip address 192.168.12.2 255.255.255.0
half-duplex
!
interface Ethernet0/1
ip address 192.168.21.2 255.255.255.0
half-duplex
!
interface Ethernet0/2
ip address 192.168.23.2 255.255.255.0
half-duplex
!
ip route 3.3.3.3 255.255.255.255 192.168.23.3
!
!
(R3 Configuration:)
!
interface Loopback0
ip address 3.3.3.3 255.255.255.255
!
interface Ethernet0/2
ip address 192.168.23.3 255.255.255.0
half-duplex
!
ip route 192.168.12.0 255.255.255.0 192.168.23.2
ip route 192.168.21.0 255.255.255.0 192.168.23.2
!
!
--------------------------------
(Inspect R1:)
r1#
r1#traceroute 3.3.3.3
Type escape sequence to abort.
Tracing the route to 3.3.3.3
1 192.168.12.2 124 msec 12 msec 48 msec
2 192.168.23.3 112 msec *160 msec
r1#
(將e0/0端口關閉 shutdown ethernet 0/0 port )
r1#
r1(config)#int e0/0
r1(config-if)#shutdown
r1#
r1#traceroute 3.3.3.3
Type escape sequence to abort.
Tracing the route to 3.3.3.3
1 192.168.21.2 144 msec 72 msec 20 msec
2 192.168.23.3 80 msec *96 msec
r1#
(將e0/0端口重新開啟reopen ethernet 0/0 port )
r1#
r1#config t
r1(config)#int e0/0
r1(config-if)#no shutdown
r1#
r1#traceroute 3.3.3.3
Type escape sequence to abort.
Tracing the route to 3.3.3.3
1*
192.168.12.2 76 msec 76 msec
2 192.168.23.3 88 msec *120 msec
r1#
Notice: ip route 3.3.3.3 255.255.255.255 192.168.21.2 50(后面的50表示的是管理距離 It
represents"Distance metric for this route")