dis cu 看所有
dis this 看自己
undo info-center enable不开信息提示
restore fac 恢复出厂模式
save 要在<>模式
dis vlan 可以看端口和vlan
加终端
进入端口 int g0/0/1
p l a 加入access
p d v 10 加入vlan10
配置端口
dis int brief查看所有端口概要信息
dis ip int brief 查看端口IP情况
dis current-configuration int查看所有接口配置情况。
dis current-configuration int g0/0/1查看指定接口情况
int g0/0/1 dis this进入到指定接口,查看接口情况
路由
ip route-static 目的地址 子网掩码 下一条地址.
[AR1]ip route-static 0.0.0.0 0 192.168.30.21
dis ip route-table用于查看路由器的路由表
内网访问外网
[AR2]acl number 2000
[AR2]rule 5 permit source 192.168.0.0 0.0.255.255
[AR2] rule 10 deny
(G0/0/1)nat outbound 2000
dis nat session all
1、建立地址池[AR2]nat address-group 1 2.2.2.2 2.2.2.10
注意设置ip地址池时,不要包括该端口的地址,否则会出现 Error: The address conflicts with interface or ARP IP.
2、在接口中取消原来的nat outbound [G0/0/1]undo nat outbound 2000
3、添加新的[G0/0/1]nat outbound 2000 address-group 1
interface GigabitEthernet0/0
port link-mode route // 改为三层
ip address 112.44.45.96 255.255.255.0 //互联网地址
nat outbound 2000
nat server protocol tcp global 112.44.45.96 441 inside 192.168.255.249 441 description vpn
nat server protocol tcp global 112.44.45.96 20000 inside 192.168.255.249 443 description VPN
外网访问内网
加地址要改为三层模式
port link-mode route
ip address 10.148.23.250 255.255.255.0
配置ssh
#
#
local-user admin class manage 创建一个admin的账号
password simple password1 设置密码
service-type ssh
authorization-attribute user-role network-admin 设置权限
#
ssh server enable
ssh user admin service-type stelnet authentication-type password 登录方式用密码
display ssh user-information [username] 看远程
提高
line vty 5 63 //line vty 0 63表示最多可以有64个用户进行远程登录,0到63
authentication-mode scheme
user-role admin
user-role network-operator