Question concerning NAT / IPv6 and so

Clarence

In Runtime
Messages
109
Location
Trinidad
I'm still relatively a student though, and one question with IP Addressing, I know that it is said we are running out of IPv4, hence the reason for IPv6 however i'm a bit confused as if NAT translate a private to public IP - can a destination IP be the same as a Sending IP before NAT?

Let me elaborate a little more, in the organization i work our DHCP scope is between 192.168.100.0 - 192.168.100.50 - the range is 50 ips private subnet 255.255.255.252. Now is it possible another organisation somewhere across the world hold this same range- and if it was an exact packet reference to that company 192.168.0.25 Both host pc and recieving pc. how will the router know?

I'm just an intern at the company though. So please help
 
I'm confused as to what you're asking. but I'll see if I can help.

First - yes, a destination can be the same as the sending IP, but the packet will never leave the sending PC. The network card will see the packet is destined to itself it won't leave.

Is it possible for two PC's in the world to have the IP address 192.168.0.25 - Yes. And that's only because 192.168.x.x is an internal private IP and not what the world sees. That said, it is not possible for two devices on the same private network to have the same IP address.

In the scenarios & questions given, NAT doesn't come into play at all.
 
ok but can you explain what happens when 2 private ips needs to communicate on 2 seperate networks across the glode. lets say 2 different host pcs with similar private ips
 
Why does it matter if they have similar private IPs? The outside world never knows what those are and only sees the public IP from the router.

Basically what happens for one computer to talk to another over the internet: PC sends a request to the router, the router packages it and sends it out to the destination which responds by switching the destination and source addresses. The router on the initiating side still has the connection open so NAT is not needed.

Where it does come into place is typically associated with port forwarding. Basically if the router detects traffic coming in at port Y, it will direct it to port X on computer Z. The private IP address on the initiating computer doesn't matter, nor will computer Z ever know what it is.
 
simply put yes:

computer 192.168.0.2
communicates with router 192.168.0.1 to go find a page on a website.
request comes out the pubblic interface of your router 1.1.1.1

and off to the website 2.2.2.2
hits the websites router
get'snat'd to an internal address 192.168.0.1 and back.

your client never knows the internel address, only the external (2.2.2.2) of the webserver.

the webserver never knows your client IP, only the public address of your router to respond to (1.1.1.1)



as for the second question:
ok but can you explain what happens when 2 private ips needs to communicate on 2 seperate networks across the glode. lets say 2 different host pcs with similar private ips
if there are firewalls and NAT then don't worry, the clients never see the internal IP's of the other networks.

if you're creating a VPN tunnel in the middle then you need to use separate address schemes since the two sites appear to be a single site, (and you can't have two addresses that are the same on the same rout-able network.
 
Back
Top Bottom