TCP/IP and NetMasks and Routing Tables
Posted on 2002-04-22
Perhaps someone can help me to understand TCP/IP and subnet masks better.
I have two computers (connected to a cable modem and to each other via a hub, not a router) that have been dynamically assigned (via DHCP) their IP addresses. The addressess are as follows:
Computer A: xxxx.yyyy.181.97, subnet mask 255.255.248.0
Computer B: xxxx.yyyy.180.177, subnet mask 255.255.248.0
Now, doing a "bitwise and" between the two addressess and their respective masks, I derive the network to which I belong to be xxxx.yyyy.176.0.
I also note that for computer A the last byte is less than 128 and for computer B the last byte is greater than 128. I know that there can be some significance to this, but have not seen an explanation.
Now, if we limited the IP addresses on the subnet xxxx.yyyy.176.0 to be of the form xxxx.yyyy.176.(1-255) with a subnet mask of 255.255.255.0, then this subnet would only be able to accommodate 255 IP addresses. It looks like the combination of the 181 and the 248 on the subnet mask allows for more IP addresses to be assigned to that subnet? Is that the point?
Now let's say that I wanted to be able to network these two computers together at home. I would want an entry in my routing table for computer A that says that if I am trying to send a packet to computer B, I should send it from computer A. What should that look like and why?:
Thanks for the help/tutorial.