调整路由的AD值
实验:调整路由的AD值【实验名称】调整路由的AD值(备注:此实验环境最好用GNS3或者小凡来做,PT不支持“distance 99 192.168.1.2 0.0.0.0”这条命令)【实验目的】通过调整路由的管理距离值,实现路由的管理和控制【实验背景】某企业的3台路由器(RA、RB、RC)运行了RIP路由协议,RA分别与RB、RC连接【需求分析】通过配置RA的管理距离,使RA只能学到RB的通告路由,并忽略所有路由器的路由,且从RB学到路由的管理距离为99.【实验拓扑】【实验设备】路由器3台【预备知识】路由器基本配置知识、IP路由知识、RIP【实验原理】修改管理距离来过滤和控制路由【实验步骤】步骤1:在路由器上配置IP路由选择和IP地址Router>enableRouter#conf tEnter configuration commands, one perline.End with CNTL/Z.Router(config)#no ip domain lookupRouter(config)#hostname RzARzA(config)#int fa0/0RzA(config-if)#ip address 192.168.1.1255.255.255.0RzA(config-if)#no shutRzA(config-if)#exitRzA(config)#int fa0/1RzA(config-if)#ip address 192.168.2.1255.255.255.0RzA(config-if)#no shutRzA(config-if)#exitRzA(config)#int lo0RzA(config-if)#ip address 10.1.1.1255.255.255.0RzA(config-if)#no shutRzA(config-if)# Router>enableRouter#conf tEnter configuration commands, one perline.End with CNTL/Z.Router(config)#no ip domain lookupRouter(config)#hostname RzBRzB(config)#int fa0/0RzB(config-if)#ip address 192.168.1.2255.255.255.0RzB(config-if)#no shutRzB(config-if)#exitRzB(config)#int lo0RzB(config-if)#ip address 192.168.10.1255.255.255.0RzB(config-if)#no shutRzB(config-if)# Router>enableRouter#conf tEnter configuration commands, one perline.End with CNTL/Z.Router(config)#no ip domain lookup Router(config)#hostname RzCRzC(config)#int fa0/0RzC(config-if)#ip address 192.168.2.2255.255.255.0RzC(config-if)#no shutRzC(config-if)#exitRzC(config)#int lo0RzC(config-if)#ip address 192.168.20.1255.255.255.0RzC(config-if)#no shutRzC(config-if)# 步骤2:配置RIP协议RzA(config-if)#exitRzA(config)#router rip RzA(config-router)#version 2RzA(config-router)#network 192.168.1.0 RzA(config-router)#network 192.168.2.0 RzA(config-router)#network 10.1.1.0RzA(config-router)#no auto-summaryRzA(config-router)#endRzA#write Building configuration...RzA# RzB(config-if)#exitRzB(config)#router rip RzB(config-router)#version 2RzB(config-router)#network 192.168.1.0RzB(config-router)#network 192.168.10.0RzB(config-router)#no auto-summaryRzB(config-router)#endRzB#write Building configuration...RzB# RzC(config-if)#exitRzC(config)#router rip RzC(config-router)#version 2RzC(config-router)#network 192.168.2.0RzC(config-router)#network 192.168.20.0RzC(config-router)#no auto-summaryRzC(config-router)#end %SYS-5-CONFIG_I: Configured from console byconsoleRzC#write Building configuration...RzC#步骤3:修改管理距离RzA(config)#router rip RzA(config-router)#distance 255RzA(config-router)#distance 99 192.168.1.20.0.0.0步骤4:验证测试在路由器A上用命令show ip route 和show ip route rip来验证配置RzA#show ip route Codes: C - connected, S - static, I - IGRP,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, E - EGP i - IS-IS, 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 10.0.0.0/24 is subnetted, 1 subnetsC 10.1.1.0 is directly connected, Loopback0C 192.168.1.0/24 is directly connected, FastEthernet0/0C 192.168.2.0/24 is directly connected, FastEthernet0/1R 192.168.10.0/24 via 192.168.1.2, 00:00:14, FastEthernet0/0R 192.168.20.0/24 via 192.168.2.2, 00:00:13, FastEthernet0/1RzA# RzA#ping 192.168.20.1 Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to192.168.20.1, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5),round-trip min/avg/max = 31/31/32 ms RzA#RzB#ping 10.1.1.1 Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 10.1.1.1,timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5),round-trip min/avg/max = 15/28/32 ms RzB#RzC>ping 192.168.10.1 Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to192.168.10.1, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5),round-trip min/avg/max = 62/62/63 ms RzC> 参考配置:RzA#show running-config Building configuration... Current configuration : 664 bytes!version 12.4no service timestamps log datetime msecno service timestamps debug datetime msecno service password-encryption!hostname RzA!!!!!!!!!!!!no ip domain-lookup!!!!!!interface Loopback0 ipaddress 10.1.1.1 255.255.255.0!interface FastEthernet0/0 ipaddress 192.168.1.1 255.255.255.0 duplex auto speed auto!interface FastEthernet0/1 ipaddress 192.168.2.1 255.255.255.0 duplex auto speed auto!interface Vlan1 noip address shutdown!router rip version 2 network 10.0.0.0 network 192.168.1.0 network 192.168.2.0 distance 255distance 99 192.168.1.2 0.0.0.0 noauto-summary!ip classless!!!!!!!line con 0line vty 0 4 login!!!end RzA# RzB#show running-config Building configuration... Current configuration : 625 bytes!version 12.4no service timestamps log datetime msecno service timestamps debug datetime msecno service password-encryption!hostname RzB!!!!!!!!!!!!no ip domain-lookup!!!!!!interface Loopback0 ipaddress 192.168.10.1 255.255.255.0!interface FastEthernet0/0 ipaddress 192.168.1.2 255.255.255.0 duplex auto speed auto!interface FastEthernet0/1 noip address duplex auto speed auto shutdown!interface Vlan1 noip address shutdown!router rip version 2 network 192.168.1.0 network 192.168.10.0 no auto-summary!ip classless!!!!!!!line con 0line vty 0 4 login!!!end RzB# RzC#show running-config Building configuration... Current configuration : 625 bytes!version 12.4no service timestamps log datetime msecno service timestamps debug datetime msecno service password-encryption!hostname RzC!!!!!!!!!!!!no ip domain-lookup!!!!!!interface Loopback0 ipaddress 192.168.20.1 255.255.255.0!interface FastEthernet0/0 ipaddress 192.168.2.2 255.255.255.0 duplex auto speed auto!interface FastEthernet0/1 noip address duplex auto speed auto shutdown!interface Vlan1 noip address shutdown!router rip version 2 network 192.168.2.0 network 192.168.20.0 noauto-summary!ip classless!!!!!!!line con 0line vty 0 4 login!!!end RzC# 【实验总结】通过本节课的学习,通过调整路由的管理距离,实现路由的过滤和控制。-woniu5- -woniu3-
页:
[1]