Hands-On Challenge Lab
Configuring NAT on a Router
Network diagram to setup in packet tracer
Activity 1: Prepare for NAT
You will configure the routers with IP address from the list and then turn on RIPv2 routing.
Step 1. Configure the IP addresses on the routers. Don’t forget to turn on the interface.
ROUTER INTERFACE IP Address
ISP S0/0/1 [Link]/24
Classrm_A S0/0/1 [Link]/24
Classrm_A S0/0/0 [Link]/24
Classrm_B S0/0/0 [Link]/24
Classrm_B Fa0/0 [Link]/24
Classrm_C Fa0/0 [Link]/24
After the routers are configured, you should be able to ping from one router to its neighbor router, but
since there is no dynamic routing protocol setup, you will not be able to ping from router Classrm_C to
the ISP router
Step 2 Setup RIP routing
On router Classrm_A, configure RIP, set a passive interface, and configure the default network
Classrm_A#
Classrm_A#config t
Enter configuration commands, one per line. End with CNTL/Z.
Classrm_A(config)#router rip
Classrm_A(config-router)#network [Link]
Classrm_A(config-router)#network [Link]
Classrm_A(config-router)#passive-interface s0/0/1
Classrm_A(config-router)#exit
Classrm_A(config)#ip default-network [Link]
Classrm_A(config)#
The passive-interface stops RIP updates from going to the ISP. The ip default-network command
advertises a default network to the other routers so they know how to get to the Internet.
Step 3 Configure RIP on Classrm_B
Classrm_B(config)#router rip
Classrm_B(config-router)#network [Link]
Classrm_B(config-router)#network [Link]
Step 4 Configure RIP on Classrm_C
Classrm_C(config)#router rip
Classrm_C(config-router)#network [Link]
Step 5 Configure a default route to the school network and make it so you do not have to login in
for a telnet session
ISP(config)#ip route [Link] [Link] s0/0/1
ISP(config)#line vty 0 4
ISP(config-line)#no login
Test to make sure you can ping from the ISP router to the Classrm_C router and from Classrm_C
to the ISP. If you can’t, troubleshoot your configurations.
Activity 2: Configure Dynamic NAT
Dynamic NAT allows many private IP addresses to use more than one public IP address. In this
activity, you will configure Dynamic NAT on the Classrm_A router.
Step 1. Create a pool of routable IP address on the Classrm_A router and call it GlobalNet. This
pool should contain the range of addresses [Link] to [Link].
Classrm_A(config)#ip nat pool GlobalNet [Link] [Link] net [Link]
Step 2. Create an access list that will permit hosts from the Classrm_B and Classrm_C networks.
Classrm_A(config)#access-list 1 permit [Link] [Link]
Classrm_A(config)#access-list 1 permit [Link] [Link]
Don’t forget to use a wild card mask instead of a subnetmask.
Step 3. Now map the access list to the pool you created. This will allow the hosts from the 2
classrooms to use any of the IP addresses from the pool to access the Internet.
Classrm_A(config)#ip nat inside source list 1 pool GlobalNet
Step 4. Now you need to tell the router which interface is the inside (private) and which interface is the
outside (public). Repeat this step if you just configure PAT
Classrm_A(config)#int s0/0/0
Classrm_A(config-if)#ip nat inside
Classrm_A(config-if)#int s0/0/1
Classrm_A(config-if)#ip nat outside
Step 5. Test the Dynamic NAT configuration.
Connect a computer to the console port of the Classrm_c router. Open a terminal connection on
the computer and open a telnet session to the ISP router.
Classrm_C#telnet [Link]
Move the cable to the CLassrm_B router and open a telnet session with the ISP router.
Classrm_B#telnet [Link]
Step 6. Check the address translations.
Leave the sessions open on the Classrm_B and Classrm_C routers.
Open the command line on the Classrm_A router and view you current translations by entering
the show ip nat translation command.
Classrm_A#sh ip nat translations
Pro Inside global Inside local Outside local Outside global
tcp [Link]:1025 [Link]:1025 [Link]:23 [Link]:23
tcp [Link]:1025 [Link]:1025 [Link]:23 [Link]:23
Activity 3: Configure PAT
Step 1: erase the Dynamic NAT off the Classrm_A router
Use the console connection to Clssrm_C and Classrm_B routers to end the telnet session with the ISP.
Type CTRL+SHIFT+6, then type x.
Classrm_A#clear ip nat translation *
Classrm_A#config t
Classrm_A(config)#no ip nat inside source list 1 pool GlobalNet
Classrm_A(config)#no ip nat pool GlobalNet [Link] [Link] net [Link]
Complete step 4 of Configure Dynamic NAT if you haven’t done this before.
Step 2: Create a NAT pool
On the Classrm_A router, create a NAT pool with one public IP address and call it MYCC. It
will contain the address [Link].
Classrm_A(config)#ip nat pool MYCC [Link] [Link] net [Link]
Step 3. Create the access list
Create access list 2 to permit the two private IP networks from Classrm_C and Classrm_B.
Classrm_A(config)#access-list 2 permit [Link] [Link]
Classrm_A(config)#access-list 2 permit [Link] [Link]
Step 4. Map the access list to the single IP address pool MYCC
Classrm_A(config)#ip nat inside source list 2 pool MYCC overload
Step 5. Test the translations
Do exactly what you did in Activity 2 and start a telnet session to the ISP router from both Classrn_B
router and Classrm_C router.
Check the translations on the Classrm_A router with the show ip nat translation command.
Take note of what public IP address is used by the two translations.