Basic Networking Course for Beginners

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 to learn the basics of how networks work, and how the components fit together so that they can set up a small home/office network.

Getting Started

In order for two computers to talk to each other they need:

  1. To be Connected (cable or Wireless) this is known as the connection media.
  2. To have a common language. in Networking this is known as a protocol.
  3. To have An Address.





Connecting Computers Together

Early computer networks used cable to connect computers together in a wired network.

Most modern networks use wireless (wi-Fi) as the main connection media and networks tend to be a mixture of wired and wireless.

The diagram below shows a wired Ethernet network. To work each device must be connected to a Ethernet hub or switch.

However logically they are all connected together and share the same media which we see later.

Wired--Ethernet-network

For a Wireless network the devices must connect to a wire access point as shown in the diagram below.

However,again logically they share and compete for access to the same media.

Wireless access usually have an Ethernet hub built in which allows them to connect to the wired Ethernet network.wireless-network

 

Ethernet Addressing

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.

00:01:6C:67:02:c6

On Windows open a cmd prompt– Start menu run enter cmd and return.

Enter ipconfig /all into the window and hit return.

mac-address-windows

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.

Links and Networks

Ethernet is a data link protocol. Also known as a level 2 protocol on the OSI and TCP/IP networking models.

The TCP/IP networking model tutorial explains protocol levels in more detail.

It is possible for computers to talk to each other using just Ethernet, and with no networking protocol, but it is not practical

You can liken a link to a street. Streets have houses and houses have numbers.

An Ethernet link (the street) has computers (houses) which in turn have numbers (Ethernet, Mac Address or Physical Address) .

However you can have many streets and the streets are connected. (crossroads, roundabouts etc ) to form a network of streets.

Routers divide out Ethernet links into networks.

Networking Protocols

All modern networks (home, office, corporate and the Internet) use the TCP/IP networking protocols.

The Networking protocol also has addresses (IP address), and these addresses are not fixed but assigned by a network administrator or automatically using a service called DHCP (Dynamic host Configuration protocol).

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

FF:FF:FF:FF:FF:FF

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 hubs, 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 hubs,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 (Bridges and switches) working at level 2 (data link layer) can create separate collision domains.

Even though bridges and switches divide a network into separate collision domains, the computers are still part of the same broadcast domain.

This is shown in the diagram below.

broadcasts-collisions-ethernet

Devices on the left of the bridge/switch can communicate with each other, and not affect devices on the right of he switch and vice versa.

However a broadcast will be seen by devices on both sides of the switch.

Bridges vs Switches

Bridges and switches do very similar functions and today you can only buy switches.

Bridges were used to join network segments i.e. LAN to LAN, whereas switch connected devices.

Hubs vs Switches

Hubs operate at the physical level, and were once the primary mechanism for connecting computers together.

Hubs do not create a separate collision domain they just repeat packets.

They have been replaced by switches.

If you look on Amazon for a hub it will be a switch.

This Cisco video explains the difference in more detail

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.

simple-ethernet-data-frame

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.data-envelope

This concept of data being inserted into an envelope is used repeatedly in data communications, and it is an important one to grasp.

The envelope containing the data (letter) can simply be inserted into another envelope and so on.

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.

p-data-envelopes-header

IP Addresses

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:

192.168.0.1

The address has four components each component is separated by a dot(.). So it is of this form:

a.b.c.d

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.

In our street analogy they think they are on different streets.

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

Using ipconfig command to find IP address on windows computer

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.

IP Networks

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 usually  present, and it connects your home network to the Internet.

All computers/devices on your home network will have the same network number.

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

See –

IPv6

IPv4 is common on most networks today but it is slowly being replaced by IPv6.

For those new to networking IPv4 is where you should start, and once you become familiar with it then you might consider taking a look at IPv6.

 

Home Networking Quiz

Quick Quiz to test your knowledge of Home networking technologies and concepts.

Questions?

What’s missing from this tutorial? What isn’t properly explained? Let me know using the comments section below and help me improve this course.

Related Articles and Resources

Facebooktwittergoogle_plusredditpinterestlinkedinmail

6 comments

  1. Hi Steve,
    I just discovered your website today. I think it is great! It is to point and you cover all the most used and needed components. You have very clear and consise explanations. Keep up the good work, and thanks again.

    Tim

    I liked your quiz but I disagree with three of the questions/answers…

    Q 4
    I disagree. DNS is important, but not necessay if never use the internet. If your home network has no DNS server configured you cannot acces the internet. I think it would be better if you asked “If you do not configure your DNS server correctly, or not at all will the computers on your Home Network still communicate?” Answer = Yes

    Q 6
    I disagree. The majority of home users with two computers simply plug the two RJ45 UTP network cables into the router as 99% of routers include 4 RJ45 network ports.

    Q 8
    You got me on this one. I thought you were asking about the IP address. I think it would be better if you asked “How do you assign your Ethernet devices a MAC address.”

    1. Tim
      Tks for the good feedback I’ve edited the first two questions (DNS and router).Q8 regarding ethernet is a bit of a trick question to check that you understand that Ethernet addresses are pre-assigned.
      rgds
      steve

  2. The best simple explanation I have seen! Thank you.
    On thing lacking is the part about the switch/bridge and separate domains.

Leave a Reply

Your email address will not be published. Required fields are marked *