does router NAT change a public address?

December 12, 2010 at 05:38:08
Specs: Windows 7
I have a private network who's router is config with a ublic address of 192.168.1.1(lan1) and inside this private network and installed another private network that uses a router , which also uses a NAT with a public address of 192.168.1.2(LAN-2),
So, my doubt is when a packet from LAN-2 goes through the whole network to the outside world. What would be the ip-address(source) in the packet.
Is it LAN-1's public address or LAN-2's public address,
That is 192.168.1.1 or 192.168.1.2........

See More: does router NAT change a public address?

Report •


#1
December 12, 2010 at 05:49:15
I think you're confused about public versus private subnets.

192.168.0.0/24 is a private Class C subnet. It's not "public" which means it's not routable on the internet.

Your two IP's are in the same subnet by the way:

192.168.1.1
192.168.1.2

are both part of 192.168.0.0/24. In fact, they're the very first two IP's available.

Your public IP address will be the one assigned to the WAN side of your router(s) by your ISP.

Do a little reading/research on "subnets and subnetting" for more in-depth info on this topic. Google is your friend!

It matters not how straight the gate,
How charged with punishments the scroll,
I am the master of my fate;
I am the captain of my soul.

***William Henley***


Report •

#2
December 12, 2010 at 05:58:39
hey sorry the public address is 150.80.x.1 for lan-1 and 150.80.x.2 for Lan-2......
Now what will be the answer

Report •

#3
December 12, 2010 at 06:23:51
It looks to me that you are confused about the way IP addressing works.

On the WAN (Wide Area Network - i.e. Internet) the IP address is assigned by the DHCP in your ISPs server. This may be fixed or dynamic depending on your subscription.

On the LAN (Local Area Network) side it is your routers DHCP which allocates IP address to device attached to it either wired / wireless. These addresses are usually in the range 192.168.xxx.xxx. You can set the allocation of IP address by your router in a static way though normally by default they are dynamically allocated.

So if you are using 2 routers how have you connected them to a single connection to the WAN?

I have 2 devices (a switched HUB and a wireless router). The HUB uplink port is connected to one of the wired ports of the wireless router. In this way the wireless router is the one that connects to the outside using a single IP address.

What is your topography?
How are you connecting up?
Once you understand this, the answer may then be obvious.

___________________________________________
When everything else fails, read the instructions.


Report •

Related Solutions

#4
December 13, 2010 at 07:45:59
karanh

What would be the ip-address(source) in the packet.

Typically, once it leaves the WAN side of your router, the "source" address will be the router's external IP. The router itself, utilizing NAT will deal with the internal address of the return packets and send them to the appropriate port.

I said it before, I'll say it again.......do some research/reading on subnettting. Include NAT and "routing of packets" in your research.

mosaddique

When you say, "I have 2 devices (a switched HUB and a wireless router" I have to wonder what you mean by "a switched HUB".

That's an oxymoron.....or at the very least, a contradiction in terms.

A hub and a switch are physically similar (they both have RJ45 ports to plug network cables into), but in behaviour, completely different. There is no such thing as a "switched hub" A device is either a switch, or a hub but it cannot be both.

A quick google search of the two will tell you their differences and you'll understand why you can't have a "switched hub".

It matters not how straight the gate,
How charged with punishments the scroll,
I am the master of my fate;
I am the captain of my soul.

***William Henley***


Report •

#5
December 13, 2010 at 09:14:01
Agreed, I should have said switch.

___________________________________________
When everything else fails, read the instructions.


Report •

Ask Question