路由器之间 静态,默认,动态获取路由表设置(Cisco Packer Tracer 模拟器)
来源:互联网 发布:远程登陆阿里云服务器 编辑:程序博客网 时间:2024/06/07 21:19
【拓扑图】
【静态,指向对方】
指出 目标网段, 子网掩码, 下一跳路由 接入端口
路由1:
Router>enRouter#confConfiguring from terminal, memory, or network [terminal]? Enter configuration commands, one per line. End with CNTL/Z.Router(config)#int f0/0Router(config-if)#ip address 192.168.1.254 255.255.255.0Router(config-if)#no shutRouter(config-if)#%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to upRouter(config-if)#exitRouter(config)#int f0/1Router(config-if)#ip address 192.168.3.254 255.255.255.0Router(config-if)#no shutRouter(config-if)#%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to upRouter(config-if)#exitRouter(config)#ip route 192.168.2.0 255.255.255.0 192.168.3.253Router(config)#endRouter#%SYS-5-CONFIG_I: Configured from console by consoleRouter#show ip routeCodes: 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 routeGateway of last resort is not setC 192.168.1.0/24 is directly connected, FastEthernet0/0S 192.168.2.0/24 [1/0] via 192.168.3.253C 192.168.3.0/24 is directly connected, FastEthernet0/1Router#
【路由2】
Router>enRouter#confConfiguring from terminal, memory, or network [terminal]? Enter configuration commands, one per line. End with CNTL/Z.Router(config)#int f0/0Router(config-if)#ip address 192.168.2.254 255.255.255.0Router(config-if)#no shutRouter(config-if)#%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to upRouter(config-if)#exitRouter(config)#int f0/1Router(config-if)#ip address 192.168.3.253 255.255.255.0Router(config-if)#no shutRouter(config-if)#%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to upRouter(config-if)#exitRouter(config)#ip route 192.168.1.0 255.255.255.0 192.168.3.254Router(config)#endRouter#%SYS-5-CONFIG_I: Configured from console by consolRouter>show ip routeCodes: 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 routeGateway of last resort is not setS 192.168.1.0/24 [1/0] via 192.168.3.254C 192.168.2.0/24 is directly connected, FastEthernet0/0C 192.168.3.0/24 is directly connected, FastEthernet0/1
【测试】 pc-1 ping 192.168.2.1
默认路由
类似
【路由1】
Router>enRouter#confConfiguring from terminal, memory, or network [terminal]? Enter configuration commands, one per line. End with CNTL/Z.Router(config)#int f0/0Router(config-if)#ip address 192.168.1.254 255.255.255.0Router(config-if)#no shutRouter(config-if)#%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to upRouter(config-if)#exitRouter(config)#int f0/1Router(config-if)#ip address 192.168.3.254 255.255.255.0Router(config-if)#no shutRouter(config-if)#%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to upRouter(config-if)#exitRouter(config)#ip route 0.0.0.0 0.0.0.0 192.168.3.253Router(config)#endRouter#%SYS-5-CONFIG_I: Configured from console by consoleRouter>show ip routeCodes: 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 routeGateway of last resort is 192.168.3.253 to network 0.0.0.0C 192.168.1.0/24 is directly connected, FastEthernet0/0C 192.168.3.0/24 is directly connected, FastEthernet0/1S* 0.0.0.0/0 [1/0] via 192.168.3.253
【路由2】
Router>enRouter#confConfiguring from terminal, memory, or network [terminal]? Enter configuration commands, one per line. End with CNTL/Z.Router(config)#int f0/0Router(config-if)#ip address 192.168.2.254 255.255.255.0Router(config-if)#no shutRouter(config-if)#%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to upRouter(config-if)#exitRouter(config)#int f0/1Router(config-if)#ip address 192.168.3.253 255.255.255.0Router(config-if)#no shutRouter(config-if)#%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to upRouter(config-if)#exitRouter(config)#ip route 0.0.0.0 0.0.0.0 192.168.3.254Router(config)#endRouter#%SYS-5-CONFIG_I: Configured from console by consolRouter>show ip routeCodes: 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 routeGateway of last resort is 192.168.3.254 to network 0.0.0.0C 192.168.2.0/24 is directly connected, FastEthernet0/0C 192.168.3.0/24 is directly connected, FastEthernet0/1S* 0.0.0.0/0 [1/0] via 192.168.3.254
【测试】
pc2 ping 192.168.1.1
动态路由
每30s 发送 自己网段信息和 端口信息
注意 当两个路由器都 配置完后 , 需要等待一会 才能看到 自动匹配的路由表
命令也类似
【路由1】
Router>enRouter#confConfiguring from terminal, memory, or network [terminal]? Enter configuration commands, one per line. End with CNTL/Z.Router(config)#int f0/0Router(config-if)#ip address 192.168.1.254 255.255.255.0Router(config-if)#no shutRouter(config-if)#%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to upRouter(config-if)#exitRouter(config)#int f0/1Router(config-if)#ip address 192.168.3.254 255.255.255.0Router(config-if)#no shutRouter(config-if)#%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to upRouter(config-if)#exitRouter(config)#route ripRouter(config-router)#version 2Router(config-router)#network 192.168.1.0Router(config-router)#network 192.168.3.0Router(config-router)#endRouter#%SYS-5-CONFIG_I: Configured from console by consoleRouter#show ip routeCodes: 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 routeGateway of last resort is not setC 192.168.1.0/24 is directly connected, FastEthernet0/0C 192.168.3.0/24 is directly connected, FastEthernet0/1Router#show ip routeCodes: 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 routeGateway of last resort is not setC 192.168.1.0/24 is directly connected, FastEthernet0/0R 192.168.2.0/24 [120/1] via 192.168.3.253, 00:00:13, FastEthernet0/1C 192.168.3.0/24 is directly connected, FastEthernet0/1Router#
【路由2】
Router>enRouter#confConfiguring from terminal, memory, or network [terminal]? Enter configuration commands, one per line. End with CNTL/Z.Router(config)#int f0/0Router(config-if)#ip address 192.168.2.254 255.255.255.0Router(config-if)#no shutRouter(config-if)#%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to upRouter(config-if)#exitRouter(config)#int f0/1Router(config-if)#ip address 192.168.3.253 255.255.255.0Router(config-if)#no shutRouter(config-if)#%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to upRouter(config)#exitRouter(config)#router ripRouter(config-router)#version 2Router(config-router)#network 192.168.2.0Router(config-router)#network 192.168.3.0Router(config-router)#endRouter#%SYS-5-CONFIG_I: Configured from console by consoleRouter#show ip routeCodes: 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 routeGateway of last resort is not setC 192.168.2.0/24 is directly connected, FastEthernet0/0C 192.168.3.0/24 is directly connected, FastEthernet0/1Router#show ip routeCodes: 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 routeGateway of last resort is not setR 192.168.1.0/24 [120/1] via 192.168.3.254, 00:00:24, FastEthernet0/1C 192.168.2.0/24 is directly connected, FastEthernet0/0C 192.168.3.0/24 is directly connected, FastEthernet0/1
【测试】
pc1 ping 192.168.2.1
阅读全文
0 0
- 路由器之间 静态,默认,动态获取路由表设置(Cisco Packer Tracer 模拟器)
- 单臂路由 (Cisco Packer Tracer 模拟器)
- 三层交换机实现路由功能配置示例与详解 (Cisco Packer Tracer 模拟器)
- 两层交换机上划分VLAN借三层交换机路由功能实现跨网段访问(Cisco Packer Tracer 模拟器)
- OSPF 直连接与虚连接配置实例 (Cisco Packer Tracer 模拟器)
- 二层交换机实现vlan 功能 (Cisco Packer Tracer 模拟器)
- 网络Cisco实验-交换机路由器综合实验(静态路由)
- Cisco 路由器 OSPF协议(动态路由访问)
- Cisco 路由器 RIP协议(动态路由访问)
- CISCO 2台路由器静态路由
- CISCO 3台路由器静态路由
- Cisco 路由器 OSPF动态路由技术试题
- Cisco Packet Tracer模拟器使用
- Cisco Packet Tracer模拟器使用
- 路由器静态路由配置(华为模拟器)
- 路由器中的静态路由设置
- 构建简易网络与网络设备的简单配置(Cisco Packet Tracer)第二弹:静态路由协议配置
- 构建简易网络与网络设备的简单配置(Cisco Packet Tracer)第三弹:动态路由协议配置
- 欢迎使用CSDN-markdown编辑器
- python3.6.2与mysql的连接--pip安装pymysql
- 11.7(周二)
- 线程池实战实例Java + Python
- redis的开启和关闭,
- 路由器之间 静态,默认,动态获取路由表设置(Cisco Packer Tracer 模拟器)
- SJTU OJ 1012. 增长率问题
- List对象利用属性进行排序的通用工具类
- 漫步最优化三十九——Fletcher-Reeves法
- CCF排队问题
- 使用Softmax回归模型训练识别MNIST数据
- ReactJS + SpringMVC整合Java利用Docker部署
- va_start和va_end使用详解
- 判断学生成绩是否有效