目录
一、基础命令
1.system-view 进入用户 【缩写: sys】
2.interface 接口号 进入接口 【缩写:int 接口号】
3.ip address xxx.xxx.xxx.xxx 255.255.255.0 添加ip地址 【缩写:ip add IP地址 子网掩码】
4.undo 命令 【取消命令】
5.sysname 用户名【缩写: sys 用户名】 修改用户名
6.quit 退出当前层
7.return 退出整个用户
8.display ip interface brief 查看接口的ip
9.display interface brief 查看接口配置信息
10.save 保存配置
二、命令图片如下:
三、两个路由-静态
1.路由视图
2.相关配置
2.1【AR1】:
<R1>sys
Enter system view, return user view with Ctrl+Z.
[R1]int g0/0/1
[R1-GigabitEthernet0/0/1]ip add 192.168.10.1 24
[R1-GigabitEthernet0/0/0]ip add 192.168.1.254 24 #此处配置PC1网关
静态路由配置:
[R1]ip route-static 192.168.2.0 24 192.168.10.2 ---指定网段
设置缺省路由:ip route-static 0.0.0.0 0 192.168.10.2
2.2【PC1】:
2.3 【PC2】:
2.4 【AR2】:
<R2>sys
Enter system view, return user view with Ctrl+Z.
[R2]int g0/0/0
[R2-GigabitEthernet0/0/0]ip add 192.168.2.254 24
静态路由配置:
[R2]ip route-static 192.168.1.0 24 192.168.10.1
设置缺省路由:ip route-static 0.0.0.0 0 192.168.10.1