Tutorial: Basic networking

D

DelJo63

The objective is to get you connected to your ISP and to avoid wasted time fussing with the network configuration when you have symptoms that connectivity might be a problem. There are many things that can cause problems with your EMAIL or Print/File sharing – not all of them are remotely related to the networking configurations.

There are two major NODES to the Internet: (1) your ISP (the gateway to www et al) and (2) your system(s), which are known as clients (of course theres thousands-millions even, but from your system, its all or nothing). The problem is getting your client to talk to the ISP – the rest of the World Wide Web comes to you without configuration issues. Once you can get a browser to operate, you can then get email services per the instructions from your ISP.

Regardless of how you get ‘connected’ (cable,dsl, or dial-up), your ISP will be in control of the IP address assigned to you and does this most frequently using DHCP. They also will define the DNS addresses you will be using.

There are lots of variations in configuring a network but here are some basic facts for all of them:

Your IP ADDRESS is in a pool of addresses assigned to the ISP. An IP address has the form of aaa.bbb.ccc.ddd
The aaa.bbb.ccc is the SUBNET portion of the address and the ddd portion is always 0 < ddd < 256. Specific numbers have special meaning (0,1,255) so the maximum number of users attached to the subnet aaa.bbb.ccc is 253 – you will be one of them -- let’s pretend you get assigned an address of aaa.bbb.ccc.101.

If your IP Address starts with 169.XX.XX.XX you have an invalid IP Address and will not be able to access the Internet. This address is a positive confirmation that your network adapter did not get a response for the DHCP request. Verify that your firewall is allowing IN/OUT TCP/UDP ports 67-68.

You will also get a configuration setting for the GATEWAY. It is the default address for anything your client can not handle for itself – which is almost everything. So unless the request is for an address on your local LAN, all traffic exists your system heads for the gateway. It is ALWAYS associated with your ISP or the router on your LAN if you have one (if so, it will forward to the ISP.)

Another configuration setting is the subnet MASK and it is frequently 255.255.255.0. This little goodie controls the number of users in the SUBNET and by changing, the ISP can get more than 253 users crammed into the subnet.

With just an IP address, Gateway address and subnet MASK, you can now route IP traffic and prove you are connected. This scenario assumes you are directly connected to the ISP without a router.

1:- First, PING 127.0.0.1 (the nic card itself)
This proves your NIC is operational

2:- Next, PING aaa.bbb.ccc.101 (your public ip address)
This is the address assigned to you by the ISP when the connection was made. But how do you find it?
By getting a Command Prompt (run cmd) and issuing IPCONFIG
Unless you have modified your firewall settings, you should NOT see Request timed out, but rather something like
Reply from aaa.bbb.ccc.101: bytes=32 time<1ms TTL=64

3:- Follow that with PING $GATEWAY (as shown by the previous ipconfig). You should NOT see Request timed out.
This too should look like
Reply from $GATEWAY: bytes=32 time 104 ms TTL=64

Congrats! Steps 1-3 have proven you have connectivity and routing to your ISP.

