| 场景 | 服务器需要固定公网地址 |
|---|---|
| 适用 | 华为 VRP / 思科 IOS / H3C Comware |
| 要点 | 三厂都用一条静态映射实现双向,前提是接口 NAT 角色已就位 |
华为 VRP
华为 VRP
interface GigabitEthernet0/0/1
nat static global 202.1.1.10 inside 192.168.1.10
nat static global 202.1.1.11 inside 192.168.1.11
display nat static思科 IOS
思科 IOS
ip nat inside source static 192.168.1.10 202.1.1.10
! 同一内网地址存在多条映射时加 extendable
show ip nat translations
show ip nat statisticsH3C Comware
H3C Comware
interface GigabitEthernet1/0/1
nat static outbound 192.168.1.10 202.1.1.10
display nat static
display nat session all差异:思科一条命令即完成双向映射;华为/H3C 在接口下逐条配置。H3C V7 主推 nat static outbound 写法,V5 老设备为 nat static global ... inside ...,配置前先打 ? 确认本机语法。