闫辉 发表于 2020-10-26 16:03:47

配置接口IP地址和描述信息

华为:配置R1上GigabitEthernet 0/0/0接口的IP地址。使用点分十进制格式(如255.255.255.0)或根据子网掩码前缀长度配置子网掩码。interface GigabitEthernet 0/0/0ip address 10.0.13.1 24
https://upload-images.jianshu.io/upload_images/24325874-52d49a1242756af8.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240


description This interface connects to R2-G0/0/0补充命令 可以标识此接口连接的是R2
https://upload-images.jianshu.io/upload_images/24325874-e4bf4381d54ec2c8.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240


在当前接口视图下,执行display this命令查看配置结果。
https://upload-images.jianshu.io/upload_images/24325874-bf985c71dd306946.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240


执行display interface命令查看接口信息。
https://upload-images.jianshu.io/upload_images/24325874-97997a6f631d468b.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240


从命令回显信息中可以看到,接口的物理状态与协议状态均为Up,表示对应的物理层与数据链路层均可用。 配置R2上GigabitEthernet 0/0/0接口的IP地址与描述信息。
https://upload-images.jianshu.io/upload_images/24325874-a7cc12fb9d21a2ec.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240


配置完成后,通过执行ping命令测试R1和R2间的连通性。
https://upload-images.jianshu.io/upload_images/24325874-795737623ca6a6da.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240



思科:R1上面配置接口地址12.1.1.1思科的掩码如图,思科默认接口关闭,no shutdown 开启接口
https://upload-images.jianshu.io/upload_images/24325874-fc9fb5a762cd8612.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240


R2上面配置接口地址12.1.1.2思科的掩码如图,思科默认接口关闭,no shutdown 开启接口
https://upload-images.jianshu.io/upload_images/24325874-eff7fb4b1125d1e5.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240


思科每次配置完地址记得有两条命令一定要做,方便排错R2#show ip route查看路由表R2#show ip int brief查看接口IP状态
https://upload-images.jianshu.io/upload_images/24325874-04abbf532eb3f3c1.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240


两端ping测试联通性。!表示有路由,且有回包,U表示有路由,但是没有回包。
https://upload-images.jianshu.io/upload_images/24325874-4f851ee429873eb8.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240



页: [1]
查看完整版本: 配置接口IP地址和描述信息