目錄
一、拓撲圖
二、路由器配置
?R0路由器配置
R1路由器配置
R1路由器配置
三、檢查路由器未知路由條目
R0路由器
R1路由器
R2路由器
四、添加路由器未知條目
R0路由器
R1路由器
R2路由器
五、調(diào)試
PC0到PC1是否能ping通
PC1到PC0是否能ping通
一、拓撲圖
二、路由器配置
?R0路由器配置
Router>en(進入特權(quán)模式)
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(退出特權(quán)、配置模式)
Router(config)#int f0/0(繼續(xù)進入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(返回特權(quán)模式)
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#
五、調(diào)試
PC0到PC1是否能ping通
文章來源:http://www.zghlxwxcb.cn/news/detail-723429.html
PC1到PC0是否能ping通
文章來源地址http://www.zghlxwxcb.cn/news/detail-723429.html
到了這里,關(guān)于三臺路由器兩臺PC的網(wǎng)絡(luò)配置的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!