Cisco IOS Dynamic NAT Configuration

It’s time to configure dynamic NAT where we use a pool of IP addresses for translation. I’ll use a fairly simple topology with two hosts and one router that will perform NAT:

This time we have 2 host routers on the left side, and I’m using another subnet. Let’s prepare the host routers:

Host1(config)#no ip routing
Host1(config)#default gateway 192.168.123.3
Host2(config)#no ip routing
Host2(config)#ip default-gateway 192.168.123.3

The next step is to configure NAT:

NAT(config)#interface fastEthernet 0/0
NAT(config-if)#ip nat inside 
NAT(config)#interface fastEthernet 1/0
NAT(config-if)#ip nat outside

First, we’ll configure the correct inside and outside interfaces. Now I will create a pool with IP addresses that we can use for the translation:

NAT(config)#ip nat pool MYPOOL 192.168.23.10 192.168.23.20 prefix-length 24

The ip nat pool command lets us create a pool. I’m calling mine “MYPOOL,” and I’m using IP address 192.168.23.10 up to 192.168.23.20. We can now select the hosts that we want to translate:

We're Sorry, Full Content Access is for Members Only...

If you like to keep on reading, Become a Member Now! Here is why:

  • Learn any CCNA, CCNP and CCIE R&S Topic. Explained As Simple As Possible.
  • Try for Just $1. The Best Dollar You’ve Ever Spent on Your Cisco Career!
  • Full Access to our 798 Lessons. More Lessons Added Every Week!
  • Content created by Rene Molenaar (CCIE #41726)

542 Sign Ups in the last 30 days

satisfaction-guaranteed
100% Satisfaction Guaranteed!
You may cancel your monthly membership at any time.
No Questions Asked!

Tags: ,


Forum Replies

  1. Hi Rene,

    Thanks for the article.
    I believe the interface on NAT Router connected to switch should be fa0/0. I see the diagram says fa1/0 wherein the command say fa0/0 —> ip nat inside.

    Correct me if i am wrong.

  2. Hi Jeeva Jose,

    Thanks you are right, I just fixed it in the diagram.

    Rene

  3. Hello All,

    can we use interface ip of router in dynamic nat.

  4. Hello Rene,
    Thanks for the article.
    I just want to know about F0/0 on Nat router, what we called it?

    Thanks in advance.
    Wisam

49 more replies! Ask a question or join the discussion by visiting our Community Forum