2514的配置
2514# sho run
Building configuration...
!
Current configuration:
!
version 11.2
no service udp-small-servers
no service tcp-small-servers
!
hostname 2514
!
enable secret 5 $1$uoHU$Vks/1YCRi33z4TXs4qekI0
!
frame-relay switching
!
interface Ethernet0
no ip address
!
interface Ethernet1
no ip address
shutdown
!
interfacc Serial0
ip address 192.3.1.2 255.255.255.0
encapsulation frame-relay IETF
ip ospf message-digest-key 1 md5 kim
bandwidth 2000
clockrate 2000000
frame-relay map ip 192.3.1.1 100 broadcast
frame-relay intf-type dce
!
interface Serial1
ip address 192.8.1.1 255.255.255.0
no ip mroute-cache
enthpsulation x25 dce
ip ospf message-digest-key 2 md5 cisco
bandwidth 64
x25 address 1234
x25 htc 16
x25 nvc 4
x25 map ip 192.8.1.2 5678 broadcast
clockrate 64000
!
router ospf 1
passive-interface Ethernet0
network 192.3.1.0 0.0.0.255 area 0
network 192.8.1.O 0.0.0.255 area 0
neighbor 192.8.l.2 priority 1
neighbor 192.3.1.1 priority 1
area 0 authentication message-digest
!
no ip classless
!
line con 0
line aux 0
line vty 0 4
login
!
end
2505的配置
building configuraiion...
Current configuration:!
version 11.2
no service udp-small-servers
no service tcp-small-servers
!
hostname 2505
!
enable secret 5 $1$b43o$CpEYSTc2EPwnRlQGDvIm//
!
username 2511-1 passWord 7 1511021F0725
!
hub ether 0 1
link-test
auto-polarity
!
hub ether O 2
link-test
auto-polarity
!
hub ether 0 3
link-test
auto-polarity
!
hub ether 0 4
link-test
auto-polarity
!
hub ether 0 5
link-test
auto-polarity
!
hub ether 0 6
link-test
auto-polarity
!
hub ether 0 7
link-test
auto-polarity
!
hub ether 0 8
link-test
auto-polarity
!
interface Ethernet0
ip address 192.1.4.1 255.255.255.0
!
interfacc Serial0
ip address 192.l.2.1 255.255.255.0
ip ospf message-digest-key 1 md5 cisco
ip ospf network non-broadcast
bandwidth 2000
clockrate 2000000
!
interface Serial1
ip address 192.7.1.2 255.255.255.0
encapsulation ppp
ip ospf message-digdest-key 1 md5 kim
ip ospf network non-broadcast
bandwidth 64
clockrate 64000
ppp authentication chap
!
router ospf 1
passive-interface Ethernet0
network 192.l.2.0 0.0.0.255 area 2
network 192.l.4.O 0.0.0.255 area 2
network 192.7.1.0 0.0.0.255 area 0
neighbor 192.7.l.1 priority 1
neighbor 192.1.2.2 priority 1
area 0 authentication message-digest
area 2 authentication message-digest
area 2 range 192.1.0.0 255.255.0.0
!
no ip classless
ip ospf name-lookup
!
line con 0
line aux 0
Iine vty 0 4
login
!
end线路备份 其实,在广域网连接中,最不可靠的因素大多数情况下是出在线路、端口及外接的设备上。相对来说线路备份更为重要。
线路备份一般有几种主要方法:
· 采用动态路由自动进行备份
· 采用显示backup(备份)方法进入备份
· 采用浮动的静态路由方法进行备份
方法1是在网络中含有多条冗余线路,路由器通过动态路由学习到所有线路工作情况.根据路由算法选择最优的路径作为主干线路,一旦某条主干线路出现故障,路由器将在一段时间过后,自动删除通过该条线路的路径,重新进行最优路径计算,重新选择一条通过某条冗余线路的最优的路径。所有这些过程,都由动态路由协议自动完成,无须任何其它设置。
方法2 显示backup备份方法
该种方法显示的指明哪条主干线路,哪一条是备份线路。假如主干线路出现故障,则在指定的时间内,备份线路会代替主干线路工作。假如主干线路恢复正常,则在指定的时间过后,会自动切换回主干线路备份线路重新处于备份状态。
设置为显示备份后,路由器将监测CD信号,一旦CD信号消失,则路由器便认为该线路出现故障。假如CD 信号始终存在,则路由器认为主干线路工作正常。
这种备方法适用于DDN专线作主干线路的情况。因为对于DDN专线,假如线路断掉,则两边的路由器的CD信号都会消失,而该种方去不适用于X.25线路上,因为X.25线路上出现故障时,大多数情况下都是建立不起来虚电路,而CD信号则往往存在。而且,假如一端X.25线路出现故障,而另一端X.25线路往往是正常的,这样,假如正常一端的路由器有数据传送给不正常一端时,路由器认为X.25线路工作正常。因此根本不会起备份线路。
显示备份方法配置步骤
1.正确配置主干线路能正常通信
2.然后正确配置备份线路能正常通信
3.在主干线路所连接的端口中显示指出哪一条线路为备份线路
backup interface 备份线路端口号
4.指定在主干线路出现故障多长时间后启用备份线路及在主干线路恢复正常多长时间后切换回主干线路。备份线路恢复到备份状态
backup delay 时间参数1(秒) 时间参数字2(秒)
时间参数1指定在主干线路出现故障多长时间后启用备份线路,时间参数2指定在主干线路恢复正常多长时间后切换回主干线路,备份线路恢复到备份状态。
设置备份线路的路由可以起任何方式的路由,但备份线路一般带宽相对主干线路较低,且假如起动态路由会有额外费用。因此,一般在备份线路上使用静态路由。
在全局设置模式下
ip route 目地子网地址 子网掩码 相邻路由器相邻端口地址
原则上讲,备份线路可以为任何线路。但一般都是用带宽相对较低,费用较低的线路作为备份线路。
一般的,可以用X.25或PSTN作DDN线路的备份。
以下实例为用Cisco2501 AUX口作模拟DDN专线的拨号备份.
实例:
Cisco 2501-above 的配置
Current configuration:
!
version 11.2
no service udp-small-servers
no service tcp-small-servers
!
hostname above
!
Current configuration:
!
version 11.2
no service udp-small-servers
no service tcp-small-servers
!
hostname above
!
enable secret 5 $1$O1aq$Kxgp1A0Eulqug8SbCm6rdl
enable password cisco
!
username down password 7 095C5E19
chat-script lab ABORT ERROR ABORT BUSY ABORT "NO ANSWER" "" "AT H" OK "ATDT \T"
TIMEOUT 60 CONNECT \c
!
interface Ethernet0
ip address 192.192.193.1 255.255.255.0
!interface Serial0
ip address 192.192.192.1 255.255.255.0
bandwidth 64
clockrate 64000
!
interface Serial1
no ip address
shutdown
!
interface Async1
ip address 166.71.70.1 255.255.255.0
encapsulation ppp
async dynamic address
async dynamic routing
async mode dedicated
dialer in-band
dialer map ip 167.71.70.2 name down moden-script lab broadcast 3631
dialer-group 1
no cdp enable
ppp authentication chap
!
router rip
network l92.192.192.0
nctwork 192.192.193.0
!
no ip classless
ip route 0.0.0.0 0.0.0.0 166.71.70.2
ip routc 192.192.191.0 255.255.255.0 166.71.70.2
dialer-list 1 protocol ip permit
!
line con 0
line aux 0
modem InOut
modem autoconfigure discovery
stopbits 1
rxspeed 38400
txspeed 38400
flowcontrol hardware
line vty 0 4
no login
!
end
!Cisco 2501 named down configuration
Cisco 2501-down 的配置
Current configuration:
!
version 11.2
no service udp-small-servers
no servicc tcp-small-servers
!
hostname down
!
enable secret 5 $1$m8S4$lnrkhnJDtCVtSvTpXO8v/0
enable password cisco
!
username above password 7 095C5E19
chat-script lab ABORT ERROR ABORT BUSY ABORT "NO ANSWER" "" "AT H" OK "ATDT \T" TIMEOUT 60 CONNECT \C
!
interface Ethernet 0
ip address 192.192.191.1 255.255.255.0
!
interface Serial0
backup delay 10 10
backup interface Async1
ip address 192.192.192.3 255.255.255.0
!interface Seriall
no ip address
shutdown
!
interface Async1
ip address 166.71.70.2 255.255.255.0
encapsulation ppp
async dynamic address
async dynamic routing
async mode dedicated
dialer in-band
dialer map ip 166.71.70.1 name above modem-script lab broadcast 3621
dialer-group 1
no cdp enable
ppp authentication chap
!
router rip
net work 192.192.192.0
net work 192.192.191.0
!
no ip classless
ip route 0.0.0.0 0.0.0.0 166.71.70.1
ip route 192.192.193.0 255.255.255.0 166.71.70.1
dialer-list 1 protocol ip permit
!
line con 0
line aux 0
modem InOut
modem autoconfigure discovery
stopbits 1
rxspeed 38400
txspeed 38400
flowcontrol hardware
line vty 0 4
no login
!方法3:浮动的静态路由作备份。缺省状态下,Cisco路由器选择路由的顺序为静态路由,动态路由,缺省路由,这是由各种路由的权值决定的。
可以手动改变静态路由的权值大小,使得其可以在动态路由之后,该静态路由就成为浮动的静态路由。假如在动态路由表中找不到相应有路由时,浮动的静态路由才可以被选中,以传输数据。一般的,对于X.25线路用浮动的静态路由作拨号备份,非凡适合。不过,用浮动的静态路由可以用任何线路备份其他任何线路。
注重:用浮动的静态路由作X.25线路的备份线路则X.25线路必须起动态路由,否则无法实现双向备份。
浮动静态路由配置步骤:
1、正确配置主干线路,保证其能正常通信
2、配置主干线路的动态路由
3、正确配置备份线路,保证其能正常通信
4、配置通过备份线路的浮动静态路由
ip route 目地子网地址 子网掩码 相邻路由器相邻端口地址 权值
其中,权值数值越高其路由优先权越低权值范围在1-255之间
实例:
COSCO 2501-above的配置
Current confignration:
!
version 11.2
no service udp-small-servers
no service tcp-small-servers
!
hostname above
!
enable secret 5 $1$O1aq$KxgpIA0Eulqug8SbCm6rd1
enable password cisco
!
username down password 7 095C5E19
chat-scrip lab ABORT ERROR ABORT BUSY ABORT "NO ANSWER" "" "AT H" OK "ATDT \T" TIMEOUT 60 CONNECT \c
!
interface Ethernet0
ip address 192.192.193.1 255.255.255.0
!
interface Serial0
iu address 192.192.192.1 255.255.255.0
bandwidth 64
clockrate 64000
!
interface Scrial1
no ip address
shutdown
interface Asyncl
ip address 166.71.70.1 255.255.255.0
encapsulation ppp
async dynamic address
async dynamic routing
async mode dedicated
dialer in-band
dialer ip 166.71.70.2 name down modem-script lab broadcast 3631
dialer-group 1
no cdp enable
ppp authentication chap
!
router rip
network 192.192.192.0
network 192.192.193.0
!
no ip classless
ip route 0.0.0.0 0.0.0.0 166.71.70.2 150
ip route 192.192.191.0 255.255.255.0 166.71.70.2 150
dialer-list 1 protocol ip permit
!
line con 0
line aux 0
modem InOut
modem autoconfigure discovery
stopbits 1
rxspeed 38400
txspeed 38400
flowcontrol hardware
line vty 0 4
no login
!
end
Cisco 2501-down 的配置
Current configuration:
!
version 11.2
no service udp-small-servers
no service tep-small-servers
!
hostname down
!
enable secret 5 $1$m8S4$InrkhnJDtCVtSvTpXO8v/0
enable password cisco
!
username above password 7 095C5E19
chat-script lab ABORT ERROR ABORT BUSY ABORT "NO ANSWER" "" "AT H" OK "ATDT \T" TIMEOUT 60 CONNECT \c
!
interface Ethernet0
ip address 192.192.191.1 255.255.255.0
!
interface Serial0
ip address 192.192.192.3 255.255.255.0
!
interface Serial1
no ip address
shutdown
!
interface Asyncl
ip address 166.71.70.2 255.255.255.0
encapsulation ppp
async dynamic address
async dynamic routing
async mode dedicated
dialer in-band
dialer map ip 166.71.70.1 name above modem-script lab broadcast 3621
dialer-group 1
no cdp enable
ppp authentication chap
!
router rip
network 192.192.192.0
network 192.192.191.0
!
no ip classless
ip route 0.0.0.0 0.0.0.0 166.71.70.1 150
ip route 192.192.193.0 255.255.255.0 166.71.70.1 150
dialer-list 1 protocol ip permit
!
line con 0
line aux 0
modem InOut
modem autoconfigure discovery
stopbits 1
rxspeed 38400
txspeed 38400
flowcontrol hardware
line vty 0 4
no login
!