You are on page 1of 53

AAiT SITE Fundamentals of Networking

Computer Network and Data Communication

School of Information Technology and Software Engineering (SITE


AAiT SITE Fundamentals of Networking

Table of Contents
1. Introduction to Data Communications and Computer networks ......................................................... 5
1.1 Introduction: ................................................................................................................................. 5
1.2 Basic components of communication networks ........................................................................... 5
1.3 Types of Transmission mode ........................................................................................................ 6
1.4 Fundamentals of Information Transmission Media and Coding................................................... 7
1.5 Types of Computer Networks ....................................................................................................... 8
i. Local Area Network ....................................................................................................................... 8
ii. Wireless Area Network ................................................................................................................. 9
iii. Wide Area Network....................................................................................................................... 9
iv. Metropolitan Area Network ....................................................................................................... 10
v. Campus Area Network ................................................................................................................ 10
1.6 Data Communication Hardware ................................................................................................. 10
1.7 Types of Network Topologies ..................................................................................................... 12
2. OSI 7 Layers and Concept of Open standard ..................................................................................... 18
2.1 Application Layer ........................................................................................................................ 19
2.2 Presentation Layer ...................................................................................................................... 19
2.3 Session Layer ............................................................................................................................... 20
2.4 Transport Layer ........................................................................................................................... 21
2.5 Network Layer ............................................................................................................................. 21
2.6 Data Link Layer ............................................................................................................................ 21
2.7 Physical Layer .............................................................................................................................. 22
2.8 Advantages of OSI Model............................................................................................................ 22
2.2 OSI vs. TCP/IP Model ................................................................................................................... 22
3. Network Layer .................................................................................................................................... 24
4.1 Basic set up of IP address ............................................................................................................ 24
4.2 Types of IP Address: IPv4 vs IPv6 ................................................................................................ 31
4.3 IPv4 Address ................................................................................................................................ 31
4.4 Subnetting ................................................................................................................................... 35
4.5 Network Layer Protocol .............................................................................................................. 40
4.6 Network Address Types: ............................................................................................................. 44

2|Page
AAiT SITE Fundamentals of Networking

4.7 Routing Protocols ........................................................................................................................ 45


4. Physical and Data Link Layers ............................................................................................................ 46
4.1 Physical Layer .............................................................................................................................. 46
4.2 Data link Layer overview ............................................................................................................. 46
4.3 Flow and Error Control ................................................................................................................ 47
4.4 Local Area Network ..................................................................................................................... 48
4.5 Wireless Network ........................................................................................................................ 48
4.6 Wide Area Networks ................................................................................................................... 48
5. Transport Layers ................................................................................................................................. 49
5.1 Process-to-Process Delivery Concepts- UDP, TCP, SCTP ............................................................. 49
5.2 Congestion control ...................................................................................................................... 52
5.3 QOS in Multimedia ...................................................................................................................... 52
6. Application Layer ................................................................................................................................ 53
6.1 Application Layer overview ......................................................................................................... 53

3|Page
AAiT SITE Fundamentals of Networking

Figure 1 Data Communication Component ................................................................................................. 5


Figure 2 Simplex Transmission mode .......................................................................................................... 6
Figure 3 Half Duplex Transmission Mode .................................................................................................... 6
Figure 4 Full Duplex Transmission Mode..................................................................................................... 7
Figure 5 All the transmission Mode ............................................................................................................. 7
Figure 6 LAN Network .................................................................................................................................. 9
Figure 7 WLAN Network............................................................................................................................... 9
Figure 8 WAN Network .............................................................................................................................. 10
Figure 9 Point-to-point topology diagram ................................................................................................. 13
Figure 10 Bus Topology Network ............................................................................................................... 14
Figure 11 Ring Topology ............................................................................................................................. 15
Figure 12 Star Topology ............................................................................................................................. 15
Figure 13 Partial Mesh ............................................................................................................................... 16
Figure 14 Full Mesh topology ..................................................................................................................... 17
Figure 15 Summary of OSI Model functionality ........................................................................................ 18
Figure 16 Mail Server Setup ........................................................................................................................ 53

4|Page
AAiT SITE Fundamentals of Networking

Chapter One

1. Introduction to Data Communications and Computer networks


1.1 Introduction:
Data Commutation deals with the transmission (sending and receiving) of information between two
locations by means of electrical signals. The two types of electric signals may be either analog or digital.
Digital Data communication is the name given to the communication where exchange of information takes
place in the form of 0s and 1s over some transmission medium like a wire or wireless.

The effectiveness of a data communication system depends on three fundamental characteristics:

✓ Delivery: The system must deliver data to the correct destination. Data must be received by the
intended devices or user and only by that devices or user.
✓ Accuracy: The system must deliver the data accurately. Data that have been altered in
transmission and left uncorrected must not be used.
✓ Timeliness: The system must deliver the data in time. The data delivered late are useless. For
example, in the case of audio and video, timely deliver means delivering the data as they are
produced in the same order of production and without significant delay. This type of delivery is
called real-time transmission (live streaming)

1.2 Basic components of communication networks


To make the communication effective, every network use five components:

✓ Messages
✓ Sender
✓ Receiver
✓ Medium and
✓ Protocol

Figure 1 Data Communication Component


5|Page
AAiT SITE Fundamentals of Networking

i. Message: The message is the data information to be communicated. It can be text, audio,
numbers, video or any combination of these types.
ii. Sender: The sender is the devices that sends the data message. It can be a computer,
workstation, telephone or video camera.
iii. Receiver: The receiver is the devices that receives the message. It can be computer, workstation,
or phone.
iv. Medium: The transmission medium is the physical path by which a message travels from send to
receiver. It should be a twisted-pair, co-axial cable, fiber optic cable or Radio waves.
v. Protocol: A protocol is a set of rules that govern the data communications. It represents
arrangement between the communicating devices. Without a protocol, two devices may be
connected but cannot communicate.

1.3 Types of Transmission mode


The term transmission mode is used to define the direction of signal flow between two linked devices.
There are three types of transmission modes. They are simplex, Half Duplex and Full duplex

Simplex: In simplex mode communication is unidirectional, i.e only one of the two devices on the link can
transmit data and the other will only receive the data. Take an example of Computer and Monitor. The
compute will send data to the monitor and the monitor will only display it.

Figure 2 Simplex Transmission mode

So, simplex data transfer is Uni-directional. And monitor will never send data back to the computer. Same
is true between computer and key board. Keyboard receive data from computer but computer will never
receive data from key board.

Half Duplex: In half Duplex both the linked devise can transmit and receive the data. But not at the same
time. i.e when the first devices are sending the data the second will only receive, similarly when the second
is sending the data the first will be receive. Example the use of a walkie-talkie is a half-duplex.

In a half-Duplex transmission, the entire capacity of a channel is taken over by whichever of the two
devices is transmitting at the same time.

Figure 3 Half Duplex Transmission Mode


6|Page
AAiT SITE Fundamentals of Networking

Full Duplex: In full duplex mode (Duplex) both the linked devise can transmit and receive the data at the
same time. The one example is mobile phone or telephone line between two users. Both users can talk
and hear at the same time. The signals going in either direction share the capacity of the link. This sharing
can occur in two ways. Either the link contains two physically separate transmission paths. One for sending
and the other for receiving or the capacity of the channel is divided between signals travelling in both
directions.

Figure 4 Full Duplex Transmission Mode

Figure 5 All the transmission Mode

1.4 Fundamentals of Information Transmission Media and Coding


In the process of data communication, the data must be transformed into signals to send them from one
place to another. Data stored in a computer is in the form of 0s and 1s. to transform this data from one
place to another place, it must be converted into digital signals. This is called Encoding digital data into
digital signals or digital to digital conversion.

✓ And the process of converting analog signal into digital signal is called analog to digital conversion
or digitizing an analog signal.
✓ The process of converting the digital signal into analog signal is called digital to analog conversion
or modulating a digital signal.
✓ The process of sending an analog signal over long distances using high frequency carrier signal is
called analog to analog conversion or modulating an analog signal.

7|Page
AAiT SITE Fundamentals of Networking

1.5 Types of Computer Networks


There are different type of network, however these are the basic and commonly used ones:

✓ Local Area Network (LAN)


✓ WLAN (Wireless LAN)
✓ WAN (Wide Area Network)
✓ MAN (Metropolitan Area Network)
✓ CAN (Campus Area Network)

i. Local Area Network


A local area network (LAN) is a collection of devices connected together in one physical location, such as
a building, office, or home. A LAN can be small or large, ranging from a home network with one user to an
enterprise network with thousands of users and devices in an office or school.

Regardless of size, a LAN's single defining characteristic is that it connects devices that are in a single,
limited area.

8|Page
AAiT SITE Fundamentals of Networking

Figure 6 LAN Network

ii. Wireless Area Network

A wireless local area network (WLAN) is a wireless distribution method for two or more devices. WLANs
use high-frequency radio waves and often include an access point to the Internet. A WLAN allows users
to move around the coverage area, often a home or small office, while maintaining a network connection.
A WLAN is sometimes called a local area wireless network (LAWN).

Figure 7 WLAN Network

iii. Wide Area Network


In its simplest form, a wide-area network (WAN) is a collection of local-area networks (LANs) or other
networks that communicate with one another. A WAN is essentially a network of networks, with the
Internet the world's largest WAN.

9|Page
AAiT SITE Fundamentals of Networking

Figure 8 WAN Network

iv. Metropolitan Area Network


A metropolitan area network (MAN) is a computer network that connects computers within a
metropolitan area, which could be a single large city, multiple cities and towns, or any given large area
with multiple buildings. A MAN is larger than a local area network (LAN) but smaller than a wide area
network (WAN).

v. Campus Area Network


A campus area network (CAN) is a computer network that spans a limited geographic area. CANs
interconnect multiple local area networks (LAN) within an educational or corporate campus. ... CANs are
smaller than metropolitan area networks (MAN) and wide area networks (WAN), which stretch over large
geographic areas.

1.6 Data Communication Hardware


In data communication, the integration of hardware and software must be done meticulously so that the
intended outcome will be achieved. Below is some of the hardware component for data communication
over the network:

NIC: Network Interface Card

A network interface card (NIC) is a hardware component without which a computer cannot be connected
over a network. It is a circuit board installed in a computer that provides a dedicated network connection
to the computer. It is also called network interface controller, network adapter or LAN adapter.

Purpose

• NIC allows both wired and wireless communications.


• NIC allows communications between computers connected via local area network (LAN) as well
as communications over large-scale network through Internet Protocol (IP).
• NIC is both a physical layer and a data link layer device, i.e. it provides the necessary hardware
circuitry so that the physical layer processes and some data link layer processes can run on it.

10 | P a g e
AAiT SITE Fundamentals of Networking

Network Cables: there are different types of cables that will be used to connect the network equipment.
That could be between the network device or network device with end user device. Below is the most
basic cable types, characteristics, benefits and it features:

Twisted-pair cable. You probably see this during your lap session and the name itself comes from the type
of cable inside the shield. This cable consists of color-coded pairs of insulated copper wires. Every two
wires are twisted around each other to form pair. Usually, there are four pairs. Each pair has one solid
color and one stripped color wire. Solid colors are blue, brown, green, and orange. In stripped color, the
solid color is mixed with the white color.

Based on how pairs are stripped in the plastic sheath, there are two types of twisted-pair cable; UTP and
STP.

In the UTP (Unshielded twisted-pair) cable, all pairs are wrapped in a single plastic sheath.

In the STP (Shielded twisted-pair) cable, each pair is wrapped with an additional metal shield, then all
pairs are wrapped in a single outer plastic sheath.

Similarities and differences between STP and UTP cables

✓ Both STP and UTP can transmit data at 10Mbps, 100Mbps, 1Gbps, and 10Gbps.
✓ Since the STP cable contains more materials, it is more expensive than the UTP cable.
✓ Both cables use the same RJ-45 (registered jack) modular connectors.
✓ The STP provides more noise and EMI resistance than the UTP cable.
✓ The maximum segment length for both cables is 100 meters or 328 feet.
✓ Both cables can accommodate a maximum of 1024 nodes in each segment.

Fiber Optic Cable

This cable consists of a core, cladding, buffer, and jacket. The core is made from thin strands of glass or
plastic that can carry data over a long distance. The core is wrapped in the cladding; the cladding is
wrapped in the buffer, and the buffer is wrapped in the jacket.

Fiber optic cable is completely immune to EMI and RFI. This cable can transmit data over a long distance
at the highest speed. It can transmit data up to 40 kilometers at the speed of 100Gbps.

Fiber optic uses light to send data. It reflects light from one endpoint to another. Based on how many
beams of light are transmitted at a given time, there are two types of fiber optical cable; SMF and MMF.

SMF (Single-mode fiber) optical cable

This cable carries only a single beam of light. This is more reliable and supports much higher bandwidth
and longer distances than the MMF cable. This cable uses a laser as the light source and transmits 1300
or 1550 nano-meter wavelengths of light.

MMF (multi-mode fiber) optical cable


11 | P a g e
AAiT SITE Fundamentals of Networking

This cable carries multiple beams of light. Because of multiple beams, this cable carries much more data
than the SMF cable. This cable is used for shorter distances. This cable uses an LED as the light source and
transmits 850 or 1300 nano-meter wavelengths of light.

Switch: Switch is where you end user lives. All end user device like computer, laptop, printer, CCTV
camera, IP Phone… etc will be connected to these devices. There is different type of switch which is access
switch, distribution switch and core switch. Based on its functionality, the layer where each switch will be
presented is different. It operates at layer two of the OSI model and uses MAC address as source and
destination address for communication purpose.

Router: Unlike switch which will broadcast its traffic to all its port to find the destination devices, router
is a bit intelligent and decide where to send the traffic based on the destination IP address of the devices.
It uses routing table and exit interface to decide where to send the data. It operates at layer 3 of the OSI
model.

Firewall: At your network premises, you might have different application such as website at DMZ, mailbox
sever at server farm, or edge server at DMZ or FTP server. If you want to protect those servers from being
access by unauthorized person, you need to deploy firewall at the edge of your network and create rules
or policy to enforce who can access the resource with specific ports. It operates both at Layer 3 and Layer
4 of OSI model.

1.7 Types of Network Topologies

Point to Point: Point-to-point topology is the easiest of all the network topologies. In this method, the
network consists of a direct link between two computers.

Advantages:

✓ This is faster and highly reliable than other types of connections since there is a direct
connection.
✓ No need for a network operating system
✓ Does not need an expensive server as individual workstations are used to access the files
✓ No need for any dedicated network technicians because each user sets their permissions

Disadvantages:

✓ The biggest drawback is that it only be used for small areas where computers are in close
proximity.
✓ You can't back up files and folders centrally
✓ There is no security besides the permissions. Users often do not require to log onto their
workstations.

12 | P a g e
AAiT SITE Fundamentals of Networking

Figure 9 Point-to-point topology diagram

Bus Topology

Bus topology uses a single cable which connects all the included nodes. The main cable acts as a spine
for the entire network. One of the computers in the network acts as the computer server. When it has
two endpoints, it is known as a linear bus topology.

Advantages:

Here are pros/benefits of using a bus topology:

✓ Cost of the cable is very less as compared to other topology, so it is widely used to build small
networks.
✓ Famous for LAN network because they are inexpensive and easy to install.
✓ It is widely used when a network installation is small, simple, or temporary.
✓ It is one of the passive topologies. So, computers on the bus only listen for data being sent, that
are not responsible for moving the data from one computer to others.

Disadvantages:

Here are the cons/drawbacks of bus topology:

✓ In case if the common cable fails, then the entire system will crash down.
✓ When network traffic is heavy, it develops collisions in the network.
✓ Whenever network traffic is heavy, or nodes are too many, the performance time of the
network significantly decreases.
✓ Cables are always of a limited length.

13 | P a g e
AAiT SITE Fundamentals of Networking

Figure 10 Bus Topology Network

Ring Topology

In a ring network, every device has exactly two neighboring devices for communication purpose. It is called
a ring topology as its formation is like a ring. In this topology, every computer is connected to another
computer. Here, the last node is combined with a first one.

This topology uses token to pass the information from one computer to another. In this topology, all the
messages travel through a ring in the same direction.

Advantages:

Here are pros/benefits of ring topology:

✓ Easy to install and reconfigure.


✓ Adding or deleting a device in-ring topology needs you to move only two connections.
✓ The troubleshooting process is difficult in a ring topology.
✓ Failure of one computer can disturb the whole network.
✓ Offers equal access to all the computers of the networks
✓ Faster error checking and acknowledgment.

Disadvantages:

Here are drawbacks/cons of ring topology:

✓ Unidirectional traffic.
✓ Break in a single ring can risk the breaking of the entire network
✓ Modern days high-speed LANs made this topology less popular.
✓ In the ring, topology signals are circulating at all times, which develops unwanted power
consumption.
✓ It is very difficult to troubleshoot the ring network.
✓ Adding or removing the computers can disturb the network activity.

14 | P a g e
AAiT SITE Fundamentals of Networking

Figure 11 Ring Topology

Star Topology

In the star topology, all the computers connect with the help of a hub. This cable is called a central node,
and all other nodes are connected using this central node. It is most popular on LAN networks as they are
inexpensive and easy to install.

Figure 12 Star Topology

Advantages:

Here are pros/benefits of start topology:

✓ Easy to troubleshoot, set up, and modify.


✓ Only those nodes are affected, that has failed. Other nodes still work.
✓ Fast performance with few nodes and very low network traffic.
✓ In Star topology, addition, deletion, and moving of the devices are easy.

Disadvantages:

Here are cons/drawbacks of using Star:


15 | P a g e
AAiT SITE Fundamentals of Networking

✓ If the hub or concentrator fails, attached nodes are disabled.


✓ Cost of installation of star topology is costly.
✓ Heavy network traffic can sometimes slow the bus considerably.
✓ Performance depends on the hub's capacity
✓ A damaged cable or lack of proper termination may bring the network down.

Mesh Topology

The mesh topology has a unique network design in which each computer on the network connects to
every other. It is developing a P2P (point-to-point) connection between all the devices of the network. It
offers a high level of redundancy, so even if one network cable fails, still data has an alternative path to
reach its destination.

Types of Mesh Topology:

• Partial Mesh Topology: In this type of topology, most of the devices are connected almost
similarly as full topology. The only difference is that few devices are connected with just two or
three devices.

Figure 13 Partial Mesh

16 | P a g e
AAiT SITE Fundamentals of Networking

Full Mesh topology

In a full mesh topology, all nodes/devices are directly connected. The type of redundancy is increased in
a full-mesh topology. These types of network topology are used in the backbone network. If there is high
traffic between any nodes then other routes are chosen for traffic balancing.

Figure 14 Full Mesh topology

Advantages:

Here, are pros/benefits of Mesh topology

✓ The network can be expanded without disrupting current users.


✓ Need extra capable compared with other LAN topologies.
✓ No traffic problem as nodes has dedicated links.
✓ Dedicated links help you to eliminate the traffic problem.
✓ A mesh topology is robust.
✓ It has multiple links, so if any single route is blocked, then other routes should be used for data
communication.
✓ P2P links make the fault identification isolation process easy.
✓ It helps you to avoid the chances of network failure by connecting all the systems to a central
node.
✓ Every system has its privacy and security.

Disadvantages:

✓ Installation is complex because every node is connected to every node.


✓ It is expensive due to the use of more cables. No proper utilization of systems.
✓ Complicated implementation.
✓ It requires more space for dedicated links.
✓ Because of the amount of cabling and the number of input-outputs, it is expensive to implement.
✓ It requires a large space to run the cables.

Chapter Two

17 | P a g e
AAiT SITE Fundamentals of Networking

2. OSI 7 Layers and Concept of Open standard

OSI (Open Systems Interconnection) is a reference model for how applications communicate over a
network. This model focuses on providing a visual design of how each communications layer is built on
top of the other, starting with the physical cabling, all the way to the application that's trying to
communicate with other devices on a network.

A reference model is a conceptual framework for understanding relationships. The motivation of creating
the OSI reference model is to guide technology vendors and developers so the digital communications
products and software programs they create can interoperate and to promote a clear framework that
describes the functions of a networking or telecommunications system that's in use.

Figure 15 Summary of OSI Model functionality

OSI layer used to encapsulate and decapsulate data as it moves from source to destination vice versa.
Below is the picture that explain how the data moves from sender to receiver.

18 | P a g e
AAiT SITE Fundamentals of Networking

2.1 Application Layer


The application layer is used by end-user software such as web browsers and email clients. It provides
protocols that allow software to send and receive information and present meaningful data to users. A
few examples of application layer protocols are the Hypertext Transfer Protocol (HTTP), File Transfer
Protocol (FTP), Post Office Protocol (POP), Simple Mail Transfer Protocol (SMTP), and Domain Name
System (DNS).

2.2 Presentation Layer


This layer provides independence from differences in data representation (e.g., encryption) by translating
from application to network format, and vice versa. The presentation layer works to transform data into
the form that the application layer can accept. This layer formats and encrypts data to be sent across a
network, providing freedom from compatibility problems. It is sometimes called the syntax layer. Layer 6
Presentation examples include encryption, ASCII, EBCDIC, TIFF, GIF, PICT, JPEG, MPEG, MIDI.

Two communicating devices communicating may be using different encoding methods, so layer 6 is
responsible for translating incoming data into a syntax that the application layer of the receiving device
can understand.

19 | P a g e
AAiT SITE Fundamentals of Networking

If the devices are communicating over an encrypted connection, layer 6 is responsible for adding the
encryption on the sender’s end as well as decoding the encryption on the receiver's end so that it can
present the application layer with unencrypted, readable data.

Finally, the presentation layer is also responsible for compressing data it receives from the application
layer before delivering it to layer 5. This helps improve the speed and efficiency of communication by
minimizing the amount of data that will be transferred.

2.3 Session Layer


This is the layer responsible for opening and closing communication between the two devices. The time
between when the communication is opened and closed is known as the session. The session layer
ensures that the session stays open long enough to transfer all the data being exchanged, and then
promptly closes the session in order to avoid wasting resources.

The session layer also synchronizes data transfer with checkpoints. For example, if a 100-megabyte file is
being transferred, the session layer could set a checkpoint every 5 megabytes. In the case of a disconnect
or a crash after 57 megabytes have been transferred, the session could be resumed from the last
checkpoint, meaning only 45 more megabytes of data need to be transferred. Without the checkpoints,
the entire transfer would have to begin again from scratch.

20 | P a g e
AAiT SITE Fundamentals of Networking

2.4 Transport Layer


Layer 4 is responsible for end-to-end communication between the two devices. This includes taking data
from the session layer and breaking it up into chunks called segments before sending it to layer 3. The
transport layer on the receiving device is responsible for reassembling the segments into data the session
layer can consume.

The transport layer is also responsible for flow control and error control. Flow control determines an
optimal speed of transmission to ensure that a sender with a fast connection doesn’t overwhelm a
receiver with a slow connection. The transport layer performs error control on the receiving end by
ensuring that the data received is complete, and requesting a retransmission if it isn’t.

2.5 Network Layer


The network layer is responsible for facilitating data transfer between two different networks. If the two
devices communicating are on the same network, then the network layer is unnecessary. The network
layer breaks up segments from the transport layer into smaller units, called packets, on the sender’s
device, and reassembling these packets on the receiving device. The network layer also finds the best
physical path for the data to reach its destination; this is known as routing.

2.6 Data Link Layer


The data link layer is very similar to the network layer, except the data link layer facilitates data transfer
between two devices on the SAME network (basically on the same switch). The data link layer takes
packets from the network layer and breaks them into smaller pieces called frames. Like the network layer,
the data link layer is also responsible for flow control and error control in intra-network communication
(The transport layer only does flow control and error control for inter-network communications).

21 | P a g e
AAiT SITE Fundamentals of Networking

2.7 Physical Layer


This layer includes the physical equipment involved in the data transfer, such as the cables and switches.
This is also the layer where the data gets converted into a bit stream, which is a string of 1s and 0s. The
physical layer of both devices must also agree on a signal convention so that the 1s can be distinguished
from the 0s on both devices.

2.8 Advantages of OSI Model

The OSI model helps users and operators of computer networks:

✓ Determine the required hardware and software to build their network.


✓ Understand and communicate the process followed by components communicating across a
network.
✓ Perform troubleshooting, by identifying which network layer is causing an issue and focusing
efforts on that layer.

The OSI model helps network device manufacturers and networking software vendors:

✓ Create devices and software that can communicate with products from any other vendor,
allowing open interoperability
✓ Define which parts of the network their products should work with.
✓ Communicate to users at which network layers their product operates – for example, only at the
application layer, or across the stack.

2.2 OSI vs. TCP/IP Model


Below is the comparison between OSI and TCP/IP model

22 | P a g e
AAiT SITE Fundamentals of Networking

The Transfer Control Protocol/Internet Protocol (TCP/IP) is older than the OSI model and was created by
the US Department of Defense (DoD). A key difference between the models is that TCP/IP is simpler,
collapsing several OSI layers into one:

✓ OSI layers 5, 6, 7 are combined into one Application Layer in TCP/IP


✓ OSI layers 1, 2 are combined into one Network Access Layer in TCP/IP – however TCP/IP does
not take responsibility for sequencing and acknowledgement functions, leaving these to the
underlying transport layer.

Other important differences:

✓ TCP/IP is a functional model designed to solve specific communication problems, and which is
based on specific, standard protocols. OSI is a generic, protocol-independent model intended to
describe all forms of network communication.
✓ In TCP/IP, most applications use all the layers, while in OSI simple applications do not use all seven
layers. Only layers 1, 2 and 3 are mandatory to enable any data communication.

23 | P a g e
AAiT SITE Fundamentals of Networking

Chapter Three

3. Network Layer
4.1 Basic set up of IP address
Before going deep into IP address deigns, let us understand what looks like to assign IP address to our
workstation and the details in it.

If your computer is connected with network cable, you will see a network icon at the bottom right of your
computer.

If you open that icon and get into properties of the IPv4, you will get the following and be able to assign
IP address to your computer.

Above is the IP address details for one particular computer or workstation.

24 | P a g e
AAiT SITE Fundamentals of Networking

The IP address which is highlighted with red box is given to this particular computer and it contains two
parts. The network part and the IP address part. The network part will be the same to all computers that
belongs to the same category, that could be student, staff, guest or ICT. If we go deeper, we can divide
computers into department of our campus.

Assume AAiT has the following colleges:

1. Computer and software Engineer


2. Electrical Engineering
3. Civil Engineering
4. Chemical Engineering
5. Construction Engineering

This colleges might have different department and for the sake of simplicity we will not go further from
here.

Each college has their own resource to access by both staff and student and their own policy to apply to
the resource being accessed. Therefore, each college needs to have their own separate IP address range
to assign for their staff, student or resources.

25 | P a g e
AAiT SITE Fundamentals of Networking

Let us assume AAiT assigned the IP address of 10.5.0.0/16 to entire campus and you as a network engineer
would like to subdivide this address further into each college so that the security applied to Electrical
Engineer will not affect the other college and vice versa. This is where the subnet mask plays a great role.
It divides the IP address with the Network and Host.

Subnet mask allows you to divide the IP address into Network and 32-bit specific IP address. As it is shown
above picture, the first 3(24 bits) octets are 255 which means all bits are turned to 1 which is assigned to
network, the fourth octet is 0 which is used for host.

Based on the above description, this computer has a network of 192.168.1. and host address of 125. And
the IP address and network format is 192.168.1.0/24

How to determine the network and host address of a particular IP address?

The subnet mask is the giveaway in this case. If the bits are on, it is for network and if the bits are off it is
for host. Since the first 24 bits are on(1s), that means the first three dotted decimal number is for network
and the last 8 bits are off(0s), then we have 8 bits to assign for host.

NB: Every computer within the same network can communicate directly without involvement of layer 3
devices like router, firewall or layer 3 switches.

26 | P a g e
AAiT SITE Fundamentals of Networking

Since 8 bits are off and used for host, we can determine that we can have 28 -2 different Host address with
the network of 192.168.1 address.

Therefore, 192.168.1.0/24 means 192.168.1.0 255.255.255.0 to find the subnet mask, convert the binary
number to decimal number.

/24 is equal to 11111111.11111111.11111111.00000000 when converted to binary number. And if you


convert this binary number to decimal then you will get 255.255.255.0.

Therefor, 192.168.1.1 to 192.168.254 can be assigned to host on the network of 192.168.1. we have one
network, that have 254 host IP address.

Now we know which part of the IP address belongs to Network and which part of the IP address belongs
to host. And all hosts within the same network can communicate with each other.

Let us back to our AAiT example, and give 10.5.0.0/21 to college of Electrical Engineer. Based on this
information we can determine:

The network Address :10.5.0.0

Range of Host address: 10.5.0.1 - 10.5.7.254

Subnet mask:255.255.248.0 (11111111.11111111.11111000.00000000)

If you convert the IP above binary, you will get the same subnet mask of 255.255.248.0. since we have 11
bits off, we can have 211-2 =2046 usable IP address for college of Electrical Engineering.

NB: we will see how to calculate all of this in later section.

Now let us also give 10.5.8.0/23 for civil engineering college.

Network: 10.5.8.0

Range of Host address: 10.5.8.1 - 10.5.9.254

Subnet mask: 255.255.254.0

Now these two colleges have two different networks, but they are under the same university and there is
a good chance that they will share common resources should it be for student or staff. As a matter of fact,
how does the users within these two networks be able to access resource over public network such as
google.com, youtube.com, facebook.com etc? or how will both colleges communicate each other to share
resources?

This is where default gateway is coming into play.

27 | P a g e
AAiT SITE Fundamentals of Networking

The default gateway is the path used to pass information when the device doesn't know where the
destination is. More directly, a default gateway is a router that connects your host to remote network
segments. It's the exit point for all the packets in your network that have destinations outside your
network.

The other information we need to know before going into designing IP address is Primary DNS server
and Alternative DNS Server.

28 | P a g e
AAiT SITE Fundamentals of Networking

We have a habit of searching our favorite website using high level language such as

✓ https://www.google.com
✓ https://www.facebook.com
✓ https://www.aait.edu.et
✓ https://portal.aait.edu.et

If you see what is going behind the seen those URL is associated with an IP address (public IP address to
be specific)

To check the public IP address of URL you are accessing use the following steps:

✓ Open command prompt on your computer which has internet connection


✓ Type nslookup

And you will see information like the following screen capture

29 | P a g e
AAiT SITE Fundamentals of Networking

The information you get might be different since they have different DNS server.

You can try to check the IP address assigned for the facebook.com, aait.edu.et portal.aait.edu.et.

The reason we are using those names, is because the IP address set on the DNS (Domain Name System)
server.

The Domain Name System (DNS) is an important part of the internet, providing a way to map names (a
website you're seeking) to numbers (the address for the website).

30 | P a g e
AAiT SITE Fundamentals of Networking

4.2 Types of IP Address: IPv4 vs IPv6


Initially, there was only IPv4 (Internet Protocol version 4) and it was used to connect our devices to the
network, allow us to access resource over the internet. This IP format has 32 bits which contains over
4(232) billion IP addresses to be used. However, when the Internet is introduced to the public Usage beside
university and military operation, the depletion of IPv4 address is more than anticipated.

In order to avoid running out of IPv4 address, Internet Assigned Numbers Authority, the organization that
allocates and control the Internet planned to have temporary and permanent solution.

As temporary solution, instead of making all IP address as public and everyone should use one public IP
address to connect to Internet, they have created Private IP address using RFC 1918. Doing so also force
to create a technology called Network Address Translation (NAT)that preserve IP address for longer time,
giving sufficient time to implement IPv6 which is the permanent solution.

Unlike IPv4, IPv6 has lots of public IP address and lots of way to implement Public IP address. It has 2 128
(equal to 340 trillion trillion trillion IP addresses) different IP address, not to mention, we can create our
own public IP address using the MAC address of the devices and single public IP address.

4.3 IPv4 Address


IP version 4 is 32 bits long. The maximum values of a number that can be formed by using 32 bits is 232 .
so the maximum number of IPv4 address is 4,294,967,296. It consists of four octets each of which can
contain one to three digits ranging from 0 to 255 separated by dot(.). Here, each number is the decimal
representation(base-10) for an 8-digit binary number(base-2).

Example of an IPv4 address: 63.171.234.171

The order of the bits in the first octet of the IP address decides the class of the IP address.

31 | P a g e
AAiT SITE Fundamentals of Networking

IPv4 address sub divided into five class; Class A, B, C, D and E. However, our main focus will be on the first
three class and more specifically on the private IP address of those classes.

✓ Class A: 0.0.0.0 – 126.255.255.255


✓ Class B: 128.0.0.0 – 191.255.255.255
✓ Class C: 192.0.0.0 – 223.255.255.255
✓ Class D: 224.0.0.0 – 239.255.255.255
✓ Class E: 240.0.0.0 – 240.255.255.255

At first, IP address will be confusing, but once you got the concept of it, it will be very simple and easy to
work with.

Some bits of the IP address represent the network and the remaining bits represent the host. The IP
address can be further divided into two parts:

Network ID: it identifies which network you are on. The number of networks in any class is given by the
formula:

Number of Networks = 2 networkBits

Host ID: It identifies your machine on the network. The number of hosts in any class is given by the
formula:

Number of Hosts = 2 hotsBits – 2

Here the two IP addresses are subtracted because:

1. Host ID in which all the bits are set to 0 is not assigned because this represents the network ID
2. Host ID in which the bits are set to 1 is reserved for Direct Broadcast Address (for sending the
data from one network to all the other hosts in another network)

Below is the simplest method to determine at which class does the particular IP address belongs to:

Class A:

The first bit of the first octet is always set to 0.

✓ The network ID has 8 bits


✓ The host ID has 24 bits

32 | P a g e
AAiT SITE Fundamentals of Networking

The default subnet mask for Class A IP address is 255.0.0.0. Subnet masks are used to tell hosts on the
network which part is the network address and which part is the host address of an IP address.

How does the subnet mask do this?

Suppose you have an IP address as

10.20.15.3 = 00001010.00010100.00001111.00000011

and the subnet mask as,

255.0.0.0 = 11111111.00000000.00000000.00000000

The IP address bits that have corresponding mask bits as 1 represents the Network ID and the address
bits that have corresponding mask bits as set to 0 represent the host ID

10.20.15.1 = 00001010.00010100.00001111.00000001

255.0.0.0 = 11111111.00000000.00000000.00000000

by comparing corresponding bits of address bits and mask bits we get,

netid = 00001010 = 10

hostid = 00010100.00001111.00000011 = 20.15.3

Class A has:

• Network ID =2⁷-2 = 126 (Here 2 address is subtracted because 0.0.0.0 and 127.x.x.x are special
address. 127.x.x.x is reserved for localhost)
• Host ID = 2²⁴-2 = 16,777,214

Class B

The IP address belonging to Class B uses the first two octets to identify the network and the last two
octets are used to identify the host.

1. The Network ID has 14 bits.


2. The Host ID has 16 bits.

33 | P a g e
AAiT SITE Fundamentals of Networking

The first two bit of the first octet is always set to 10.

The default subnet mask for class B is 255.255.0.0.

So, class B has:

• Network IDs = 2¹⁴ = 16384 network ID


• Host IDs = 2¹⁶ = 65534 host address

Class C

The IP address belonging to Class C uses the first three octets to identify the network and the last octet
is used to identify the host.

1. The Network ID has 21 bits.


2. The Host ID has 8 bits.

The first two bit of the first octet is always set to 110.

The default subnet mask for class B is 255.255.255.0.

So, class C has:

• Network IDs = 2²¹= 2097152


• Host IDs = 2⁸= 254

34 | P a g e
AAiT SITE Fundamentals of Networking

The IP address belonging to Class C range from 192.0.0.a to 223.255.255.a.(where a ranges from 0 to
255)

How to identify the IP class from a given IP address?

So, using the above knowledge given an IP address you can identify the class of the IP address.

You can do it by looking at the first octet of the IP address. Convert the dotted-decimal IP address to its
binary equivalent.

• If it begins with 0, then it’s a Class A network.


• If it begins with 10, then it’s a Class B network.
• If it begins with 110, then it’s a Class C network.

4.4 Subnetting

Why subnetting?

Subnetting enables assigned network address to be broken into smaller, efficient allocations that are more
suitable for each network within an organization. For example, a point-to-point WAN link between AAiT
and AAU Main campus firewall needs only two IP addresses, while a LAN segment such as AAiT-Student
or AAiT-Staff SSIDs might requires thousands of IP address so that each student/Staff in the campus be
able to connect and access resources both inside and outside of the campus.

Let us start from the simplest IP address which is class C.

Assume you planned to use the IP address of 192.168.1.0 with the subnet mask of 255.255.255.0 for your
office. In short you plan to use 192.168.1.0/24 network for your small office.

If we convert the subnet mask to binary, we can find the two parts of IP addresses (Network and host).

255.255.255.0 =11111111. 11111111. 11111111.00000000

Since all 1s are network and all 0s are for host, based on the above information, we can determine that
the first 3 octets(192.168.1) are for network and the last octet(.0) is for host.

So, for the IP address of 192.168.1.0/24, we have 28-2 =254 usable IP address. However, you office grow
a bit and you decide to have two networks, one for you employees computer to get connected and the
other subnetwork for your Servers that are dedicated for your financial transaction, Procurement, Human
resource management, project management ..etc.

Since the first 24 bits are set for network, you don’t have any right to modify or edit it, rather you can
borrow one bit from host address and create subnetworks.

In order to find the number of subnets, use the following formula.

35 | P a g e
AAiT SITE Fundamentals of Networking

• 2N where N is the number of bits borrowed from host.

Based on your plan, you need only two subnets, so you will borrow one bit from host which makes you
network bit 25 and your host bit 7. What does this mean?

The original network is 192.168.1.0/24 which has 254 usable IP address in a single subnet. Now you divide
the network into two, each subnet having 126 usable IP address.

In order to find the number of hosts per subnet, use the following formula.

2H-2

Initially the network and host bit arrangement were:

11111111.11111111.11111111.00000000

After you borrow one bit from host it become

11111111.11111111.11111111.10000000 making your network bit to 25 and you host bit to 7.

Now we know we have two subnetwork and 126 usable IP address per each subnet, let us list them

✓ subnetworks,
✓ broadcast Address for each subnet (the last IP address of the subnet)
✓ range usable IP address (The IP address between subnetwork and broadcast address for each
subnetwork),
✓ subnet mask each subnet.

To find the subnetwork, first find the block size which will be 2H =27 = 128

Therefore, the subnet will go in the range of 128.

Subnet one details:

✓ Subnetwork: 192.168.1.0
✓ Broadcast address: 192.168.1.127
✓ Usable IP address:192.168.1.1 to 192.168.1.126
✓ Subnet mask: 11111111.11111111.11111111.10000000
o Convert the binary and you will get =>255.255.255.128 which is the subnet mask for each
subnet

Subnet Two details:

✓ Subnetwork: 192.168.1.128
✓ Broadcast address: 192.168.1.255
✓ Usable IP address:192.168.1.129 to 192.168.1.254
✓ Subnet mask: 11111111.11111111.11111111.10000000

36 | P a g e
AAiT SITE Fundamentals of Networking

As your organization grow, you add services to your office and you need at least three subnets:

✓ For your employees


✓ For your servers
✓ And for CCTV camera.

Now the question you need to ask and get the answer is, how many bits do you need to borrow from
host?

Borrowing one bit will only gives you two networks, which is less than what you want, however, if you
borrow two bits you will have four networks which is above what you required for.

It is better and recommend to have more network than less, so you need to borrow two bits from host
and get four networks. You can reserve the fourth bit for future use.

Therefore, you will have a bit mask of 11111111.11111111.11111111.11000000

Now you need only to find the block size and the rest will be simple.

From above binary information, the block size is 64 (26) at fourth octet so the subnet will be:

1. 192.168.1.0/26
2. 192.168.1.64/26
3. 192.168.1.128/26
4. 192.168.1.192/26

You can find the first and last usable IP address for each subnet, the total number of usable IP address for
each subnet, broadcast address of each subnet and subnet mask for each subnet once you get the block
size using the above methods we have done.

Let us do the first octet and complete the rest.

For 192.168.1.0/26 subnetwork.

✓ Broadcast IP address: 192.168.1.63


✓ First and last IP address: 192.168.1.1 to 192.168.1.62
✓ Total number of usable IP address: 26-2=62
✓ Subnet mask=255.255.255.192 (convert 11111111.11111111.11111111.11000000)

NB: The interesting octet in class C network is always 3rd octet.

The logical question here is do you have 62 Servers, or 62 CCTV camera? You might have 100 employees
in the future but is it possible for small office to have 62 servers?

37 | P a g e
AAiT SITE Fundamentals of Networking

In reality, you might have less than 10 servers, or less the 10 CCTV cameras. But in above plan we just
waste more than 52 usable IP address by assigning 62 IP addresses for all networks and that IP address
could been used for other services or for our employee in the future.

Let us assume we have 2 servers now and it will grow to 10 servers in the future, and we have 6 CCTV
camera and it will grow to 11 in the future. Currently we have only 33 employees (both permanent and
contractual employees) however in the near future we might have over 100 employees and some guest,
so we need to prepare our network to provide sufficient IP address to the incoming employees and our
guests. Below is how we can manage and use our IP address efficiently.

Given IP address: 192.168.1.0/24

✓ Number of employees: >=100


✓ Number of servers<=10
✓ Number of CCTV Camera<=11

What if I can borrow one bit first and assign that IP address to my employees?

✓ 192.168.1.0/25

Now the first 128 IP address is being utilized by employee’s network and I have the next 128 IP address to
sub divided into another subnetwork efficiently.

I have an address of 192.168.1.128/25 to be allocated and used.

So let me borrow 2 bits from it and give it to both CCTV and Server subnets.

192.168.1.128/25 is remaining network and borrowing 2 bits from it will give me four network that has
62 usable IP address.

List of Subnet after the first subnet will be:

✓ 192.168.1.128/27
✓ 192.168.1.160/27
✓ 192.168.1.192/27
✓ 192.168.1.224/27

Still, we can subnet further until we got what we want but for simplicity’s sake let us stope here. And this
is what we call is Variable Lengths subnet Mask (VLSM)

38 | P a g e
AAiT SITE Fundamentals of Networking

Class B network subnet.

Assume you are a network engineer for AAU and you have been assigned to create subnet for four main
campuses of AAU mainly (Main campus, AAiT, 4 Kilo and EiABC) and you have been given the IP address
of 172.16.0.0/16 to use.

172.16.0.0 255.255.0.0 =172.16.0.0/16

From above information, you have been given an IP address that has 16 bits for hosts which is 65534
usable IP address.

Since four networks are required, you need to borrow 2 bits from host which makes the subnet mask to
/18.

To list the subnets, you need to find the block size. However, the interesting octet in this case third octet
and the block size will be on 3rd octet.

In 3rd octet, you have 6 bits for host which is 64, therefore the subnet lists will be:

✓ 172.16.0.0 /18
✓ 172.16.64.0/18
✓ 172.16.128.0/18
✓ 172.16.192.0/18

To find broadcast, first and last useable IP address follow the following example:

For 172.16.128.0/18 network address.

✓ Broadcast: 172.16.191.255
✓ First usable IP address: 172.16.128.1
✓ Last usable IP address: 172.16.191.254
✓ Subnet mask: 255.255.192.0

Please find the broadcast, first and last usable and subnet mask for other three networks.

Same logic applies for class A network except the interesting octet could be 2nd, 3rd or 4th octet where as
for class C the interesting octet always will be 4th octet and for class B the interesting octet could be 3rd or
4th octet.

39 | P a g e
AAiT SITE Fundamentals of Networking

4.5 Network Layer Protocol


There are lots of network layer protocols and it will be beyond the scope of this class to get in details of
each network layer protocols. However, the following are the major network protocol that you will face
day to day as network engineer.

❖ DHCP: Dynamic Host Configuration Protocol


DHCP is a communication protocol that enables network administrators to automate the assignment of
IP addresses in a network. In an IP network, every device connecting to the internet requires a unique IP.
DHCP lets network admins distribute IP addresses from a central point and automatically send a new IP
address when a device is plugged in from a different place in the network. DHCP works on a client-server
model.

Advantages of using DHCP

✓ Centralized management of IP addresses.


✓ Seamless addition of new clients into a network.
✓ Reuse of IP addresses, reducing the total number of IP addresses required.

Disadvantages of using DHCP

✓ Tracking internet activity becomes tedious, as the same device can have multiple IP addresses
over a period of time.
✓ Computers with DHCP cannot be used as servers, as their IPs change over time.

❖ DNS: Domain Name System protocol

The DNS protocol helps in translating or mapping host names to IP addresses. DNS works on a client-server
model, and uses a distributed database over a hierarchy of name servers.

Hosts are identified based on their IP addresses, but memorizing an IP address is difficult due to its
complexity. IPs are also dynamic, making it all the more necessary to map domain names to IP addresses.
DNS helps resolve this issue by converting the domain names of websites into numerical IP addresses.

Advantages

✓ DNS facilitates internet access.


40 | P a g e
AAiT SITE Fundamentals of Networking

✓ Eliminates the need to memorize IP addresses.

Disadvantages

✓ DNS queries don't carry information pertaining to the client who initiated it. This is because the
DNS server only sees the IP from where the query came from, making the server susceptible to
manipulation from hackers.
✓ DNS root servers, if compromised, could enable hackers to redirect to other pages for phishing
data.

❖ FTP: File Transfer Protocol

File Transfer Protocol enables file sharing between hosts, both local and remote, and runs on top of TCP.
For file transfer, FTP creates two TCP connections: control and data connection. The control connection
is used to transfer control information like passwords, commands to retrieve and store files, etc., and the
data connection is used to transfer the actual file. Both of these connections run in parallel during the
entire file transfer process.

Advantages

✓ Enables sharing large files and multiple directories at the same time.
✓ Let’s you resume file sharing if it was interrupted.
✓ Let’s you recover lost data, and schedule a file transfer.

Disadvantages

✓ FTP lacks security. Data, usernames, and passwords are transferred in plain text, making them
vulnerable to malicious actors.
✓ FTP lacks encryption capabilities, making it non-compliant with industry standards.

❖ HTTP: Hyper Text Transfer Protocol

HTTP is an application layer protocol used for distributed, collaborative, and hypermedia information
systems. It works on a client-server model, where the web browser acts as the client. Data such as text,
images, and other multimedia files are shared over the World Wide Web using HTTP. As a request and
response type protocol, the client sends a request to the server, which is then processed by the server
before sending a response back to the client.

HTTP is a stateless protocol, meaning the client and server are only aware of each other while the
connection between them is intact. After that, both the client and server forget about each other's
existence. Due to this phenomenon, the client and server can't both retain information between
requests.

Advantages

41 | P a g e
AAiT SITE Fundamentals of Networking

• Memory usage and CPU usage are low because of lesser concurrent connections.
• Errors can be reported without closing connections.
• Owing to lesser TCP connections, network congestion is reduced.

Disadvantages

• HTTP lacks encryption capabilities, making it less secure.


• HTTP requires more power to establish communication and transfer data.

❖ IMAP and IMAP4: Internet Message Access Protocol (version 4)

IMAP is an email protocol that lets end users access and manipulate messages stored on a mail server
from their email client as if they were present locally on their remote device. IMAP follows a client-
server model, and lets multiple clients access messages on a common mail server concurrently. IMAP
includes operations for creating, deleting, and renaming mailboxes; checking for new messages;
permanently removing messages; setting and removing flags; and much more. The current version of
IMAP is version 4 revision 1.

Advantages

• As the emails are stored on the mail server, local storage utilization is minimal.
• In case of accidental deletion of emails or data, it is always possible to retrieve them as they are
stored on the mail server.

Disadvantages

• Emails won't work without an active internet connection.


• High utilization of emails by end users requires more mailbox storage, thereby augmenting
costs.

❖ POP and POP3: Post Office Protocol (version 3)

The Post Office Protocol is also an email protocol. Using this protocol, the end user can download emails
from the mail server to their own email client. Once the emails are downloaded locally, they can be read
without an internet connection. Also, once the emails are moved locally, they get deleted from the mail
server, freeing up space. POP3 is not designed to perform extensive manipulations with the messages
on the mail server, unlike IMAP4. POP3 is the latest version of the Post Office Protocol.

Advantages

• Read emails on local devices without internet connection.


• The mail server need not have high storage capacity, as the emails get deleted when they're
moved locally.

Disadvantages

42 | P a g e
AAiT SITE Fundamentals of Networking

• If the local device on which the emails were downloaded crashes or gets stolen, the emails are
lost.

❖ 7. SMTP: Simple Mail Transfer Protocol

SMTP is a protocol designed to transfer electronic mail reliably and efficiently. SMTP is a push protocol
and is used to send the email, whereas POP and IMAP are used to retrieve emails on the end user's side.
SMTP transfers emails between systems, and notifies on incoming emails. Using SMTP, a client can
transfer an email to another client on the same network or another network through a relay or gateway
access available to both networks.

Advantages

• Ease of installation.
• Connects to any system without any restriction.
• It doesn't need any development from your side.

Disadvantages

• Back and forth conversations between servers can delay sending a message, and also increases
the chance of the message not being delivered.
• Certain firewalls can block the ports used with SMTP.

❖ Telnet: Terminal emulation protocol

Telnet is an application layer protocol that enables a user to communicate with a remote device. A
Telnet client is installed on the user's machine, which accesses the command line interface of another
remote machine that runs a Telnet server program.

Telnet is mostly used by network administrators to access and manage remote devices. To access a
remote device, a network admin needs to enter the IP or host name of the remote device, after which
they will be presented with a virtual terminal that can interact with the host.

Advantages

• Compatible with multiple operating systems.


• Saves a lot of time due to its swift connectivity with remote devices.

Disadvantages

• Telnet lacks encryption capabilities and sends across critical information in clear text, making it
easier for malicious actors.
• Expensive due to slow typing speeds.

❖ SNMP: Simple Network Management Protocol

43 | P a g e
AAiT SITE Fundamentals of Networking

SNMP is an application layer protocol used to manage nodes, like servers, workstations, routers, switches,
etc., on an IP network. SNMP enables network admins to monitor network performance, identify network
glitches, and troubleshoot them. SNMP protocol is comprised of three components: a managed device,
an SNMP agent, and an SNMP manager.

The SNMP agent resides on the managed device. The agent is a software module that has local
knowledge of management information, and translates that information into a form compatible with
the SNMP manager. The SNMP manager presents the data obtained from the SNMP agent, helping
network admins manage nodes effectively.

Currently, there are three versions of SNMP: SNMP v1, SNMP v2, and SNMP v3. Both versions 1 and 2
have many features in common, but SNMP v2 offers enhancements such as additional protocol
operations. SNMP version 3 (SNMP v3) adds security and remote configuration capabilities to the
previous versions.

4.6 Network Address Types:


✓ Unicast

Unicast is the term used to describe communication where a piece of information is sent from one point
to another point. In this case there is just one sender, and one receiver.

Unicast transmission, in which a packet is sent from a single source to a specified destination, is still the
predominant form of transmission on LANs and within the Internet. All LANs (e.g. Ethernet) and IP
networks support the unicast transfer mode, and most users are familiar with the standard unicast
applications (e.g. http, smtp, ftp and telnet) which employ the TCP transport protocol.

✓ Broadcast

Broadcast is the term used to describe communication where a piece of information is sent from one
point to all other points. In this case there is just one sender, but the information is sent to all connected
receivers.

Broadcast transmission is supported on most LANs (e.g. Ethernet), and may be used to send the same
message to all computers on the LAN (e.g. the address resolution protocol (arp) uses this to send an
address resolution query to all computers on a LAN, and this is used to communicate with an IPv4 DHC
server). Network layer protocols (such as IPv4) also support a form of broadcast that allows the same
packet to be sent to every system in a logical network (in IPv4 this consists of the IP network ID and an all
1's host number).

✓ Multicast

Multicast is the term used to describe communication where a piece of information is sent from one or
more points to a set of other points. In this case there is may be one or more senders, and the information
is distributed to a set of receivers (there may be no receivers, or any other number of receivers).

One example of an application which may use multicast is a video server sending out networked TV
channels. Simultaneous delivery of high-quality video to each of a large number of delivery platforms will

44 | P a g e
AAiT SITE Fundamentals of Networking

exhaust the capability of even a high bandwidth network with a powerful video clip server. This poses a
major salability issue for applications which required sustained high bandwidth. One way to significantly
ease scaling to larger groups of clients is to employ multicast networking.

Multicasting is the networking technique of delivering the same packet simultaneously to a group of
clients.

4.7 Routing Protocols


What do you think about the Internet connectivity across the globe? How is your traffic from your
computer or mobile pass and reaches to google server or Facebook server in united states? How many
devices will traverse before reaching to the Head of office of those servers?

Imagine how many routers or firewall will be available on entire world and how many of them will be up
and down for some reason.

For the packet (data) to move from AAiT computers that are connected with google.com or facebook.com,
the router or the firewall at the edge of the network must know the route path to destination network.
But the question would be, how does the router or the firewall possibly know all the connection from
AAiT to google.com or facebook.com head office? Or once it gets the route path, what if a certain device
is failed and break the route that already known?

In order to answer those question, routing protocols was invented. There are different types of routing
protocols that has different features which gives you options to choose one from the other based on your
requirements.

Types of Routing protocols:

✓ Interior Gateway Routing Protocols (IGRP) and contains the following routing protocols
o Routing Information Protocol (RIP)
o Interior Gateway Protocol (IGRP)
o Open Shortest Path First (OSPF)
o Exterior Gateway Protocol (EGP)
o Enhanced Interior Gateway Routing Protocol (EIGRP)
o Intermediate System-to-Intermediate System (IS-IS)
✓ Exterior Gateway Protocol (Internet Protocols)
o Border Gateway Protocol (BGP)

These are routing protocols that allow your edge device to learn the route path dynamically and updates
its routing tables so that it will get the right path to forward the packets.

Device categorized in Layer three are:

✓ Router
✓ Layer 3 capable switches
✓ Firewall (although this could be in Layer 4)

45 | P a g e
AAiT SITE Fundamentals of Networking

Chapter Four

4. Physical and Data Link Layers


4.1 Physical Layer
Physical layer is the lowest layer of the OSI reference model. It is responsible for sending bits from one
computer to another. This layer is not concerned with the meaning of the bits and deals with the setup of
physical connection to the network and with transmission and reception of signals.

Physical layer in the OSI model plays the role of interacting with actual hardware and signaling mechanism.
Physical layer is the only layer of OSI network model which actually deals with the physical connectivity of
two different stations. This layer defines the hardware equipment, cabling, wiring, frequencies, pulses
used to represent binary signals etc.

Physical layer provides its services to Data-link layer. Data-link layer hands over frames to physical layer.
Physical layer converts them to electrical pulses, which represent binary data. The binary data is then sent
over the wired or wireless media.

Device that are categorized as Physical layer are:

✓ Repeaters or switch,
✓ Hubs,
✓ Network interface cards (NICs),
✓ Cables and connectors

4.2 Data link Layer overview

Data Link Layer is second layer of OSI Layered Model. This layer is one of the most complicated layers and
has complex functionalities and liabilities. Data link layer hides the details of underlying hardware and
represents itself to upper layer as the medium to communicate.

Data link layer works between two hosts which are directly connected in some sense. This direct
connection could be point to point or broadcast. Systems on broadcast network are said to be on same
link. The work of data link layer tends to get more complex when it is dealing with multiple hosts on single
collision domain.

Data link layer is responsible for converting data stream to signals bit by bit and to send that over the
underlying hardware. At the receiving end, Data link layer picks up data from hardware which are in the
form of electrical signals, assembles them in a recognizable frame format, and hands over to upper layer.

Data link layer has two sub-layers:

• Logical Link Control: It deals with protocols, flow-control, and error control
• Media Access Control: It deals with actual control of media
46 | P a g e
AAiT SITE Fundamentals of Networking

Functionality of Data-link Layer


Data link layer does many tasks on behalf of upper layer. These are:
✓ Framing

Data-link layer takes packets from Network Layer and encapsulates them into Frames.
Then, it sends each frame bit-by-bit on the hardware. At receiver’ end, data link layer
picks up signals from hardware and assembles them into frames.
✓ Addressing

Data-link layer provides layer-2 hardware addressing mechanism. Hardware address is


assumed to be unique on the link. It is encoded into hardware at the time of
manufacturing.
✓ Synchronization

When data frames are sent on the link, both machines must be synchronized in order to
transfer to take place.
✓ Error Control

Sometimes signals may have encountered problem in transition and the bits are flipped.
These errors are detected and attempted to recover actual data bits. It also provides error
reporting mechanism to the sender.
✓ Flow Control

Stations on same link may have different speed or capacity. Data-link layer ensures flow
control that enables both machines to exchange data on same speed.
✓ Multi-Access

When host on the shared link tries to transfer the data, it has a high probability of
collision. Data-link layer provides mechanism such as CSMA/CD to equip capability of
accessing a shared media among multiple Systems.

4.3 Flow and Error Control

Flow Control

It is an important function of the Data Link Layer. It refers to a set of procedures that tells the sender
how much data it can transmit before waiting for acknowledgement from the receiver.

Purpose of Flow Control

Any receiving device has a limited speed at which it can process incoming data and also a limited
amount of memory to store incoming data. If the source is sending the data at a faster rate than the
capacity of the receiver, there is a possibility of the receiver being swamped. The receiver will keep

47 | P a g e
AAiT SITE Fundamentals of Networking

losing some of the frames simply because they are arriving too quickly and the buffer is also getting
filled up.

This will generate waste frames on the network. Therefore, the receiving device must have some
mechanism to inform the sender to send fewer frames or stop transmission temporarily. In this way,
flow control will control the rate of frame transmission to a value that can be handled by the receiver.

Example – Stop & Wait Protocol

Error Control :

The error control function of data link layer detects the errors in transmitted frames and re-transmit all
the erroneous frames.

Purpose of Error Control:

The function of the error control function of the data link layer helps in dealing with data frames that
are damaged in transit, data frames lost in transit, and the acknowledgement frames that are lost in
transmission. The method used for error control is called Automatic Repeat Request which is used for
the noisy channel.

4.4 Local Area Network

A local area network (LAN) is a collection of devices connected together in one physical location, such as
a building, office, or home. A LAN can be small or large, ranging from a home network with one user to
an enterprise network with thousands of users and devices in an office or school.

4.5 Wireless Network

A wireless network is a computer network that uses wireless data connections between network nodes.
Examples of wireless networks include cell phone networks, wireless local area networks (WLANs),
wireless sensor networks, satellite communication networks, and terrestrial microwave networks.

4.6 Wide Area Networks

A wide area network (also known as WAN), is a large network of information that is not tied to a single
location. WANs can facilitate communication, the sharing of information and much more between devices
from around the world through a WAN provider.

WANs can be vital for international businesses, but they are also essential for everyday use, as the internet
is considered the largest WAN in the world. Keep reading for more information on WANs, their use, how
they differ from other networks and their overall purpose for businesses and people, alike.

48 | P a g e
AAiT SITE Fundamentals of Networking

Chapter Five

5. Transport Layers

5.1 Process-to-Process Delivery Concepts- UDP, TCP, SCTP

The Internet model has three protocols at the transport layer: UDP, TCP, and SCTP.

The data link layer is responsible for delivery of frames between two neighboring nodes over a link. This
is called node-to-node delivery. The network layer is responsible for delivery of datagrams between two
hosts. This is called host-to-host delivery. Communication on the Internet is not defined as the exchange
of data between two nodes or between two hosts. Real communication takes place between two
processes. So that we need process-to-process delivery.

However, at any moment, several processes may be running on the source host and several on the
destination host. To complete the delivery, we need a mechanism to deliver data from one of these
processes running on the source host to the corresponding process running on the destination host.

The transport layer is responsible for process-to-process delivery-the delivery of a packet, part of a
message, from one process to another. The following figure shows these three types of deliveries and
their domains.

Client/Server Paradigm:

There are several ways to achieve process-to-process communication; the most common one is through
the client/server paradigm. A process on the local host, called a client, needs services from a process
usually on the remote host, called a server.

✓ User Datagram Protocol (UDP)


✓ TCP services
✓ TCP Segment

49 | P a g e
AAiT SITE Fundamentals of Networking

Both processes (client and server) have the same name. For example, to get the day and time from a
remote machine, we need a Daytime client process running on the local host and a Daytime server
process running on a remote machine.

A remote computer can run several server programs at the same time, just as local computers can run
one or more client programs at the same time. For communication, we must define the following:

✓ Local host
✓ Local process
✓ Remote host
✓ Remote process

Addressing

Whenever we need to deliver something to one specific destination among many, we need an address.
At the data link layer, we need a MAC address to choose one node among several nodes if the connection
is not point-to-point. A frame in the data link layer needs a destination MAC address for delivery and a
source address for the next node's reply.

At the network layer, we need an IP address to choose one host among millions. A datagram in the
network layer needs a destination IP address for delivery and a source IP address for the destination's
reply.

At the transport layer, we need a transport layer address, called a port number, to choose among multiple
processes running on the destination host. The destination port number is needed for delivery; the source
port number is needed for the reply.

In the Internet model, the port numbers are 16-bit integers between 0 and 65,535. The client program
defines itself with a port number, chosen randomly by the transport layer software running on the client
host. This is the ephemeral port number.

The server process must also define itself with a port number. This port number, however, cannot be
chosen randomly. If the computer at the server site runs a server process and assigns a random number
as the port number, the process at the client site that wants to access that server and use its services will
not know the port number.

Every client process knows the well-known port number of the corresponding server process. For
example, while the Daytime client process, discussed above, can use an ephemeral (temporary) port
number 52,000 to identify itself, the Daytime server process must use the well-known (permanent) port
number 13.

It should be clear by now that the IP addresses and port numbers play different roles in selecting the final
destination of data. The destination IP address defines the host among the different hosts in the world.
After the host has been selected, the port number defines one of the processes on this particular host.

50 | P a g e
AAiT SITE Fundamentals of Networking

The lANA (Internet Assigned Number Authority) has divided the port numbers into three ranges: well
known, registered, and dynamic (or private).

✓ Well-known ports: The ports ranging from 0 to 1023 are assigned and controlled by lANA. These
are the well-known ports.
✓ Registered ports: The ports ranging from 1024 to 49,151 are not assigned or controlled by
lANA. They can only be registered with lANA to prevent duplication.
✓ Dynamic ports: The ports ranging from 49,152 to 65,535 are neither controlled nor registered.
They can be used by any process. These are the ephemeral ports.

Socket Addresses:

Process-to-process delivery needs two identifiers, IP address and the port number, at each end to make a
connection. The combination of an IP address and a port number is called a socket address. The client
socket address defines the client process uniquely just as the server socket address defines the server
process uniquely which is represented in the following figure.

Multiplexing and Demultiplexing:

The addressing mechanism allows multiplexing and demultiplexing by the transport layer.

Multiplexing:

At the sender site, there may be several processes that need to send packets. However, there is only one
transport layer protocol at any time. This is a many-to-one relationship and requires multiplexing. The
protocol accepts messages from different processes, differentiated by their assigned port numbers. After
adding the header, the transport layer passes the packet to the network layer.

Demultiplexing:

At the receiver site, the relationship is one-to-many and requires demultiplexing. The transport layer
receives datagrams from the network layer. After error checking and dropping of the header, the
transport layer delivers each message to the appropriate process based on the port number.

Connectionless Versus Connection-Oriented Service

A transport layer protocol can either be connectionless or connection-oriented.

Connectionless Service:

In a connectionless service, the packets are sent from one party to another with no need for connection
51 | P a g e
AAiT SITE Fundamentals of Networking

establishment or connection release. The packets are not numbered; they may be delayed or lost or may
arrive out of sequence. There is no acknowledgment either. UDP, is connectionless.

Connection-Oriented Service:

In a connection-oriented service, a connection is first established between the sender and the receiver.
Data are transferred. At the end, the connection is released. The TCP and SCTP are connection-oriented
protocols.

Reliable Versus Unreliable:

The transport layer service can be reliable or unreliable. If the application layer program needs reliability,
we use a reliable transport layer protocol by implementing flow and error control at the transport layer.
If the application program does not need reliability because it uses its own flow and error control
mechanism or it needs fast service or the nature of the service does not demand flow and error control
(real-time applications), then an unreliable protocol can be used. In the Internet, UDP is connectionless
and unreliable; TCP and SCTP are connection oriented and reliable.

5.2 Congestion control

Network congestion occurs when a node or link carries data beyond its limit. This often leads to the
queuing of packets—and in the worst case, loss of packets—as well as a decrease in the network’s Quality
of Service (QoS).

Sudden bursts of traffic due to special events can also choke otherwise healthy and sufficient network
links resulting in a degradation of the entire network. Yet another cause of network congestion is network
protocols that use retransmission to avoid packet loss, such as TCP (Transmission Control Protocol, the
backbone of the modern internet), which can keep a network congested even when the load has been
reduced. Such a state where the initial load has died down but network throughput is still low is called
Congestive Collapse.

5.3 QoS in Multimedia

Quality of service (QoS) refers to any technology that manages data traffic to reduce packet loss, latency
and jitter on a network. QoS controls and manages network resources by setting priorities for specific
types of data on the network.

52 | P a g e
AAiT SITE Fundamentals of Networking

Chapter six

6. Application Layer
6.1 Application Layer overview

An application layer is an abstraction layer that specifies the shared communications protocols and
interface methods used by hosts in a communications network. The application layer abstraction is
used in both of the standard models of computer networking: the Internet Protocol Suite (TCP/IP) and
the OSI model.

Simple Mail Transfer Protocol (SMTP): SMTP stands for Simple Mail Transfer Protocol, and it's an
application used by mail servers to send, receive, and/or relay outgoing mail between email senders
and receivers. ... When you send an email, the SMTP server processes your email, decides which server
to send the message to, and relays the message to that server.

Figure 16 Mail Server Setup

Without an SMTP server, your email wouldn’t make it to its destination. Once you hit “send,” your
email transforms into a string of code that is then sent to the SMTP server. The SMTP server is able to
process that code and pass on the message. If the SMTP server wasn’t there to process the message,
it would be lost in translation.
Additionally, the SMTP server verifies that the outgoing email is from an active account, acting as the
first safeguard in protecting your inbox from illegitimate email. It also will send the email back to the
SMTP sender if it can’t be delivered.

world Wide Web (WWW)

The World Wide Web (WWW) is combination of all resources and users on the Internet that are using
the Hypertext Transfer Protocol (HTTP). ... "The World Wide Web is the universe of network-accessible
information, an embodiment of human knowledge." The Web, as it's commonly known, is often
confused with the Internet.

53 | P a g e

You might also like