Get the App
SLTechnology News&Howtos  ›  Network Security  › 

NAT static conversion

Shulou Source: shulou.com Published: 2022-06-01 04:35:06 10月05日 Update

I. Experimental environment and objectives

A switch, a router and three PCs are interconnected across the network and configured with static NAT translation, as shown in the following figure

II. Operation script

1. In switch SW

SW#conf t

SW (config) # no ip routing

SW (config) # int f1and0

SW (config-if) # speed 100

SW (config-if) # duplex full

two。 In router R1

R1#conf t

R1 (config) # int f0bin0

R1 (config-if) # ip add 192.168.10.1 255.255.255.0

R1 (config-if) # no shutdown

R1 (config-if) # speed 100

R1 (config-if) # duplex full

R1 (config-if) # int f0bin1

R1 (config-if) # ip add 10.0.0.1 255.255.255.0

R1 (config-if) # no shutdown

3. In VPCS

VPCS [1] > ip 192.168.10.2 192.168.10.1

VPCS [1] > 2

VPCS [2] > ip 192.168.10.3 192.168.10.1

VPCS [2] > 3

VPCS [3] > ip 10.0.0.10 10.0.0.1

VPCS [3] > 1

VPCS [1] > ping 10.0.0.10

VPCS [1] > 2

VPCS [2] > ping 10.0.0.10

4. In router R1

R1 (config-if) # exit

R1 (config) # ip nat inside source static 192.168.10.2 10.0.0.3

R1 (config) # ip nat inside source static 192.168.10.3 10.0.0.4

R1 (config) # int f0bin0

R1 (config-if) # ip nat inside

R1 (config-if) # int f0bin1

R1 (config-if) # ip nat outside

R1 (config-if) # end

R1#debug ip nat

5. In VPCS

VPCS [2] > 1

VPCS [1] > ping 10.0.0.10

VPCS [1] > 2

VPCS [2] > ping 10.0.0.10

Third, the diagram of the experimental steps

1. In switch SW

two。 In router R1

3. In VPCS

4. In router R1

5. In VPCS

4. Experimental results

The results show that the static NAT is configured successfully, as shown in the following figure

Tags: Routing router switch lab static result configuration success network-wide step environment target script three figure 2 Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info vpn OPPO Reno Microsoft MariaDB