1、功能
Cisco命令
华为命令
进入全局模式
#configure terminal
2、命名
hostname 主机名
sysname 主机名
修改特权密码
enable password 密码(明文)
enable secret 密码(密文)
super password 密码
进入接口模式
interface 接口
interface 接口
进入vlan模式
interface vlan vlan号
interface vlan vlan号
给接口配IP
ip address
3、0 4 password 密码 login user-interface vty 0 4 authentication-mode password set authentication-mode password simple 密码 user privilege level 3 激活端口 no shutdown undo shutdown 关闭端口 shutdown shutdown 退出 exit quit 创建VLAN vlan vlan号 vlan vlan号 VLAN中增加
4、 端口 port e0/1 port e0/2 to e0/4 当前端口加入 到VLAN switchport access vlan vlan号 port access vlan vlan号 设置端口工作 模式 switchport mode trunk|access|dynamic port link-type trunk|access|hybrid 设trunk允许的 VLAN switchport trunk allowed vlan remove|add ID port tru
5、nk permit vlan ID|All 指定镜像端口 monitor session 1 destination int 接口 monitor-port 接口 指定被镜像端 口 monitor session 1 source int 接口 both port mirror 接口 设置生成树启 动与否 spanning-tree vlan vlan号(默认开启) stp enable|disable(默认关闭) 端口的聚合 interface range f0/1 – 4 channel
6、group 1 mode on
link-aggregation e0/1 to e0/4 ingress|both
undo link-aggregation e0/1|all
设置主vlan
isolate-user-vlan enable
设置主vlan包括
的子vlan
isolate-user-vlan
7、 hdlc 设静态路由 ip route 网络号 掩码 下一跳IP/接口 ip route-static网络号 掩码 下一跳IP/接口 启用RIP路由 router rip rip rip work rip input rip output 配置路由器的 ID int loopback 0 ip add IP地址 掩码 router id A.B.C.D 启动OSPF协议 router ospf 进程号 ospf enable 配置OSPF区域 net 网络号 反向掩码 area
8、
9、源IP 反向掩码 目的IP 反向掩码 eq 端口号
acl
10、nt 串口接口 (config-if)#ppp authentication pap 被认证方 (config)#int 串口接口 (config-if)#ppp pap sent-username 用户名 password 密码 主认证方 local-user 用户名password {simple|cipher} 密码 interface串口接口 ppp authentication-mode pap 被认证方 interface串口接口 ppp pap local-user 用户名 password {simple|cipher} 密码
11、 Chap认证 主认证方 (config)#username 客户端主机名 password 密码 (config)#int 串口接口 (config-if)#ppp authentication (config-if)#ppp chap hostname 服务器主机名 被认证方 (config)#username 服务器主机名 password 密码 (config)#int 串口接口 (config-if)#ppp chap hostname 客户端主机名 主认证方 local-user 对方主机名passwo
12、rd {simple|cipher} 密码 interface串口接口 ppp authentication-mode chap ppp chap user 自己主机名 被认证方 interface串口接口 local-user 对方主机名 password {simple|cipher}密码 ppp chap user自己主机名 静态nat (1)为内外部接口配IP并激活; (2)在接口上启用NAT; 内部接口:ip nat inside 外部接口:ip nat outside (3)建立静态地址转换 (config)#ip na
13、t inside source static 私有IP 公网IP
interface 接口
nat server global
14、 地址池名 公网起始IP 公网终止IP netmask 掩码 (5)实现地址转换 (config)#ip nat inside source list 列表号 pool 地址池名 (1) 建立地址池 nat address-group公网起始IP 公网终止IP pool 1 (2)定义内网允许访问外网的ACL acl 列表号 rule permit source 源IP 反向掩码 rule deny source any (3)实现地址转换 int 公网接口 nat outbound列表号address-group pool 1






