文章来源地址https://www.toymoban.com/news/detail-623166.html
Router0配置代码:
##端口配置
Router(config)#int fastEthernet 0/0
Router(config-if)#ip address 192.168.10.254 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#int fastEthernet 0/1
Router(config-if)#ip address 192.168.20.1 255.255.255.252
Router(config-if)#no shutdown
Router(config-if)#exit
##静态路由配置:目的网段 子网掩码 下一跳
Router(config)#ip route 192.168.30.0 255.255.255.252 192.168.20.2
Router(config)#ip route 192.168.40.0 255.255.255.0 192.168.20.2
下一跳IP为本路由器对端路由器的直连端口IP地址
Router1配置代码:
##同Router0
Router(config)#int fastEthernet 0/0
Router(config-if)#ip address 192.168.20.2 255.255.255.252
Router(config-if)#no shutdown
Router(config-if)#int fastEthernet 0/1
Router(config-if)#ip address 192.168.30.1 255.255.255.252
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#ip route 192.168.10.0 255.255.255.0 192.168.20.1
Router(config)#ip route 192.168.40.0 255.255.255.0 192.168.30.2
Router2配置代码:
##同Router0
Router(config)#int fastEthernet 0/0
Router(config-if)#ip address 192.168.30.2 255.255.255.252
Router(config-if)#no shutdown
Router(config-if)#int fastEthernet 0/1
Router(config-if)#ip address 192.168.40.254 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#ip route 192.168.10.0 255.255.255.0 192.168.30.1
Router(config)#ip route 192.168.20.0 255.255.255.252 192.168.30.1
测试:PC0 ping PC1 作者:野生网工技术宅 https://www.bilibili.com/read/cv23208432 出处:bilibili
文章来源:https://www.toymoban.com/news/detail-623166.html
到了这里,关于思科模拟器配置静态路由(下一跳使用IP)的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!