www.howtonetwork.org

CCNA & CCNP Certifcation Training

  • About
  • Contact
  • FAQ
  • Join
  • Home
  • CCNA
    • ICND1
    • ICND2
    • 101 CCNA LABS
  • CCNP
    • ROUTE
    • SWITCH
    • TSHOOT
    • 101 CCNP LABS
  • CompTIA
    • Security+
    • Network+
  • Design
    • CCDA
    • CCDP
You are here: Home / 101 CCNA LABS / Network Address Translation Solutions / Lab 67 Solution: Configuring interface-based Port Address Translation

Lab 67 Solution: Configuring interface-based Port Address Translation

Task 1:

For reference information on configuring hostnames, please refer to:

Lab 35 Configuration and Verification Task 1

Task 2:

For reference information on configuring DCE clocking, please refer to:

Lab 57 Configuration and Verification Task 2

Lab 58 Configuration and Verification Task 2

For reference information on configuring IP interfaces, please refer to:

Lab 31 Configuration and Verification Task 3

Task 3:

Sw1#conf t

Enter configuration commands, one per line.  End with CNTL/Z.

Sw1(config)#vlan 50

Sw1(config-vlan)#name NAT_VLAN

Sw1(config-vlan)#exit

Sw1(config)#int f0/2

Sw1(config-if)#switchport mode access

Sw1(config-if)#switchport access vlan 50

Sw1(config-if)#no shutdown

Sw1(config-if)#exit

Sw1(config)#line vty 0 15

Sw1(config-line)#password CISCO

Sw1(config-line)#login

Sw1(config-line)#end

Sw1#

Sw1#show vlan brief

VLAN Name Status Ports
—- ——————————– ——— ——————————-
1 default active Fa0/1, Fa0/3, Fa0/4, Fa0/5
Fa0/6, Fa0/7, Fa0/8, Fa0/9
Fa0/10, Fa0/11, Fa0/12, Fa0/13
Fa0/14, Fa0/15, Fa0/16, Fa0/17
Fa0/18, Fa0/19, Fa0/20, Fa0/21
Fa0/22, Fa0/23, Fa0/24, Gi0/1
Gi0/2
50 NAT_VLAN active Fa0/2
1002 fddi-default active
1003 trcrf-default active
1004 fddinet-default active
1005 trbrf-default active

Task 4:

Sw1#conf t

Enter configuration commands, one per line.  End with CNTL/Z.

Sw1(config)#int vlan 1

Sw1(config-if)#shutdown

Sw1(config-if)#exit

Sw1(config)#int vlan 50

Sw1(config-if)#no shutdown

Sw1(config-if)#ip address 10.2.2.4 255.255.255.224

Sw1(config-if)#exit

Sw1(config)#ip default-gateway 10.2.2.2

Sw1(config)#end

Sw1#

R3#conf t

Enter configuration commands, one per line.  End with CNTL/Z.

R3(config)#int fa0/0

R3(config-if)#no shutdown

R3(config-if)#ip address 10.2.2.2 255.255.255.224

R3(config-if)#end

R3#

Task 5:

R1#ping 192.168.254.2

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.254.2, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 4/4/4 ms

R3#ping 192.168.254.1

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.254.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 4/4/4 ms

R3#ping 10.2.2.4

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 10.2.2.4, timeout is 2 seconds:

..!!!

Success rate is 60 percent (3/5), round-trip min/avg/max = 1/3/4 ms

Sw1#ping 10.2.2.2

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 10.2.2.2, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 4/4/8 ms

Sw1#ping 192.168.254.1

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.254.1, timeout is 2 seconds:

…..

Success rate is 0 percent (0/5)

Task 6:

R3#conf t

Enter configuration commands, one per line.  End with CNTL/Z.

R3(config)#access-list 140 remark ‘Permit ICMP Traffic For NAT’

Sw1(config)#access-list 140 permit icmp 10.2.2.0 0.0.0.31 any

