console 模式
line console 0
特权模式 enable
全局模式 config teminal
int f0/0
配 ip 地址 ip address 10.1.1.1 255.255.255.0
返回全局模式 end
查看接口状态 do show ip interface breif
do sh ip int b
vty 里面可以设置普通用户密码 password 密码
里面可以开启 ssh/telnet
设置密码默认开启 telnet
line vty 0 4
transport input ssh/telnet/all/none
开启 ssh 需要
ip domain-name luobifu.com
hostname luobifu
crypto key generate rsa
交换机虚拟 pc
int vlan 1
配置 ip 地址
ip address 10.1.1.1 255.255.255.0
配置网关
ip default-gateway 10.1.1.254
no shutdown
end
本地用户登陆
int vty 0 4
login local
config terminal
username luobifu password luobfi
看路由表 show ip route
ip route 目标网段 子网掩码 下一跳地址 管理距离值
看 mac 地址表 show mac-address-table
保存配置 copy running-config start-config