Troubleshooting TCP/IP

Connectivity issues can occur for several different reasons.  Incorrect subnet masks, invalid IP addresses, name resolution issues, etc.  Here are a few easy things to check when two computers cannot communicate.

Contents
Are the two computers on the same subnet?
How do I figure out the subnet mask?
Is the correct default gate configured?
Is the IP address valid?
Name Resolution

Are the two computers on the same subnet?    (Back to top)

AND the IP address and subnet mask for each computer.  If the results match, they are on the same subnet and should communicate.

The computers in Example 1 are on different subnets and will not see each other.

Example 1   Computer 1 Computer 2
IP Address 192.168.116.22 192.168.129.124
Subnet Mask 255.255.192.0 255.255.192.0
CIDR Notation 192.168.116.22/18 192.168.129.124/18
Network ID 192.168.64.0 192.168.128.0

The computers in Example 2 are on the same subnet and will see each other.  Note:  If these computers are separated by a router, they will not see each other.   Computer 1 will determine that Computer 2 is on the same subnet and will not forward the packets to the default gateway.

Example 2   Computer 1 Computer 2
IP Address 192.168.32.15 192.168.47.12
Subnet Mask 255.255.240.0 255.255.240.0
CIDR Notation 192.168.32.15/20 192.168.47.12/20
Network ID 192.168.32.0 192.168.32.0

 

How do I figure out the subnet mask?    (Back to top)

With Windows 2000, Microsoft introduced expressing the subnet mask after the IP address (/number).  To figure out what the subnet mask is, simply remember that the subnet mask is expressed as four octets of eight bits each.  With an IP address of 192.168.64.22/20, the subnet mask would use all 8 bits from the first octet--255; all eight bits from the second octet--255; and 4 bits from the third octet--128+64+32+16 or 240.

 

 

Is the correct default gateway configured?     (Back to top)

Computers on the segment must configured with the correct default gateway to forward packets across the router.  The gateway must be on the same subnet (same network ID) as the computers.  In the following graphic, the correct default gateway is the port that the segment connects to. 

 

Is the IP address valid?  (Back to top)

IP addresses come with rules.  The host ID cannot be all ones (255), or all zeroes (0).  Nor can we use any IP addresses in the following subnets:  127.0.0.0 (diagnostics), 10.0.0.0 (private) or192.168.0.0 (private).

The IP addresses also must be within the valid ranges defined by the subnet mask.  To see if the IP address is valid, look at the right most high order bit in the subnet mask. 

In Example 1,  The RED 1 is the right most high order bit and has a value of 64.  This becomes the delta.  Valid IP address ranges start with 192.168.64.1.  Add the delta to the third octet.  This becomes the starting address of the next range of IP addresses, 192.168.128.1  

Example 1

Network ID 192 168 0 0
Subnet Mask 255 255 192 0
Binary Conversion 11111111 11111111 11000000 00000000

Example 2

In Example 2,  The RED 1 is the right most high order bit and has a value of 16.  This becomes the delta.  Valid IP address ranges start with 131.107.16.1.  Add the delta to the second octet.  This becomes the starting address of the next range of IP addresses, 131.107.32.1.  Add the delta again, the next range is 131.107.48.1

Network ID 131 107 0 0
Subnet Mask 255 248 0 0
Binary Conversion 11111111 11110000 00000000 00000000

 

Name Resolution  (Back to top)

If you can connect by IP address but not computer name (NetBIOS) or by Fully Qualified Domain Name (FQDN), then name resolution is the problem.  If the problem is with Computer Names, then check for a WINS server or a local LMHOSTS file.  If the problem is with FQDN, then the problem is with the DNS server of a local HOSTS file.