The next step is to verify you can use NAMES instead of ip-addresses. This transformation/lookup occurs in the DNS (ie: Domain Name Service) where all those Internet domains are registered (btw: there’s many places to register, but accessing any one will (finally) get to the one with the name you’re looking for OR return can't find jun-k-bix.com: Non-existent domain.)

In your command prompt enter IPCONFIG /ALL
Near the bottom you will see (usually) two lines associated with the label DNS Servers . .
Whenever your system requests site-by-name, the operation flows like this:
Request foo.com --> Gateway --> DNS address
Returns the ip-address thereof <-- Gateway <-- DNS
Request ip-address-of-foo.com --> Gateway --> off into the WWW
Reply from foo.com <-- Gateway <-- foo.com

4:- Now prove that your browser can find pages using a name rather than an ip-address:
PING WWW.GOOGLE.COM and you should get something like

Pinging WWW.GOOGLE.COM [66.102.7.104] with 32 bytes of data
Reply from 66.102.7.104: bytes=32 time=98ms TTL=238

Notice that WWW.GOOGLE.COM was translated into 66.102.7.104

Once you’ve come this far, your TCP configuration is valid for your ISP. :wave: :giddy:

Any other issues with connecting to specific services (eg: email, ssh, file sharing) will NOT be issues with TCP but rather, your client software configuration and/or your firewall.

For myself, I always make the ISP home page my browser’s home page – this gives me immediate status that I am connected to the ISP and if it’s working correctly, any problems with accessing http://foo.com/ is a clear indication that it is upstream from my ISP! Saves me lots of time J


But what if you have a router between the modem and your system(s)? What changes? Lots of things but the above principles still apply. Remember we were pretending you got assigned an address of aaa.bbb.ccc.101? That will likely still be true but it will not be seen using IPCONFIG. You will need to access your router’s configuration page which is brand-name dependent:
Netgear 192.168.0.1
D-Link 192.168.0.1
Linksys 192.168.1.1
Belkin 192.168.2.1​
So, enter http://192.168.x.1/ and then use the documented user/password
Not having access to all variations of routers, I’ll have to use mine as an example (ie Netgear RP614v2) and you will need to poke about the menu system to find the WAN status or setup (netgear menu is Router Status) and mine looks like
Internet Port
MAC Address 00:aa:bb:cc:dd:ee
IP Address aaa.bbb.ccc.101 << there it is! My PUBLIC ip address
DHCP Client
IP Subnet Mask 255.255.254.0
Domain Name Server 67.21.15.2
67.21.15.18

The LAN Port looks like
MAC Address 00:zz:xx:ww:vv:tt
IP Address 192.168.0.1 << the router’s address and the LAN gateway
DHCP Server
IP Subnet Mask 255.255.255.0

Where is the ip address for the system(s) on the LAN? Under the Attached Device Menu:
# IP Address Device Name MAC Address
01 192.168.0.3 eMac 00:zz:cc:ee:rr:tt
02 192.168.0.4 LTBEARD 00:zz:xx:mm:nn:tt

Using a router will change your tests 1,2,3,4 as follows
1:- First, PING 127.0.0.1 (the nic card itself) no change here
2:- PING 192.168.0.4 (your LAN ip address) [*]
3:- PING 192.168.0.1 (your router/gateway address) [*]
3:- PING aaa.bbb.ccc.101 (your public ip address)
4:- PING www.google.com

[*] note: with a router/firewall in place you may not get timing info here, as the firewall can be configured to ignore ICMP requests (for security reasons).
 
Could you explain how to create a Subnet and how to recognize a valid MAC address? I read the text and struggled through the lab, but I am still confused.
 
in reverse order:

Your MAC address is created by the vendor of the NIC and 'burned' into the
device as a UNIQUE address. Each vendor is assigned their own prefix and
the remainder is simple increments thereafter. You can see yours using
the ipconfig /all (or ifconfig on Linux). It's made from pairs
of digits 0-1 and letters A-F, which create a hexadecimal number.

A subnet is an IP address with it's subnet mask applied so as to limit the traffic
that is seen by the NIC. The subnet mask is usually seen as a.b.c.d where
each letter can be numbers in the range 0-255. These represent bits
(ie 255 decimal is FF in hex, which is eight '1'). These act as a filter to say,
where there's a '1' in the mask, the same bit in the IP address must be present to allow traffic.
A '0' in the mask says that bit of the IP address is ignored.
Thus an IP address 192.168.1.15 with a mask of 255.255.255.0 will allow traffic
to be seen, while traffic destine to 192.168.2.10 will not. In fact, the trailing '0'
allows all IP addresses from 192.168.1.1 thru 192.168.1.255 to be seen,
making all devices in this range the IP SUBNET.
 
Back