Computer networks consist of many different components, technologies and protocols working together.
In this tutorial/course we look at the fundamentals of how computers communicate on a TCP/IP network.
The tutorial is geared for those who need a basic understanding of how networks work, and how the components fit together so that they can set up a small home/office network.
In order for two computers to talk to each other they need:
- To be Connected (cable or Wireless) this is known as the connection media.
- To have a common language. in Networking this is known as a protocol.
- To have An Address
Ethernet or MAC Addresses
In order to communicate with each other each computer needs to have a unique address. This address is called the MAC (media access control address) and is built into the network card.
The address is also often called the physical address and the Ethernet address. It is 48 bits long (new format is 64 bits) and is fixed by the manufacturer i.e. cannot be changed. (see Note 1).
It is shown as 6 hexadecimal numbers separated by colons e.g.
On Windows open a cmd prompt– Start menu run enter cmd and return.
Enter ipconfig /all into the window and hit return.
Notice windows using a dash – as a delimiter.
Note 1: On modern network cards it is possible for MAC addresses to be manually assigned, but it is not normal to do so. In addition 64 bit MAC addresses are now used.
Ethernet Broadcasts,Broadcast Domains and Collisions
To send a message to all computers on an Ethernet network a broadcast address (Mac Address of all ones) is used. So
is the broadcast MAC address in Hex. See Understanding binary numbers
The broadcast domain is the effective range of the broadcast, which can be limited by inserting level 3 (IP level) network devices e.g. routers.
A broadcast will be re-transmitted by switches, bridges (level 2) and repeaters (level 1).
Note: Levels are the levels in the 7 layer OSI data model. See understanding the TCP/IP networking Model
Level 1 = physical e.g. media i.e. cable devices = Repeater
Level 2 = Data Link= Ethernet -devices are switches and bridges
Level 3= Network= IP protocol – devices are routers
A collision domain is the section of a network where packets can collide, and interfere with each other.
Network devices working at level 2 (data link layer) will create separate collision domains.
So bridges and switches divide a network into separate collision domains, but they are still part of the same broadcast domain.
Data Frames and Packets
Data is transferred between computers in data frames or packets.
The term frame is used for data units at the data link level and the the term packet for data units and the networking level.
Hence we have Ethernet frames and IP packets.
The data frame contains data and frame management information.
The concept used to describe data frames is that of a letter and envelope.
The letter is the data which is placed inside an envelope that contains the addressing information.
This concept of data being inserted into an envelope is used repeatedly in data communications, and it is an important one to grasp.
Although the Ethernet protocol alone is sufficient to get data between two nodes on an Ethernet network, it is not used on its own.
Ethernet represents what is known as a data link protocol, and for networking we need a networking protocol which in our case is IP (internet protocol).
Again the IP protocol is not used in isolation, but as part of a protocol suite called TCP/IP.
It is however the IP protocol which contains the important IP addresses which are used for connecting computers together across the Internet, and in local networks.
The diagram below illustrates how data is placed inside protocol envelopes (headers).
At the receiving end it is unpacked in the reverse order.
Every device attached to your home network has an IP address, but what is a IP address? and why is it needed?
The IP address is the most important address as far as we are concerned, as it is a logical address, meaning it is assigned by us, and can be changed.
Current networks use IPv4 Addresses. IPv6 Addresses are being introduced but are unlikely to impact home/small office networks for a number of years.
The IP (IPv4) address is a 32 bit address and is written in dotted decimal notation and appears like this:
The address has four components each component is separated by a dot(.). So it is of this form:
For home/small office networks it isn’t really important to understand the different address classes (a,b,c,d etc) or the technicalities of sub netting as IP addresses are usually auto assigned.
When troubleshooting network problems you will need to be able to identify network addresses, and if a device has one, and whether that address is valid.
Because home/small office networks use a device called a NAT router ) the IP addresses used on almost all home networks is a non routeable IP address starting with 192.
This IP address is auto assigned by a DHCP server which is part of the NAT router.
Problems arise when clients are unable to get an IP address from the DHCP server because of network/router problems.
If a client cannot get an IP address then some clients will auto assign an IP address. from a reserved range 169.254.0.0-169.254.255.255 or simply have an IP address of 0.0.0.0.
Note: Different versions of windows use different default IP addresses
In either case it is unlikely to work correctly because clients with a 192. address are on a different network to clients with a 168. address, even though they may be next to each other on the same physical cable.
Finding Your IP Address
To find the IP address on a windows computer using ipconfig, open a command line (dos prompt) and type the command ipconfig at the prompt.
The following is displayed
Note: Click start>run and enter cmd in the text box to open a command prompt
Note: You may have more than one network address if you have multiple network cards installed.
The IP address here is 192.168.1.3 . You will also see the default gateway address (192.168.1.1). This is the IP address of the Router, the term gateway is an old Unix expression that is still used.
IP Addresses,Mac Addresses and ARP
To send an IP packet to a network device the sender needs to know the IP address of the destination device.
The IP address will be used to get the data packet to the final network segment.
In order to deliver the packet to the final destination the MAC address of the destination computer must be known.
A protocol know as ARP (address resolution protocol) is used, which uses an Ethernet broadcast to query the nodes on the network. The query is basically:
Which node has the IP address (Destination IP address). Send me your MAC address.
All nodes see the query but only the node with the destination IP address replies.
Computers and other devices can be grouped together into networks.
In the real world this is the same as houses are grouped together into streets.
Each network will have a unique network number and and will be the same for all computers/devices on that network.
To separate devices into networks a router is required.
On home/small office networks only one router is present which connects your home network to the Internet.
Network numbers are part of the IP address.
So when you look at an IP address what you see is a number with two components. A network component and a node component
It is the job of the Subnet mask to split the IP address into the network component and the Node component (device address).
For my network my computer has an IP address of 192.168.1.69 and a Subnet mask of 255.255.255.0.
To find the network address you do a logical AND of the two numbers. This gives a network number of 192.168.1.0 and a node number of .0.0.0.69.
To verify use the simple AND rules
0 AND 0=0
0 AND 1=0
1 AND 0=0
1 AND 1=1
So number logical AND with 255 (all 1s) = the number
And number logical AND with 0 (all 0s) = 0
IPv4 is common on most networks today but it is slowly being replaced by IPv6.
You should now have a basic understanding of what happens on you home/small office network. You can find more details of IP addresses, DHCP etc in the articles below.
Related Articles and Resources
- Basic networking concepts -tutorial covers basic concepts like peer to peer networking etc
- Build a home/small /office network
- Understanding DHCP
- Understanding DNS
- Internet and Networking Components– Common components of the home network.
- Useful Windows networking Commands