confused about networking concepts

Status
Not open for further replies.

abbas1707

Beta member
Messages
2
im disappointed :mad
:mad :(
lot of confusions .......
i am going to explain all which i want to happen :-s
let us consider
i have a pc(give some name say "A") connected to LAN( default gate way 192.168.0.1 and address 192.168.0.27).
when i open "whatismyipis.com" it shows me "Your ip is:202.108.155.2". now this ip is actually the ip
of server to which im connected.and it is same for all pc's connected
to this server.

now consider
there is another pc(give name say "B") connected to some LAN( default gate way 192.168.0.1 and address 192.168.0.124) in some different city.
when some one open "whatismyipis.com" at this it shows "Your ip is:202.178.165.2".

also consider one more pc(give name say "c") having modem.when "c" runs dial up connection..it get connected to internet
when "c" opens its network connections, there are 2 ip. Server ip(202.154.121.2), client ip(202.154.120.44)

and last consider "D" also having modem as "C"

>>>>>now keeping in mind "A","B","c","D"

***1st confusion***

when "A" opens its browser , type some url say "www.ABC.net" and click on GO then what will happen???

As i think

1.first request goes to defaullt gate way at port 80.
2.default gateway listens request at port 80
3.then default gateway establishes tcp connection with "www.ABC.net"(if no DNS involved).
4.default gateway sends Get page request to "www.ABC.net", receieves page and directs it to "A".

is it tottaly wrong???? what corrections needed????

***2nd confusion***

let "c" knows the ip of "A" (which inturn is ip of A's server), and wants to connect to "A" at port 6789.. how can it happen????

what port should be forwareded to "A" by its router so dat "c" and "A" can communicate?????

***3rd confusion***

if "c" knows the ip of "D"..and if "C" want to connect to "D" at port 6789..>>then they just have to open their ports
and they can start communicating (i.e no port forwarding involve here)


>>>> these are some confusions im facing.......and i need help badly at this time.........

hope to get some help from u people...plz help, i will be very thankful.......
 
As far as the A situation, how in depth do you want to go.
This involves NAT translation.

Basically, A sends a request to the web server on port 80 but listens on the IP 192.168.0.27 and a random port over 1024. The default gateway (assuming it is the one running NAT) will then add an entry in it's NAT table containing the internal IP (192.168.0.27) and the random port computer A chose and a random port number it chooses over 1024. It will then send a request to the web server on port 80 and listen on IP 202.108.155.2 with the random port number it chose. When the response from the web server comes back, it will hit the default gateway at 202.108.155.2:randomPort#, then gateway will then check it's NAT table, find the internal IP/Port number and send the response through.

You can use the same logic for B.

This sounds a bit like homework, so that's as far as I'm going to go.
 
In other words the 202 ip address is external and the 192 ip is a non routable ip address that is intrenal. The 192 range is reserved for internal networks. Lets say you have a switch connected to a cable modem and your ISP gives you 1 ip address ( 99% of the time) and you have 3 workstations connected to the switch. The first workstation that turns on will grab that one ip address and get on the internet and the others will not. That is where a router with NAT comes in. tHE SAME ScENARO as above, NAT lies to your isp and sayss there is only one workstation connected. NAT uses that one ip address ( external ) then as each internal workstation makes a request NAT keeps track of which internal ip made the request and use the one external ip to go external. Also routers have SPI which inspects incoming packets to make sure they are not forged and where really requested. I think if you are using broadband and you make a dial up connection, the broadband is dropped and your browser will automatically switch or it may ask if you want to switch to the dial up.
 
Any IP address starting with 192.xxx.xxx.xxx is a local IP. This means it's served by your router or DCHP server, and only works within your network. Your computer may be 192.168.1.3, but your friend's computer at his house may also be 192.168.1.3. This is because both PC's are on different networks, and each network has its own set of 192.xxx.xxx.xxx addresses.

However, the 202.xxx.xxx.xxx is your Internet (WAN, Wide Area Network) IP. It is provided by your Internet Service Provider (ISP) to your modem. All modems will have different WAN IP's. Since whatismyip.com is a service located on the Internet, and all Internet connections go through your modem, it shows your modem's IP, because the modem sends the request. Your router then sees the returning packets and sends them to the local IP of the PC that sent the request. Your ISP doesn't even know that you run more than one PC, because the router combines the Internet requests from all PC's into one IP (your WAN IP).

Port forwarding is a technique used to allow a certain PC on the LAN to have direct access to your WAN IP. This is most useful for hosting servers, such as a personal FTP server. FTP servers run on port 21, but normally the router manages (usually blocking access to if it's a firewall router) all ports. However, if you want an FTP server (say, a PC on your LAN with an IP 192.168.1.5), then you have to make the port on your WAN IP go directly to your LAN PC. This is a concept called Port Forwarding, where the router directs packets for a particular port directly to a specified LAN address. That way, someone trying to connect to ftp://<your WAN IP> will automatically connect to the PC on your LAN. I've used this for HTTP, FTP, and game servers, it's actually a very useful feature found on almost all routers.
 
Just to add one more part.

192.168.0.0-192.168.255.255 are non-routable.

192.0.0.0-102.167.255.255 and 192.169.0.0-192.255.255.255 are internet routable.
 
>>>>PRIVATE NON ROUTABLE IP ADDRESSES<<<<<<

10.0.0.0 - 10.255.255.255
172.16.0.0 - 172.31.255.255
192.168.0.0 - 192.168.255.255

On my network @ home i use 192.168.xxx.xxx on the wan side of my ISA server connected to my FIOS router and 10.10.000.000 on the LAN side of the ISA server ( DHCP hands out 10.10.xxx.xxx) AD and DNS and W/S.
 
Status
Not open for further replies.
Back
Top Bottom