How do you NAT an internal IP to Multiple VLAN IPs?

Answered Question
Jul 31st, 2007

Hello,

I am trying to NAT one server IP situated on the inside interface on an 1841 router to an IP on each VLAN outside interface.

Here's a sample of my router config:

**************************************

interface FastEthernet0/0

ip address 192.168.1.1 255.255.255.0

ip nat inside

!

!

interface FastEthernet0/1

no ip address

!

interface FastEthernet0/1.1

encapsulation dot1Q 10

ip address 10.10.10.254 255.255.255.0

ip nat outside

!

interface FastEthernet0/1.2

encapsulation dot1Q 20

ip address 10.10.20.254 255.255.255.0

ip nat outside

!

interface FastEthernet0/1.3

encapsulation dot1Q 30

ip address 10.10.30.254 255.255.255.0

ip nat outside

***************************************

So, take for example, if my server IP is 192.168.1.100/24, i want to NAT it to each of the 3 VLANs indicated above to somthing like 10.10.10.100/24, 10.10.20.100/24, 10.10.30.100/24. It will only let me NAT one inside IP to one outside VLAN IP. Does anyone have any ideas on how to get around this or is it just the nature of the router?

*Note: I will need all ports open, so PAT is not the best option for me, unless anyone know's how to open all ports on one command line.

Any help would be appreciated!

Thank you,

-Lee

I have this problem too.
0 votes
Correct Answer by Jon Marshall about 9 years 5 months ago

Hi Lee

Could you try

ip nat inside source static 192.168.1.100 10.10.10.100 extendable

ip nat inside source static 192.168.1.100 10.10.20.100 extendable

ip nat inside source static 192.168.1.100 10.10.30.100 extendable

HTH

Jon

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
Correct Answer
Jon Marshall Tue, 07/31/2007 - 09:10

Hi Lee

Could you try

ip nat inside source static 192.168.1.100 10.10.10.100 extendable

ip nat inside source static 192.168.1.100 10.10.20.100 extendable

ip nat inside source static 192.168.1.100 10.10.30.100 extendable

HTH

Jon

Actions

This Discussion