Jump to content

How To Configure A Nat On A Cisco Ios Router


wildweaselmi
 Share

Recommended Posts


  • This tutorial will detail the steps needed to properly configure network address translation (NAT) on a Cisco IOS router.
  • Network Address Translation is a way for users on an internal network to share one or more external (often public) IP addresses.
  • This tutorial will focus on the sharing of a single external IP address which is often referred to as port address translation (PAT).
  • The following information is required for NAT:

    External IP address to be NAT'd: 99.99.99.99/24


    Internal IP address: 192.168.0.1/24


    gallery_1_68_65821.jpg



Running the commands in IOS


MyWiseGuys#config t


MyWiseGuys(config)#int fa0/0


MyWiseGuys(config-if)#ip add 192.168.0.1 255.255.255.0


MyWiseGuys(config-if)#no shut


MyWiseGuys(config-if)#int fa0/1


MyWiseGuys(config-if)#ip add 99.99.99.99 255.255.255.0


MyWiseGuys(config-if)#no shut


MyWiseGuys(config-if)#exit


MyWiseGuys(config)#access-1ist 1 permit 192.168.0.0 0.0.0.255


MyWiseGuys(config)#ip nat inside source list 1 interface fa0/1 overload


MyWiseGuys(config)#int fa0/0


MyWiseGuys(config-if)#ip nat inside


MyWiseGuys(config-if)#int fa0/1


MyWiseGuys(config-if)#ip nat outside


MyWiseGuys(config-if)#exit


MyWiseGuys(config)#exit


MyWiseGuys#copy runn start



c:\ping 192.168.0.1



c:\ping 99.99.99.99



MyWiseGuys#sh ip nat translations


gallery_1_68_4900.jpg



show ip nat translations Field Descriptions


Pro = Protocol of the port identifying the address.


Inside global = The legitimate IP address that represents one or more inside local IP addresses to the outside world.


Inside local = The IP address assigned to a host on the inside network; probably not a legitimate address assigned by the Network Interface Card (NIC) or service provider.


Outside local = IP address of an outside host as it appears to the inside network; probably not a legitimate address assigned by the NIC or service provider.


Outside global = The IP address assigned to a host on the outside network by its owner.


create = How long ago the entry was created (in hours:minutes:seconds).


use = How long ago the entry was last used (in hours:minutes:seconds).


flags = Indication of the type of translation. Possible flags are:


  • extended—Extended translation
  • static—Static translation
  • destination—Rotary translation
  • outside—Outside translation
  • timing out—Translation will no longer be used, due to a TCP finish (FIN) or reset (RST) flag.



Other related commands


clear ip nat translation


Clears dynamic NAT translations from the translation table.



ip nat


Designates that traffic originating from or destined for the interface is subject to NAT.



ip nat inside destination


Enables NAT of the inside destination address.



ip nat inside source


Enables NAT of the inside source address.



ip nat outside source


Enables NAT of the outside source address.



ip nat pool


Defines a pool of IP addresses for NAT.



ip nat service


Enables a port other than the default port.



show ip nat statistics


Displays NAT statistics.



Following attachment is from Cisco Systems (Verifying NAT Operation and Basic NAT Troubleshooting)


13.pdf


13.pdf

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...