Cisco路由器配置实例(经典)
思科路由器如何配置DHCP实例
思科路由器如何配置DHCP实例在一个局域网中,我们可以使用一个DHCP服务器来管理网络中的IP地址,这样会轻松很多的,也不需要担心IP地址冲突的问题了。
下面是店铺收集整理的思科路由器如何配置DHCP实例,希望对大家有帮助~~思科路由器如何配置DHCP实例客户需求:1.同时为多个VLAN的客户机分配地址2.VLAN内有部分地址采用手工分配的方式3.为客户指定网关、Wins服务器等4.VLAN 2的地址租用有效期限为1天,其它为3天5.按MAC地址为特定用户分配指定的IP地址最终配置如下:ip dhcp excluded-address 10.1.1.1 10.1.1.19 //排除的地址范围,不用于动态地址分配的地址ip dhcp excluded-address 10.1.1.240 10.1.1.254ip dhcp excluded-address 10.1.2.1 10.1.2.19!ip dhcp pool global //global是pool name地址池的名字,由用户指定,随便写不过一定写的通俗最起码自己要能看懂network 10.1.0.0 255.255.0.0 //动态分配的地址段(将要分配给用户的地址)dns-server 10.1.1.1 10.1.1.2 //为客户机配置dns服务器netbios-name-server 10.1.1.5 10.1.1.6 //为客户机配置wins服务器(这个根据情况设置,一般不需要)netbios-node-type h-node //为客户机配置节点模式(影响名称解释的顺利,如h-node=先通过wins服务器解释)lease 3 //地址租用期限: 3天ip dhcp pool vlan1network 10.1.1.0 255.255.255.0 //本pool是global的子pool, 将从global pool继承domain-name 等optiondefault-router 10.1.1.100 10.1.1.101 //为客户机配置默认网关!ip dhcp pool vlan2 //为另一VLAN配置的poolnetwork 10.1.2.0 255.255.255.0default-router 10.1.2.100 10.1.2.101lease 1!ip dhcp pool vlan1_liangwei //总是为MAC地址为010050.bade.6384的机器分配10.1.1.21地址host 10.1.1.21255.255.255.0client-identifier 010050.bade.6384 //client-identifier=01加上客户机网卡地址!ip dhcp pool vlan1_liangwei5host 10.1.1.50 255.255.255.0client-identifier 010010.3ab1.eac8相关的DHCP调试命令:no service dhcp //停止DHCP服务[默认为启用DHCP服务]sh ip dhcp binding //显示地址分配情况show ip dhcp conflict //显示地址冲突情况debug ip dhcp server {events | packets | linkage} //观察DHCP服务器工作情况如果DHCP客户机分配不到IP地址,常见的原因有两个。
Cisco基于策略路由的配置实例
问题描述您可以定义自己的规则来进行数据包的路由而不仅仅由目的地地址所决定。
在这里您可以学到怎么使用基于策略路由的办法来解决这一问题。
在具体的应用中,基于策略的路由有:☆基于源IP地址的策略路由☆基于数据包大小的策略路由☆基于应用的策略路由☆通过缺省路由平衡负载这里,讲述了第一种情况的路由策略。
举例在这个例子中,防火墙的作用是:把10.0.0.0/8内部网地址翻译成可路由的172.16 .255.0/24子网地址。
下面的防火墙配置是为了完整性而加进去的,它不是策略路由配置所必需的。
在这里的防火墙可以被其它类似的产品代替,如PIX或其它类似防火墙设备。
这里的防火墙的配置如下:!ip nat pool net-10 172.16.255.1 172.16.255.254 prefix-length 24ip nat inside source list 1 pool net-10!interface Ethernet0ip address 172.16.20.2 255.255.255.0ip nat outside!interface Ethernet1ip address 172.16.39.2 255.255.255.0ip nat inside!router eigrp 1redistribute staticnetwork 172.16.0.0default-metric 10000 100 255 1 1500!ip route 172.16.255.0 255.255.255.0 Null0access-list 1 permit 10.0.0.0 0.255.255.255!end在我们的例子中,Cisco WAN路由器上运行策略路由来保证从10.0.0.0/8网络来的P数据包被发送到防火墙去。
配置中定义了两条net-10策略规则。
第一条策略就定义了从10.0.0.0/8网络来的IP数据包被发送到防火墙去(我们很快会看到这里的配置有问题)。
Cisco路由器配置实例(经典)
实训报告实训一路由基本配置1、实验目的:路由器基本配置及ip设置2、拓扑结构图Router0 fa0/0: 192.168.11.1Fa0/1:192.168.1.1Router1 fa0/0: 192.168.11.2Fa0/1:192.168.2.1Znn1:192.168.1.2Znn2:192.168.2.23、实验步骤Router1Router>en 用户模式进入特权模式Router#conf t 特权模式进入全局模式Enter configuration commands, one per line. End with CNTL/Z.Router(config)#host rznn1 改名字为rznn1rznn1(config)#int fa0/0 进入fa0/0端口rznn1(config-if)#ip add 192.168.11.1 255.255.255.0 设置ip地址rznn1(config-if)#no sh 激活rznn1(config)#int fa0/1rznn1(config-if)#ip add 192.168.1.1 255.255.255.0rznn1(config-if)#no shrznn1(config-if)#exitrznn1(config)#exitrznn1#copy running-config startup-config 保存Destination filename [startup-config]? startup-configrznn1#conf trznn1(config)#enable secret password 222 设置密文rznn1#show ip interface b 显示Interface IP-Address OK? Method Status Protocol FastEthernet0/0 192.168.11.1 YES manual up up FastEthernet0/1 192.168.1.1 YES manual up upVlan1 unassigned YES manual administratively down downrouter 2outer>enRouter#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#host rznn2rznn2(config)#int fa0/0rznn2(config-if)#ip add 192.168.11.2 255.255.255.0rznn2(config-if)#no shrznn2(config)#int fa0/1rznn2(config-if)#ip add 192.168.2.1 255.255.255.0rznn2(config-if)#no shRznn2#copy running-config startup-config 保存Destination filename [startup-config]? startup-configrznn2(config-if)#exitrznn2(config)#exitrznn2#conf trznn2(config)#enable secret 222rznn2#show ip interface bInterface IP-Address OK? Method Status Protocol FastEthernet0/0 192.168.11.2 YES manual up up FastEthernet0/1 192.168.2.1 YES manual up upVlan1 unassigned YES manual administratively down down实训二1、远程登录、密码设置及验证为路由器开设telnet端口,PC机可以远程登陆到Rznn3(Router 1)拓扑结构图Router0:192.168.1.1Pc:192.168.1.2步骤rznn3>rznn3>enrznn3#conf tEnter configuration commands, one per line. End with CNTL/Z.rznn3(config)#no ip domain lookuprznn3(config)#line cons 0rznn3(config-line)#password znnrznn3(config-line)#loginrznn3(config-line)#no exec-trznn3(config-line)#logg syncrznn3(config-line)#exitrznn3(config)#int fa0/0rznn3(config-if)#ip add 192.168.1.1 255.255.255.0rznn3(config-if)#no shrznn3(config-if)#exitrznn3(config)#line vty 0 4 打通五个端口rznn3(config-line)#password cisco 设置密码rznn3(config-line)#login 保存rznn3(config-line)#exit4、测试:实训三命令组1、目的:八条命令(no ip domain lookup\line cons 0\password\login\no exec-t\logg sync\show version\reload\copy running-config startup-config)\show cdp neighbors)2、拓扑结构图Router0 fa0/0: 192.168.11.1Router1 fa0/0: 192.168.11.23、步骤rznn1#conf tEnter configuration commands, one per line. End with CNTL/Z.1、rznn1(config)#no ip domain lookup 取消域名查找转换2、rznn1(config)#line cons 0 打开cons 0端口3、rznn1(config-line)#password znn 设置密码为znnrznn1(config-line)#login 保存rznn1(config-line)#no exec-t 设置永不超时4、rznn1(config-line)#logg sync 产生日志5、rznn1#show version 显示思科路由系统版本信息Cisco IOS Software, 2800 Software (C2800NM-ADVIPSERVICESK9-M), Version 12.4(15)T1, RELEASE SOFTWARE (fc2)Technical Support: /techsupportCopyright (c) 1986-2007 by Cisco Systems, Inc.Compiled Wed 18-Jul-07 06:21 by pt_rel_team6、rznn1#show cdp neighbors 查看路由器连接的相邻路由器的相关信息Capability Codes: R - Router, T - Trans Bridge, B - Source Route BridgeS - Switch, H - Host, I - IGMP, r - Repeater, P - PhoneDevice ID Local Intrfce Holdtme Capability Platform Port IDrznn2 Fas 0/0 139 R C2800 Fas 0/07、rznn1#copy running-config startup-config 保存刚才指令Destination filename [startup-config]? startup-configBuilding configuration...[OK]8、rznn1#reload 重启路由器Proceed with reload? [confirm]System Bootstrap, Version 12.1(3r)T2, RELEASE SOFTWARE (fc1)Copyright (c) 2000 by cisco Systems, Inc.cisco 2811 (MPC860) processor (revision 0x200) with 60416K/5120K bytes of memorySelf decompressing the image :########################################################################## [OK] Restricted Rights Legendrznn1#show ip interface bInterface IP-Address OK? Method Status Protocol FastEthernet0/0 192.168.11.1 YES manual up up FastEthernet0/1 192.168.1.1 YES manual up upVlan1 unassigned YES manual administratively down down9、rznn1(config-if)#ip add 192.168.3.1 255.255.255.0 重置ip地址rznn1#show ip interface bInterface IP-Address OK? Method Status Protocol FastEthernet0/0 192.168.3.1 YES manual up up FastEthernet0/1 192.168.1.1 YES manual up up Vlan1 unassigned YES manual administratively down down实训四发现协议1、实训目的通过发现协议显示路由器相邻路由的端口信息2、拓扑结构Router0:192.168.11.1Router1:fa0/0 192.168.11.2Fa0/1 192.168.12.1Router2:192.168.12.23、步骤R1路由器Router>enRouter#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#host r1r1(config)#int fa0/0r1(config-if)#ip add 192.168.11.1 255.255.255.0r1(config-if)#no sh%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to upr1(config-if)#r1(config-if)#exitr1(config)#exitr1#%SYS-5-CONFIG_I: Configured from console by consoler1#show ip interface bInterface IP-Address OK? Method Status Protocol FastEthernet0/0 192.168.11.1 YES manual up down FastEthernet0/1 unassigned YES manual administratively down downVlan1 unassigned YES manual administratively down downR2 路由器Router>enRouter#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#host r2r2(config)#int fa0/0r2(config-if)#ip add 192.168.11.2 255.255.255.0r2(config-if)#no sh%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up r2(config-if)#exitr2(config)#exitr2#%SYS-5-CONFIG_I: Configured from console by consoler2#conf tEnter configuration commands, one per line. End with CNTL/Z.r2(config)#int fa0/0r2(config-if)#int fa0/1r2(config-if)#ip add 192.168.12.1 255.255.255.0r2(config-if)#no sh%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to upr2(config-if)#exitr2(config)#exitr2#%SYS-5-CONFIG_I: Configured from console by consoler2#show ip interface bInterface IP-Address OK? Method Status Protocol FastEthernet0/0 192.168.11.2 YES manual up upFastEthernet0/1 192.168.12.1 YES manual up down Vlan1 unassigned YES manual administratively down downR3路由器Router>enRouter#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#host r3r3(config)#int fa0/0r3(config-if)#ip add 192.168.12.2 255.255.255.0r3(config-if)#no sh%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up r3(config-if)#exitr3(config)#exitr3#%SYS-5-CONFIG_I: Configured from console by consoler3#show ip interface bInterface IP-Address OK? Method Status Protocol FastEthernet0/0 192.168.12.2 YES manual up up FastEthernet0/1 unassigned YES manual administratively down downVlan1 unassigned YES manual administratively down downR1发现邻居r1#show cdp neighborsCapability Codes: R - Router, T - Trans Bridge, B - Source Route BridgeS - Switch, H - Host, I - IGMP, r - Repeater, P - PhoneDevice ID Local Intrfce Holdtme Capability Platform Port IDr2 Fas 0/0 165 R C2800 Fas 0/0R2发现邻居r2#show cdp neighborsCapability Codes: R - Router, T - Trans Bridge, B - Source Route BridgeS - Switch, H - Host, I - IGMP, r - Repeater, P - PhoneDevice ID Local Intrfce Holdtme Capability Platform Port IDr1 Fas 0/0 176 R C1841 Fas 0/0r3 Fas 0/1 130 R C1841 Fas 0/0R3发现邻居r3#show cdp neighborsCapability Codes: R - Router, T - Trans Bridge, B - Source Route BridgeS - Switch, H - Host, I - IGMP, r - Repeater, P - PhoneDevice ID Local Intrfce Holdtme Capability Platform Port IDr2 Fas 0/0 166 R C2800 Fas 0/14、总结show 命令(1)show ip interface b (显示端口ip信息)(2)show version (显示ios版本信息)(3)show running-config (显示刚才使用的命令配置信息)(4)show cdp neighbors (显示发现邻居直连设备信息)(5)show interface (显示所有端口详细信息)实训五静态路由1、实验目的:将不同网段的网络配通(ip route)Ip route语法:ip route 目标地址子网掩码相邻路由器接口地址Show ip route2、试验拓扑:Router0:192.168.11.1Router1:fa0/0 192.168.11.2Fa0/1 192.168.12.1Router2:192.168.12.23、实验步骤:Router1Router>enRouter#conf tRouter(config)#host r1r1(config)#int fa0/0r1(config-if)#ip add 192.168.11.1 255.255.255.0r1(config-if)#no sh%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to upr1(config-if)#exitr1(config)#exitr1#show ip interface bInterface IP-Address OK? Method Status ProtocolFastEthernet0/0 192.168.11.1 YES manual up downFastEthernet0/1 unassigned YES manual administratively down downVlan1 unassigned YES manual administratively down downr1#%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up r1#ping 192.168.12.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.12.1, timeout is 2 seconds:.....Success rate is 0 percent (0/5)r1#conf tEnter configuration commands, one per line. End with CNTL/Z.r1(config)#ip route 192.168.12.0 255.255.255.0 192.168.11.2r1(config)#exitr1#ping 192.168.12.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.12.1, timeout is 2 seconds:Success rate is 100 percent (5/5), round-trip min/avg/max = 31/31/32 msr1#ping 192.168.12.2Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.12.2, timeout is 2 seconds:.....Success rate is 0 percent (0/5)r1#ping 192.168.12.2Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.12.2, timeout is 2 seconds:Success rate is 100 percent (5/5), round-trip min/avg/max = 47/62/78 msr1#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - 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 - ODRP - periodic downloaded static routeGateway of last resort is not setC 192.168.11.0/24 is directly connected, FastEthernet0/0S 192.168.12.0/24 [1/0] via 192.168.11.2Router3Router>enRouter#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#host r3r3(config)#int fa0/0r3(config-if)#ip add 192.168.12.2 255.255.255.0r3(config-if)#no sh%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up r3(config-if)#exitr3(config)#exitr3#%SYS-5-CONFIG_I: Configured from console by consoler3#show ip interface bInterface IP-Address OK? Method Status Protocol FastEthernet0/0 192.168.12.2 YES manual up up FastEthernet0/1 unassigned YES manual administratively down downVlan1 unassigned YES manual administratively down downr3#conf tEnter configuration commands, one per line. End with CNTL/Z.r3(config)#ip route 192.168.11.0 255.255.255.0 192.168.12.1r3(config)#exitr3#ping 192.168.11.2Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.11.2, timeout is 2 seconds:Success rate is 100 percent (5/5), round-trip min/avg/max = 31/31/32 msr3#ping 192.168.11.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.11.1, timeout is 2 seconds:Success rate is 100 percent (5/5), round-trip min/avg/max = 62/62/63 msr3#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2i - 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 - ODRP - periodic downloaded static routeGateway of last resort is not setS 192.168.11.0/24 [1/0] via 192.168.12.1C 192.168.12.0/24 is directly connected, FastEthernet0/04、默认路由Route 1r1>enr1#conf tEnter configuration commands, one per line. End with CNTL/Z.r1(config)#no ip route 192.168.12.0 255.255.255.0 192.168.11.2%No matching route to deleter1(config)#exitr1#%SYS-5-CONFIG_I: Configured from console by consoler1#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - 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 - ODRP - periodic downloaded static routeGateway of last resort is not setC 192.168.11.0/24 is directly connected, FastEthernet0/0r1#conf tEnter configuration commands, one per line. End with CNTL/Z.r1(config)#ip route 0.0.0.0 0.0.0.0 192.168.11.2r1(config)#exitr1#%SYS-5-CONFIG_I: Configured from console by consoler1#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2i - 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 - ODRP - periodic downloaded static routeGateway of last resort is 192.168.11.2 to network 0.0.0.0C 192.168.11.0/24 is directly connected, FastEthernet0/0S* 0.0.0.0/0 [1/0] via 192.168.11.2r1#ping 192.168.12.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.12.1, timeout is 2 seconds:Success rate is 100 percent (5/5), round-trip min/avg/max = 16/28/31 msr1#ping 192.168.12.2Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.12.2, timeout is 2 seconds: Success rate is 100 percent (5/5), round-trip min/avg/max = 62/62/63 msRoute 3r1>enr1#conf tEnter configuration commands, one per line. End with CNTL/Z.r1(config)#no ip route 192.168.12.0 255.255.255.0 192.168.11.2%No matching route to deleter1(config)#exitr1#%SYS-5-CONFIG_I: Configured from console by consoler1#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - 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 - ODRP - periodic downloaded static routeGateway of last resort is not setC 192.168.11.0/24 is directly connected, FastEthernet0/0r1#conf tEnter configuration commands, one per line. End with CNTL/Z.r1(config)#ip route 0.0.0.0 0.0.0.0 192.168.11.2r1(config)#exitr1#%SYS-5-CONFIG_I: Configured from console by consoler1#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - 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 - ODRP - periodic downloaded static routeGateway of last resort is 192.168.11.2 to network 0.0.0.0C 192.168.11.0/24 is directly connected, FastEthernet0/0S* 0.0.0.0/0 [1/0] via 192.168.11.2r3#ping 192.168.11.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.11.1, timeout is 2 seconds: Success rate is 100 percent (5/5), round-trip min/avg/max = 62/62/63 ms实训六动态路由RIP 协议1、实验目的使用配置动态路由启动Rip协议使用到的命令(router rip/network/show ip protocols/show ip route)2、实验拓扑R1 fa0/0 192.168.11.1R2 fa0/0 192.168.11.2fa0/1 192.168.12.1R3 fa0/0 192.168.12.23、实验步骤R1Router>enRouter#conf tEnter configuration commands, one per line. End with CNTL/Z. Router(config)#host r1r1(config)#int fa0/0r1(config-if)#ip add 192.168.11.1 255.255.255.0r1(config-if)#no shr1(config-if)#exitr1(config)#router ripr1(config-router)#network 192.168.11.0r1(config-router)#exitr1(config)#exitr1#%SYS-5-CONFIG_I: Configured from console by consoleR2Router>enRouter#conf tEnter configuration commands, one per line. End with CNTL/Z. Router(config)#host r2r2(config)#int fa0/0r2(config-if)#ip add 192.168.11.2 255.255.255.0r2(config-if)#no shr2(config-if)#exitr2(config)#int fa0/1r2(config-if)#ip add 192.168.12.1 255.255.255.0r2(config-if)#no shr2(config-if)#exitr2(config)#router ripr2(config-router)#network 192.168.11.0r2(config-router)#network 192.168.12.0r2(config-router)#exitr2(config)#exitr2#R3Router>enRouter#conf tEnter configuration commands, one per line. End with CNTL/Z. Router(config)#host r3r3(config)#int fa0/0r3(config-if)#ip add 192.168.12.2 255.255.255.0r3(config-if)#no shr3(config-if)#exitr3(config)#router ripr3(config-router)#network 192.168.12.0r3(config-router)#exitr3(config)#exitr3#%SYS-5-CONFIG_I: Configured from console by console4、实验测试R1r1#show ip protocolsRouting Protocol is "rip"Sending updates every 30 seconds, next due in 10 secondsInvalid after 180 seconds, hold down 180, flushed after 240 Outgoing update filter list for all interfaces is not setIncoming update filter list for all interfaces is not set Redistributing: ripDefault version control: send version 1, receive any version Interface Send Recv Triggered RIP Key-chain FastEthernet0/0 1 2 1Automatic network summarization is in effectMaximum path: 4Routing for Networks:192.168.11.0Passive Interface(s):Routing Information Sources:Gateway Distance Last UpdateDistance: (default is 120)r1#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - 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 - ODRP - periodic downloaded static routeGateway of last resort is not setC 192.168.11.0/24 is directly connected, FastEthernet0/0R 192.168.12.0/24 [120/1] via 192.168.11.2, 00:00:24, FastEthernet0/0 r1#ping 192.168.12.0Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.12.0, timeout is 2 seconds: Success rate is 100 percent (5/5), round-trip min/avg/max = 31/31/32 msR2r2#show ip protocolsRouting Protocol is "rip"Sending updates every 30 seconds, next due in 21 secondsInvalid after 180 seconds, hold down 180, flushed after 240Outgoing update filter list for all interfaces is not setIncoming update filter list for all interfaces is not setRedistributing: ripDefault version control: send version 1, receive any versionInterface Send Recv Triggered RIP Key-chain FastEthernet0/0 1 2 1FastEthernet0/1 1 2 1Automatic network summarization is in effectMaximum path: 4Routing for Networks:192.168.11.0192.168.12.0Passive Interface(s):Routing Information Sources:Gateway Distance Last UpdateDistance: (default is 120)r2#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - 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 - ODRP - periodic downloaded static routeGateway of last resort is not setC 192.168.11.0/24 is directly connected, FastEthernet0/0C 192.168.12.0/24 is directly connected, FastEthernet0/1R3r3#show ip protocolsRouting Protocol is "rip"Sending updates every 30 seconds, next due in 15 secondsInvalid after 180 seconds, hold down 180, flushed after 240Outgoing update filter list for all interfaces is not setIncoming update filter list for all interfaces is not setRedistributing: ripDefault version control: send version 1, receive any versionInterface Send Recv Triggered RIP Key-chain FastEthernet0/0 1 2 1Automatic network summarization is in effectMaximum path: 4Routing for Networks:192.168.12.0Passive Interface(s):Routing Information Sources:Gateway Distance Last UpdateDistance: (default is 120)r3#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - 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 - ODRP - periodic downloaded static routeGateway of last resort is not setR 192.168.11.0/24 [120/1] via 192.168.12.1, 00:00:04, FastEthernet0/0 C 192.168.12.0/24 is directly connected, FastEthernet0/0r3#ping 192.168.11.0Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.11.0, timeout is 2 seconds: Success rate is 100 percent (5/5), round-trip min/avg/max = 31/31/32 ms实训七负载平衡试训目的实现负载平衡实训拓扑R1 fa0/0 192.168.11.1R2 eth0/0/0 192.168.11.2Fa0/0 192.168.12.1Fa0/0 192.168.13.1R3 fa0/0 192.168.12.2Fa0/1 192.168.14.1R4 fa0/0 192.168.13.2Fa0/1 192.168.15.1R5 fa0/0 192.168.14.2Fa0/1 192.168.15.2实训步骤(R1 )r1>enR1#conf tR1(config)#ip route 0.0.0.0 0.0.0.0 192.168.11.2R1(config)#exitr1#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - 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 - ODRP - periodic downloaded static routeGateway of last resort is 192.168.11.2 to network 0.0.0.0C 192.168.11.0/24 is directly connected, FastEthernet0/0S* 0.0.0.0/0 [1/0] via 192.168.11.2(R2)r2>enr2(config)#ip route 0.0.0.0 0.0.0.0 192.168.12.2r2(config)#ip route 0.0.0.0 0.0.0.0 192.168.13.2r2(config)#exitr2#%SYS-5-CONFIG_I: Configured from console by consoles% Ambiguous command: "s"r2#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - 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 - ODRP - periodic downloaded static routeGateway of last resort is 192.168.12.2 to network 0.0.0.0C 192.168.11.0/24 is directly connected, Ethernet0/0/0C 192.168.12.0/24 is directly connected, FastEthernet0/0C 192.168.13.0/24 is directly connected, FastEthernet0/1S* 0.0.0.0/0 [1/0] via 192.168.12.2[1/0] via 192.168.13.2(R3)r3>enr3#conf tEnter configuration commands, one per line. End with CNTL/Z.r3(config)#ip route 0.0.0.0 0.0.0.0 192.168.12.1r3(config)#exitr3#%SYS-5-CONFIG_I: Configured from console by consoler3#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - 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 - ODRP - periodic downloaded static routeGateway of last resort is 192.168.12.1 to network 0.0.0.0C 192.168.12.0/24 is directly connected, FastEthernet0/0C 192.168.14.0/24 is directly connected, FastEthernet0/1S* 0.0.0.0/0 [1/0] via 192.168.12.1(R4)r4>enr4#conf tEnter configuration commands, one per line. End with CNTL/Z.r4(config)#ip route 0.0.0.0 0.0.0.0 192.168.13.1r4(config)#exitr4#%SYS-5-CONFIG_I: Configured from console by consoler4#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - 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 - ODRP - periodic downloaded static routeGateway of last resort is 192.168.13.1 to network 0.0.0.0C 192.168.13.0/24 is directly connected, FastEthernet0/0C 192.168.15.0/24 is directly connected, FastEthernet0/1S* 0.0.0.0/0 [1/0] via 192.168.13.1(R5)r5>enr5#conf tEnter configuration commands, one per line. End with CNTL/Z.r5(config)#ip route 0.0.0.0 0.0.0.0 192.168.14.1r5(config)#ip route 0.0.0.0 0.0.0.0 192.168.15.1r5(config)#exitr5#%SYS-5-CONFIG_I: Configured from console by consoler5#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - 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 - ODRP - periodic downloaded static routeGateway of last resort is 192.168.14.1 to network 0.0.0.0C 192.168.14.0/24 is directly connected, FastEthernet0/0C 192.168.15.0/24 is directly connected, FastEthernet0/1S* 0.0.0.0/0 [1/0] via 192.168.14.1[1/0] via 192.168.15.1实训测试(R1)r1#ping 192.168.14.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.14.1, timeout is 2 seconds:Success rate is 100 percent (5/5), round-trip min/avg/max = 62/84/94 ms (R5)r5#ping 192.168.11.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.11.1, timeout is 2 seconds: Success rate is 100 percent (5/5), round-trip min/avg/max = 79/91/94 ms实训八DHCP 协议配置实训目的全网配通实训拓扑Fa0/0 192.168.11.1Fa0/1 192.168.12.1实训步骤Router>enRouter#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#host r1r1(config)#int fa0/0r1(config-if)#ip add 192.168.11.1 255.255.255.0r1(config-if)#no shr1(config-if)#exitr1(config)#int fa0/1r1(config-if)#ip add 192.168.12.1 255.255.255.0r1(config-if)#no shr1(config-if)#exitr1(config)#ip dhcp pool znn //配置一个根地址池znnr1(dhcp-config)#network 192.168.11.0 255.255.255.0 //为所有客户机动态分配的地址段r1(dhcp-config)#default-router 192.168.11.1 //为客户机配置默认的网关r1(dhcp-config)#dns-server 192.168.11.1 //为客户机配置DNS服务器r1(dhcp-config)#exitr1(config)#ip dhcp pool znn1r1(dhcp-config)#network 192.168.12.0 255.255.255.0r1(dhcp-config)#default-router 192.168.12.1r1(dhcp-config)#dns-server 192.168.12.1r1(dhcp-config)#exit。
Cisco路由器QoS配置实例详解
QoS---CQ(定制队列)学习CQ(定制队列)的配置;本实验首先用ACL定义一些流量。
然后再将这些流量进行先后排队,最后将排好队的流量策略应用到接口上1 过滤流量R2(config)#access-list 101 permit ospf any anyR2(config)#access-list 101 permit eigrp any anyR2(config)#access-list 102 permit ip any 192.168.0.1 0.0.0.0R2(config)#access-list 102 permit ip host 192.168.0.1 anyR2(config)#access-list 103 permit tcp any host 192.168.0.1 eq 23R2(config)#access-list 103 permit tcp any host 192.168.0.1 eq 21R2(config)#access-list 103 permit tcp any host 192.168.0.1 eq 20R2(config)#access-list 104 permit udp any lt 200 any lt 200R2(config)#access-list 104 permit tcp any range 135 139 any range 135 139R2(config)#access-list 105 permit udp any range 16333 35252 any range 16333 352522 队列排序R2(config)#queue-list 1 protocol ip 1 list 101 //将与List101匹配的流量排在第一位R2(config)#queue-list 1 protocol ip 2 list 102R2(config)#queue-list 1 protocol ip 3 list 103R2(config)#queue-list 1 protocol ip 4 list 104R2(config)#queue-list 1 protocol ip 5 list 1053 将CQ应用到接口R2(config)#int s0R2(config-if)#custom-queue-list 1 //将这个定制好的队列应用到接口上4 检验R2#sh queueing //查看队列Current fair queue configuration:Interface Discard Dynamic Reserved Link Prioritythreshold queues queues queues queuesBRI0 64 16 0 8 1BRI0:1 64 16 0 8 1BRI0:2 64 16 0 8 1Serial1 64 256 0 8 1Current DLCI priority queue configuration:Current priority queue configuration:Current custom queue configuration:List Queue Args1 1 protocol ip list 1011 2 protocol ip list 1021 3 protocol ip list 1031 4 protocol ip list 1041 5 protocol ip list 105QoS---PQ11 将udp协议的16333端口至35252端口都设为低优先级2 将rip设为高优先级R1(config)#priority-list 1 protocol ip low list 100 //建立优先级列表1,将与access-list 100匹配的流量设为低优先级R1(config)#access-list 100 permit udp any range 16333 35252 any range 16333 35252 //range命令是设定一个端口范围R1(config)#priority-list 1 protocol ip high udp ripR1(config)#int s0R1(config-if)#priority-group 1 //将优先级列表1应用到接口S0上2 验证R1#sh queueingCurrent fair queue configuration:Interface Discard Dynamic Reservedthreshold queue count queue countSerial1 64 256 0Current priority queue configuration:List Queue Args1 low protocol ip list-1001 high protocol ip udp port ripR1#sh ip int s0Serial0 is administratively down, line protocol is downInternet protocol processing disabledR1#sh int s0Serial0 is administratively down, line protocol is downHardware is HD64570MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec,reliability 255/255, txload 1/255, rxload 1/255Encapsulation HDLC, loopback not setKeepalive set (10 sec)Last input never, output 01:37:44, output hang neverLast clearing of "show interface" counters neverInput queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 159 Queueing strategy: priority-list 1Output queue (queue priority: size/max/drops):high: 0/20/0, medium: 0/40/0, normal: 0/60/159, low: 0/80/05 minute input rate 0 bits/sec, 0 packets/sec5 minute output rate 0 bits/sec, 0 packets/sec0 packets put, 52588119 bytes, 0 no bufferReceived 0 broadcasts, 0 runts, 0 giants, 0 throttles0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort0 packets, 52588444 bytes, 0 underruns0 output errors, 0 collisions, 2 interface resets0 output buffer failures, 0 output buffers swapped out6 carrier transitionsDCD=down DSR=down DTR=down RTS=down CTS=downQoS----PQ21 将主机192.168.0.1设为最高优先级2 将192.168.0.0/24网段下的其他主机设为中等优先级3 将所有http流量设为普通优先级4 将所有ftp流量设为低优先级配置如下:R1(config)#priority-list 2 protocol ip high list 2 //建立优先级列表2 ,将与access-list 2匹配的流量定为高优先级R1(config)#access-list 2 permit 192.168.0.1 0.0.0.0R1(config)#priority-list 2 protocol ip medium list 3R1(config)#access-list 3 deny 192.168.0.1 0.0.0.0R1(config)#access-list 3 permit 192.168.0.0 0.0.0.255R1(config)#priority-list 2 protocol ip normal tcp wwwR1(config)#priority-list 2 protocol ip low tcp ftpR1(config)#priority-list 2 protocol ip low tcp ftp-dataR1(config)#int s1R1(config-if)#priority-group 2 //在接口S1上应用该优先级列表R1#sh queueing //查看队列Current fair queue configuration:Current priority queue configuration:List Queue Args2 high protocol ip list 22 medium protocol ip list 32 normal protocol ip tcp port www2 low protocol ip tcp port ftp2 low protocol ip tcp port ftp-dataQoS---CBWFQ(基于类分配带宽)CBWFQ(基于类分配带宽)基本配置实验要求:给上一个实验所定义的3种流量,QQ,SMTP,FTP分配不同的带宽1 定义流量(直接调用上一个实验的配置)R4(config)#class-map QQR4(config-cmap)#match access-group name QQ//匹配一个名为QQ的命名ACLR4(config-cmap)#exiR4(config)#ip access-list extended QQR4(config-ext-nacl)#permit ip any 61.172.240.0 0.0.0.255R4(config-ext-nacl)#permit udp any any eq 4000R4(config-ext-nacl)#permit udp any any eq 8000R4(config-ext-nacl)#exiR4(config)#class-map smtpR4(config-cmap)#match access-group 100R4(config-cmap)#exiR4(config)#access-list 100 permit tcp any any eq smtpR4(config)#class-map ftpR4(config-cmap)#match access-group 101R4(config-cmap)#exiR4(config)#access-list 101 permit tcp any any eq 20R4(config)#access-list 101 permit tcp any any eq 212 定义策略R4(config)#policy-map CBWFQR4(config-pmap)#class QQR4(config-pmap-c)#bandwidth percent 5 //为类型为QQ的流量分配百分之五的带宽R4(config-pmap)#class smtpR4(config-pmap-c)#bandwidth percent 25R4(config-pmap)#class ftpR4(config-pmap-c)#bandwidth percent 20R4(config-pmap-c)#exi3 应用到接口上R4(config)#int s0R4(config-if)#service-policy output CBWFQ4 验证R4#sh policy-map//查看策略Policy Map wyClass QQpolice cir 10000 bc 1500conform-action dropexceed-action dropClass smtppolice cir 10000 bc 1500conform-action dropexceed-action dropClass ftppolice cir 10000 bc 1500conform-action dropexceed-action dropPolicy Map CBWFQClass QQBandwidth 5 (%) Max Threshold 64 (packets) Class smtpBandwidth 25 (%) Max Threshold 64 (packets) Class ftpBandwidth 20 (%) Max Threshold 64 (packets)。
cisco路由器三层交换机简单环境配置实例
cisco路由器三层交换机简单环境配置实例随着Internet的高速发展,网络规模不断膨胀,对于从事网络专业的学生熟练掌握路由器和交换机的配置已显得十分重要。
接下来是小编为大家收集的cisco路由器三层交换机简单环境配置实例方法,希望能帮到大家。
cisco路由器三层交换机简单环境配置实例:一、网络拓扑图:二、配置命令:1、路由器的配置:interface FastEthernet0/0ip address 10.66.88.222 255.255.255.0ip nat outsideduplex autospeed autointerface FastEthernet0/1ip address 192.168.1.1 255.255.255.0ip nat insideduplex autospeed autointerface Vlan1no ip addressshutdownip nat inside source list 1 interface FastEthernet0/0 overload ip classlessip route 192.168.2.0 255.255.255.0 192.168.1.222ip route 192.168.3.0 255.255.255.0 192.168.1.222access-list 1 permit 192.168.0.0 0.0.255.255三、三层交换机的配置:hostname L3-SWip dhcp pool vlan2poolnetwork 192.168.3.0 255.255.255.0 default-router 192.168.3.1dns-server 202.101.172.35ip dhcp pool vlan1poolnetwork 192.168.2.0 255.255.255.0 default-router 192.168.2.1dns-server 202.101.172.35interface FastEthernet0/1no switchportip address 192.168.1.222 255.255.255.0 duplex autospeed autointerface FastEthernet0/2 switchport mode trunkinterface FastEthernet0/5 switchport mode trunkinterface Vlan1ip address 192.168.2.1 255.255.255.0 interface Vlan2ip address 192.168.3.1 255.255.255.0 ip classlessip route 0.0.0.0 0.0.0.0 192.168.1.1四、二层交换机的配置:1、switch0的配置:hostname sw0interface FastEthernet0/1 switchport mode trunkinterface FastEthernet0/2 switchport mode access2、switch1的配置:hostname sw1interface FastEthernet0/1switchport mode trunkinterface FastEthernet0/2switchport access vlan 2switchport mode access看了“cisco路由器三层交换机简单环境配置实例”还想看:1.思科交换机基本配置实例讲解2.三层交换机配置的实例教程3.cisco路由器怎么在虚拟环境下配置三层交换4.cisco2960交换机的简单配置5.交换机配置基础及实例讲解6.思科三层交换机与路由器的比较方法7.思科交换机配置教程详解。
实验九 配置 IPv6 路由(cisco)
实验九配置IPv6路由实验拓扑实验要求1、配置每台路由器的ipv4和ipv6地址2、R1和R3上建立一条6to4tunnel3、R1和R3之间配置RIPng实现两个ipv6网络互相通信实验步骤1、在R1和R3上开启Ipv6路由能R1(config)#ipv6unicast-routingR3(config)#ipv6unicast-routing2、在三台路由器上配置Ipv4地址,并配置默认路由R1(config)#interface ethernet0/0R1(config-if)#ip address192.168.12.1255.255.255.0R1(config-if)#no shutdownR1(config)#ip route0.0.0.00.0.0.0192.168.12.2R2(config)#interface ethernet0/0R2(config-if)#ip address192.168.12.2255.255.255.0R2(config-if)#no shut R2(config-if)#exit R2(config)#interface ethernet0/1R2(config-if)#ip address192.168.23.2255.255.255.0R2(config-if)#no shutR3(config)#interface ethernet0/1R3(config-if)#ip address192.168.23.3255.255.255.0R3(config-if)#no shutdownR3(config)#ip route0.0.0.00.0.0.0192.168.23.23、配置R1和R3的Ipv6地址R1(config)#interface loopback0R1(config-if)#ipv6address fec0:2001::1/120R3(config)#interface loopback0R3(config-if)#ipv6address fec0:2002::1/1204.配置R1和R3的6to4Tunnel配置之前先测试R1是否能ping通192.168.23.3,如果能通才能做下面的操作R1(config)#interface tunnel0R1(config-if)#ipv6enableR1(config-if)#tunnel mode ipv6ipR1(config-if)#tunnel source192.168.12.1R1(config-if)#tunnel destination192.168.23.3R3(config)#interface tunnel0R3(config-if)#ipv6enableR3(config-if)#tunnel mode ipv6ipR3(config-if)#tunnel source192.168.23.3R3(config-if)#tunnel destination192.168.12.1R1#show ipv6interface briefEthernet0/0[up/up]unassignedEthernet0/1[administratively d own/down]unassignedLoopback0[up/up]FE80::203:E3FF:FE22:E5C0FEC0:2001::1Tunnel0[up/up]FE80::C0A8:C015.配置RIPngR1(config)#ipv6routerrip AAAR1(config-rtr)#exitR1(config)#interfacetunnel0R1(config-if)#ipv6ripAAA enableR1(config-if)#exitR1(config)#interfaceloopback0R1(config-if)#ipv6rip AAA enableR3(config)#ipv6routerrip BBBR3(config-rtr)#exitR3(config)#interfacetunnel0R3(config-if)#ipv6ripBBB enableR3(config-if)#exitR3(config)#interfaceloopback0R3(config-if)#ipv6rip BBB enable6.检查和测试R1#show ipv6routeIPv6Routing T able-5entriesCodes:C-Connected,L-Local,S-Static,R-RIP,B-BGP U-Per-user Static routeI1-ISIS L1,I2-ISIS L2,IA-ISIS interarea,IS-ISIS summaryO-OSPF intra,OI-OSPF inter,OE1-OSPF ext1,OE2-OSPF ext2ON1-OSPF NSSA ext1,ON2-OSPF NSSA ext2L FE80::/10[0/0]via::,Null0C FEC0:2001::/120[0/0]via::,Loopback0L FEC0:2001::1/128[0/0]via::,Loopback0R FEC0:2002::/120[120/2]via FE80::C0A8:1703,Tunnel0L FF00::/8[0/0]via::,Null0R1#ping fec0:2002::1source loopback0T ype escape sequence to abort.Sending5,100-byte ICMP Echos to FEC0:2002::1,timeout is2seconds: !!!!!。
Cisco(思科)路由器静态路由的配置
Cisco(思科)路由器静态路由的配置实验拓扑实验步骤我们要使得 1.1.1.0/24、2.2.2.0/24、3.3.3.0/24 ⽹络之间能够互相通信。
(1)步骤 1:在各路由器上配置 IP 地址、保证直连链路的连通性R1(config)#int loopback0R1(config-if)#ip address 1.1.1.1 255.255.255.0R1(config)#int s0/0/0R1(config-if)#ip address 192.168.12.1 255.255.255.0R1(config-if)#no shutdownR2(config)#int loopback0R2(config-if)#ip address 2.2.2.2 255.255.255.0R2(config)#int s0/0/0R2(config-if)#clock rate 128000R2(config-if)#ip address 192.168.12.2 255.255.255.0R2(config-if)#no shutdownR2(config)#int s0/0/1R2(config-if)#clock rate 128000R2(config-if)#ip address 192.168.23.2 255.255.255.0R2(config-if)#no shutdownR3(config)#int loopback0R3(config-if)#ip address 3.3.3.3 255.255.255.0R3(config)#int s0/0/1R3(config-if)#ip address 192.168.23.3 255.255.255.0R3(config-if)#no shutdown(2)步骤 2:R1上配置静态路由R1(config)#ip route 2.2.2.0 255.255.255.0 s0/0/0//下⼀跳为接⼝形式,s0/0/0 是点对点的链路,注意应该是 R1 上的s0/0/0 接⼝R1(config)#ip route 3.3.3.0 255.255.255.0 192.168.12.2//下⼀跳为IP 地址形式,192.168.12.2 是R2 上的IP 地址(3)步骤 3:R2上配置静态路由R2(config)#ip route 1.1.1.0 255.255.255.0 s0/0/0R2(config)#ip route 3.3.3.0 255.255.255.0 s0/0/1(4)步骤 4:R3上配置静态路由R3(config)#ip route 1.1.1.0 255.255.255.0 s0/0/1R3(config)#ip route 2.2.2.0 255.255.255.0 s0/0/1实验调试(1)在 R1、R2、R3 上查看路由表R1#show ip routeCodes: C - connected, S - static, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - 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 routeo - ODR, P - periodic downloaded static routeGateway of last resort is not setC 192.168.12.0/24 is directly connected, Serial0/0/01.0.0.0/24 is subnetted, 1 subnetsC 1.1.1.0 is directly connected, Loopback02.0.0.0/24 is subnetted, 1 subnetsS 2.2.2.0 is directly connected, Serial0/0/03.0.0.0/24 is subnetted, 1 subnetsS 3.3.3.0 [1/0] via 192.168.12.2R2#show ip routeCodes: C - connected, S - static, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2ia - IS-IS inter area, * - candidate default, U - per-user static routeo - ODR, P - periodic downloaded static routeGateway of last resort is not setC 192.168.12.0/24 is directly connected, Serial0/0/01.0.0.0/24 is subnetted, 1 subnetsS 1.1.1.0 is directly connected, Serial0/0/02.0.0.0/24 is subnetted, 1 subnetsC 2.2.2.0 is directly connected, Loopback03.0.0.0/24 is subnetted, 1 subnetsS 3.3.3.0 is directly connected, Serial0/0/1C 192.168.23.0/24 is directly connected, Serial0/0/1R3#show ip routeCodes: C - connected, S - static, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2ia - IS-IS inter area, * - candidate default, U - per-user static routeo - ODR, P - periodic downloaded static routeGateway of last resort is not set1.0.0.0/24 is subnetted, 1 subnetsS 1.1.1.0 is directly connected, Serial0/0/12.0.0.0/24 is subnetted, 1 subnetsS 2.2.2.0 is directly connected, Serial0/0/13.0.0.0/24 is subnetted, 1 subnets C 3.3.3.0 is directly connected, Loopback0C 192.168.23.0/24 is directly connected, Serial0/0/1(2)从各路由器的环回⼝ ping 其他路由器的环回⼝:R1#ping//不带任何参数的 ping命令,允许我们输⼊更多的参数Protocol [ip]:Target IP address: 2.2.2.2 //⽬标IP地址Repeat count [5]: //发送的ping 次数Datagram size [100]: //ping包的⼤⼩Timeout in seconds [2]: //超时时间Extended commands [n]: y //是否进⼀步扩展命令Source address or interface: 1.1.1.1 //源IP地址Type of service [0]:Set DF bit in IP header? [no]:Validate reply data? [no]:Data pattern [0xABCD]:Loose, Strict, Record, Timestamp, Verbose[none]:Sweep range of sizes [n]:Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:Packet sent with a source address of 1.1.1.1Success rate is 100 percent (5/5), round-trip min/avg/max = 12/14/16 ms//以上说明从 R1 的 loopback0 可以ping 通R2 上的 loopback0。
Cisco路由器静态、动态路由配置
Cisco路由器静态、动态路由配置2010-07-22 20:31Cisco路由器静态、动态路由配置本文介绍Cisco路由器静态、动态路由配置,动态路由协议这里只介绍RIP、EIGRP、OSPF三种。
下面是网络拓扑图:如上图网络拓扑,配置路由协议使其网络连通(PC0和PC1互通)。
一、配置静态路由1.配置IP地址信息台式机的IP地址配置很简单,我这里不用多说,PC0 IP:10.3.0.2 NETMASK:255.255.255.0 PC1 IP:192.16.3.2 NETMASK:255.255.255.0 。
下面配置router0下面配置router1这里我们来试试PC0和PC1互通性PC0 ping PC1如图所示:这里我们看到PC0和PC1并不能相通。
PC1 ping PC0如图所示:这里我们看到PC1和PC0也并不能相通。
2.配置静态路由协议Router(config)#ip route 192.16.3.0 255.255.255.0 172.16.2.2 R1(config)#ip route 10.3.0.0 255.255.255.0 172.16.2.1 下面我们再来试试PC0和PC1互通性PC0 ping PC1如图所示:这里我们看到PC0和PC1能相通,我们配置的静态路由协议起作用了。
PC1 ping PC0如图所示:这里我们看到PC1和PC0能相通,我们配置的静态路由协议也起作用了。
二、 RIP路由协议的配置1. 配置IP地址信息配置IP地址信息见上面配置静态路由中配置IP地址信息,我这里不多说。
这里配置了ip地址以后如静态路由中一样,PC0和PC1不能相通。
2. 配置rip路由协议配置router0Router(config)#router ripRouter(config-router)#version 2Router(config-router)#network 10.3.0.0Router(config-router)#network 172.16.2.0配置router1R1(config)#router ripR1(config-router)#version 2R1(config-router)#network 192.16.3.0R1(config-router)#network 172.16.2.03. 查看rip路由信息查看router0查看router1这里我们可以看到R开头的路由信息即是通过rip协议得到的路由信息。
思科路由器配置命令详解及实例
思科路由器配置命令详解及实例思科路由器配置命令详解及实例一、路由器基本配置1.1 登录路由器为了配置和管理思科路由器,您需要登录到路由器的控制台或通过远程登录方式。
使用以下命令登录路由器,并进行必要的身份验证:```Router> enableRouterconfigure terminalEnter configuration commands, one per line: End with TL/Z:Router(config)hostname [路由器名称]Router(config)enable secret [密码]Router(config)line console 0Router(config-line)password [密码]Router(config-line)logging synchronousRouter(config-line)exitRouter(config)line vty 0 4Router(config-line)password [密码]Router(config-line)logging synchronous```1.2 配置接口接下来,您需要配置路由器的接口,以便与其他网络设备进行通信。
使用以下命令配置接口:```Router(config)interface [接口类型] [接口编号]Router(config-if)ip address [IP地址] [子网掩码]Router(config-if)no shutdownRouter(config-if)exit```二、路由配置2.1 静态路由静态路由是手动配置的路由项,将特定的网络目的地与下一跳路由器关联起来。
以下是配置静态路由的示例命令:```Router(config)ip route [目的网络] [子网掩码] [下一跳地址]```2.2 动态路由动态路由是通过路由协议动态学习并自动更新的路由项。
思科路由器SSH配置案例
思科路由器SSH配置案例思科路由器SSH配置案例SSH 为建立在应用层基础上的'安全协议。
SSH 是目前较可靠,专为远程登录会话和其他网络服务提供安全性的协议。
利用 SSH 协议可以有效防止远程管理过程中的信息泄露问题。
下面是思科路由器SSH 配置案例,希望对你有帮助!1. 配置hostname和ipdomain-nameRouter#configure terminalRouter(config)#hostname R2 //配置ssh的时候路由器的名字不能为routerR2(config)#ip domain-name //配置SSH必需R2(config)#username best password best1或 username best privilege 15 password 7 best1注:添加一个用户:best,口令:best1R2(config)#line vty 0 4R2(config-line)#transport input ssh //只允许用SSH登录(注意:禁止telnet和从交换引擎session!)2. 配置SSH服务:R2(config)#crypto key generate rsaThe name for the keys will be: 注:SSH的关键字名就是hostname + . +ipdomain-nameChoose the size of the key modulus in the range of 360 to 2048 for yourGeneral Purpose Keys. Choosing a key modulus greater than 512 may takea few minutsHow many bits in the modulus [512]: 注:选择加密位数,cisco推荐使用1024Generating RSA keys ...[OK]用命令show ip ssh也能看到:SSH Enabled - version 1.5Authentication timeout: 120 secs; Authentication retries:现在SSH服务已经启动,如果需要停止SSH服务,用以下命令:R2(config)#crypto key zeroize rsa3.设置SSH参数配置好了SSH之后,通过show run命令我们看到SSH默认的参数:超时限定为120秒,认证重试次数为3次,可以通过下面命令进行修改:R2(config)#ip ssh {[time-out seconds]} │ [authentication-retries interger]}如果要把超时限定改为180秒,则应该用:R2(config)# ip ssh time-out 180如果要把重试次数改成5次,则应该用:R2(config)# ip ssh authentication-retries这样,SSH已经在路由器上配置成功了,就能够通过SSH进行安全登录了。
思科路由器配置教程
思科路由器配置教程思科路由器配置教程1、硬件准备1.1 路由器选购1.2 网线连接1.3 电源连接2、系统登录2.1 打开浏览器2.2 输入默认IP地质2.3 输入用户名和密码2.4 登录路由器管理界面3、基本配置3.1 修改设备名称3.2 设置系统时间3.3 配置DNS服务器3.4 设置路由器登录密码3.5 保存配置4、网络接口配置4.1 查看接口信息4.2 配置IP地质4.3 配置子网掩码4.4 配置默认网关4.5 激活接口4.6 保存配置5、路由配置5.1 静态路由配置5.2 动态路由配置5.3 路由优先级配置5.4 保存配置6、网络服务配置6.1 DHCP服务器配置 6.2 NAT配置6.3 ACL配置6.4 端口转发配置6.5 防火墙配置6.6 保存配置7、无线网络配置7.1 开启无线功能7.2 配置无线网络名称(SSID)7.3 配置无线密码7.4 保存配置8、安全性配置8.1 修改默认管理端口8.2 配置访问控制列表(ACL)8.3 开启SSH服务8.4 配置防火墙规则8.5 保存配置9、附件本文档附带了以下相关附件,供参考使用: - 配置示例文件- 路由器型号手册- 思科路由器常见问题解答集10、法律名词及注释- IP地质:Internet Protocol Address,即互联网协议地质,用于唯一标识网络上的设备。
- DNS服务器:Domn Name System Server,用于将域名解析为对应的IP地质。
- DHCP服务器:Dynamic Host Configuration Protocol Server,用于自动分配IP地质和其他网络配置信息给客户端设备。
- NAT:Network Address Translation,网络地质转换,用于将私有IP地质转换为公共IP地质。
- ACL:Access Control List,访问控制列表,用于控制网络流量的进出规则。
思科Cisco路由器配置——RIP路由配置实验详解
思科Cisco路由器配置——RIP路由配置实验详解本⽂实例讲述了思科Cisco RIP路由配置实验。
分享给⼤家供⼤家参考,具体如下:⼀、实验⽬的:使⽤RIP版本2配置路由器,让路由器可以接收到所有的路由条⽬⼆、拓扑图:三、具体步骤配置:(1)R1路由器配置Router>enable --进⼊特权模式Router#configure terminal --进⼊全局配置模式Enter configuration commands, one per line. End with CNTL/Z.Router(config)#hostname R1 --修改路由器名为R1R1(config)#interface s0/0/0 --进⼊端⼝R1(config-if)#ip address 192.168.1.1 255.255.255.0 --设置ip地址R1(config-if)#clock rate 64000 --设置时钟速率R1(config-if)#no shutdown --激活端⼝%LINK-5-CHANGED: Interface Serial0/0/0, changed state to downR1(config-if)#interface l0 --进⼊回环端⼝R1(config-if)#ip address 1.1.1.1 255.255.255.0 --设置ip地址R1(config-if)#exit --返回上⼀级R1(config)#router rip --开启rip协议R1(config-router)#version 2 --版本2R1(config-router)#no auto-summary --关闭⾃动汇总R1(config-router)#network 192.168.1.0 --添加直连⽹段到RIPR1(config-router)#network 1.1.1.0 --添加直连⽹段到RIPR1(config-router)#end --返回特权模式(2)R2路由器配置Router>enable --进⼊特权模式Router#configure terminal --进⼊全局配置模式Enter configuration commands, one per line. End with CNTL/Z.Router(config)#hostname R2 --修改路由器名为R2R2(config)#interface s0/0/0 --进⼊端⼝R2(config-if)#ip address 192.168.1.2 255.255.255.0 --设置ip地址R2(config-if)#no shutdown --激活端⼝R2(config-if)#interface s0/0/1 --进⼊端⼝R2(config-if)#ip address 192.168.2.1 255.255.255.0 --设置ip地址R2(config-if)#clock rate 64000 --设置时钟速率R2(config-if)#no shutdown --激活端⼝%LINK-5-CHANGED: Interface Serial0/0/1, changed state to downR2(config-if)#exit --返回上⼀级R2(config)#router rip --开启rip协议R2(config-router)#version 2 --版本2R2(config-router)#no auto-summary --关闭⾃动汇总R2(config-router)#network 192.168.1.0 --添加直连⽹段到RIPR2(config-router)#network 192.168.2.0 ----添加直连⽹段到RIPR2(config-router)#end --返回特权模式(3)R3路由器配置Router>enable --进⼊特权模式Router#configure terminal --进⼊全局配置模式Enter configuration commands, one per line. End with CNTL/Z.Router(config)#hostname R3 --修改路由器名R3R3(config)#interface s0/0/0 --进⼊端⼝R3(config-if)#ip address 192.168.3.1 255.255.255.0 --设置ip地址R3(config-if)#clock rate 64000 --设置时钟速率R3(config-if)#no shutdown --激活端⼝%LINK-5-CHANGED: Interface Serial0/0/0, changed state to downR3(config-if)#interface s0/0/1 --进⼊端⼝R3(config-if)#ip address 192.168.2.2 255.255.255.0 --设置ip地址R3(config-if)#no shutdown --激活端⼝R3(config-if)#exit --返回上⼀级R3(config)#router rip --开启rip协议R3(config-router)#version 2 --版本2R3(config-router)#no auto-summary --关闭⾃动汇总R3(config-router)#network 192.168.2.0 --添加直连⽹段到RIPR3(config-router)#network 192.168.3.0 --添加直连⽹段到RIPR3(config-router)#end --返回特权模式(3)R4路由器配置Router>enable --进⼊特权模式Router#configure terminal --进⼊全局配置模式Enter configuration commands, one per line. End with CNTL/Z. Router(config)#hostname R4 --修改路由器名为R4R4(config)#interface s0/0/0 --进⼊端⼝R4(config-if)#ip address 192.168.3.2 255.255.255.0 --设置ip地址R4(config-if)#no shutdown --激活端⼝R4(config-if)#interface l0 --进⼊回环端⼝R4(config-if)#ip address 2.2.1.1 255.255.255.0 --设置ip地址R4(config-if)#interface l1 --进⼊回环端⼝R4(config-if)#ip address 2.2.2.1 255.255.255.0 --设置ip地址R4(config-if)#interface l2 --进⼊回环端⼝R4(config-if)#ip address 2.2.3.1 255.255.255.0 --设置ip地址R4(config-if)#interface l3 --进⼊回环端⼝R4(config-if)#ip address 2.2.4.1 255.255.255.0 --设置ip地址R4(config-if)#exit 返回上⼀级R4(config)#router rip --开启rtp协议R4(config-router)#version 2 --版本2R4(config-router)#no auto-summary --关闭路由汇总R4(config-router)#network 192.168.3.0 --添加直连⽹段到RIPR4(config-router)#network 2.2.1.0 --添加直连⽹段到RIPR4(config-router)#network 2.2.2.0 --添加直连⽹段到RIPR4(config-router)#network 2.2.3.0 --添加直连⽹段到RIPR4(config-router)#network 2.2.4.0 --添加直连⽹段到RIPR4(config-router)#end --返回特权模式四、验证:(1)查看路由器路由表(2)测试ping通性。
实验三 Cisco路由器的基本配置
实验三 Cisco路由器的基本配置(验证性)(2学时)一、实验目的1.掌握Cisco路由器的基本配置命令2.熟悉Cisco路由器的配置环境二、实验内容(一)路由器的工作模式在命令行状态下,主要有以下几种工作模式:1.一般用户模式(UserEXEC)用户模式用于查看路由器的基本信息。
在用户模式下,只能够运行少数的命令,且不能对路由器进行配置。
从配置端口进入路由器时,首先要进入一般用户模式,一般用户模式下默认的路由器提示符为:Router>如果配置了路由器的名字,则提示符为:路由器的名字>用logout命令退出。
2.特权模式在默认状态下,特权模式可以使用比一般用户模式下多得多的命令。
特权模式用于查看路由器的各种状态,绝大多数命令用于测试网络、检查系统等,但是不能对端口及网络协议进行配置。
路由器未做任何配置时,输入enable命令即可由一般用户模式进入特权模式。
如果配置了口令,则需要输入口令。
默认的特权模式的提示符为:Router#如果配置了路由器的名字,则提示符为:路由器的名字#退出方法:用exit或disable命令退到userEXEC模式。
3.全局配置模式(GobalConfiguration)全局配置模式中可以配置一些全局性的参数。
要进入全局配置模式,必须首先进入特权模式。
在进入配置模式前,必须指定是通过终端、NVRAM或是网络服务器进行配置。
如果通过终端进行配置,输入config terminal命令,进入全局配置模式。
全局配置模式的提示符为:Router(config)#如果配置了路由器的名字,则提示符为:路由器的名字(config)#退出方法:可使用exit或end或Ctrl+Z命令退到特权模式4.全局配置模式下的配置子模式在全局配置模式下可进入各种配置子模式①端口配置模式进入方式:在全局配置模式下,用interface命令进入具体的端口Router(config)#interface 端口的类型端口号提示符:Router(config-if)#②子端口配置模式进入方式:在端口配置模式下用interface命令进入指定的子端口Router(config-if)#interface端口的类型端口号.子端口号提示符:Router(config-subif)#③路由配置模式进入方式:在全局配置模式下,用“router 具体的协议名”命令指定具体的路由协议。
Cisco路由器QoS配置实例详解
Cisco路由器QoS配置实例详解Cisco路由器QoS配置实例详解1、介绍本文档旨在详细介绍如何在Cisco路由器上配置QoS (Quality of Service)以优化网络性能和资源分配。
通过正确配置QoS,可以提供更好的网络服务质量,确保重要的数据流能够得到优先处理,从而提高网络整体性能。
2、QoS的基本概念在开始配置QoS之前,了解以下几个基本概念是很重要的: - 带宽:指网络在一定时间内能够传输的数据量,通常以每秒传输的比特数(bps)来表示。
- 延迟:指数据在网络中传输所需的时间延迟。
- 丢包率:指在数据传输过程中丢失的数据包的百分比。
- 重传:当数据包丢失时,发送方会重新发送相同的数据包。
- 流量控制:通过限制数据传输的速度,以避免网络拥塞。
3、QoS的常见策略针对不同类型的网络流量,可以使用多种QoS策略来优化性能:- Traffic Shaping:通过限制数据传输速率来平滑网络流量,避免拥塞。
- Traffic Policing:对流量施加限制,超出限制的流量将被丢弃或重标记。
- Priority Queuing:给重要数据流分配高优先级,确保其能够得到及时处理。
- Class-Based Queuing:根据数据流的类别分配带宽,优先处理重要的数据流。
- Weighted Fr Queuing:根据流量的重要性将带宽公平分配给不同的数据流。
- Low Latency Queuing:通过消除队列延迟来提供低延迟的服务。
4、配置QoS的步骤在Cisco路由器上配置QoS通常需要以下步骤:4.1 创建访问列表:用于标识要进行QoS处理的流量。
4.2 创建类别地图:将访问列表与QoS策略关联起来。
4.3 配置QoS策略:根据需求选择合适的QoS策略,并应用于特定的接口。
4.4 验证QoS配置:使用适当的测试工具验证配置是否生效,并对网络性能进行评估。
5、示例配置以下是一个示例配置,用于说明如何在Cisco路由器上实现基于端口的优先级排队(Port-Based Priority Queuing): ```interface FastEthernet0/0priority-queue out```通过这个配置,接口FastEthernet0/0上的数据流将被赋予最高优先级,确保其能够得到及时处理。
(完整word版)Cisco Packet Tracer实验5:CISCO 路由器基本配置
实验5:CISCO 路由器基本配置一、实验目的1、练习cisco 路由器端口的基本配置;2、初步了解静态路由协议二、实验环境:packet tracer 5.0三、实验步骤:拓扑结构图如下所示:配置过程:Router1:Router>enable /进入特权模式Router#config t /进入配置模式Enter configuration commands, one per line。
End with CNTL/Z.Router(config)#hostname yangyu /修改路由器名称yangyu(config)#int serial 0/0/0 /配置串口yangyu(config-if)#ip add 192.168。
2。
1 255.255.255。
0yangyu(config—if)#clock rate 64000yangyu(config-if)#no shut%LINK—5—CHANGED: Interface Serial0/0/0, changed state to downyangyu(config-if)#int fa0/0 /配置以太网接口yangyu(config-if)#ip add 192.168.1.1 255.255。
255.0yangyu(config-if)#no shut%LINK-5—CHANGED: Interface FastEthernet0/0, changed state to up%LINEPROTO—5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up yangyu(config)#%LINK—5-CHANGED: Interface Serial0/0/0, changed state to upyangyu#config tEnter configuration commands, one per line。
思科路由器静态路由配置实验案例详解
思科路由器静态路由配置实验案例详解本⽂实例讲述了思科路由器静态路由配置实验。
分享给⼤家供⼤家参考,具体如下:实验⼋ 路由器静态路由配置⼀、实验⽬标1. 掌握静态路由的配置⽅法和技巧;2. 掌握通过静态路由⽅式实现⽹络的连通性;3. 熟悉⼴域⽹线缆的链接⽅式;⼆、实验背景 学校有新旧两个校区,每个校区是⼀个独⽴的局域⽹,为了使新旧校区能够正常相互通讯,共享资源。
每个校区出⼝利⽤⼀台路由器进⾏连接,两台路由器间学校申请了⼀条2M的DDN专线进⾏相连,要求做适当配置实现两个校区的正常相互访问。
三、技术原理1. 路由器属于⽹络层设备,能够根据IP包头的信息,选择⼀条最佳路径,将数据包转发出去。
实现不同⽹段的主机之间的互相访问。
路由器是根据路由表进⾏选路和转发的。
⽽路由表⾥就是由⼀条条路由信息组成。
2. ⽣成路由表主要有两种⽅法:⼿⼯配置和动态配置,即静态路由协议配置和动态路由协议配置。
3. 静态路由是指有⽹络管理员⼿⼯配置的路由信息。
4. 静态路由除了具有简单、⾼效、可靠的优点外,它的另⼀个好处是⽹络安全保密性⾼。
5. 缺省路由可以看做是静态路由的⼀种特殊情况。
当数据在查找路由表时,没有找到和⽬标相匹配的路由表项时,为数据指定路由。
四、实验步骤 新建packet tracer拓扑图 (1)在路由器R1、R2上配置接⼝的IP地址和R1串⼝上的时钟频率; (2)查看路由器⽣成的直连路由; (3)在路由器R1、R2上配置静态路由; (4)验证R1、R2上的静态路由配置; (5)将PC1、PC2主机默认⽹关分别设置为路由器接⼝fa 1/0的IP地址; (6)PC1、PC2主机之间可以相互通信;五、实验设备 pc 2台;Router-PT可扩展路由 2台(Switch_2811⽆V.35线接⼝);Switch_2960 2台;DCE 串⼝线;直连线;交叉线六、实验拓扑图七、实验命令PC1IP: 192.168.1.2Submask: 255.255.255.0Gateway: 192.168.1.1PC2IP: 192.168.2.2Submask: 255.255.255.0Gateway: 192.168.2.1R1enconf thostname R1int fa 1/0no shutip address 192.168.1.1 255.255.255.0exitint serial 2/0no shutip address 192.168.3.1 255.255.255.0clock rate 64000(必须配置时钟才可通信)endR2enconf thostname R2int fa 1/0no shutip address 192.168.2.1 255.255.255.0exitint serial 2/0ip address 192.168.3.2 255.255.255.0no shutendR1enconf tip route 192.168.2.0 255.255.255.0 192.168.3.2endshow ip routeR2enconf tip route 192.168.1.0 255.255.255.0 192.168.3.1endshow ip route⼋、实验结果 配置PC0、PC1的IP地址: 配置R1,R2接⼝的IP 地址和R1串⼝上的时钟频率: 在路由器R1、R2上配置静态路由,验证R1、R2上的静态路由配置 PC0 ping PC1:。
Cisco路由器静态路由配置实例
Cisco路由器静态路由配置实例初学路由器的配置,下面就用Boson NetSim for CCNP 6.1模拟软件进行配置…这篇文章主要是对路由表进行静态路由配置…拓扑结构图如下:下面开始:1.对Router1进行配置,配置命令如下:Router>enable进入特权模式Router#configure terminal 进入配置模式Enter configuration commands, one per line. End with CNTL/Z. Router(config)#interface ethernet0 进入E0端口模式Router(config-if)#ip address 192.168.1.1 255.255.255.0 配置IP地址Router(config-if)#no shutdown 激活该端口%LINK-3-UPDOWN: Interface Ethernet0, changed state to upRouter(config-if)#exit 返回上一级Router(config)#interface serial0 进入S0 端口模式Router(config-if)#ip address 192.168.2.1 255.255.255.0Router(config-if)#no shutdown%LINK-3-UPDOWN: Interface Serial0, changed state to up%LINK-3-UPDOWN: Interface Serial0, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state to downRouter(config-if)#clock rate 6400 注意这里是设置时钟..如有不明白,可以打”?”.但是系统给的参数是 64000 .而我们要配置成 6400 ..可能是模拟软件的一个小BUG 吧!现在是在模拟软件中,如果是真实环境,我们要参照说明书..按照说明书来配置参数….Router(config-if)#exitRouter(config)#ip route 192.168.3.0 255.255.255.0 192.168.2.2 配置路由表Router(config)#end 返回特权模式Router#show ip route查看路由表Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaE1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate defaultU - per-user static routeGateway of last resort is not setC 192.168.1.0 is directly connected, Ethernet0S 192.168.3.0 [1/0] via 192.168.2.2C 192.168.2.0 is directly connected, Serial02. 对Router2进行配置,配置命令如下:Router>enableRouter#configure terminalEnter configuration commands, one per line. End with CNTL/Z. Router(config)#interface ethernet0Router(config-if)#ip address 192.168.3.1 255.255.255.0Router(config-if)#no shutdown%LINK-3-UPDOWN: Interface Ethernet0, changed state to upRouter(config-if)#exitRouter(config)#interface serial0Router(config-if)#ip address 192.168.2.2 255.255.255.0Router(config-if)#no shutdown%LINK-3-UPDOWN: Interface Serial0, changed state to up/////在这儿我们就不用设置时钟了,在相连的两个路由器接口中,只要一个接口配置时钟就可以了Router(config-if)#exitRouter(config)#ip route 192.168.1.0 255.255.255.0 192.168.2.1Router(config)#endRouter#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaE1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate defaultU - per-user static routeGateway of last resort is not setC 192.168.3.0 is directly connected, Ethernet0C 192.168.2.0 is directly connected, Serial0S 192.168.1.0 [1/0] via 192.168.2.13.对计算机的配置..IP地址和子网掩码还有网关上面的图上面的..测试:PC1 ping PC3C:>ping 192.168.3.2Pinging 192.168.3.2 with 32 bytes of data:Reply from 192.168.3.2: bytes=32 time=60ms TTL=241Reply from 192.168.3.2: bytes=32 time=60ms TTL=241Reply from 192.168.3.2: bytes=32 time=60ms TTL=241Reply from 192.168.3.2: bytes=32 time=60ms TTL=241Reply from 192.168.3.2: bytes=32 time=60ms TTL=241Ping statistics for 192.168.3.2: Packets: Sent = 5, Received = 5, Lost = 0 (0% loss),Approximate round trip times in milli-seconds:Minimum = 50ms, Maximum = 60ms, Average = 55ms 静态路由表的配置完成..初学者…有错误希望大家指出…..。
思科路由器配置命令详解及实例
CISCO路由器配置命令详解及实例目录CISCO路由器配置命令详解及实例 (1)第一章:路由器配置基础 (2)一、基本设置方式 (2)二、命令状态 (2)三、设置对话过程 (3)四、常用命令 (5)五、配置IP寻址 (6)六、配置静态路由 (8)第二章:广域网协议设置 (8)一、HDLC (8)二、PPP (11)三、x.25 (12)四、Frame Relay (15)五. Cisco765M通过ISDN拨号上263 (18)六、PSTN (19)第三章:路由协议设置 (30)一、RIP协议 (30)三、OSPF协议 (31)四、重新分配路由 (34)五、IPX协议设置 (36)第四章:服务质量及访问控制 (37)一、协议优先级设置 (37)二、队列定制 (38)三、访问控制 (38)第五章:虚拟局域网(VLAN)路由 (39)一、虚拟局域网(VLAN) (39)二、交换机间链路(ISL)协议 (39)三、虚拟局域网(VLAN)路由实例 (39)第六章:知识参考 (44)一、路由器初始化 (44)二、IP分配 (45)第一章:路由器配置基础一、基本设置方式一般来说,可以用5种方式来设置路由器:1.Console口接终端或运行终端仿真软件的微机;2.AUX口接MODEM,通过电话线与远方的终端或运行终端仿真软件的微机相连;3.通过Ethernet上的TFTP服务器;4.通过Ethernet上的TELNET程序;5.通过Ethernet上的SNMP网管工作站。
但路由器的第一次设置必须通过第一种方式进行,此时终端的硬件设置如下:波特率:9600数据位:8停止位:1奇偶校验: 无二、命令状态1. router>路由器处于用户命令状态,这时用户可以看路由器的连接状态,访问其它网络和主机,但不能看到和更改路由器的设置内容。
2. router#在router>提示符下键入enable,路由器进入特权命令状态router#,这时不但可以执行所有的用户命令,还可以看到和更改路由器的设置内容。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
实训报告实训一路由基本配置1、实验目的:路由器基本配置及ip设置2、拓扑结构图Router0 fa0/0: 192.168.11.1Fa0/1:192.168.1.1Router1 fa0/0: 192.168.11.2Fa0/1:192.168.2.1Znn1:192.168.1.2Znn2:192.168.2.23、实验步骤Router1Router>en 用户模式进入特权模式Router#conf t 特权模式进入全局模式Enter configuration commands, one per line. End with CNTL/Z.Router(config)#host rznn1 改名字为rznn1rznn1(config)#int fa0/0 进入fa0/0端口rznn1(config-if)#ip add 192.168.11.1 255.255.255.0 设置ip地址rznn1(config-if)#no sh 激活rznn1(config)#int fa0/1rznn1(config-if)#ip add 192.168.1.1 255.255.255.0rznn1(config-if)#no shrznn1(config-if)#exitrznn1(config)#exitrznn1#copy running-config startup-config 保存Destination filename [startup-config]? startup-configrznn1#conf trznn1(config)#enable secret password 222 设置密文rznn1#show ip interface b 显示Interface IP-Address OK? Method Status Protocol FastEthernet0/0 192.168.11.1 YES manual up up FastEthernet0/1 192.168.1.1 YES manual up upVlan1 unassigned YES manual administratively down downrouter 2outer>enRouter#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#host rznn2rznn2(config)#int fa0/0rznn2(config-if)#ip add 192.168.11.2 255.255.255.0rznn2(config-if)#no shrznn2(config)#int fa0/1rznn2(config-if)#ip add 192.168.2.1 255.255.255.0rznn2(config-if)#no shRznn2#copy running-config startup-config 保存Destination filename [startup-config]? startup-configrznn2(config-if)#exitrznn2(config)#exitrznn2#conf trznn2(config)#enable secret 222rznn2#show ip interface bInterface IP-Address OK? Method Status Protocol FastEthernet0/0 192.168.11.2 YES manual up up FastEthernet0/1 192.168.2.1 YES manual up upVlan1 unassigned YES manual administratively down down实训二1、远程登录、密码设置及验证为路由器开设telnet端口,PC机可以远程登陆到Rznn3(Router 1)拓扑结构图Router0:192.168.1.1Pc:192.168.1.2步骤rznn3>rznn3>enrznn3#conf tEnter configuration commands, one per line. End with CNTL/Z.rznn3(config)#no ip domain lookuprznn3(config)#line cons 0rznn3(config-line)#password znnrznn3(config-line)#loginrznn3(config-line)#no exec-trznn3(config-line)#logg syncrznn3(config-line)#exitrznn3(config)#int fa0/0rznn3(config-if)#ip add 192.168.1.1 255.255.255.0rznn3(config-if)#no shrznn3(config-if)#exitrznn3(config)#line vty 0 4 打通五个端口rznn3(config-line)#password cisco 设置密码rznn3(config-line)#login 保存rznn3(config-line)#exit4、测试:实训三命令组1、目的:八条命令(no ip domain lookup\line cons 0\password\login\no exec-t\logg sync\show version\reload\copy running-config startup-config)\show cdp neighbors)2、拓扑结构图Router0 fa0/0: 192.168.11.1Router1 fa0/0: 192.168.11.23、步骤rznn1#conf tEnter configuration commands, one per line. End with CNTL/Z.1、rznn1(config)#no ip domain lookup 取消域名查找转换2、rznn1(config)#line cons 0 打开cons 0端口3、rznn1(config-line)#password znn 设置密码为znnrznn1(config-line)#login 保存rznn1(config-line)#no exec-t 设置永不超时4、rznn1(config-line)#logg sync 产生日志5、rznn1#show version 显示思科路由系统版本信息Cisco IOS Software, 2800 Software (C2800NM-ADVIPSERVICESK9-M), Version 12.4(15)T1, RELEASE SOFTWARE (fc2)Technical Support: /techsupportCopyright (c) 1986-2007 by Cisco Systems, Inc.Compiled Wed 18-Jul-07 06:21 by pt_rel_team6、rznn1#show cdp neighbors 查看路由器连接的相邻路由器的相关信息Capability Codes: R - Router, T - Trans Bridge, B - Source Route BridgeS - Switch, H - Host, I - IGMP, r - Repeater, P - PhoneDevice ID Local Intrfce Holdtme Capability Platform Port IDrznn2 Fas 0/0 139 R C2800 Fas 0/07、rznn1#copy running-config startup-config 保存刚才指令Destination filename [startup-config]? startup-configBuilding configuration...[OK]8、rznn1#reload 重启路由器Proceed with reload? [confirm]System Bootstrap, Version 12.1(3r)T2, RELEASE SOFTWARE (fc1)Copyright (c) 2000 by cisco Systems, Inc.cisco 2811 (MPC860) processor (revision 0x200) with 60416K/5120K bytes of memorySelf decompressing the image :########################################################################## [OK] Restricted Rights Legendrznn1#show ip interface bInterface IP-Address OK? Method Status Protocol FastEthernet0/0 192.168.11.1 YES manual up up FastEthernet0/1 192.168.1.1 YES manual up upVlan1 unassigned YES manual administratively down down9、rznn1(config-if)#ip add 192.168.3.1 255.255.255.0 重置ip地址rznn1#show ip interface bInterface IP-Address OK? Method Status Protocol FastEthernet0/0 192.168.3.1 YES manual up up FastEthernet0/1 192.168.1.1 YES manual up up Vlan1 unassigned YES manual administratively down down实训四发现协议1、实训目的通过发现协议显示路由器相邻路由的端口信息2、拓扑结构Router0:192.168.11.1Router1:fa0/0 192.168.11.2Fa0/1 192.168.12.1Router2:192.168.12.23、步骤R1路由器Router>enRouter#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#host r1r1(config)#int fa0/0r1(config-if)#ip add 192.168.11.1 255.255.255.0r1(config-if)#no sh%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to upr1(config-if)#r1(config-if)#exitr1(config)#exitr1#%SYS-5-CONFIG_I: Configured from console by consoler1#show ip interface bInterface IP-Address OK? Method Status Protocol FastEthernet0/0 192.168.11.1 YES manual up down FastEthernet0/1 unassigned YES manual administratively down downVlan1 unassigned YES manual administratively down downR2 路由器Router>enRouter#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#host r2r2(config)#int fa0/0r2(config-if)#ip add 192.168.11.2 255.255.255.0r2(config-if)#no sh%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up r2(config-if)#exitr2(config)#exitr2#%SYS-5-CONFIG_I: Configured from console by consoler2#conf tEnter configuration commands, one per line. End with CNTL/Z.r2(config)#int fa0/0r2(config-if)#int fa0/1r2(config-if)#ip add 192.168.12.1 255.255.255.0r2(config-if)#no sh%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to upr2(config-if)#exitr2(config)#exitr2#%SYS-5-CONFIG_I: Configured from console by consoler2#show ip interface bInterface IP-Address OK? Method Status Protocol FastEthernet0/0 192.168.11.2 YES manual up upFastEthernet0/1 192.168.12.1 YES manual up down Vlan1 unassigned YES manual administratively down downR3路由器Router>enRouter#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#host r3r3(config)#int fa0/0r3(config-if)#ip add 192.168.12.2 255.255.255.0r3(config-if)#no sh%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up r3(config-if)#exitr3(config)#exitr3#%SYS-5-CONFIG_I: Configured from console by consoler3#show ip interface bInterface IP-Address OK? Method Status Protocol FastEthernet0/0 192.168.12.2 YES manual up up FastEthernet0/1 unassigned YES manual administratively down downVlan1 unassigned YES manual administratively down downR1发现邻居r1#show cdp neighborsCapability Codes: R - Router, T - Trans Bridge, B - Source Route BridgeS - Switch, H - Host, I - IGMP, r - Repeater, P - PhoneDevice ID Local Intrfce Holdtme Capability Platform Port IDr2 Fas 0/0 165 R C2800 Fas 0/0R2发现邻居r2#show cdp neighborsCapability Codes: R - Router, T - Trans Bridge, B - Source Route BridgeS - Switch, H - Host, I - IGMP, r - Repeater, P - PhoneDevice ID Local Intrfce Holdtme Capability Platform Port IDr1 Fas 0/0 176 R C1841 Fas 0/0r3 Fas 0/1 130 R C1841 Fas 0/0R3发现邻居r3#show cdp neighborsCapability Codes: R - Router, T - Trans Bridge, B - Source Route BridgeS - Switch, H - Host, I - IGMP, r - Repeater, P - PhoneDevice ID Local Intrfce Holdtme Capability Platform Port IDr2 Fas 0/0 166 R C2800 Fas 0/14、总结show 命令(1)show ip interface b (显示端口ip信息)(2)show version (显示ios版本信息)(3)show running-config (显示刚才使用的命令配置信息)(4)show cdp neighbors (显示发现邻居直连设备信息)(5)show interface (显示所有端口详细信息)实训五静态路由1、实验目的:将不同网段的网络配通(ip route)Ip route语法:ip route 目标地址子网掩码相邻路由器接口地址Show ip route2、试验拓扑:Router0:192.168.11.1Router1:fa0/0 192.168.11.2Fa0/1 192.168.12.1Router2:192.168.12.23、实验步骤:Router1Router>enRouter#conf tRouter(config)#host r1r1(config)#int fa0/0r1(config-if)#ip add 192.168.11.1 255.255.255.0r1(config-if)#no sh%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to upr1(config-if)#exitr1(config)#exitr1#show ip interface bInterface IP-Address OK? Method Status ProtocolFastEthernet0/0 192.168.11.1 YES manual up downFastEthernet0/1 unassigned YES manual administratively down downVlan1 unassigned YES manual administratively down downr1#%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up r1#ping 192.168.12.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.12.1, timeout is 2 seconds:.....Success rate is 0 percent (0/5)r1#conf tEnter configuration commands, one per line. End with CNTL/Z.r1(config)#ip route 192.168.12.0 255.255.255.0 192.168.11.2r1(config)#exitr1#ping 192.168.12.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.12.1, timeout is 2 seconds:Success rate is 100 percent (5/5), round-trip min/avg/max = 31/31/32 msr1#ping 192.168.12.2Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.12.2, timeout is 2 seconds:.....Success rate is 0 percent (0/5)r1#ping 192.168.12.2Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.12.2, timeout is 2 seconds:Success rate is 100 percent (5/5), round-trip min/avg/max = 47/62/78 msr1#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - 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 - ODRP - periodic downloaded static routeGateway of last resort is not setC 192.168.11.0/24 is directly connected, FastEthernet0/0S 192.168.12.0/24 [1/0] via 192.168.11.2Router3Router>enRouter#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#host r3r3(config)#int fa0/0r3(config-if)#ip add 192.168.12.2 255.255.255.0r3(config-if)#no sh%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up r3(config-if)#exitr3(config)#exitr3#%SYS-5-CONFIG_I: Configured from console by consoler3#show ip interface bInterface IP-Address OK? Method Status Protocol FastEthernet0/0 192.168.12.2 YES manual up up FastEthernet0/1 unassigned YES manual administratively down downVlan1 unassigned YES manual administratively down downr3#conf tEnter configuration commands, one per line. End with CNTL/Z.r3(config)#ip route 192.168.11.0 255.255.255.0 192.168.12.1r3(config)#exitr3#ping 192.168.11.2Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.11.2, timeout is 2 seconds:Success rate is 100 percent (5/5), round-trip min/avg/max = 31/31/32 msr3#ping 192.168.11.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.11.1, timeout is 2 seconds:Success rate is 100 percent (5/5), round-trip min/avg/max = 62/62/63 msr3#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2i - 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 - ODRP - periodic downloaded static routeGateway of last resort is not setS 192.168.11.0/24 [1/0] via 192.168.12.1C 192.168.12.0/24 is directly connected, FastEthernet0/04、默认路由Route 1r1>enr1#conf tEnter configuration commands, one per line. End with CNTL/Z.r1(config)#no ip route 192.168.12.0 255.255.255.0 192.168.11.2%No matching route to deleter1(config)#exitr1#%SYS-5-CONFIG_I: Configured from console by consoler1#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - 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 - ODRP - periodic downloaded static routeGateway of last resort is not setC 192.168.11.0/24 is directly connected, FastEthernet0/0r1#conf tEnter configuration commands, one per line. End with CNTL/Z.r1(config)#ip route 0.0.0.0 0.0.0.0 192.168.11.2r1(config)#exitr1#%SYS-5-CONFIG_I: Configured from console by consoler1#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2i - 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 - ODRP - periodic downloaded static routeGateway of last resort is 192.168.11.2 to network 0.0.0.0C 192.168.11.0/24 is directly connected, FastEthernet0/0S* 0.0.0.0/0 [1/0] via 192.168.11.2r1#ping 192.168.12.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.12.1, timeout is 2 seconds:Success rate is 100 percent (5/5), round-trip min/avg/max = 16/28/31 msr1#ping 192.168.12.2Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.12.2, timeout is 2 seconds: Success rate is 100 percent (5/5), round-trip min/avg/max = 62/62/63 msRoute 3r1>enr1#conf tEnter configuration commands, one per line. End with CNTL/Z.r1(config)#no ip route 192.168.12.0 255.255.255.0 192.168.11.2%No matching route to deleter1(config)#exitr1#%SYS-5-CONFIG_I: Configured from console by consoler1#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - 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 - ODRP - periodic downloaded static routeGateway of last resort is not setC 192.168.11.0/24 is directly connected, FastEthernet0/0r1#conf tEnter configuration commands, one per line. End with CNTL/Z.r1(config)#ip route 0.0.0.0 0.0.0.0 192.168.11.2r1(config)#exitr1#%SYS-5-CONFIG_I: Configured from console by consoler1#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - 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 - ODRP - periodic downloaded static routeGateway of last resort is 192.168.11.2 to network 0.0.0.0C 192.168.11.0/24 is directly connected, FastEthernet0/0S* 0.0.0.0/0 [1/0] via 192.168.11.2r3#ping 192.168.11.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.11.1, timeout is 2 seconds: Success rate is 100 percent (5/5), round-trip min/avg/max = 62/62/63 ms实训六动态路由RIP 协议1、实验目的使用配置动态路由启动Rip协议使用到的命令(router rip/network/show ip protocols/show ip route)2、实验拓扑R1 fa0/0 192.168.11.1R2 fa0/0 192.168.11.2fa0/1 192.168.12.1R3 fa0/0 192.168.12.23、实验步骤R1Router>enRouter#conf tEnter configuration commands, one per line. End with CNTL/Z. Router(config)#host r1r1(config)#int fa0/0r1(config-if)#ip add 192.168.11.1 255.255.255.0r1(config-if)#no shr1(config-if)#exitr1(config)#router ripr1(config-router)#network 192.168.11.0r1(config-router)#exitr1(config)#exitr1#%SYS-5-CONFIG_I: Configured from console by consoleR2Router>enRouter#conf tEnter configuration commands, one per line. End with CNTL/Z. Router(config)#host r2r2(config)#int fa0/0r2(config-if)#ip add 192.168.11.2 255.255.255.0r2(config-if)#no shr2(config-if)#exitr2(config)#int fa0/1r2(config-if)#ip add 192.168.12.1 255.255.255.0r2(config-if)#no shr2(config-if)#exitr2(config)#router ripr2(config-router)#network 192.168.11.0r2(config-router)#network 192.168.12.0r2(config-router)#exitr2(config)#exitr2#R3Router>enRouter#conf tEnter configuration commands, one per line. End with CNTL/Z. Router(config)#host r3r3(config)#int fa0/0r3(config-if)#ip add 192.168.12.2 255.255.255.0r3(config-if)#no shr3(config-if)#exitr3(config)#router ripr3(config-router)#network 192.168.12.0r3(config-router)#exitr3(config)#exitr3#%SYS-5-CONFIG_I: Configured from console by console4、实验测试R1r1#show ip protocolsRouting Protocol is "rip"Sending updates every 30 seconds, next due in 10 secondsInvalid after 180 seconds, hold down 180, flushed after 240 Outgoing update filter list for all interfaces is not setIncoming update filter list for all interfaces is not set Redistributing: ripDefault version control: send version 1, receive any version Interface Send Recv Triggered RIP Key-chain FastEthernet0/0 1 2 1Automatic network summarization is in effectMaximum path: 4Routing for Networks:192.168.11.0Passive Interface(s):Routing Information Sources:Gateway Distance Last UpdateDistance: (default is 120)r1#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - 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 - ODRP - periodic downloaded static routeGateway of last resort is not setC 192.168.11.0/24 is directly connected, FastEthernet0/0R 192.168.12.0/24 [120/1] via 192.168.11.2, 00:00:24, FastEthernet0/0 r1#ping 192.168.12.0Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.12.0, timeout is 2 seconds: Success rate is 100 percent (5/5), round-trip min/avg/max = 31/31/32 msR2r2#show ip protocolsRouting Protocol is "rip"Sending updates every 30 seconds, next due in 21 secondsInvalid after 180 seconds, hold down 180, flushed after 240Outgoing update filter list for all interfaces is not setIncoming update filter list for all interfaces is not setRedistributing: ripDefault version control: send version 1, receive any versionInterface Send Recv Triggered RIP Key-chain FastEthernet0/0 1 2 1FastEthernet0/1 1 2 1Automatic network summarization is in effectMaximum path: 4Routing for Networks:192.168.11.0192.168.12.0Passive Interface(s):Routing Information Sources:Gateway Distance Last UpdateDistance: (default is 120)r2#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - 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 - ODRP - periodic downloaded static routeGateway of last resort is not setC 192.168.11.0/24 is directly connected, FastEthernet0/0C 192.168.12.0/24 is directly connected, FastEthernet0/1R3r3#show ip protocolsRouting Protocol is "rip"Sending updates every 30 seconds, next due in 15 secondsInvalid after 180 seconds, hold down 180, flushed after 240Outgoing update filter list for all interfaces is not setIncoming update filter list for all interfaces is not setRedistributing: ripDefault version control: send version 1, receive any versionInterface Send Recv Triggered RIP Key-chain FastEthernet0/0 1 2 1Automatic network summarization is in effectMaximum path: 4Routing for Networks:192.168.12.0Passive Interface(s):Routing Information Sources:Gateway Distance Last UpdateDistance: (default is 120)r3#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - 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 - ODRP - periodic downloaded static routeGateway of last resort is not setR 192.168.11.0/24 [120/1] via 192.168.12.1, 00:00:04, FastEthernet0/0 C 192.168.12.0/24 is directly connected, FastEthernet0/0r3#ping 192.168.11.0Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.11.0, timeout is 2 seconds: Success rate is 100 percent (5/5), round-trip min/avg/max = 31/31/32 ms实训七负载平衡试训目的实现负载平衡实训拓扑R1 fa0/0 192.168.11.1R2 eth0/0/0 192.168.11.2Fa0/0 192.168.12.1Fa0/0 192.168.13.1R3 fa0/0 192.168.12.2Fa0/1 192.168.14.1R4 fa0/0 192.168.13.2Fa0/1 192.168.15.1R5 fa0/0 192.168.14.2Fa0/1 192.168.15.2实训步骤(R1 )r1>enR1#conf tR1(config)#ip route 0.0.0.0 0.0.0.0 192.168.11.2R1(config)#exitr1#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - 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 - ODRP - periodic downloaded static routeGateway of last resort is 192.168.11.2 to network 0.0.0.0C 192.168.11.0/24 is directly connected, FastEthernet0/0S* 0.0.0.0/0 [1/0] via 192.168.11.2(R2)r2>enr2(config)#ip route 0.0.0.0 0.0.0.0 192.168.12.2r2(config)#ip route 0.0.0.0 0.0.0.0 192.168.13.2r2(config)#exitr2#%SYS-5-CONFIG_I: Configured from console by consoles% Ambiguous command: "s"r2#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - 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 - ODRP - periodic downloaded static routeGateway of last resort is 192.168.12.2 to network 0.0.0.0C 192.168.11.0/24 is directly connected, Ethernet0/0/0C 192.168.12.0/24 is directly connected, FastEthernet0/0C 192.168.13.0/24 is directly connected, FastEthernet0/1S* 0.0.0.0/0 [1/0] via 192.168.12.2[1/0] via 192.168.13.2(R3)r3>enr3#conf tEnter configuration commands, one per line. End with CNTL/Z.r3(config)#ip route 0.0.0.0 0.0.0.0 192.168.12.1r3(config)#exitr3#%SYS-5-CONFIG_I: Configured from console by consoler3#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - 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 - ODRP - periodic downloaded static routeGateway of last resort is 192.168.12.1 to network 0.0.0.0C 192.168.12.0/24 is directly connected, FastEthernet0/0C 192.168.14.0/24 is directly connected, FastEthernet0/1S* 0.0.0.0/0 [1/0] via 192.168.12.1(R4)r4>enr4#conf tEnter configuration commands, one per line. End with CNTL/Z.r4(config)#ip route 0.0.0.0 0.0.0.0 192.168.13.1r4(config)#exitr4#%SYS-5-CONFIG_I: Configured from console by consoler4#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - 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 - ODRP - periodic downloaded static routeGateway of last resort is 192.168.13.1 to network 0.0.0.0C 192.168.13.0/24 is directly connected, FastEthernet0/0C 192.168.15.0/24 is directly connected, FastEthernet0/1S* 0.0.0.0/0 [1/0] via 192.168.13.1(R5)r5>enr5#conf tEnter configuration commands, one per line. End with CNTL/Z.r5(config)#ip route 0.0.0.0 0.0.0.0 192.168.14.1r5(config)#ip route 0.0.0.0 0.0.0.0 192.168.15.1r5(config)#exitr5#%SYS-5-CONFIG_I: Configured from console by consoler5#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - 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 - ODRP - periodic downloaded static routeGateway of last resort is 192.168.14.1 to network 0.0.0.0C 192.168.14.0/24 is directly connected, FastEthernet0/0C 192.168.15.0/24 is directly connected, FastEthernet0/1S* 0.0.0.0/0 [1/0] via 192.168.14.1[1/0] via 192.168.15.1实训测试(R1)r1#ping 192.168.14.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.14.1, timeout is 2 seconds:Success rate is 100 percent (5/5), round-trip min/avg/max = 62/84/94 ms (R5)r5#ping 192.168.11.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.11.1, timeout is 2 seconds: Success rate is 100 percent (5/5), round-trip min/avg/max = 79/91/94 ms实训八DHCP 协议配置实训目的全网配通实训拓扑Fa0/0 192.168.11.1Fa0/1 192.168.12.1实训步骤Router>enRouter#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#host r1r1(config)#int fa0/0r1(config-if)#ip add 192.168.11.1 255.255.255.0r1(config-if)#no shr1(config-if)#exitr1(config)#int fa0/1r1(config-if)#ip add 192.168.12.1 255.255.255.0r1(config-if)#no shr1(config-if)#exitr1(config)#ip dhcp pool znn //配置一个根地址池znnr1(dhcp-config)#network 192.168.11.0 255.255.255.0 //为所有客户机动态分配的地址段r1(dhcp-config)#default-router 192.168.11.1 //为客户机配置默认的网关r1(dhcp-config)#dns-server 192.168.11.1 //为客户机配置DNS服务器r1(dhcp-config)#exitr1(config)#ip dhcp pool znn1r1(dhcp-config)#network 192.168.12.0 255.255.255.0r1(dhcp-config)#default-router 192.168.12.1r1(dhcp-config)#dns-server 192.168.12.1r1(dhcp-config)#exit。