华为路由器nat
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys R2
[R2]int g0/0/1
[R2-GigabitEthernet0/0/1]ip add 200.1.1.1 29
[R2-GigabitEthernet0/0/1]int g0/0/2
[R2-GigabitEthernet0/0/2]ip add 100.1.1.254 24
<Huawei>sys
[Huawei]sys R1
[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]ip add 192.168.1.1 24
[R1-GigabitEthernet0/0/0]int g0/0/1
[R1-GigabitEthernet0/0/1]ip add 200.1.1.2 29
[R1-GigabitEthernet0/0/1]q
[R1]ip route-static 0.0.0.0 0 200.1.1.1 到公网默认路由
[R1]acl 2000
[R1-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255
[R1-acl-basic-2000]int g0/0/1
[R1-GigabitEthernet0/0/1]nat outbound 2000
至此pc1能够ping通外网client1
[R1-GigabitEthernet0/0/1]nat server protocol tcp global current-interface 999 inside 192.168.1.200 www
至此 client能够通过 http://200.1.1.2:999访问Server1