靜態路由

        Hi,大家好,愚人節快樂,今天我給大家帶來的是“Cisco靜態路由+默認路由實現全網互通”


一、實驗拓補

Static_Route.png

 

二、實驗環境

三個Cisco路由器(R1,R2,R3) 每臺路由器啓用Loopback虛擬接口用於扮演PC

 

三、實驗目的

實現全網互通,每臺路由器都能ping通所有接口(包括虛擬接口)

 

四、配置步驟

R1上配置

R1#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

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

 

五、實驗結果

從上述步驟可以看出,已實現全網互通功能

 


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章