CCNPv7 ROUTE Lab6-1 NAT Student
CCNPv7 ROUTE Lab6-1 NAT Student
CCNPv7 ROUTE Lab6-1 NAT Student
Topology.
Objectives
Configure dynamic NAT and static NAT on the HQ router.
Configure dynamic NAT on the Branch router.
Verify the configuration and operation using show commands.
Background
The HQ and Branch sites must be configured to support NAT. Specifically,
the HQ and Branch routers will be configured to provide inside LAN users
with outside public addresses using NAT. The HQ router will also provide
static NAT to access the Email server from the outside network.
Note: This lab uses Cisco 1941 routers with Cisco IOS Release 15.2 with IP
Base. Depending on the router or switch model and Cisco IOS Software
version, the commands available and output produced might vary from what
is shown in this lab.
Required Resources
3 routers (Cisco IOS Release 15.2 or comparable)
Serial and Ethernet cables
Step 1: Configure loopbacks and assign addresses.
Cable the network as shown in the topology diagram. Erase the startup
configuration and reload each router to clear previous configurations.
Using the addressing scheme in the diagram, apply the IP addresses to
the interfaces on the HQ, ISP, and Branch routers.
You can copy and paste the following configurations into your routers to
begin.
Note: Depending on the router model, interfaces might be numbered
differently than those listed. You might need to alter the designations
accordingly.
HQ (R1)
hostname HQ
!
interface Loopback0
description Headquarters LAN
ip address 10.10.10.1 255.255.255.0
exit
!
interface Loopback1
description Simulates the Email Server
ip address 10.10.20.238 255.255.255.255
exit
!
interface Serial1/0
description Connection to ISP
ip address 209.165.200.226 255.255.255.248
clock rate 128000
no shut
exit
!
End
ISP (R2)
hostname ISP
!
interface Loopback0
description Simulating the Internet
ip address 209.165.202.129 255.255.255.240
exit
!
interface Serial1/0
description Connection to HQ
ip address 209.165.200.225 255.255.255.248
no shut
exit
!
interface Serial1/1
description Connection to Branch
ip address 209.165.200.241 255.255.255.248
clock rate 128000
no shut
exit
!
ip route 209.165.200.232 255.255.255.248 Serial1/0
ip route 209.165.200.248 255.255.255.248 Serial1/1
!
End
Branch (R3)
hostname Branch
!
interface Loopback0
description Branch LAN
ip address 192.168.1.1 255.255.255.0
exit
!
interface Serial1/1
description Connection to ISP
ip address 209.165.200.242 255.255.255.248
no shut
exit
!
End
a. Verify your configuration by using the show ip interface brief and the
show interfaces description command. The output from the Branch
router is shown here as an example.
Branch# show ip interface brief | include up
Serial0/0/1 209.165.200.242 YES manual up up
Loopback0 192.168.1.1 YES manual up up
Branch#
Branch# show interfaces description | include up
Se0/0/1 up up Connection to ISP
Lo0 up up Branch LAN
Branch#
b. From the Branch router, run the following Tcl script to verify connectivity.
foreach address {
209.165.200.241
209.165.202.129
209.165.200.226
} { ping $address }
Branch# tclsh
Branch(tcl)# foreach address {
+>209.165.200.241
+>209.165.202.129
+>209.165.200.226
+>} { ping $address }
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 209.165.200.241, timeout is 2
seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/13/16 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 209.165.202.129, timeout is 2
seconds:
.....
Success rate is 0 percent (0/5)
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 209.165.200.226, timeout is 2
seconds:
.....
Success rate is 0 percent (0/5)
Branch(tcl)#
Why do the pings to the ISPs loopback and HQ router address fail?
El ping falla porque los routers de Branch y HQ necesitan un enrutador
predeterminado para ISP
Step 2: Configure default static routes on Branch and HQ.
a. On HQ, configure a default static route to ISP.
HQ(config)# ip route 0.0.0.0 0.0.0.0 209.165.200.225
b. On the Branch router, configure a default static route to ISP.
You can copy and paste the following configurations into your routers.
Branch(config)# ip route 0.0.0.0 0.0.0.0 209.165.200.241
c. From the Branch router, run the following Tcl script to verify connectivity.
foreach address {
209.165.200.241
209.165.202.129
209.165.200.226
+>} { ping $address}
Branch# tclsh
Branch(tcl)# foreach address {
+>209.165.200.241
+>209.165.202.129
+>209.165.200.226
+>} { ping $address }
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 209.165.200.241, timeout is 2
seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/13/16 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 209.165.202.129, timeout is 2
seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/13/16 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 209.165.200.226, timeout is 2
seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 28/28/28 ms
Branch(tcl)#
Note: You can also specify the router interface designator (for example,
S0/0/0, Fa0/0, or Lo1) as the source for the extended ping, as follows:
Branch# ping 209.165.200.226 source Lo1
Why are the pings unsuccessful?
El Ping falla porque el origen de 192.168.1.1 es una dirección IP privada
interna y el ISP no conoce esas direcciones
The ISP cannot route back to the internal private address of the Branch
LAN.
d. The LAN interface must be identified as an inside NAT interface, and the
Internet interface must be identified as an outside NAT interface.
Branch(config)# interface Loopback 0
Branch(config-if)# ip nat inside
Branch(config-if)# exit
Branch(config)#
Branch(config)# interface Serial1/1
Branch(config-if)# ip nat outside
Branch(config-if)# exit
Branch(config)#
As shown above, the pool has been configured and the interfaces
assigned. The output of the show ip nat translations command
confirms that there are currently no active NAT translations:
Branch# show ip nat translations
Branch#
b. Initiate NAT traffic by pinging from the Branch LAN to the ISP interface,
ISP’s loopback, the HQ Internet interface, and this time also include the
HQ public email server address. Run the following Tcl script on the
Branch router to verify connectivity.
foreach address {
209.165.200.241
209.165.202.129
209.165.200.226
209.165.200.238
} { ping $address source 192.168.1.1}
Branch# tclsh
Branch(tcl)# foreach address {
+>209.165.200.241
+>209.165.202.129
+>209.165.200.226
+>209.165.200.238
+>} { ping $address source 192.168.1.1}
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 209.165.200.241, timeout is 2
seconds:
Packet sent with a source address of 192.168.1.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/13/16 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 209.165.202.129, timeout is 2
seconds:
Packet sent with a source address of 192.168.1.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/13/16 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 209.165.200.226, timeout is 2
seconds:
Packet sent with a source address of 192.168.1.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 28/28/28 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 209.165.200.238, timeout is 2
seconds:
Packet sent with a source address of 192.168.1.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 28/28/28 ms
Branch(tcl)#