networking questions..

Status
Not open for further replies.

nothingman02

Solid State Member
Messages
7
Hi,
I am new to networking and am learning and have some doubts. I am trying to put together these concepts in my head(thought experiments) as I have no experience or equipment to work with. Any help would be greatly appreciated.

Here goes..
Say I have a private network with one public IP. Now, NAT (or commonly PAT I believe) allows communication with the internet. And if I need the IP address of a destination, a bunch of DNS servers work together and will return me the destination IP.

1) So, now, what happens next? I mean if I the host im trying to talk to is private.
Say, I am trying to access gmail. The DNS will return the public IP of google which would be its default gateway(?). But once my packets get there to the gateway, how will the subsequent routing to an appropriate host take place? I dont have the IP or Mac address and the host is hidden inside.

2) Secondly, what if I am trying to communicate with somebody inside my own network. If I am A, how will I know B's (private) IP address so that the switch can learn and forward my packets to B's MAC address. Do I need an internal DNS server for all my private IP addresses set up or is it not required and there is another way.

Thanks again for your help.
 
Hm...I suppose the answer for 1) is Porrt forwarding or DMZ or a combination of both?
Am I correct?

How about 2) ?

Anybody? Thanks..
 
1. The router will be setup to forward requests from particular services or incoming ports to particular servers inside the network. E.g. traffic coming in on port 110 might be sent to the mail server, etc.

2. ARP is the thing you're looking for. Basically determines the MAC address when only the IP is known.
A DNS server is only required when translating a domain name to an IP address. E.g. typing in 'www.google.com' into your web browser, a request will be sent to your DNS server to find out the IP address associated with 'google.com'. Seeing as this is all on your local network, you don't need one.
 
Thanks for the reply SOULphIRE.

Sorry I am not still clear about the second part. I understand how ARP works but for the switch to send out an ARP broadcast, shouldn't it know the IP address?

Basically, in my example, in an internal private network, how will the host A or the layer 2 switch that its connected to, know the private IP address of host B (destination)?
 
The switch has a table of all the machines it knows. First it'll be blank. When the switch receives a packet to send to a machine it doesn't know it will send it out all ports. Only the right machine will accept it.

The switch will have logged the info of the first sender, so it now knows where to send any packets it gets for that machine. Very quickly, the switch learns exactly what addresses are connected to each of its ports (as machines send out regular routine checks, broadcasts, etc)

My advice is to download wireshark and run that. Reset your switch, then watch the data you get from wireshark if you try to ping one machine from another.
 
Thanks again. But I think you are explaining MAC address resolution again.

I understand how that works. But the IP address is needed to obtain the appropriate MAC address. And in this case, the IP address is unknown.

Lets assume;
1) there are no ARP caches, MAC tables etc and the network has been just set up and turned on for the first time.
2) Its a layer 2 switch and can only forward MAC addresses (unlike the layer 3 switch, if I am correct which will also forward IP addresses)

Sorry but I am new and trying to understand...thanks again for your help. Am downloading the wireshark (1.2.9) right now..
 
1. If it's just a switch connected to a few pcs, then host A will send out a broadcast to the entire subnet.
2. If there's a router involved, host A will send to the default gateway (the router).
 
1. The router will be setup to forward requests from particular services or incoming ports to particular servers inside the network. E.g. traffic coming in on port 110 might be sent to the mail server, etc.

2. ARP is the thing you're looking for. Basically determines the MAC address when only the IP is known.
A DNS server is only required when translating a domain name to an IP address. E.g. typing in 'www.google.com' into your web browser, a request will be sent to your DNS server to find out the IP address associated with 'google.com'. Seeing as this is all on your local network, you don't need one.

Sometime the services stop and the internet won't run.
 
Status
Not open for further replies.
Back
Top Bottom