Cisco路由器配置接口备份

Cisco路由器配置接口备份

Cisco路由器配置接口备份接口备份

【实验目的】
掌握如何通过接口备份保证连接的可靠性。

【背景描述】
你是一个公司的网络工程师,由于公司的网页上有时时更新的资料,为了保证数据更新人员能随时登陆服务器更新资料,

你决定采用备份接口技术来预防可能出现的接口或者线缆发生故障所带来的通信中断问题。服务器所处网段是192.168.2.0/24 。
【实现功能】
实现接口冗余备份,保证网络正常运行。

【实验拓扑】
实验设备】
R2624路由器(2台)、V35DCE(2根)、V35DTE(2根)

【实验步骤】

第一步:基本配置
Red-Giant>en
Red-Giant#conf t
Red-Giant(config)#hos R1
R1(config)#int s0
R1(config-if)#ip add 192.168.12.1 255.255.255.0
R1(config-if)#cl ra 64000
R1(config-if)#no sh
R1(config-if)#int s1
R1(config-if)#ip add 192.168.21.1 255.255.255.0
R1(config-if)#cl ra 64000
R1(config-if)#no sh
R1(config-if)#end
Red-Giant(config)#hos R2
R2(config)#int s0
R2(config-if)#ip add 192.168.12.2 255.255.255.0
R2(config-if)#no sh
R2(config-if)#int s1
R2(config-if)#ip add 192.168.21.2 255.255.255.0
R2(config-if)#no sh
R2(config-if)#int f0
R2(config-if)#ip add 192.168.2.1 255.255.255.0
R2(config-if)#no sh

验证测试:R1# ping 192.168.12.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echoes to 192.168.12.2, timeout is 2 seconds:
!!!!!
R1# ping 192.168.21.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echoes to 192.168.21.2, timeout is 2 seconds:
!!!!!

第二步:配置备份接口
R1(config)#int s0
R1(config-if)#backup interface serial 1 !指定serial 1作为主接口的备份接口。
R1(config-if)#backup delay 0 0 !指定在主接口down情况下,备份接口立即工作

验证测试:Serial1 is standby mode, line protocol is down
Hardware is HDLC4530B
Internet address is 192.168.21.1/24
MTU 1500 bytes, BW 2048 Kbit, DLY 20000 usec, rely 255/255, load 1/255
Encapsulation HDLC, loopback not set, keepalive set (10 sec)
Last input 00:02:08, output 00:02:08, output hang never
Last clearing of “show interface” counters never
Input queue: 0/75/0 (size/max/drops); Total output drops: 0
Queueing strategy: weighted fair
Output queue: 0/64/0 (size/threshold/drops)
Conversations 0/1 (active/max active)
Reserved Conversations 0/0 (allocated/max allocated)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
3 packets input, 72 bytes, 0 no buffer
Received 3 broadcasts
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
12 packets output, 288 bytes, 0 underruns
0 output errors, 0 collisions, 5 interface resets
0 output buffer failures, 0 output buffers swapped out
3 carrier transitions
DCD=down DSR=up DTR=up RTS=down CTS=up

第三步:配置路由可达性
R1(config)#ip route 192.168.2.0 255.255.255.0 serial 0
R1(config)#ip route 192.168.2.0 255.255.255.0 serial 1

验证测试:R1#ping 192.168.2.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echoes to 192.168.2.1, timeout is 2 seconds:
!!!!!

第四步:当主接口down掉或者链路出现故障时,备份接口启用
R1(config)#int s0
R1(config-if)#shut
%UPDOWN: Line protocol on Interface Serial0, changed state to down
%UPDOWN: Interface Serial0, changed state to down
%UPDOWN: Interface Serial1, changed state to up
%UPDOWN: Line protocol on Interface Serial1, changed state to up
R1#ping 192.168.2.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echoes to 192.168.2.1, timeout is 2 seconds:
!!!!!

【注意事项】
要在接口模式下配置备份接口;
要指明路由可达。

【参考配置】
R1#sh run

成为第一个发表评论的人

发表评论

您的电子邮件地址不会被公开.


*