静态路由实验

来源:互联网 发布:网络应用安全 编辑:程序博客网 时间:2024/04/27 23:12

本实验:需要2960交换机2台、2811路由器2台、台pc。

实验图:

R1的配置:

Router>en

Router#config t

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

Router(config)#host R1

R1(config)#int fa1/0

R1(config-if)#ip address 192.168.1.1 255.255.255.0

R1(config-if)#no shut


%LINK-5-CHANGED: Interface FastEthernet1/0, changed state to up


%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/0, changed state to up


R1(config-if)#exit

R1(config)#int serial0/2/0

R1(config-if)#no shut


%LINK-5-CHANGED: Interface Serial0/2/0, changed state to down

R1(config-if)#ip address 192.168.3.1 255.255.255.0

R1(config-if)#clock rate 64000

R1(config-if)#exit

R1(config)#ip route 192.168.2.0 255.255.255.0 192.168.3.2

R1(config)#end

R1#

%SYS-5-CONFIG_I: Configured from console by console


R2配置:

Router>en

Router#config t

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

Router(config)#host R2

R2(config)#int fa1/0

R2(config-if)#no shut


%LINK-5-CHANGED: Interface FastEthernet1/0, changed state to up


%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/0, changed state to up


R2(config-if)#ip address 192.168.2.1 255.255.255.0

R2(config-if)#exit

R2(config)#int serial0/2/0

R2(config-if)#ip address 192.168.3.2 255.255.255.0

R2(config-if)#no shut


%LINK-5-CHANGED: Interface Serial0/2/0, changed state to up


R2(config-if)#

%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/2/0, changed state to up


R2(config-if)#exit

R2(config)#ip route 192.168.1.0 255.255.255.0 192.168.3.1

R2(config)#exit

R2#

在R1上测试:

R1#ping 192.168.3.2


Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.3.2, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 4/5/6 ms


R1#ping 192.168.2.2


Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.2.2, timeout is 2 seconds:

.!!!!

Success rate is 80 percent (4/5), round-trip min/avg/max = 9/12/14 m

在R2上测试:

R2#ping 192.168.3.1


Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.3.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 2/4/6 ms


R2#ping 192.168.1.2


Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.1.2, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 7/12/14 ms


本文出自 “思科实验linux” 博客,请务必保留此出处http://1054054.blog.51cto.com/1044054/1251526

0 0