实验一 层次化配置方法
 
1实验拓朴图
2实验目标
1.实现PC ping 通路由器局域网接口。
2.实现PC 之间互相ping 通。
 
3实验步骤及测试
1)基本信息配置
 
RT5 RT6的基本信息
En
Config terminal
No ip domain-lookup
Line console 0
Logging synchronous
No login
privilege level 15
line Vty 0 4
No login
Privilege level 15
Exit
分别给RT5RT6配置设备名
 
2)接口配置及测试
 
RT5的配置
int e0/0
ip add 192.168.10.1 255.255.255.0
no shutd
RT6的配置
Int e0/0
Ip add 192.168.18.1 255.255.255.0
No shutd
 
 
RT5 RT6分别Show ip int b可知接口配置无误。测试结果省略。
 
RT5的配置
rt5(config-if)#int e0/0
rt5(config-if)#ip add 192.168.10.1 255.255.255.0
rt5(config-if)#no shut                           
rt5(config-if)#int e0/1                          
rt5(config-if)#ip add 192.168.1.1 255.255.255.252
rt5(config-if)#no shut
rt5(config-if)#
rt5(config)#ip route 192.168.18.0 255.255.255.0 192.168.1.2
//配置静态路由,不同网段连通必配置的
 
RT6 的配置
rt6(config)#int e0/1
rt6(config-if)#ip add 192.168.1.2 255.255.255.252
rt6(config-if)#no shut
rt6(config)#int e0/0
rt6(config-if)#ip add 192.168.18.1 255.255.255.0
rt6(config-if)#no shut
rt6(config)#ip route 192.168.10.0 255.255.255.0 192.168.1.1 
//配置静态路由,不同网段连通必配置的
 
四、测试结果
rt5(config)#do show ip route
Codes: 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
 
Gateway of last resort is not set
C    192.168.10.0/24 is directly connected, Ethernet0/0
     192.168.1.0/30 is subnetted, 1 subnets
C       192.168.1.0 is directly connected, Ethernet0/1
S    192.168.18.0/24 [1/0] via 192.168.1.2
由上可知,静态路由配置成功。RT6测试结果类似,省略。对SW1 SW2 PC1 PC2进行互ping。结果为任何设备之间可以相互ping通,实验成功。
 
五、实验心得
加深了对静态路由的理解,对层次话配置有了初步了解。