03-23-2017 02:00 AM - edited 03-08-2019 09:52 AM
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.
03-23-2017 04:23 AM
This is not a valid config. If it works don't expect it to be stable.
03-26-2017 10:12 PM
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.
03-23-2017 05:15 AM
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.
03-26-2017 08:46 PM
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.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide