Hi,你們好,愚人節快樂,今天我給你們帶來的是「Cisco靜態路由+默認路由實現全網互通」
ide
1、實驗拓補oop
2、實驗環境測試
三個Cisco路由器(R1,R2,R3), 每臺路由器啓用Loopback虛擬接口用於扮演PC機spa
3、實驗目的blog
實現全網互通,每臺路由器都能ping通全部接口(包括虛擬接口)接口
4、配置步驟ip
R1上配置路由
R1#configure terminalterminal
Enter configuration commands, one per line. End with CNTL/Z.it
R1(config)#interface serial 1/0
R1(config-if)#clock rate 64000
R1(config-if)#ip address 1.1.1.1 255.255.255.0
R1(config-if)#no shutdown
*Mar 1 00:02:23.743: %LINK-3-UPDOWN: Interface Serial1/0, changed state to up
*Mar 1 00:02:24.747: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial
R1(config-if)#exit
R1(config)#interface loopback 0
*Mar 1 00:03:35.187: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback0, changed state to up
R1(config-if)#ip address 10.10.10.10 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#exit
R2上配置
R2#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#interface serial 1/0
R2(config-if)#ip address 1.1.1.254 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#exit
*Mar 1 00:03:36.279: %LINK-3-UPDOWN: Interface Serial1/0, changed state to up
*Mar 1 00:03:37.283: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0, changed state to up
R2(config)#interface serial 1/1
R2(config-if)#clock rate 64000
R2(config-if)#ip address 2.2.2.1 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#exit
*Mar 1 00:05:43.735: %LINK-3-UPDOWN: Interface Serial1/1, changed state to up
*Mar 1 00:05:44.739: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/1, changed state to up
R2(config)#interface loopback 0
*Mar 1 00:07:18.683: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback0, changed state to up
R2(config-if)#ip address 20.20.20.20 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#exit
R3上配置
R3#configure terminal
R3(config)#interface serial 1/0
R3(config-if)#ip address 2.2.2.254 255.255.255.0
R3(config-if)#no shutdown
*Mar 1 00:06:26.323: %LINK-3-UPDOWN: Interface Serial1/0, changed state to up
*Mar 1 00:06:27.327: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0, changed state to up
R3(config-if)#exit
R3(config)#interface loopback 0
*Mar 1 00:07:12.331: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback0, changed state to up
R3(config-if)#ip address 30.30.30.30 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#exit
配置路由條目
R1(config)#ip route 0.0.0.0 0.0.0.0 1.1.1.254
R2(config)#ip route 10.10.10.0 255.255.255.0 1.1.1.1
R2(config)#ip route 30.30.30.0 255.255.255.0 2.2.2.254
R3(config)#ip route 0.0.0.0 0.0.0.0 2.2.2.1
各個節點測試連通性
R1測試
R1#ping 1.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/30/80 ms
R1#
R1#ping 1.1.1.254
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.254, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/10/12 ms
R1#
R1#ping 10.10.10.10
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.10.10.10, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms
R1#
R1#ping 2.2.2.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2.2.2.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/10/16 ms
R1#
R1#ping 20.20.20.20
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 20.20.20.20, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/14/32 ms
R1#
R1#ping 2.2.2.254
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2.2.2.254, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/28/36 ms
R2測試
R2#ping 1.1.1.254
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.254, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 32/40/44 ms
R2#
R2#ping 1.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/9/20 ms
R2#
R2#ping 10.10.10.10
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.10.10.10, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/10/12 ms
R2#
R2#ping 2.2.2.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2.2.2.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 36/40/44 ms
R2#
R2#ping 2.2.2.254
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2.2.2.254, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/18/20 ms
R2#
R2#ping 30.30.30.30
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 30.30.30.30, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/10/12 ms
R2#
R2#ping 20.20.20.20
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 20.20.20.20, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms
R3測試
R3#ping 30.30.30.30
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 30.30.30.30, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms
R3#
R3#ping 2.2.2.254
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2.2.2.254, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/21/32 ms
R3#
R3#ping 2.2.2.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2.2.2.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/11/16 ms
R3#
R3#ping 20.20.20.20
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 20.20.20.20, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/11/20 ms
R3#
R3#ping 1.1.1.254
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.254, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/12/20 ms
R3#
R3#ping 1.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/20/24 ms
R3#
R3#ping 10.10.10.10
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.10.10.10, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/20/28 ms
5、實驗結果
從上述步驟能夠看出,已實現全網互通功能