本文介绍: 动态NAT配置静态NAT配置Easy IP配置
静态NAT配置
配置
nat static global { global-address} inside {host-address }
命令用于创建静态NAT。
global
参数用于配置外部公网地址。
inside
参数用于配置内部私有地址。
- AR1-NAT
<Huawei>sy
Enter system view, return user view with Ctrl+Z.
[Huawei]sy NAT
[NAT]int g0/0/0
[NAT-GigabitEthernet0/0/0]ip address 192.168.1.254 24
[NAT-GigabitEthernet0/0/0]int s1/0/0
[NAT-Serial1/0/0]ip address 200.10.10.2 24
[NAT-Serial1/0/0]nat static global 202.10.10.1 inside 192.168.1.1
[NAT-Serial1/0/0]nat static global 202.10.10.2 inside 192.168.1.2
- Internet
<Huawei>sy
Enter system view, return user view with Ctrl+Z.
[Huawei]int s1/0/0
[Huawei-Serial1/0/0]ip address 100.1.1.1 24
[Huawei-Serial1/0/0]q
[Huawei]ip route-static 0.0.0.0 0.0.0.0 200.10.10.2
抓包测试
动态NAT配置
配置
- AR1-NAT
<Huawei>sy
Enter system view, return user view with Ctrl+Z.
[Huawei]sy NAT
[NAT]nat address-group 1 200.10.10.1 200.10.10.200
[NAT]acl 2000
[NAT-acl-basic-2000]rule 5 permit source 192.168.1.0 0.0.0.255
[NAT-acl-basic-2000]q
[NAT]int s1/0/0
[NAT-Serial1/0/0]nat outbound 2000 address-group 1 no-pat
[NAT-Serial1/0/0]ip address 200.10.10.201 24
[NAT-GigabitEthernet0/0/0]ip address 192.168.1.254 24
- Internet
<Huawei>sy
Enter system view, return user view with Ctrl+Z.
[Huawei]int s1/0/0
[Huawei-Serial1/0/0]ip address 100.1.1.1 24
[Huawei-Serial1/0/0]q
[Huawei]ip route-static 0.0.0.0 0.0.0.0 200.10.10.201
测试
Easy IP配置
配置
- AR1-NAT
<Huawei>sy
Enter system view, return user view with Ctrl+Z.
[Huawei]sy NAT
[NAT]int g0/0/0
[NAT-GigabitEthernet0/0/0]ip address 192.168.1.254 24
[NAT-GigabitEthernet0/0/0]q
[NAT]int s1/0/0
[NAT-Serial1/0/0]ip address 200.10.10.1 24
[NAT-Serial1/0/0]q
[NAT]acl 2000
[NAT-acl-basic-2000]rule 5 permit source 192.168.1.0 0.0.0.255
[NAT-acl-basic-2000]q
[NAT]int s1/0/0
[NAT-Serial1/0/0]nat outbound 2000
- Internet
<Huawei>sy
[Huawei]int s1/0/0
[Huawei-Serial1/0/0]ip address 100.1.1.1 24
[Huawei-Serial1/0/0]q
[Huawei]ip route-static 0.0.0.0 0.0.0.0 200.10.10.1
测试
- PC1
- PC2
原文地址:https://blog.csdn.net/m0_61802503/article/details/135774510
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如若转载,请注明出处:http://www.7code.cn/show_61183.html
如若内容造成侵权/违法违规/事实不符,请联系代码007邮箱:suwngjj01@126.com进行投诉反馈,一经查实,立即删除!
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。