shutdown 关闭接口
undo 撤销配置
quit 返回
save 保存
dis curent-con 显示当前配置
dis save-con 显示保存配置
reset save-con 消除下次启动加载文件
dis ip trouting-table 查看路由表
ip route-static+ip 掩码 下一跳 配置静态路由
rip配置:
rip
version 2
network ip
ospf配置
ospf 1 (创建ospf1) router-id 1.1.1.1(路由器之间不能一样)
area 0 (进入区域0同一区域才能建立关系)
network ip 反掩码
ospf timer hello 接口下敲更改hello时间
ospf net b 接口下敲 修改网络类型为b
dis ospf peer 查看ospf配置
ospf dr 设置端口优先级
reset ospf process 重启ospf
ospf network-type p2p 不选DR BDR(两台路由器之间可以设置)
dis ospf lsdb
bandwidth-referenc 设置带宽参考值
ospf cost 更改ospf开销值(需要在出接口更改)
ospf authenticaion-mode md5 simple(唯一明文认证) 配置认证(接口认证>区域认证)
dis mac-add 查看mac地址表
vlan配置
创建vlan x
port link-type access(trunk) 表示端口类型
port default vlan x 表示access接口属于哪个vlan
port trunk allow-pass vlan x 表示trunk运行通行vlan
port trunk pvid vlan x 设置trunk的pvid(默认是1)
tracert -a ip+ip 追踪ip之间路径
dis ip int br 查看设备ip
undo portswitch 将二层接口转换为三层接口
acl配置(控制访问列表)
2000-2999
acl xxx 创建acl
rule deny (拒绝) source ip+通配符 拒绝ip通行
dis acl xxx 查看配置的acl
traffic-filter outbound acl xxx 在出接口下运行acl
3000以上
acl xxx
rule deny tcp source 原ip(网段)+通配符 destination 目的ip+通配符 destination-port eq 21(端口)拒绝ip(网段)访问某个服务器
nat配置
静态nat
RTA-Serial1/0/0]nat static global 公网ip inside 主机ip
display nat static 验证
动态nat
[RTA]nat address-group 1 200.10.10.1 200.10.10.200 创建地址池
[RTA]acl 2000
[RTA-acl-basic-2000]rule 5 permit source 192.168.1.0 0.0.0.255 允许私有网段变化
[RTA-acl-basic-2000]quit
[RTA]interface serial1/0/0
[RTA-Serial1/0/0]nat outbound 2000 address-group 1 no-pat 开启动态nat
RTA]display nat address-group 1 验证
Easy IP配置(特殊nat)
[RTA]acl 2000
[RTA-acl-basic-2000]rule 5 permit source 192.168.1.0 0.0.0.255
[RTA-acl-basic-2000]quit
[RTA]interface serial1/0/0
[RTA-Serial1/0/0]nat outbound 2000
[RTA]display nat outbound 验证
NA服务器配置
[RTA-Serial1/0/0]ip address 200.10.10.2 24
[RTA-Serial1/0/0]nat server protocol tcp global 202.10.10.1 www inside 192.168.1.1 8080
stp edged-port enable 边缘端口
reboot 重启设备
display current-configuration 查看当前配置信息
user-interface console 0 创建console端口
authentication-mode password
set authentication password cipher 设置密码
idle-timeout 20 0 设置20分钟无操作重登录 默认10分钟
clock timezone Local add 08:00:00 修改系统时间
clock datetime 12:00:00 2016-03-11 修改系统日期
display version 查看路由器的软件版本与硬件信息