6.4.5 Packet Tracer - Configure Static NAT Answers
Topology

6.4.5 Packet Tracer - Configure Static NAT
Objectives
- Part 1: Test Access without NAT
- Part 2: Configure Static NAT
- Part 3: Test Access with NAT
Scenario
In IPv4 configured networks, clients and servers use private addressing. Before packets with private addressing can cross the internet, they need to be translated to public addressing. Servers that are accessed from outside the organization are usually assigned both a public and a private static IP address. In this activity, you will configure static NAT so that outside devices can access an inside server at its public address.
Instructions
Part 1: Test Access without NAT
Step 1: Attempt to connect to Server1 using Simulation Mode.
a. Switch to Simulation mode.
b. From PC1 or L1, use the Web Browser to attempt to connect to the Server1 web page at 172.16.16.1. Continue to click the Capture / Forward button and notice how the packets never leave the internet cloud. The attempts should fail.
c. Exit Simulation mode.
d. From PC1, ping the R1 S0/0/0 interface (209.165.201.2). The ping should succeed.
C:\> ping 209.165.201.2
Pinging 209.165.201.2 with 32 bytes of data:
Reply from 209.165.201.2: bytes=32 time=6ms TTL=254
Reply from 209.165.201.2: bytes=32 time=1ms TTL=254
Reply from 209.165.201.2: bytes=32 time=11ms TTL=254
Reply from 209.165.201.2: bytes=32 time=8ms TTL=254
Ping statistics for 209.165.201.2:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 1ms, Maximum = 11ms, Average = 6msStep 2: View R1 routing table and running-config.
a. View the running configuration of R1. Note that there are no commands referring to NAT. An easy way to confirm this is to issue the following command:
R1# show running-config | include nat R1#
b. Verify that the routing table does not contain entries referring to the IP network addresses for PC1 and L1.
R1# show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set
172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks
C 172.16.16.0/28 is directly connected, GigabitEthernet0/0
L 172.16.16.14/32 is directly connected, GigabitEthernet0/0
209.165.201.0/24 is variably subnetted, 2 subnets, 2 masks
C 209.165.201.0/29 is directly connected, Serial0/0/0
L 209.165.201.2/32 is directly connected, Serial0/0/0c. Verify that NAT is not being used by R1.
R1# show ip nat translations R1#
Part 2: Configure Static NAT
Step 1: Configure static NAT statements.
Refer to the Topology. Create a static NAT translation to map the Server1 inside address to its outside address.
R1(config)# ip nat inside source static 172.16.16.1 64.100.50.1
Step 2: Configure interfaces.
a. Configure the G0/0 interface as an inside interface.
R1(config)# interface gigabitethernet 0/0 R1(config-if)# ip nat inside
b. Configure the S0/0/0 public interface as an outside interface.
R1(config)# interface serial 0/0/0 R1(config-if)# ip nat outside
Part 3: Test Access with NAT
Step 1: Verify connectivity to the Server1 web page.
a. Open the command prompt on PC1 or L1, attempt to ping the public address for Server1. Pings should succeed.
C:\> ping 64.100.50.1
Pinging 64.100.50.1 with 32 bytes of data:
Request timed out.
Reply from 64.100.50.1: bytes=32 time=1ms TTL=126
Reply from 64.100.50.1: bytes=32 time=2ms TTL=126
Reply from 64.100.50.1: bytes=32 time=2ms TTL=126
Ping statistics for 64.100.50.1:
Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),
Approximate round trip times in milli-seconds:
Minimum = 1ms, Maximum = 2ms, Average = 1msb. Verify that both PC1 and L1 can now access the Server1 web page.
Step 2: View NAT translations.
Use the following commands to verify the static NAT configuration on R1:
R1# show running-config Building configuration... Current configuration : 923 bytes ! version 15.1 no service timestamps log datetime msec no service timestamps debug datetime msec no service password-encryption ! hostname R1 ! ! ! ! ! ! ! ! ip cef no ipv6 cef ! ! ! ! license udi pid CISCO2911/K9 sn FTX1524L1C1 ! ! ! ! ! ! ! ! ! ! ! ! ! spanning-tree mode pvst ! ! ! ! ! ! interface GigabitEthernet0/0 ip address 172.16.16.14 255.255.255.240 ip nat inside duplex auto speed auto ! interface GigabitEthernet0/1 no ip address duplex auto speed auto shutdown ! interface GigabitEthernet0/2 no ip address duplex auto speed auto shutdown ! interface Serial0/0/0 ip address 209.165.201.2 255.255.255.248 ip nat outside ! interface Serial0/0/1 no ip address clock rate 2000000 shutdown ! interface Vlan1 no ip address shutdown ! ip nat inside source static 172.16.16.1 64.100.50.1 ip classless ! ip flow-export version 9 ! ! ! ! ! ! ! line con 0 ! line aux 0 ! line vty 0 4 login ! ! ! end
R1# show ip nat translations
Pro Inside global Inside local Outside local Outside global
icmp 64.100.50.1:5 172.16.16.1:5 209.165.201.1:5 209.165.201.1:5
icmp 64.100.50.1:6 172.16.16.1:6 209.165.201.1:6 209.165.201.1:6
icmp 64.100.50.1:7 172.16.16.1:7 209.165.201.1:7 209.165.201.1:7
icmp 64.100.50.1:8 172.16.16.1:8 209.165.201.1:8 209.165.201.1:8
--- 64.100.50.1 172.16.16.1 --- ---R1# show ip nat statistics Total translations: 5 (1 static, 4 dynamic, 4 extended) Outside Interfaces: Serial0/0/0 Inside Interfaces: GigabitEthernet0/0 Hits: 3 Misses: 12 Expired translations: 0 Dynamic mappings:
Device Configs - Final
ROUTER R1
! ============================================================== !--- 6.4.5 Packet Tracer - Configure Static NAT !--- ANSWER SCRIPT FOR ROUTER R1 !--- Usage: open the R1 CLI tab and paste this whole file at the R1> prompt. Every line beginning with "!" is a comment; IOS ignores it, so pasting a comment by accident is harmless. ! ============================================================== enable configure terminal ! -------------------------------------------------------------- !--- Part 2: Configure Static NAT. ! -------------------------------------------------------------- !--- Step 1. Static NAT: Server1 inside address 172.16.16.1 to outside address 64.100.50.1. ip nat inside source static 172.16.16.1 64.100.50.1 !--- Step 2a. G0/0 (Server1 LAN) is the inside interface. interface gigabitethernet 0/0 ip nat inside exit !--- Step 2b. S0/0/0 (public interface) is the outside interface. interface serial 0/0/0 ip nat outside exit end ! -------------------------------------------------------------- !--- Save the configuration to NVRAM. (Press Enter when prompted for the destination filename.) ! -------------------------------------------------------------- copy running-config startup-config ! ============================================================== !--- Verification: !--- show ip nat translations -> static entry 64.100.50.1 (inside global) = 172.16.16.1 (inside local) !--- show ip nat statistics -> 1 static translation; Outside interface Serial0/0/0, Inside GigabitEthernet0/0 !--- ping 64.100.50.1 (PC1, L1) -> succeeds; http://64.100.50.1 opens the Server1 web page ! ==============================================================




