cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
Join Customer Connection to register!
881
Views
5
Helpful
4
Replies
Qi Liu
Beginner

Translate one private IP address to multiple public IP addresses

Hi team,
    Here's something about NAT .
    I want to do NAT to translate 192.168.21.21 to both 202.100.10.1 and 61.144.1.252 for the server can be accessed by two Internet addresses.
    Configuration is as below:
      interface fa 0/0
        ip add 169.254.1.2 255.255.255.252
        ip nat outside
      interface fa 0/1
        ip add 192.168.21.1 255.255.255.0
        ip nat inside
      ip route 0.0.0.0 0.0.0.0 169.254.1.1
      ip nat inside source static 192.168.21.21 202.100.10.1 extendable
      ip nat inside source static 192.168.21.21 61.144.1.252 extendable
    What I am confused is :
        If the server 192.168.21.21 wants to surf the Internet, which Internet address will it use ? Choose one randomly or use the other address only if all the ports of the one are exhausted.
    Wish somebody could help ,thx.

4 REPLIES 4
Philip D'Ath
Advisor

This is not a valid config.  If it works don't expect it to be stable.

Well , the subnet 169.254.1.0/30 is only for connection . The router is a CE(client edge) router linked to ISP. There are two static routes pointed to the CE router on PE device. I have just simplized the model .
PE (Provider Edge):

interface gi 0/1/2
  ip address 169.254.1.1 255.255.255.252
ip route 61.144. 1.0 255.255.255.0 169.254.1.2
ip route 202.100.1.0 255.255.255.0 169.254.1.2
router bgp 9344
  redis conn
  redis static

So CE router can directly use the two Internet address and PE is on duty to do the transmission.
CE (Client Edge):

interface fa 0/0
  ip add 169.254.1.2 255.255.255.252
  ip nat outside
interface fa 0/1
  ip add 192.168.21.1 255.255.255.0
  ip nat inside
ip route 0.0.0.0 0.0.0.0 169.254.1.1
ip nat inside source static 192.168.21.21 202.100.10.1 extendable
ip nat inside source static 192.168.21.21 61.144.1.252 extendable

What I cannot understand is which Internet address will be used to translate first.

Julio E. Moisa
VIP Mentor

Hi

That configuration is ok for you purpose, the extendable command is used when you have an IP from different ISP and they dont have routing between them, so both IPs can be used to reach the internal IP from a external network. 

I think the selection could done using routing but as Phililp mentioned it could create unstable or asymmetric traffic. May I know what represents the IP 169.254.1.1

If this is the edge router should have something like example:

ip route 0.0.0.0 0.0.0.0 202.100.10.254
ip route 0.0.0.0 0.0.0.0 61.144.1.254   20  

But Im not really sure how is connected the router.




>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<

Well , the subnet 169.254.1.0/30 is only for connection . The router is a CE(client edge) router linked to ISP. There are two static routes pointed to the CE router on PE device. I have just simplized the model .

PE (Provider Edge):

    interface gi 0/1/2

ip address 169.254.1.1 255.255.255.252

     ip route 61.144. 1.0 255.255.255.0 169.254.1.2

     ip route 202.100.1.0 255.255.255.0 169.254.1.2

     router bgp 9344

  redis conn

  redis static

So CE router can directly use the two Internet address and PE is on duty to do the transmission.

CE (Client Edge):

       interface fa 0/0
        ip add 169.254.1.2 255.255.255.252
        ip nat outside
      interface fa 0/1
        ip add 192.168.21.1 255.255.255.0
        ip nat inside
      ip route 0.0.0.0 0.0.0.0 169.254.1.1
      ip nat inside source static 192.168.21.21 202.100.10.1 extendable
      ip nat inside source static 192.168.21.21 61.144.1.252 extendable

What I cannot understand is which Internet address will be used to translate first.