Sw1(config)#access-lis 140 permit tcp 10.2.2.0 0.0.0.31 any eq telnet

R3(config)#end

R3#

R3#show ip access-lists 140

Extended IP access list 140

10 permit icmp 10.2.2.0 0.0.0.31 any

20 permit tcp 10.2.2.0 0.0.0.31 any eq telnet

Task 7:

R3#conf t

Enter configuration commands, one per line.  End with CNTL/Z.

R3(config)#int fa0/0

R3(config-if)#ip nat inside

R3(config-if)#exit

R3(config)#int s0/0

R3(config-if)#ip nat outside

R3(config-if)#exit

R3(config)#ip nat inside source list 140 interface serial 0/0 overload

R3(config)#end

R3#

NOTE: Port Address Translation (or NAT Overload) is enabled by using the overload keyword in the ip nat inside souce list command. This allows the router to overload address translation to the specified interface or IP address. Do not forget to issue this keyword when configuring PAT. Otherwise, you will have created dynamic NAT and will run out of addresses after the very first translation.

Task 8:

Perform a ping and then telnet from Sw1 and then disconnect from the telnet session.

Sw1#ping 192.168.254.1

Sw1#telnet 192.168.254.1

R3#

R3#show ip nat translations

Pro Inside global      Inside local       Outside local      Outside global

tcp 192.168.254.2:11777 10.2.2.4:11777    192.168.254.1:23   192.168.254.1:23

icmp 192.168.254.2:4176 10.2.2.4:4176     192.168.254.1:4176 192.168.254.1:4176

icmp 192.168.254.2:4177 10.2.2.4:4177     192.168.254.1:4177 192.168.254.1:4177

icmp 192.168.254.2:4178 10.2.2.4:4178     192.168.254.1:4178 192.168.254.1:4178

icmp 192.168.254.2:4179 10.2.2.4:4179     192.168.254.1:4179 192.168.254.1:4179

icmp 192.168.254.2:4180 10.2.2.4:4180     192.168.254.1:4180 192.168.254.1:4180

NOTE: Notice that there is only one translation for Telnet but there are five translations for Ping. This is because a dynamic translation is created for every ping packet sent. By default, Cisco routers and switches will send five ping packets. You can tell they are from the same ping because the port numbers are sequential.

 

Also, by using interface based PAT, R1 will see all packets (Ping and Telnet) being sourced from the Serial0/0 interface of R3. If we enabled the debug ip packet detail command on R1, we would see the following for Telnet:

 

*Mar  1 01:07:45.127:     TCP src=23, dst=12289, seq=2994196370, ack=125681435, win=4085 ACK PSH

*Mar  1 01:07:45.272: IP: tableid=0, s=192.168.254.2 (Serial0/0), d=192.168.254.1 (Serial0/0), routed via RIB

 

In a similar manner, we would also see the following for pings from Sw2:

 

*Mar  1 01:08:40.907: IP: s=192.168.254.2 (Serial0/0), d=192.168.254.1 (Serial0/0), len 100, rcvd 3

*Mar  1 01:08:40.907:     ICMP type=8, code=0

*Mar  1 01:08:40.907: IP: tableid=0, s=192.168.254.1 (local), d=192.168.254.2 (Serial0/0), routed via FIB

*Mar  1 01:08:40.907: IP: s=192.168.254.1 (local), d=192.168.254.2 (Serial0/0), len 100, sending

*Mar  1 01:08:40.907:     ICMP type=0, code=0

 

R#show ip nat statistics

Total active translations: 5 (0 static, 5 dynamic; 5 extended)

Outside interfaces:

Serial0/0

Inside interfaces:

FastEthernet0/0

Hits: 153  Misses: 23

Expired translations: 16

Dynamic mappings:

— Inside Source

[Id: 3] access-list 140 interface Serial0/0 refcount 5

Prev

Next

About Us

This is a free bonus site for members of www.howtonetwork.com

Copyright

The content on this copyright Reality Press Ltd.
Copyright Reality Press Ltd.