1. 浮動靜態路由網絡
浮動靜態路由是一種特殊的靜態路由,經過配置一個比主路由的管理距離更大的靜態路由,保證網絡中主路由失效的狀況下,提供備份路由。但在主路由存在的狀況下它不會出如今路由表中。浮動靜態路由主要用 於拔號備份。靜態路由的用處是當以太鏈路優先選擇,當以太鏈路出現故障的時候,選用串行鏈路,而在以太鏈路恢復後,再優先選以太鏈路。async
案例:ide
配置信息:oop
[r1]dis cuui
Now create configuration...spa
Current configurationserver
!blog
version 1.74接口
sysname r1圖片
firewall enable
aaa-enable
aaa accounting-scheme optional
!
interface Aux0
async mode flow
link-protocol ppp
!
interface Ethernet0
loopback
ip address 192.168.1.1 255.255.255.0
ospf enable area 0.0.0.0
!
interface Ethernet1
!
interface Serial0
link-protocol ppp
ip address 192.168.3.1 255.255.255.0
ospf enable area 0.0.0.0
shutdown
!
interface Serial1
link-protocol ppp
ip address 192.168.4.1 255.255.255.0
!
ospf enable
!
quit
!
quit
ip route-static 192.168.2.0 255.255.255.0 192.168.4.2 preference 60
!
Return
[r2]dis cu
Now create configuration...
Current configuration
!
version 1.74
sysname r2
undo pos-server addr-switch
firewall enable
aaa-enable
aaa accounting-scheme optional
!
interface Aux0
async mode flow
link-protocol ppp
!
interface Ethernet0
loopback
ip address 192.168.2.1 255.255.255.0
ospf enable area 0.0.0.0
!
interface Ethernet1
!
interface Serial0
clock DTECLK1
link-protocol ppp
ip address 192.168.3.2 255.255.255.0
ospf enable area 0.0.0.0
!
interface Serial1
clock DTECLK1
link-protocol ppp
ip address 192.168.4.2 255.255.255.0
!
ospf enable
!
quit
!
quit
ip route-static 192.168.1.0 255.255.255.0 192.168.4.1 preference 60
!
Return
驗證信息:
主鏈路正常工做時的路由表
[r1]dis ip rou
Routing Tables:
Destination/Mask Proto Pref Metric Nexthop Interface
127.0.0.0/8 Direct 0 0 127.0.0.1 LoopBack0
127.0.0.1/32 Direct 0 0 127.0.0.1 LoopBack0
192.168.1.0/24 Direct 0 0 192.168.1.1 Ethernet0
192.168.1.1/32 Direct 0 0 127.0.0.1 LoopBack0
192.168.2.0/24 OSPF 10 1572 192.168.3.2 Serial0
192.168.3.0/24 Direct 0 0 192.168.3.2 Serial0
192.168.3.1/32 Direct 0 0 127.0.0.1 LoopBack0
192.168.3.2/32 Direct 0 0 192.168.3.2 Serial0
192.168.4.0/24 Direct 0 0 192.168.4.2 Serial1
192.168.4.1/32 Direct 0 0 127.0.0.1 LoopBack0
192.168.4.2/32 Direct 0 0 192.168.4.2 Serial1
[r2]dis ip rou
Routing Tables:
Destination/Mask Proto Pref Metric Nexthop Interface
127.0.0.0/8 Direct 0 0 127.0.0.1 LoopBack0
127.0.0.1/32 Direct 0 0 127.0.0.1 LoopBack0
192.168.1.0/24 OSPF 10 1572 192.168.3.1 Serial0
192.168.2.0/24 Direct 0 0 192.168.2.1 Ethernet0
192.168.2.1/32 Direct 0 0 127.0.0.1 LoopBack0
192.168.3.0/24 Direct 0 0 192.168.3.1 Serial0
192.168.3.1/32 Direct 0 0 192.168.3.1 Serial0
192.168.3.2/32 Direct 0 0 127.0.0.1 LoopBack0
192.168.4.0/24 Direct 0 0 192.168.4.1 Serial1
192.168.4.1/32 Direct 0 0 192.168.4.1 Serial1
192.168.4.2/32 Direct 0 0 127.0.0.1 LoopBack0
主鏈路有故障時的路由表
[r1]dis ip rou
Routing Tables:
Destination/Mask Proto Pref Metric Nexthop Interface
127.0.0.0/8 Direct 0 0 127.0.0.1 LoopBack0
127.0.0.1/32 Direct 0 0 127.0.0.1 LoopBack0
192.168.1.0/24 Direct 0 0 192.168.1.1 Ethernet0
192.168.1.1/32 Direct 0 0 127.0.0.1 LoopBack0
192.168.2.0/24 Static 60 0 192.168.4.2 Serial1
192.168.4.0/24 Direct 0 0 192.168.4.2 Serial1
192.168.4.1/32 Direct 0 0 127.0.0.1 LoopBack0
192.168.4.2/32 Direct 0 0 192.168.4.2 Serial1
[r2]dis ip rou
Routing Tables:
Destination/Mask Proto Pref Metric Nexthop Interface
127.0.0.0/8 Direct 0 0 127.0.0.1 LoopBack0
127.0.0.1/32 Direct 0 0 127.0.0.1 LoopBack0
192.168.1.0/24 Static 60 0 192.168.4.1 Serial1
192.168.2.0/24 Direct 0 0 192.168.2.1 Ethernet0
192.168.2.1/32 Direct 0 0 127.0.0.1 LoopBack0
192.168.4.0/24 Direct 0 0 192.168.4.1 Serial1
192.168.4.1/32 Direct 0 0 192.168.4.1 Serial1
192.168.4.2/32 Direct 0 0 127.0.0.1 LoopBack0
2. Back interface接口備份
備份接口是指有兩條一樣好的鏈路能夠提供給咱們走,爲了防止單點故障給咱們帶來不便,咱們把其中一條做爲主鏈路一條做爲備份鏈路,固然,這種鏈路的前提是計費按照流量來計算。
案例:
配置信息:
[r1]dis cu
Now create configuration...
Current configuration
!
version 1.74
sysname r1
firewall enable
aaa-enable
aaa accounting-scheme optional
!
interface Aux0
async mode flow
link-protocol ppp
!
interface Ethernet0
loopback
ip address 192.168.1.1 255.255.255.0
ospf enable area 0.0.0.0
!
interface Ethernet1
!
interface Serial0
link-protocol ppp
standby interface Serial 1(設置主鏈路接口的備份接口)
standby timer enable-delay 5 (設置主接口故障後幾秒後備份接口up)
standby timer disable-delay 5 (設置主接口up後幾秒後備份接口down)
ip address 192.168.3.1 255.255.255.0
ospf enable area 0.0.0.0
!
interface Serial1
link-protocol ppp
ip address 192.168.4.1 255.255.255.0
ospf enable area 0.0.0.0
!
ospf enable
!
quit
!
Return
[r2]dis cu
Now create configuration...
Current configuration
!
version 1.74
sysname r2
undo pos-server addr-switch
firewall enable
aaa-enable
aaa accounting-scheme optional
!
interface Aux0
async mode flow
link-protocol ppp
!
interface Ethernet0
loopback
ip address 192.168.2.1 255.255.255.0
ospf enable area 0.0.0.0
!
interface Ethernet1
!
interface Serial0
clock DTECLK1
link-protocol ppp
standby interface Serial 1(設置主鏈路接口的備份接口)
standby timer enable-delay 5 (設置主接口故障後幾秒後備份接口up)
standby timer disable-delay 5 (設置主接口up後幾秒後備份接口down)
ip address 192.168.3.2 255.255.255.0
ospf enable area 0.0.0.0
!
interface Serial1
clock DTECLK1
link-protocol ppp
ip address 192.168.4.2 255.255.255.0
ospf enable area 0.0.0.0
!
ospf enable
!
quit
!
Return
驗證信息:
主鏈路正常工做時的路由表
[r1]dis ip rou
Routing Tables:
Destination/Mask Proto Pref Metric Nexthop Interface
127.0.0.0/8 Direct 0 0 127.0.0.1 LoopBack0
127.0.0.1/32 Direct 0 0 127.0.0.1 LoopBack0
192.168.1.0/24 Direct 0 0 192.168.1.1 Ethernet0
192.168.1.1/32 Direct 0 0 127.0.0.1 LoopBack0
192.168.2.0/24 OSPF 10 1572 192.168.3.2 Serial0
192.168.3.0/24 Direct 0 0 192.168.3.2 Serial0
192.168.3.1/32 Direct 0 0 127.0.0.1 LoopBack0
192.168.3.2/32 Direct 0 0 192.168.3.2 Serial0
[r2]dis ip rou
Routing Tables:
Destination/Mask Proto Pref Metric Nexthop Interface
127.0.0.0/8 Direct 0 0 127.0.0.1 LoopBack0
127.0.0.1/32 Direct 0 0 127.0.0.1 LoopBack0
192.168.1.0/24 OSPF 10 1572 192.168.3.1 Serial0
192.168.2.0/24 Direct 0 0 192.168.2.1 Ethernet0
192.168.2.1/32 Direct 0 0 127.0.0.1 LoopBack0
192.168.3.0/24 Direct 0 0 192.168.3.1 Serial0
192.168.3.1/32 Direct 0 0 192.168.3.1 Serial0
192.168.3.2/32 Direct 0 0 127.0.0.1 LoopBack0
主鏈路出現故障時的路由表
[r1]dis ip rou
Routing Tables:
Destination/Mask Proto Pref Metric Nexthop Interface
127.0.0.0/8 Direct 0 0 127.0.0.1 LoopBack0
127.0.0.1/32 Direct 0 0 127.0.0.1 LoopBack0
192.168.1.0/24 Direct 0 0 192.168.1.1 Ethernet0
192.168.1.1/32 Direct 0 0 127.0.0.1 LoopBack0
192.168.2.0/24 OSPF 10 1572 192.168.4.2 Serial1
192.168.4.0/24 Direct 0 0 192.168.4.2 Serial1
192.168.4.1/32 Direct 0 0 127.0.0.1 LoopBack0
192.168.4.2/32 Direct 0 0 192.168.4.2 Serial1
[r2]dis ip rou
Routing Tables:
Destination/Mask Proto Pref Metric Nexthop Interface
127.0.0.0/8 Direct 0 0 127.0.0.1 LoopBack0
127.0.0.1/32 Direct 0 0 127.0.0.1 LoopBack0
192.168.1.0/24 OSPF 10 1572 192.168.4.1 Serial1
192.168.2.0/24 Direct 0 0 192.168.2.1 Ethernet0
192.168.2.1/32 Direct 0 0 127.0.0.1 LoopBack0
192.168.4.0/24 Direct 0 0 192.168.4.1 Serial1
192.168.4.1/32 Direct 0 0 192.168.4.1 Serial1
192.168.4.2/32 Direct 0 0 127.0.0.1 LoopBack0
3. Mp ppp捆綁
MP是Multi-Link PPP的縮寫,是將多個物理鏈路的PPP捆綁在同一個邏輯端口,旨在增長鏈路的帶寬,只要是支持PPP的物理鏈路均可以啓用MP,互相捆綁在同一個邏輯端口Virtual-Template口。MP容許將IP等網絡層的報文進行碎片處理,將碎片的報文經過多個鏈路傳輸,同時抵達同一個目的地,以求彙總全部鏈路的帶寬。
案例拓撲:
配置信息:
[r1]dis cu
Now create configuration...
Current configuration
!
version 1.74
sysname r1
firewall enable
aaa-enable
aaa accounting-scheme optional
!
interface Aux0
async mode flow
link-protocol ppp
!
interface Ethernet0
loopback
ip address 192.168.1.1 255.255.255.0
!
interface Ethernet1
!
interface Serial0
link-protocol ppp
ppp mp(進端口啓動mp)
ppp mp interface Virtual-Template1(把se0加入Virtual-Template1)
!
interface Serial1
link-protocol ppp
ppp mp(進端口啓動mp)
ppp mp interface Virtual-Template1(把se1加入Virtual-Template1)
!
interface Virtual-Template1
link-protocol ppp
ip address 192.168.3.1 255.255.255.0
!
voice-setup
!
subscriber-line 0
!
subscriber-line 1
!
quit
!
quit
ip route-static 192.168.2.0 255.255.255.0 192.168.3.2 preference 60
!
return
[r2]dis cu
Now create configuration...
Current configuration
!
version 1.74
sysname r2
undo pos-server addr-switch
firewall enable
aaa-enable
aaa accounting-scheme optional
!
interface Aux0
async mode flow
link-protocol ppp
!
interface Ethernet0
loopback
ip address 192.168.2.1 255.255.255.0
!
interface Ethernet1
!
interface Serial0
clock DTECLK1
link-protocol ppp
ppp mp (進端口啓動mp)
ppp mp interface Virtual-Template2(把se0加入Virtual-Template2)
shutdown
!
interface Serial1
clock DTECLK1
link-protocol ppp
ppp mp(進端口啓動mp)
ppp mp interface Virtual-Template2(把se1加入Virtual-Template2)
interface Virtual-Template2
link-protocol ppp
ip address 192.168.3.2 255.255.255.0
!
quit
ip route-static 192.168.1.0 255.255.255.0 192.168.3.1 preference 60
!
Return
驗證信息:
路由表信息
[r1]dis ip rou
Routing Tables:
Destination/Mask Proto Pref Metric Nexthop Interface
127.0.0.0/8 Direct 0 0 127.0.0.1 LoopBack0
127.0.0.1/32 Direct 0 0 127.0.0.1 LoopBack0
192.168.1.0/24 Direct 0 0 192.168.1.1 Ethernet0
192.168.1.1/32 Direct 0 0 127.0.0.1 LoopBack0
192.168.2.0/24 Static 60 0 192.168.3.2 Virtual-Template1
192.168.3.0/24 Direct 0 0 192.168.3.1 Virtual-Template1
192.168.3.1/32 Direct 0 0 127.0.0.1 LoopBack0
192.168.3.2/32 Direct 0 0 192.168.3.1 Virtual-Template1
[r2]dis ip rou
Routing Tables:
Destination/Mask Proto Pref Metric Nexthop Interface
127.0.0.0/8 Direct 0 0 127.0.0.1 LoopBack0
127.0.0.1/32 Direct 0 0 127.0.0.1 LoopBack0
192.168.1.0/24 Static 60 0 192.168.3.1 Virtual-Template2
192.168.2.0/24 Direct 0 0 192.168.2.1 Ethernet0
192.168.2.1/32 Direct 0 0 127.0.0.1 LoopBack0
192.168.3.0/24 Direct 0 0 192.168.3.2 Virtual-Template2
192.168.3.1/32 Direct 0 0 192.168.3.2 Virtual-Template2
192.168.3.2/32 Direct 0 0 127.0.0.1 LoopBack0
[r1]ping ip -a 192.168.1.1 192.168.2.1
PING 192.168.2.1: 56 data bytes, press CTRL_C to break
Reply from 192.168.2.1: bytes=56 Sequence=0 ttl=255 time = 27 ms
Reply from 192.168.2.1: bytes=56 Sequence=1 ttl=255 time = 27 ms
Reply from 192.168.2.1: bytes=56 Sequence=2 ttl=255 time = 27 ms
Reply from 192.168.2.1: bytes=56 Sequence=3 ttl=255 time = 27 ms
Reply from 192.168.2.1: bytes=56 Sequence=4 ttl=255 time = 27 ms
--- 192.168.2.1 ping statistics ---
5 packets transmitted
5 packets received
0.00% packet loss
round-trip min/avg/max = 27/27/27 ms