直连IP配置
直连IP基本配置
基本直连IP配置:
R1:
R1#conf t
R1(config)#int s0/1
R1(config-if)#ip address 192.168.12.1 255.255.255.0
R1(config-if)#no shutdown //将接口打开
(默认情况下,路由器所有的接口都处于关闭状态,所以当你想使用次接口时,必须要
手动将其打开)
R2:
R2#conf t
R2(config)#int s0/1
R2(config-if)#ip address 192.168.12.2 255.255.255.0
R2(config-if)#no shut //将接口打开
R2(config)#int s0/2
R2(config-if)#ip address 192.168.23.2 255.255.255.0
R2(config-if)#no shut //将接口打开
R3:
R3#conf t
R3(config)#int s0/1
R3(config-if)#ip address 192.168.23.3 255.255.255.0
R3(config-if)#no shut //将接口打开
直连IP配好后,一定要彼此ping一下,测试通了,在往下进行。
R1#ping 192.168.12.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.12.2, timeout is 2 seconds:
!!!!!
显示为5个~,即OK
同理:
R2#ping 192.168.12.1
!!!!!
R2#ping 192.168.23.3
!!!!!
R3#ping 192.168.23.2
!!!!!
3台路由器彼此都能ping通即可。
检查及排错:
如果不通,显示为:
R1#ping 192.168.12.2
Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 9.9.9.9, timeout is 2 seconds:
…..(或者为U.U.U)
排错步骤:
1. 检查接口是否开启(接口下是否no shutdown)。
命令为:show ip interface brief
以R1为例,如果R1的s0/1口没有打开:
R1#sh ip interface brief
Interface IP-Address OK? Method Status Protocol
Serial0/1 192.168.12.1 YES manual administratively down down
如果显示为administratively down,肯定是接口下没有no shutdown
正常状态应是:
R1#sh ip interface brief
Interface IP-Address OK? Method Status Protocol
Serial0/1 192.168.12.1 YES manual up up
2. 查看接口IP是否配置有误
查看命令:show run interface s0/1
R1#sh run int s0/1
Building configuration...
Current configuration : 90 bytes
interface Serial0/1
ip address 192.168.12.1 255.255.255.0
serial restart-delay 0
end
本文档为【直连IP配置】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑,
图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
该文档来自用户分享,如有侵权行为请发邮件ishare@vip.sina.com联系网站客服,我们会及时删除。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。
本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。
网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。