Verifying NAT and PAT Configurations

Router#show ip nat translations

Displays the translation table

Router#show ip nat statistics

Displays NAT statistics

Router#clear ip nat translations inside a.b.c.d outside e.f.g.h

Clears a specific translation from the table before it times out

Router#clear ip nat translations*

Clears the entire translation table before entries time out

Troubleshooting NAT and PAT Configurations

Router#debug ip nat

Displays information about every packet that is translated.

Be careful with this command. The router's CPU might not be able to handle this amount of output and might therefore hang the system.

Router#debug ip nat detailed

Displays greater detail about packets being translated.

Figure 23-1 shows the network topology for the PAT configuration that follows using the commands covered in this chapter.

Figure 23-3 Port Address Translation Configuration

ISP Router

Readers' Questions

  • DARYL
    How to configure nating on cisco router?
    8 months ago
    1. Access the router's command-line interface (CLI).
    2. Enter configuration mode by typing the command “enable” and enter the privileged mode password.
    3. Create a static route to the remote network; for example:Router(config)# ip route 10.0.0.0 255.0.0.0 10.0.0.
    4. 1 Create an access list to define which traffic can be sent through the static route.Router(config)# access-list 1 permit 10.0.0.0 0.0.0.
    5. 255 Enter configuration mode for the interface that will be used to route traffic.Router(config)#interface <interface name>
    6. Configure the interface to use NAT by typing the command “ip nat outside”.
    7. Assign the access list to the interface.Router(config-if)# ip nat outside access-list
    8. 1 Exit configuration mode by typing “exit”.
    9. Save the configuration.Router# write memory

    router>enable

    Moves to privileged mode.

    router#configure terminal

    Moves to global configuration mode.

    router(config)#host ISP

    Sets the host name.

    ISP(config)#no ip domain-lookup

    Turns off Domain Name System (DNS) resolution to avoid wait time due to DNS lookup of spelling errors.

    ISP(config)#enable secret cisco

    Sets the encrypted password to cisco.

    ISP(config)#line console 0

    Moves to line console mode.

    ISP(config-line)#login

    User must log in to be able to access the console port.

    ISP(config-line)#password class

    Sets the console line password to class.

    ISP(config-line)#logging synchronous

    Commands will be appended to a new line.

    ISP(config-line)#exit

    Returns to global configuration mode.

    Figure 23-3 Port Address Translation Configuration

    Network 172.16.10.0/24 Network 198.133.219.0/30

    Network 172.16.10.0/24 Network 198.133.219.0/30

    IP NAT IP NAT Inside Outside

    ISP(config)#interface serial 0/0/1

    Moves to interface configuration mode.

    ISP(config-if)#ip address 198.133.219.2 255.255.255.252

    Assigns an IP address and netmask.

    ISP(config-if)#clock rate 56000

    Assigns the clock rate to the DCE cable on this side of the link.

    ISP(config-if)#no shutdown

    Enables the interface.

    ISP(config-if)#interface loopback 0

    Creates loopback interface 0 and moves to interface configuration mode.

    ISP(config-if)#ip address 192.31.7.1255.255.255.255

    Assigns an IP address and netmask.

    ISP(config-if)#exit

    Returns to global configuration mode.

    ISP(config)#exit

    Returns to privileged mode.

    ISP#copy running-config startup-config

    Saves the configuration to NVRAM.

    Company Router

    nouten>enable

    Moves to privileged mode.

    router#configure terminal

    Moves to global configuration mode.

    router(config)#host Company

    Sets the host name.

    Company(config)#no ip domain-lookup

    Turns off DNS resolution to avoid wait time due to DNS lookup of spelling errors.

    Company(config)#enable secret cisco

    Sets the secret password to cisco.

    Company(config)#line console 0

    Moves to line console mode.

    Company(config-line)#login

    User must log in to be able to access the console port.

    Company(config-line)#password class

    Sets the console line password to class.

    Company(config-line)#logging synchronous

    Commands will be appended to a new line.

    Company(config-line)#exit

    Returns to global configuration mode.

    Company(config)#interface fastethernet 0/0

    Moves to interface configuration mode.

    Company(config-if)#ip address 172.16.10.1 255.255.255.0

    Assigns an IP address and netmask.

    Company(config-if)#no shutdown

    Enables the interface.

    Company(config-if)#interface serial 0/0/0

    Moves to interface configuration mode.

    Company(config-if)#ip address 198.133.219.1 255.255.255.252

    Assigns an IP address and netmask.

    Company(config-if)#no shutdown

    Enables the interface.

    Company(config-if)#exit

    Returns to global configuration mode.

    Company(config)#ip route 0.0.0.0 0.0.0.0 198.133.219.2

    Sends all packets not defined in the routing table to the ISP router.

    Company(config)#access-list 1 permit 172.16.10.0 0.0.0.255

    Defines which addresses are permitted through; these addresses are those that will be allowed to be translated with NAT.

    Company(config)#ip nat inside source list 1 interface serial 0/0/0 overload

    Creates NAT by combining list 1 with the interface serial 0/0/0. Overloading will take place.

    Company(config)#interface fastethernet 0/0

    Moves to interface configuration mode.

    Company(config-if)#ip nat inside

    Location of private inside addresses.

    Company(config-if)#interface serial 0/0/0

    Moves to interface configuration mode.

    Company(config-if)#ip nat outside

    Location of public outside addresses.

    Company(config-if)#@-@

    Returns to privileged mode.

    Company#copy running-config startup-config

    Saves the configuration to NVRAM.

    This chapter provides information and commands concerning the following topics:

    • Configuring DHCP

    • Verifying and troubleshooting DHCP configuration

    • Configuring a DHCP helper address

    • DHCP client on a Cisco IOS Software Ethernet interface

    • Configuration example: DHCP

    Continue reading here: Configuration Example DHCP

    Was this article helpful?

    +1 -1