实验七、路由器静态路由配置

实验七、路由器静态路由配置

一、 实验目的

1. 理解路由表

2. 掌握静态路由的配置

二、 应用环境

1. 在小规模环境里,静态路由是最佳的选择

2. 静态路由开销小,但不灵活,适用于相对稳定的网络

三、 实验设备

1. DCR-1751 三台

2. CR-V35FC 一条

3. CR-V35MT 一条

四、 实验拓扑

实验七、路由器静态路由配置_第1张图片

五、 实验要求

配置表

Router-A Router-B Router-C

S1/1(DCE) 192.168.1.1 S/1/0(DTE) 192.168.1.2 F0/0 192.168.2.2

F0/0 192.168.0.1 F0/0 192.168.2.1 E1/0 192.168.3.1

六、 实验步骤

第一步:参照实验三,按照上表配置所有接口的IP 地址,保证所有接口全部是up 状态,测

试连通性

第二步:查看ROUTER-A 的路由表

Router-A#show ip route

Codes: C - connected, S - static, R - RIP, B - BGP, BC - BGP connected

D - DEIGRP, DEX - external DEIGRP, O - OSPF, OIA - OSPF inter area ON1 - OSPF NSSA external type 1, ON2 - OSPF NSSA external type 2

OE1 - OSPF external type 1, OE2 - OSPF external type 2

DHCP - DHCP type

VRF ID: 0

C 192.168.0.0/24 is directly connected, FastEthernet0/0 !直连的路由

C 192.168.1.0/24 is directly connected, Serial1/1 !直连的路由

第三步:查看ROUTER-B 的路由表

Router-B#show ip route

Codes: C - connected, S - static, R - RIP, B - BGP, BC - BGP connected

D - DEIGRP, DEX - external DEIGRP, O - OSPF, OIA - OSPF inter area

ON1 - OSPF NSSA external type 1, ON2 - OSPF NSSA external type 2

OE1 - OSPF external type 1, OE2 - OSPF external type 2

DHCP - DHCP type

VRF ID: 0

C 192.168.1.0/24 is directly connected, Serial1/0

C 192.168.2.0/24 is directly connected, FastEthernet0/0

第四步:查看ROUTER-C 的路由表

Router-B#show ip route

Codes: C - connected, S - static, R - RIP, B - BGP, BC - BGP connected

D - DEIGRP, DEX - external DEIGRP, O - OSPF, OIA - OSPF inter area

ON1 - OSPF NSSA external type 1, ON2 - OSPF NSSA external type 2

OE1 - OSPF external type 1, OE2 - OSPF external type 2

DHCP - DHCP type

VRF ID: 0

C 192.168.1.0/24 is directly connected, Serial1/0

C 192.168.2.0/24 is directly connected, FastEthernet0/0

第五步:在ROUTER-A 上PING 路由器C

Router-A#ping 192.168.2.2

PING 192.168.2.2 (192.168.2.2): 56 data bytes

.....

--- 192.168.2.2 ping statistics ---

5 packets transmitted, 0 packets received, 100% packet loss !不通

第六步:在路由器A 上配置静态路由

Router-A#config Router-A_config#ip route 192.168.2.0 255.255.255.0 192.168.1.2 !配置目标网段和下一跳

Router-A_config#ip route 192.168.3.0 255.255.255.0 192.168.1.2

第七步:查看路由表

Router-A#show ip route

Codes: C - connected, S - static, R - RIP, B - BGP, BC - BGP connected

D - DEIGRP, DEX - external DEIGRP, O - OSPF, OIA - OSPF inter area

ON1 - OSPF NSSA external type 1, ON2 - OSPF NSSA external type 2

OE1 - OSPF external type 1, OE2 - OSPF external type 2

DHCP - DHCP type

VRF ID: 0

C 192.168.0.0/24 is directly connected, FastEthernet0/0

C 192.168.1.0/24 is directly connected, Serial1/1

S 192.168.2.0/24 [1,0] via 192.168.1.2 !注意静态路由的管理距离是1

S 192.168.3.0/24 [1,0] via 192.168.1.2

第八步:配置路由器B 的静态路由并查看路由表

Router-B#config

Router-B_config#ip route 192.168.0.0 255.255.255.0 192.168.1.1

Router-B_config#ip route 192.168.3.0 255.255.255.0 192.168.2.2

Router-B_config#^Z

Router-B#show ip route

Codes: C - connected, S - static, R - RIP, B - BGP, BC - BGP connected

D - DEIGRP, DEX - external DEIGRP, O - OSPF, OIA - OSPF inter area

ON1 - OSPF NSSA external type 1, ON2 - OSPF NSSA external type 2

OE1 - OSPF external type 1, OE2 - OSPF external type 2

DHCP - DHCP type

VRF ID: 0

S 192.168.0.0/24 [1,0] via 192.168.1.1

C 192.168.1.0/24 is directly connected, Serial1/0

C 192.168.2.0/24 is directly connected, FastEthernet0/0

S 192.168.3.0/24 [1,0] via 192.168.2.2

第九步:配置路由器C 的静态路由并查看路由表

Router-C#config

Router-C_config#ip route 192.168.0.0 255.255.0.0 192.168.2.1 !采用超网的方法

Router-C_config#^Z

Router-C#show ip route

Codes: C - connected, S - static, R - RIP, B - BGP

D - DEIGRP, DEX - external DEIGRP, O - OSPF, OIA - OSPF inter area ON1 - OSPF NSSA external type 1, ON2 - OSPF NSSA external type 2

OE1 - OSPF external type 1, OE2 - OSPF external type 2

S 192.168.0.0/16 [1,0] via 192.168.2.1 !注意掩码是16 位

C 192.168.2.0/24 is directly connected, FastEthernet0/0

C 192.168.3.0/24 is directly connected, Ethernet1/0

第十步:测试

Router-C#ping 192.168.0.1

PING 192.168.0.1 (192.168.0.1): 56 data bytes

!!!!! !成功

--- 192.168.0.1 ping statistics ---

5 packets transmitted, 5 packets received, 0% packet loss

round-trip min/avg/max = 30/32/40 ms

你可能感兴趣的:(职场,休闲)