Introduction to Computer Networking Handout I
Introduction to Computer Networking Handout I
By
Hunsa. O. Moses
COURSE OUTLINE
1. Course Introduction
2. The TCP/IP Five-Layer Network Model
3. The Basics of Network Devices
4. Cables
5. Hubs and Switches
6. Routers
7. Servers and Clients
8. The Physical Layer
9. Moving Bits Across the Wire
10. Twisted Pair Cabling and Duplexing
Course Introduction
1. The physical Layer: This represents the physical devices that interconnect
computers. This includes the specifications for the networking cables along with the
connectors that join these devices together, along with specifications describing
how signals are sent, over these connections.
2. The Data Link Layer: Some sources will call this the network interface or the
network access layer; at this layer the first Protocols are introduced. While the
physical layer is all about cabling, connectors and sending signals, the Data Link
Layer is responsible for a common way of interpreting these signals so network
devices can communicate. Lots of protocols exist at the Data Link Layer, but the
most common is known as the Ethernet. The Ethernet standards also define a
protocol responsible for getting data to nodes on the same network or link.
3. The Network Layer: This is also referred to as the Internet Layer. This Layer allows
different networks to communicate with each other through devices known as
routers. Internetwork is a collection of networks connected together through
routers, the most famous of these being the Internet. While the Data Link Layer is
responsible for getting data across a single link, the Network Layer is responsible
for getting data delivered across a collection of networks.
Think of when a device on your home network connects with a server on the internet. The
network layer helps to get the data between these two locations.
The most common protocol used at this layer is known as Internet Protocol (IP). IP is the
heart of the internet and smaller networks around the world. Network software’s are
usually divided into Client and Server categories, with the Client applications initiating a
request for data and the server software answering the request across the network. A
single node may be running multiple Client or server applications.
4. Transport Layer: While the Network Layer delivers data between two individual
nodes, the Transport Layer sorts out which client and server programs are
supposed to get the data. The protocol most commonly used in the 4th layer is known
as TCP (Transmission Control Protocol), <Often said together as TCP/IP>. To fully
understand and troubleshoot networking issues, it is important to know that there
are entirely different protocols serving different purposes. Other Transport
Protocols also use IP to get around, including the protocol known as UDP (User
Datagram Packet). TCP provides mechanisms to ensure that data is reliably
delivered while UDP does not.
The Network Layer (IP) is responsible for getting data from one node to another. The
Transport layer uses the TCP and UDP protocols to ensure that data is sent to the right
applications running on those nodes.
5. The Application Layer: There are lots of different protocols at this layer and as the
name implies; they are application specific. Protocols used to allow a user browse
the web or send/receive emails are very common. The protocols in this layer are
very common, since they are interacted with in the course of using the internet on a
computer.
1. CABLES:
Cables are what connect different devices to each other, allowing data to be transmitted over
them. Most network cables used today can be split into two categories;
a) Copper
b) Fiber
Copper cables are the most common forms of networking cables; they are made up
of multiple pairs of copper wires inside plastic insulator. Having in mind that
computers communicate in Binary which is represented in One(s) (1) and Zero(s) (0),
the sending device communicates binary data across this copper wires by changing
the voltage between two ranges, the system at the receiving end is able to interpret
this voltage changes as binary 1 and 0, which can then be translated into different
forms of data.
The most common forms of copper twisted-pair cables used in networking are;
1) Category 5 (Cat5)
2) Category 5e (Cat5e)
3) Category 6 (Cat6) cables
These categories have different characteristics; Number of twists in a pair of copper wire that
result in different usable lengths and transfer rate.
Cat5 is older and has been mostly replaced by Cat5e cables, from the outside they all look
about the same and even internally they are very similar to the naked eye, the important thing
to note is that; differences in how the twisted pairs are arranged inside these cables can
drastically alter how quickly data can be sent across them and how resistant these signals are
to outside interference.
Cat5e cables have mostly replaced older Cat5 cables because their internals reduce
Crosstalk. Crosstalk is when an electrical pulse on one wire is accidentally detected on
another wire. So the receiving end isn’t able to understand the data, thereby causing a network
error. Higher level protocols have a method for detecting missing data and requesting that the
data be resent but this takes up more time. The higher quality specifications of a Cat5e cable
make it less likely that data need to be retransmitted. That means on average, you can expect
more data to be transferred in the same amount of time.
Cat6 cables follow an even more strict specification to avoid crosstalk, making these cables
more expensive. They can transfer data faster and more reliably than Cat5e cable, but because
of their internal arrangement, they have a shorter maximum distance, when used at higher
speeds
FIBER OPTIC CABLES: Fiber cables contain individual optical fibers, which are tiny
tubes made out of glass about the width of a human hair. These tubes of glass can
transfer beams of light, unlike copper cables which use electric voltages, Fiber cables
use pulses of light to represent the 1s and 0s, of the underline data. Fiber is even
sometimes used in environments where there is a lot of electromagnetic interference
from outside sources, because these can impact data being sent across copper wires.
Fiber cables can generally transfer data quicker than copper cables, but they are generally
more expensive and fragile than copper cables. Fiber can also transfer data over much
longer distances than copper cables without suffering potential data loss.
2. Hubs and Switches: Every IT Specialist has to deal with networking devices on
a regular basis, cables allow the formation of point to point connections, and these are
networks where only a single device at each end of the link exists. These kinds of
connections are not super useful in world with billions of computers. There are lots of
networking devices that allows for many computers to communicate with each other.
Hub: This is a physical layer device that allows for connections from many
computers at once.
All the devices connected to a hub will end-up talking to all other devices at the same time,
it is up to each system connected to the hub to determine if the incoming data was meant
for them of to ignore it, if it isn’t, this causes a lot of noise on the network and creates a
collision domain. COLLISION DOMAIN is a network segment where only one device can
communicate at a time. If multiple systems try sending data at the same time, the
electrical pulses sent across the cable can interfere with each other. This causes these
systems to have to wait for a period before sending their data. It really slows down
network communications, and is the primary reason Hubs are fairly rare, they are mostly
historical artifacts in this present day.
NETWORK SWITCH: Originally known as a (Network switching Hub) is
very similar to a Hub, since multiple devices can be connected through it for
communication. The difference is while a Hub is a layer one or Physical layer
device, a Switch is a layer two or Data Link device,
This means that a switch can;
a) Actually inspect the content of the Ethernet protocol data being sent around the
network.
b) Determine which system the data is intended for, and only send that data to that one
system. This reduces or completely eliminates the size of collision domains on a
network, this will lead to a fewer re-transmissions and a higher overall throughput.
3. Routers: Hubs and Switches are the primary devices used to connect computers on
a single network, usually referred to as Local Area Network (LAN). But we often want to
send or receive data to computers on other networks; this is where Routers come in to
play. A Router is a device that knows how to forward data between independent
networks. While a Hub is a Layer1 device and a Switch is a Layer2 device, a router
operates at Layer3;
A Network Layer; Just as a switch can inspect Ethernet data to know where to send things, a
router can inspect IP data to know where to send things.
Routers store internal tables containing information concerning how to route traffic
between lots of different networks all over the world, the most common type of router is
one for a Home Network or a small office, this devices don’t generally have their own
Routing Tables. The purpose of these routers is mainly just to take traffic originating inside
the home or office LAN and forward it along to the Internet Service Provider (ISP), once
traffic is at the ISP, a more sophisticated type of router takes over. This core routers form
the back-bone of the internet and are directly responsible for how data is being sent and
received all over the internet. Core ISP Routers not only just handle a lot more traffic than
a home router; they also have to deal with much more complexities in make-decisions on
where to send traffic. A core router usually has many different connections to many other
routers. Routers share data with each other via a protocol known as BGP.
Border Gateway protocol (BGP): Routers share data with each other via this protocol,
which lets them learn about the most optimal paths to forward traffic. This protocol allows
routers to learn about the most optimal paths to forward traffic.
When you open a web browser and load a web page, the traffic between computers and the
web servers could have traveled over dozens of different routers. The internet is incredibly
large and complicated and routers are global guides for getting traffic to the right places.
4. Servers and Clients: All of the afore-mentioned network devices exists so that
network can communicate with each other, whether they are in the same room or
thousands of miles apart, these devices so far in this course have been referred to as
Nodes. The concepts of servers and clients, the simplest way to refer to a server is
that something that provides data to something requesting data. The thing that receives
this data is referred to as a client.
While we often talk about nodes being Servers or Clients, the reason our definitions uses the
word “Something” is because, its not just nodes that can be servers or clients. Individual
computer programs running on the same node can be servers and clients to each other. It is
also important that most devices aren’t purely a server or a client; almost all nodes are both
at some point in time.
In most network Topographies, each node is primarily either a server or a client, sometimes
we refer to an email server as an Email Server even though itself is a client of a DNS Server,
this is because its primary reason for existence is to serve data to clients. Likewise, if a
desktop machine acts like a server; in the sense that it provides data to another computer, its
primary reason for existing is to fetch data from servers so that the user at the computer can
do their work. In other words, A Server is anything that can provide data to a Client. But we
also use the word Server to refer to the primary purpose of various nodes on a network.
A bit is the smallest representation of data that a computer can understand; it’s a one and a zero.
These 1s and 0s sent across networks at the lowest level are what make-up the frames of packets
of data that will be learnt about when we cover other layers.
It doesn’t matter whether you are streaming on YouTube, or emailing your assignment or using an
ATM, what you are really doing is sending 1s and 0s across the physical layer of the many different
networks between your computer and the server that is being interacted with.
A standard copper network cable; once connected to devices on both ends will carry a constant
electrical charge. 1s and 0s are sent across those networks cables through a process called
Modulation.
Modulation is a way of varying the voltage of a charge moving across a cable. When used for
computer networks, this kind of modulation is more specifically known as Line Coding.
Line coding allows for devices on either end of the link to understand that an electrical charge in a
certain state is a zero (0) and another state, is a one (1). Through this seemingly simple technique,
modern networks are capable of moving tens billion bits (1s and 0s) across a single network cable
every second.
A standard Cat6 cable has eight wires consisting of four twisted pairs inside a single jacket,
exactly how many pairs are actually in use depends on the transmission technology in use but in all
forms of modern networking, it is important to know that these cables allow for duplex
communication.
Duplex Communication is the concept that information can flow in both directions across the
cable. On the reverse side Simplex Communication is the concept that information is
unidirectional.
The way networking cables ensure duplex communication is possible is by reserving one or two
pairs for communication in one direction and then use the remaining one or two pairs for
communication in the other direction. Devices on either side of a networking link can both
communicate with each other at the exact same-time; this is known as Full-duplex. When there is
something wrong with the connection, you might see it degrade or report itself as a Half-duplex
cable.
Half-duplex implies that while communication is possible in each direction, only one device can
communicate at a time.
Network Ports and Patch Panels
The final steps on how the physical layer works takes place at the end-points of a network links.
Twisted pair network cables are terminated with a plug that takes the individual internal wire and
exposes them. The most common plug is known as an RJ45 (Registered Jack 45).
RJ45 is one of many cable plug specifications, but by far the common in computer networking. A
network cable with an RJ45 Plug can connect to an RJ45 network port.
Network ports are generally directly attached to the devices that make up a computer network.
Switches would have many network ports because their purpose is to connect many devices but
servers and desktops usually only has one port. Most network ports usually have two LED;
a) Link Light
b) Activity Light
Link Light will be lit when a cable is properly connected to two devices that are turned on, while
the Activity Light will be flashed when data is actively transmitted across the cable. A long time
ago, the flashing light corresponded directly to the bits being sent, today computer networks are
so fast that the activity lights doesn’t really communicate anything other than if there is any traffic
or not.
On switches sometime the same LED is used for both Link and Activity status, it might even indicate
other things such as, link speed, this will most likely be in the hardware specification but there will
almost always be some troubleshooting data available through port lights. Sometimes a network
port isn’t connected directly to a device, instead there might be a network port mounted in a wall
or underneath a desk in the office, these ports are generally connected to the network via cable
ran through walls that eventually end at a patch panel.
Patch Panel is a device containing many network ports but it does no other work, it is just a
container for the end-points of many runs of cable. Additional cables are then generally run from
patch panels to switches and routers to provide network access to the computers at the other end
of those links.
Ethernet and MAC Addresses
The protocol most widely used to send data across individual links is known as Ethernet. Ethernet
and the data link layer provide the means for software at higher levels of the stack to send and
receive data. One of the primary purposes of this layer is to essentially abstract away the need for
any other layers to care about the physical layer and any hardware components in use. By
dumping this responsibility on the data link layer; the internet, transport and application layers can
now operate the same no matter how many devices they are running on is connected.
Your web browser doesn’t need to know if it’s running on a device connected via twisted pair or a
wireless connection. It just needs the underlying layers to send and receive data for it.
Ethernet is a fairly old technology, it first came into being in 1980 and saw its first fully polished
standardization in 1983, since then a few changes have been introduced primarily to support an
ever increasingly bandwidth needs. For the most part, the Ethernet in use today is comparable to
the Ethernet standards as first published all those years ago. In 1983, computer networking was
totally different than it is today, one of the notable differences in LAN topology is that the switch
hadn’t been invented yet; this meant that many or all devices on a network shared a single collision
domain. Ethernet as a protocol solved this problem by using the technique known as Carrier Sense
Multiple Access with Collision Detection CSMA/CD.
CSMA/CD is used to determine when the communications channels are clear, and when a device
is free to transmit data. The way CSMA/CD works is actually simple, when no data is currently
transmitted on the network segment, a node will feel free to send data, if it turns out two or more
computers try to send data simultaneously the computers detect this collision and stop sending
data. Each device involved with the collision then waits a while before trying to send data again.
This time interval is random and helps prevent all the computers involved in the collision from
colliding again the next time they try to transmit anything. When a network segment is a collision
domain; it means that all network devices on that segment receive communication across the
entire segment. This means we need to device a means to know which node the transmission was
meant for. This is where something known as Media Access Control Address (MAC address)
comes into play.
MAC address is a globally unique identifier attached to an individual network interface. It is a 48-bit
number normally represented by six grouping of two hexadecimal numbers.
Just like how binary is a way to represent numbers with only 2 digits, Hexadecimal is a way to
represent numbers using 16 digits. Since we don’t have numerals to represent any individual digit
lager than 9; hexadecimals employ the letters A-F to represent the numbers 10-15. Another way to
reference each group of numbers in a MAC address is an Octet
Octet in computer networking is any number that can be represented by 8 bits. In this case, two
hexadecimals digits can represent the same numbers that 8 bits can.
A MAC address is unique and the total number of possible MAC addresses that could exist is 2 x
1048 this translates to 281,471,976,710,656 unique possibilities. A MAC address is split into two
sections;
i. Organizationally Unique Identifier (OUI): The first three octets of a MAC
address are assigned to individual hardware manufacturers by the Institute
of Electrical and Electronics Engineers (IEEE). This means you can always
identify the manufacturers of a network interface purely by its MAC address
ii. The last three octets of a MAC address can be assigned in any way the
manufacturer would like with the condition that they only assign each
possible address once, to keep all MAC addresses globally unique.
Ethernet uses MAC address to ensure that the data it sends has both an address for the machine
that sent the transmission, as well as the one the transmission was intended for. In this way, even
on a network segment, acting as a single collision domain, each node on that network knows when
traffic is intended for it.
If the least significant bit in the first octet of a destination address is set to zero, it means that
Ethernet frame is intended for only the destination address. This means it will be sent to all
devices in the collision domain but only actually received and processed by the intended
destination.
If the least significant bit in the first octet of a destination address is set to one, it means you are
dealing with a multicast frame. A Multicast frame is similarly sent to all devices on the Local
Network segment, what is different is that it will either be accepted or discarded by each device
depending on criteria aside from their own hardware MAC address.
Network interfaces can be configured to accept lists of configured multicast addresses for these
sorts of communications.
The third type of Ethernet communication is known as broadcasts. An Ethernet broadcast is sent
to every single device on a LAN.
An Ethernet broadcast address is all F. Ethernet broadcasts are used so that devices can learn
more about each other.
The first part of an Ethernet frame is known as the preamble. A preamble is 8 bytes (64 bits) long,
and can itself, be split into two sections. The first 7 bytes are a series of alternating ones and
zeroes. These act partially as a buffer between frames and can also be used by the network
interface to synchronize internal clocks used to regulate the speed at which data is being sent. The
last byte in the preamble is known as the Start frame delimiter SFD. Start frame delimiter (SFD)
signals to a receiving device that the preamble is over and that the actual frame content will now
follow.
Immediately following the SFD is the destination MAC address. The destination MAC address is the
hardware address of the intended recipient which is then followed by the source MAC address or
where the frame originated from.
The next part of an Ethernet frame is the Ether-Type field which is 16 bits long and used to
describe the protocol of the contents of the frame, the VLAN Tag is found this indicates that the
frame itself is what is called a VLAN frame. If a VLAN header is present, the Ether-Type field
follows it. VLAN is short for Virtual Local Area Network and is technique that lets you have multiple
logical LANs operating on the same physical equipment. Any frame with a VLAN Tag will only be
delivered out of a switch interface configured to relay that specific tag. This way you can have a
single physical network that operates like it is a multiple LAN. VLANs are usually used to segregate
different forms of traffic.
The next part of an Ethernet frame is the data payload. A payload in networking terms is the actual
data being transported, which is everything that isn’t a header. The data payload on a traditional
Ethernet frame can be anywhere from 46-1500 bytes long, this contains all the data from higher
layers such as the IP, Transport and Application Layers that is actually being transmitted.
Following the payload is something known as a Frame Check Sequence (FCS). FCS is a 4-byte (32-
bit) number that represents a checksum value for the entire frame. This checksum value is
calculated by performing a cyclical redundancy check against the frame. A Cyclical Redundancy
Check (CRC) is an important concept for data integrity, and is used all over computing, not just
network transmissions. It is basically a mathematical transformation that uses polynomial division
to create a number that represents a larger set of data.
When a device gets ready to send an Ethernet frame it collects all the information (destination
address, VLAN Tag and so on) then performs a CRC against that data and attaches the resulting
checksum number as the frame check sequence at the end of the frame.
This data is then sent across a link and received at the other end, where all the various fields of
the Ethernet frame are collected and now the receiving side performs a CRC against that data. If
the checksum computed by the receiving end doesn’t match the checksum in the frame check
sequence field, the data is thrown out. This is because some amount of data must have been lost or
corrupted during transmission. It is then up to a protocol at a higher layer to decided if that data
should be retransmitted. Ethernet itself only reports on data integrity, it doesn’t perform data
recovery.