计算机网络实验报告 静态路由配置

实验报告八

班级:               姓名:              学号: 

实验时间:            机房:             组号:            机号:PC_B

一、    实验题目

      静态路由配置

二、    实验设备

      CISCO路由器,专用电缆,网线,CONSOLE线,PC机

三、    实验内容

n  了解路由的功能

n  在CISCO路由器上配置和验证静态路由

n  配置缺省路由

四、    原理

静态路由是指由网络管理员手工配置的路由信息。当网络的拓扑结构或链路的状态发生变化时,需要手工去修改路由表中相关的静态路由信息。静态路由信息在缺省情况下是私有的,不会传递给其他的路由器。静态路由一般适用于比较简单的网络环境,在这样的环境中,易于清楚地了解网络的拓扑结构,便于设置正确的路由信息。

五、    实际步骤

 1.设置PC_B的IP地址,连接路由器,打开超级终端。

     

2.路由器B的配置

User Access Verification

Password:

5_R2>en

Password:

5_R2#conf t

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

5_R2(config)#int s0/1/0

5_R2(config-if)#no shut

5_R2(config-if)#interface s0/1/0

5_R2(config-if)#ip addr

% Incomplete command.

3.配置routerB的s0/1/0端口的IP地址

5_R2(config-if)#ip address 172.17.200.6 255.255.255.252

5_R2(config-if)#^Z

4.配置路由器routerB的f0/1端口的IP地址

5_R2#conf t

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

5_R2(config)#int f0/1

5_R2(config-if)#ip address 10.5.2.1 255.255.255.0

5_R2(config-if)#^Z

5.配置路由器routerB的f0/0端口的IP地址

5_R2#conf t

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

5_R2(config)#int f0/0

5_R2(config-if)#ip addr 10.5.4.1 255.255.255.0

5_R2(config-if)#no shutdown

5_R2(config-if)#

6.PC_B能与PC2ping 通,不能ping PC1

7.在PC_B上配置缺省路由

5_R2(config)#ip route 10.5.1.0 255.255.255.0 172.17.200.5

5_R2(config)#exit

5_R2#show ip rout

Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP

       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

       E1 - OSPF external type 1, E2 - OSPF external type 2

       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2

       ia - IS-IS inter area, * - candidate default, U - per-user static route

       o - ODR, P - periodic downloaded static route, + - replicated route

Gateway of last resort is not set

      10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks

S        10.5.1.0/24 [1/0] via 172.17.200.5

C        10.5.2.0/24 is directly connected, FastEthernet0/1

L        10.5.2.1/32 is directly connected, FastEthernet0/1

C        10.5.4.0/24 is directly connected, FastEthernet0/0

L        10.5.4.1/32 is directly connected, FastEthernet0/0

      172.17.0.0/16 is variably subnetted, 2 subnets, 2 masks

C        172.17.200.0/24 is directly connected, Serial0/1/0

L        172.17.200.6/32 is directly connected, Serial0/1/0

5_R2#ping 10.5.1.123  (PCA)

Type escape sequence to abort.

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

!!!!!

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

5_R2#

5_R2(config)#ip route 10.5.3.0 255.255.255.0 172.17.200.5

5_R2(config)#exit

5_R2#show ip rout

Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP

       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

       E1 - OSPF external type 1, E2 - OSPF external type 2

       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2

       ia - IS-IS inter area, * - candidate default, U - per-user static route

       o - ODR, P - periodic downloaded static route, + - replicated route

Gateway of last resort is not set

      10.0.0.0/8 is variably subnetted, 6 subnets, 2 masks

S        10.5.1.0/24 [1/0] via 172.17.200.5

C        10.5.2.0/24 is directly connected, FastEthernet0/1

L        10.5.2.1/32 is directly connected, FastEthernet0/1

S        10.5.3.0/24 [1/0] via 172.17.200.5

C        10.5.4.0/24 is directly connected, FastEthernet0/0

L        10.5.4.1/32 is directly connected, FastEthernet0/0

      172.17.0.0/16 is variably subnetted, 2 subnets, 2 masks

C        172.17.200.0/24 is directly connected, Serial0/1/0

L        172.17.200.6/32 is directly connected, Serial0/1/0

5_R2#

PCB ping PCA

PCB ping PC1

PCB ping PC2

六、    成果与总结

本次实验顺利完成静态路由的分配。在实验时要搞清楚路由端口。   

相关推荐