目录
一、拓扑图
二、路由器配置
R0路由器配置
R1路由器配置
R1路由器配置
三、检查路由器未知路由条目
R0路由器
R1路由器
R2路由器
四、添加路由器未知条目
R0路由器
R1路由器
R2路由器
五、调试
PC0到PC1是否能ping通
PC1到PC0是否能ping通
一、拓扑图
二、路由器配置
R0路由器配置
Router>en(进入特权模式)
Router#conf t(进入全局配置模式)
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int f0/1(进入R0路由器的0/1接口)
Router(config-if)#ip add(简写按Tab)
Router(config-if)#ip address 192.168.1.254 255.255.255.0(对R1路由器0/1接口配置ip地址)
Router(config-if)#ex(退出特权、配置模式)
Router(config)#int f0/0(继续进入0/0接口)
Router(config-if)#ip add
Router(config-if)#ip address 192.168.2.1 255.255.255.0(对R1路由器0/0接口配置ip地址)
Router(config-if)#end(返回特权模式)
Router#
%SYS-5-CONFIG_I: Configured from console by console
Router#
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int f0/0
Router(config-if)#no shut(激活f0/0接口)
Router(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
Router(config-if)#ex
Router(config)#int f0/1
Router(config-if)#no shut(激活f0/1接口)
R1路由器配置
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int f0/0
Router(config-if)#ip add
Router(config-if)#ip address 192.168.2.2 255.255.255.0
Router(config-if)#ex
Router(config)#int f0/1
Router(config-if)#ip add
Router(config-if)#ip address 192.168.3.1 255.255.255.0
Router(config-if)#end
Router#
%SYS-5-CONFIG_I: Configured from console by console
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int f0/1
Router(config-if)#no shut(激活f0/1接口)
Router(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
Router(config-if)#ex
Router(config)#int f0/0
Router(config-if)#no shut(激活f0/0接口)
Router(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
R1路由器配置
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int f0/0
Router(config-if)#ip add
Router(config-if)#ip address 192.168.3.2 255.255.255.0
Router(config-if)#ex
Router(config)#int f0/1
Router(config-if)#ip add
Router(config-if)#ip address 192.168.4.254 255.255.255.0
Router(config-if)#end
Router#
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int f0/1
Router(config-if)#no shut(激活f0/1接口)
Router(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
Router(config-if)#ex
Router(config)#int f0/0
Router(config-if)#no shut(激活f0/0接口)
三、检查路由器未知路由条目
R0路由器
Router(config-if)#end
Router#
%SYS-5-CONFIG_I: Configured from console by console
Router#show ip route(检查路由器R0已知的路由条目)
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set
C 192.168.1.0/24 is directly connected, FastEthernet0/1(已知条目)
C 192.168.2.0/24 is directly connected, FastEthernet0/0(已知条目)
R1路由器
Router(config-if)#end
Router#
%SYS-5-CONFIG_I: Configured from console by console
Router#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set
C 192.168.2.0/24 is directly connected, FastEthernet0/0(已知条目)
C 192.168.3.0/24 is directly connected, FastEthernet0/1(已知条目)
R2路由器
Router(config-if)#end
Router#
%SYS-5-CONFIG_I: Configured from console by console
Router#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set
C 192.168.3.0/24 is directly connected, FastEthernet0/0(已知条目)
C 192.168.4.0/24 is directly connected, FastEthernet0/1(已知条目)
四、添加路由器未知条目
R0路由器
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#ip route 192.168.3.0 255.255.255.0 192.168.2.2(添加未知路由条目和下一跳地址)
Router(config)#ip route 192.168.4.0 255.255.255.0 192.168.2.2(添加未知路由条目和下一跳地址)
Router(config)#ex
Router#
%SYS-5-CONFIG_I: Configured from console by console
Router#
R1路由器
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#ip route 192.168.1.0 255.255.255.0 192.168.2.1(添加未知路由条目和下一跳地址)
Router(config)#ip route 192.168.4.0 255.255.255.0 192.168.3.2(添加未知路由条目和下一跳地址)
Router(config)#ex
Router#
%SYS-5-CONFIG_I: Configured from console by console
R2路由器
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#ip route 192.168.1.0 255.255.255.0 192.168.3.1(添加未知路由条目和下一跳地址)
Router(config)#ip route 192.168.2.0 255.255.255.0 192.168.3.1(添加未知路由条目和下一跳地址)
Router(config)#ex
Router#
五、调试
PC0到PC1是否能ping通
文章来源:https://www.toymoban.com/news/detail-723429.html
PC1到PC0是否能ping通
文章来源地址https://www.toymoban.com/news/detail-723429.html
到了这里,关于三台路由器两台PC的网络配置的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!