NAT address translation

1: Experimental environment1.1: Huawei ensp software1.2: PC, router and switchThe PC in the initialization state and the...

1: Experimental environment
1.1: Huawei ensp software
1.2: PC, router and switch
The PC in the initialization state and the router in the initialization state are connected as shown in the figure, and the switch is turned on

2, Experiment requirements, R2 provides NAT service; server page access
3: Experimental process
3.1: configure SW1 switch

vlan batch 10 20 30 40 interface Vlanif10 ip address 192.168.10.1 255.255.255.0 interface Vlanif20 ip address 192.168.20.1 255.255.255.0 interface Vlanif30 ip address 192.168.30.1 255.255.255.0 interface Vlanif40 ip address 11.0.0.2 255.255.255.0 interface GigabitEthernet0/0/1 port link-type access port default vlan 10 interface GigabitEthernet0/0/2 port link-type access port default vlan 20 interface GigabitEthernet0/0/3 port link-type access port default vlan 30 interface GigabitEthernet0/0/4 port link-type access port default vlan 20 interface GigabitEthernet0/0/5 port link-type access port default vlan 40 interface GigabitEthernet0/0/6 port link-type access port default vlan 10 ip route-static 0.0.0.0 0.0.0.0 11.0.0.1

3.2 configure AR1 router
AR1 configuration
3.2.1 configuration interface

[R1]int g0/0/0 [R1-GigabitEthernet0/0/0]ip add 11.0.0.1 24 [R1-GigabitEthernet0/0/0]un sh [R1-GigabitEthernet0/0/0]int g0/0/1 [R1-GigabitEthernet0/0/1]ip add 12.0.0.1 24 [R1-GigabitEthernet0/0/1]un sh

3.2.2 configure DHCP relay service (specify relay routing address)

[R1]int g0/0/1 [R1-GigabitEthernet0/0/1]nat static enable [R1-GigabitEthernet0/0/1]q [R1]nat address-group 1 212.0.0.100 212.0.0.200 [R1]acl 2000 [R1-acl-basic-2000]rule permit source 192.168.20.0 0.0.0.255 [R1-acl-basic-2000]rule permit source 11.0.0.0 0.0.0.255 [R1-acl-basic-2000]int g0/0/1 [R1-GigabitEthernet0/0/1]nat outbound 2000 address-group 1 no-pat [R1-GigabitEthernet0/0/1]q [R1]acl 3000 [R1-acl-adv-3000]rule permit ip source 192.168.30.0 0.0.0.255 [R1-acl-adv-3000]int g0/0/1 [R1-GigabitEthernet0/0/1]nat outbound 3000 [R1-GigabitEthernet0/0/1]nat server protocol tcp global 9.9.9.9 www inside 192.168.10.100 www [R1-GigabitEthernet0/0/1]nat static global 8.8.8.8 inside 192.168.10.10

3.2.3 configure static route

[R1-GigabitEthernet0/0/1]q [R1]ip route-static 0.0.0.0 0.0.0.0 12.0.0.2 [R1]ip route-static 192.168.10.0 24 11.0.0.2 [R1]ip route-static 192.168.20.0 24 11.0.0.2 [R1]ip route-static 192.168.30.0 24 11.0.0.2

3.3 configure R2 router
3.3.1 configuration interface

interface GigabitEthernet0/0/0 ip address 12.0.0.2 255.255.255.0 interface GigabitEthernet0/0/1 ip address 13.0.0.1 255.255.255.0 interface LoopBack0 ip address 114.114.114.114 255.255.255.255

3.3.2 configure route

ip route-static 8.8.8.8 255.255.255.255 12.0.0.1 ip route-static 9.9.9.9 255.255.255.255 12.0.0.1 ip route-static 212.0.0.0 255.255.255.0 12.0.0.1

3.4 other configurations



3.5 check whether the requirements are met




29 May 2020, 10:34 | Views: 1843

Add new comment

For adding a comment, please log in
or create account

0 comments