admin 管理员组文章数量: 1086019
完成拓扑结构
Router(config)#int g0/1
Router(config-if)#ip add 10.1.1.1 255.255.255.0
Router(config-if)#no shutdown。
配置g口路由器ip,使主机可以连通路由器
Router(config)#int s0/2/0
Router(config-if)#ip add 172.1.1.2 255.255.255.0
Router(config-if)#clock rate 2000000
Router(config-if)#no shutdown
配置R1 s0/2/0串口ip,设置时钟率
Router(config)#int s0/2/0
Router(config-if)#ip add 172.1.1.1 255.255.255.0
Router(config-if)#no shutdown
配置R0 s0/2/0,路由器串口两边都要配置
Router(config)#int s0/2/1
Router(config-if)#ip add 172.1.2.1 255.255.255.0
Router(config-if)#clock rate 2000000
Router(config-if)#no shutdown
配置中转路由R0的另一个串口
时钟配置要向水一样顺时针
相同方法配置R2
配置静态路由
同一个路由下默认有直连路由,其下三个网络可以相互连通
不知道下一条的地址,可以用出入口来配置静态路由
比如左边的网络想要访问到172.1.2.1 已知出口是s0/2/0,可以这样写
Router(config)#ip route 172.1.2.0 255.255.255.0 s0/2/0
配置R1
Router(config)#ip route 172.1.2.0 255.255.255.0 s0/2/0
%Default route without gateway, if not a point-to-point interface, may impact performance
Router(config)#ip route 192.168.1.0 255.255.255.0 s0/2/0
%Default route without gateway, if not a point-to-point interface, may impact performance
Router(config)#ip route 192.168.2.0 255.255.255.0 s0/2/0
%Default route without gateway, if not a point-to-point interface, may impact performance
配置R2
Router(config)#ip route 172.1.1.0 255.255.255.0 s0/2/1
%Default route without gateway, if not a point-to-point interface, may impact performance
Router(config)#ip route 10.1.1.0 255.255.255.0 s0/2/1
%Default route without gateway, if not a point-to-point interface, may impact performance
Router(config)#ip route 10.1.2.0 255.255.255.0 s0/2/1
%Default route without gateway, if not a point-to-point interface, may impact performance
配置R0 注意左边网络的出口是s0/2/0,右边网络的出口是s0/2/1
Router(config)#ip route 10.1.1.0 255.255.255.0 s0/2/0
%Default route without gateway, if not a point-to-point interface, may impact performance
Router(config)#ip route 10.1.2.0 255.255.255.0 s0/2/0
%Default route without gateway, if not a point-to-point interface, may impact performance
Router(config)#ip route 192.168.1.0 255.255.255.0 s0/2/1
%Default route without gateway, if not a point-to-point interface, may impact performance
Router(config)#ip route 192.168.2.0 255.255.255.0 s0/2/1
%Default route without gateway, if not a point-to-point interface, may impact performance
设置成功!
附加
下一跳 命令和出入口差不多 只在最后有所区别
ip route 172.1.1.0 255.255.255.0 出入口
ip route 172.1.1.0 255.255.255.0 下一跳ip地址
版权声明:本文标题:出入口静态路由 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.roclinux.cn/b/1738321046a1963185.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论