############################
IP规划:
eth1:公网IP x.x.x.x
eth0:私网IP 192.168.0.249
############################
一.配置用户名密码telnet登陆
console口登陆路由器
<Quidway>system-view
[Quidway]local-user admin (用户名)
[Quidway-luser-admin]password cipher ****(密码)
[Quidway-luser-admin]service-type telnet terminal (服务类型为telent终端)
[Quidway-luser-admin]level 3 (权限级别)
------------------------------------
返回配置模式(Ctrl+z,sys)
[Quidway]user-interface vty 0 4 (进入用户终端设置)
[Quidway-ui-vty0-4]authentication-mode scheme(配置验证模式为scheme)
[Quidway-ui-vty0-4]idle-timeout 0 0(设置超时时间)
返回配置模式(Ctrl+z,sys)
save
完成配置
############################
二.配置NAT上网
1.配置内网接口IP
[Quidway]interface Ethernet0/0
[Quidway-Ethernet0/0]ip address 192.168.0.249 255.255.255.0
2.配置公网接口IP
[Quidway]interface Ethernet0/1
[Quidway-Ethernet0/1]ip address x.x.x.x 255.255.255.192
[Quidway]ip route-static 0.0.0.0 0.0.0.0 x.x.x.1 preference 60 (配置默认路由)
3.配置ACL允许内网IP段可以nat出去
[Quidway]acl number 2000 (指定ACL number)
[Quidway-acl-basic-2000]rule permit source 192.168.0.0 0.0.0.255 (允许192.168.0.0、24段)
[Quidway-acl-basic-2000]rule deny (组织其他段的访问)
4.公网接口开启nat
[Quidway]interface Ethernet0/1
[Quidway-Ethernet0/1]nat outbound 2000 (应用acl 2000定义规则的IP段Snat)
三.配置静态路由可以访问机房1段和6段
[Quidway]ip route-static 192.168.1.0 255.255.255.0 192.168.0.254 preference 60
[Quidway]ip route-static 192.168.6.0 255.255.255.0 192.168.0.254 preference 60
save
完成配置
--------------------------------------------------------------------------------
补充:
1.清空配置
<Quidway>reset saved-configuration
<Quidway>reboot
转载于:https://blog.51cto.com/daedalus/1615278