思科 网络拓扑结构 三路由器配置

思科实验网络拓扑结构路由
实验大致预览
  • 知识点1:路由器的使用方法
  • 知识点2:下一跳的配置与使用

第一步 配置 左右 PC的 ip (如图所示)

【注意】 要配置网关 !!!

右侧 PC ↓

第二步 配置 路由器 配置顺序下至上左到右

进入路由器 左 1

Continue with configuration dialog? [yes/no]: no
Press RETURN to get started!
Router>en
Router#configure 
Configuring from terminal, memory, or network [terminal]? 
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#interface gigabitEthernet 0/0       //进入端口 gi 0/0
Router(config-if)#no shutdown                       //打开端口
Router(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0, changed state to up
Router(config-if)#ip address 192.168.1.254 255.255.255.0    //给端口 0/0 配置 ip
Router(config-if)#exit
Router(config)#interface gigabitEthernet 0/1      //进入 0/1
Router(config-if)#no shutdown                     //打开端口
Router(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/1, changed state to up
Router(config-if)#ip address 12.0.0.1 255.255.255.0      //给端口 0/1 配置 ip
Router(config-if)#exit
Router(config)#

进入路由器 上 1

Continue with configuration dialog? [yes/no]: no
Press RETURN to get started!
Router>en
Router#conf
Configuring from terminal, memory, or network [terminal]? 
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#interface gigabitEthernet 0/0
Router(config-if)#no shutdown 
Router(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0, changed state to up
Router(config-if)#ip address 12.0.0.2 255.255.255.0
Router(config-if)#exit
Router(config)#interface gigabitEthernet 0/1
Router(config-if)#no shutdown 
Router(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/1, changed state to up
Router(config-if)#ip address 23.0.0.2 255.255.255.0
Router(config-if)#exit
Router(config)#

进入路由器 右 1

Continue with configuration dialog? [yes/no]: no

Press RETURN to get started!

Router>en
Router#configure 
Configuring from terminal, memory, or network [terminal]? 
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#interface gigabitEthernet 0/0
Router(config-if)#no shutdown 
Router(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0, changed state to up
Router(config-if)#ip address 23.0.0.3 255.255.255.0
Router(config-if)#exit
Router(config)#interface gigabitEthernet 0/1
Router(config-if)#no shutdown 
Router(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1, changed state to up
Router(config-if)#ip address 192.168.3.254 255.255.255.0
Router(config-if)#exit
Router(config)#

最后一步 配置下一跳 ※ 【注意】别跳混!

进入路由器 左 1

Router(config)#
Router(config)#ip route 192.168.3.1 255.255.255.255 12.0.0.2

进入路由器 上 1

Router(config-if)#
Router(config)#ip route 192.168.1.1 255.255.255.255 12.0.0.1
Router(config)#ip route 192.168.3.1 255.255.255.255 23.0.0.3
Router(config)#

进入路由器 右 1

Router(config)#
Router(config)#ip route 192.168.1.1 255.255.255.255 23.0.0.2
Router(config)#

实验结束 检验是否成功

左侧PC192.168.1.1 ping 右侧PC192.168.3.1 成功ping 通 ,实验成功。

实验结束,感谢你的阅读和观看!

Views: 106

默认图片
JiHua

一个专注于前端和NodeJs的网站开发者

文章: 48

留下评论