Download as pdf or txt
Download as pdf or txt
You are on page 1of 66

TCMH3722 – COMPUTER NETWORKS

Network Addressing
Network Addressing is one of the major responsibilities of the network layer.

Network addresses are always logical, i.e., software-based addresses.

A host is also known as end system that has one link to the network. The boundary between the
host and link is known as an interface. Therefore, the host can have only one interface.

A router is different from the host in that it has two or more links that connect to it. When a router
forwards the datagram, then it forwards the packet to one of the links.
Network Addressing

The boundary between the router and link is known as an interface, and the router can have
multiple interfaces, one for each of its links. Each interface is capable of sending and receiving the IP
packets, so IP requires each interface to have an address.

Each IP address is 32 bits long, and they are represented in the form of "dot-decimal notation"
where each byte is written in the decimal form, and they are separated by the period.

An IP address would look like 193.32.216.9 where 193 represents the decimal notation of first 8 bits
of an address, 32 represents the decimal notation of second 8 bits of an address.
Network Basic Devices

HUB

SWITCH

ROUTER

GATEWAY
Network Addressing
Hub Switch
Layer Physical layer. Hubs are classified as
Data Link Layer. Network
Layer 1 devices per the OSI model. switches operate at Layer 2 of
the OSI model.
Function To connect a network of personal Allow connections to multiple
computers together. devices, manage ports, manage
VLAN security settings
Ports 4/12 ports Switch is multi-port Bridge.
24/48 ports
Table A network hub cannot learn or store Switches use content accessible
MAC address. memory CAM table.
Transmission Mode Half duplex Half/Full duplex
Network Addressing

A router is the first line of security from intrusion into a network. Routers connect a modem—
like a fiber, cable, or DSL modem—to other devices to allow communication between those
devices and the internet

A network switch is networking hardware that connects devices on a computer network by


using packet switching to receive and forward data to the destination device. A network switch
is a multiport network bridge that uses MAC addresses to forward data at the data link layer of
the OSI model.

Multiple data cables are plugged into a switch to enable communication between different
networked devices.
Network Addressing
Simple example:
Network Addressing
An IP address (internet protocol address) is a numerical representation that uniquely identifies a
specific interface on the network.

Addresses in IPv4 are 32-bits long.


This allows for a maximum of 4,294,967,296 (232) unique addresses.

Addresses in IPv6 are 128-bits, which allows for 3.4 x 1038 (2128) unique addresses.

The total usable address pool of both versions is reduced by various reserved addresses and other
considerations.

IP addresses are binary numbers but are typically expressed in decimal form (IPv4) or hexadecimal
form (IPv6) to make reading and using them easier for humans.
Network Addressing

✓ In the above figure, a router has three interfaces labeled as 1, 2 & 3 and each router interface
contains its own IP address.

✓ Each host contains its own interface and IP address.

✓ All the interfaces attached to the LAN 1 is having an IP address in the form of 223.1.1.xxx, and
the interfaces attached to the LAN 2 and LAN 3 have an IP address in the form of 223.1.2.xxx and
223.1.3.xxx respectively.

✓ Each IP address consists of two parts. The first part (first three bytes in IP address) specifies the
network, and second part (last byte of an IP address) specifies the host in the network.
Network Addressing
An IP address is 32-bit long. An IP address is divided into sub-classes:
Class A, Class B, Class C, Class D and Class E

It is as such, generally shown as 4 octets of numbers from 0-255 represented in decimal form
instead of binary form. For example, the address 168.212.226.204 represents the 32-bit binary
number 10101000.11010100.11100010.11001100.

A subnetwork or subnet is a logical subdivision of an IP network. The practice of dividing a network


into two or more networks is called subnetting. Computers that belong to the same subnet are
addressed with an identical most-significant bit-group in their IP.
Network Addressing

The sub networks so created are called subnets.

Advantages of Subnetting:
• It improves the security.
• The maintenance and administration of subnets is easy

Features of Subnet ID:


• Each subnet has its unique network address known as its Subnet ID.
• The subnet ID is created by borrowing some bits from the Host ID part of the IP Address.
• The number of bits borrowed depends on the number of subnets created.
Network Addressing
An IP address is divided into two parts:
1. Network ID: It represents the number of networks.
2. Host ID: It represents the number of hosts.

Each class have a specific range of IP addresses.

The class of IP address is used to determine the number


of bits used in a class and number of networks and
hosts available in the class.
Network Addressing

Class A
In Class A, an IP address is assigned to those networks that contain a large number of hosts.
✓ The network ID is 8 bits long.
✓ The host ID is 24 bits long.
✓ In Class A, the first bit in higher order bits of the first octet is always set to 0 and the remaining 7
bits determine the network ID. The 24 bits determine the host ID in any network.

The total number of networks in Class A = 27 = 128 network address


The total number of hosts in Class A = 224 - 2 = 16,777,214 host address

0.0.0.0 to 127.255.255.255; Example of Class A IP: 2.134.213.2


Network Addressing
Class B
In Class B, an IP address is assigned to those networks that range from small-sized to large-sized
networks.

✓ The Network ID is 16 bits long.


✓ The Host ID is 16 bits long.
✓ In Class B, the higher order bits of the first octet is always set to 10, and the remaining14 bits
determine the network ID. The other 16 bits determine the Host ID.

The total number of networks in Class B = 214 = 16384 network address


The total number of hosts in Class B = 216 - 2 = 65534 host address

128.0.0.0 to 191.255.255.255; Example of Class B: 135.58.24.17


Network Addressing
Class C
In Class C, an IP address is assigned to only small-sized networks.

✓ The Network ID is 24 bits long.


✓ The host ID is 8 bits long.
✓ In Class C, the higher order bits of the first octet is always set to 110, and the remaining 21 bits
determine the network ID. The 8 bits of the host ID determine the host in a network.

The total number of networks = 221 = 2097152 network address


The total number of hosts = 28 - 2 = 254 host address

192.0.0.0 to 223.255.255.255; Example of Class C: 192.168.178.1


Network Addressing

Class D
In Class D, an IP address is reserved for multicast addresses. It does not possess subnetting. The
higher order bits of the first octet is always set to 1110, and the remaining bits determines the host
ID in any network.

Class E
In Class E, an IP address is used for the future use or for the research and development purposes. It
does not possess any subnetting. The higher order bits of the first octet is always set to 1111, and
the remaining bits determines the host ID in any network.
Network Addressing
Class Higher NET ID HOST ID No.of No.of hosts Range
bits bits bits networks per network
7 24
A 0 8 24 2 2 0.0.0.0 to
127.255.255.255
14 16
B 10 16 16 2 2 128.0.0.0 to
191.255.255.255
21 8
C 110 24 8 2 2 192.0.0.0 to
223.255.255.255
D 1110 Not Not Not Not Defined 224.0.0.0 to
Defined Defined Defined 239.255.255.255
E 1111 Not Not Not Not Defined 240.0.0.0 to
Defined Defined Defined 255.255.255.255
Network Addressing
Network Addressing
Network Addressing
255
Private Address Space

Default Subnet Masks


Network Addressing
Network Addressing
Using the IP addresses and subnet mask shown, write out the host address:
Transport Layer

The Transport layer is a Layer 4 ensures that messages are transmitted in the order in which they
are sent and there is no duplication of data.

The main responsibility of the transport layer is to transfer the data completely.

It receives the data from the upper layer and converts them into smaller units known as segments.

This layer can be termed as an end-to-end layer as it provides a point-to-point connection between
source and destination to deliver the data reliably.
Transport Layer
The two protocols used in this layer are:

1] Transmission Control Protocol


It is a standard protocol that allows the systems to communicate over the internet.
It establishes and maintains a connection between hosts.
When data is sent over the TCP connection, then the TCP protocol divides the data into smaller
units known as segments. Each segment travels over the internet using multiple routes, and they
arrive in different orders at the destination. The transmission control protocol reorders the packets
in the correct order at the receiving end.
Transport Layer

2] User Datagram Protocol [UDP]


User Datagram Protocol is a transport layer protocol.
It is an unreliable transport protocol as in this case receiver does not send any acknowledgment
when the packet is received, the sender does not wait for any acknowledgment. Therefore, this
makes a protocol unreliable.
Transport Layer
Functions of Transport Layer:
(1) Service-point addressing: Computers run several programs simultaneously due to this reason,
the transmission of data from source to the destination not only from one computer to another
computer but also from one process to another process. The transport layer adds the header that
contains the address known as a service-point address or port address. The responsibility of the
network layer is to transmit the data from one computer to another computer and the
responsibility of the transport layer is to transmit the message to the correct process.

(2) Segmentation and reassembly: When the transport layer receives the message from the upper
layer, it divides the message into multiple segments, and each segment is assigned with a sequence
number that uniquely identifies each segment. When the message has arrived at the destination,
then the transport layer reassembles the message based on their sequence numbers.
Transport Layer
(3) Connection control: Transport layer provides two services Connection-oriented service and
connectionless service.
(a) A connectionless service treats each segment as an individual packet, and they all travel in
different routes to reach the destination.
(b) A connection-oriented service makes a connection with the transport layer at the destination
machine before delivering the packets. In connection-oriented service, all the packets travel in the
single route.

(4) Flow control: The transport layer also responsible for flow control but it is performed end-to-
end rather than across a single link.

(5) Error control: The transport layer is also responsible for Error control. Error control is performed
end-to-end rather than across the single link. The sender transport layer ensures that message
reach at the destination without any error.
Session Layer
✓ It is a layer 3 in the OSI model.
✓ The Session layer is used to establish, maintain and synchronizes the interaction between
communicating devices.

Functions of Session layer:


(1) Dialog control: Session layer acts as a dialog controller that creates a dialog between two
processes or we can say that it allows the communication between two processes which can be
either half-duplex or full-duplex.

(2) Synchronization: Session layer adds some checkpoints when transmitting the data in a
sequence. If some error occurs in the middle of the transmission of data, then the transmission
will take place again from the checkpoint. This process is known as Synchronization and
recovery.
Presentation Layer

A Presentation layer is mainly concerned with the syntax and semantics of the information
exchanged between the two systems.

✓ It acts as a data translator for a network.


✓ The Presentation layer is also known as the syntax layer.
✓ This layer is a part of the operating system that converts the data from one presentation format
to another format.
Presentation Layer
Functions of Presentation layer:
(1) Translation: Different computers use different encoding methods; the presentation layer handles
the interoperability between the different encoding methods. It converts the data from sender-
dependent format into a common format and changes the common format into receiver-dependent
format at the receiving end. such as text, audio, video.

(2) Encryption: Encryption is needed to maintain privacy. Encryption is a process of converting the
sender-transmitted information into another form and sends the resulting message over the
network.

(3) Compression: Data compression is a process of compressing the data, i.e., it reduces the number
of bits to be transmitted. Data compression is very important in multimedia
Application Layer
An application layer serves as a window for users and application processes to access network
service.
✓ It handles issues such as network transparency, resource allocation, etc.
✓ This layer provides the network services to the end-users.
✓ An application layer is not an application, but it performs the application layer functions.
Functions of Application layer:
(1) File transfer, access, and management (FTAM): An application layer allows a user to access the
files in a remote computer, to retrieve the files from a computer and to manage the files in a
remote computer.

(2) Mail services: An application layer provides the facility for email forwarding and storage.

(3) Directory services: An application provides the distributed database sources and is used to
provide that global information about various objects.
NETWORK PROTOCOL
NOTE: Recall our discussion was on Communication Protocols, Now this is Network Protocol

A network protocol is an established set of rules that determine how data is transmitted between
different devices in the same network. Essentially, it allows connected devices to communicate with
each other, regardless of any differences in their internal processes, structure or design.

Network protocols are the reason you can easily communicate with people all over the world, and
thus play a critical role in modern digital communications.

Similar to the way that speaking the same language simplifies communication between two people,
network protocols make it possible for devices to interact with each other because of
predetermined rules built into devices’ software and hardware. Neither local area networks (LAN)
nor wide area networks (WAN) could function the way they do today without the use of network
protocols.
NETWORK PROTOCOL
The following groups have defined and published different network protocols:
1. The Institute of Electrical and Electronics Engineers (IEEE)
2. The Internet Engineering Task Force (IETF)
3. The International Organization for Standardization (ISO)
4. The International Telecommunications Union (ITU)
5. The World Wide Web Consortium (W3C)
Network protocols aren’t only relevant to certified network specialists or IT professionals. Every
time you use the internet, you leverage network protocols. Though you may not know how network
protocols work or how frequently you encounter them, they are necessary for using the internet or
digital communications in any capacity.
NETWORK PROTOCOL

There are thousands of different network protocols, but they all perform one of three primary
actions:
• Communication (Treated in Previous Lectures)
• Network management
• Security

Network Management
Network management protocols define and describe the various procedures needed to effectively
operate a computer network. These protocols affect various devices on a single network —
including computers, routers and servers — to ensure each one, and the network as a whole,
perform optimally.
NETWORK PROTOCOL

The functions of network management protocols include the following:


(1) Connection: These protocols establish and maintain stable connections between different
devices on the same network.

(2) Link aggregation: Link aggregation protocols allow you to combine multiple network connections
into one link between two devices. This works to increase the strength of the connection and helps
sustain the connection should one of the links fail.

(3) Troubleshooting: Troubleshooting protocols allow network administrators to identify errors


affecting the network, evaluate the quality of the network connection, and determine how
administrators can fix any issues.
NETWORK PROTOCOL

Security protocols, also called cryptographic protocols, work to ensure that the network and the
data sent over it are protected from unauthorized users.

Common functions of security network protocols include the following:


(1) Encryption: Encryption protocols protect data and secure areas by requiring users to input a
secret key or password in order to access that information.

(2) Entity Authentication: Entity authentication protocols create a system that requires different
devices or users on a network to verify their identity before accessing secure areas.

(3) Transportation: Transportation security protocols protect data while it is transported from one
network device to another
NETWORK PROTOCOL
Here are a few examples of the most commonly used network protocols:

(1) Hypertext Transfer Protocol (HTTP): This Internet Protocol defines how data is transmitted over
the internet and determines how web servers and browsers should respond to commands. This
protocol (or its secure counterpart, HTTPS) appears at the beginning of various URLs or web
addresses online.

(2) Secure Socket Shell (SSH): This protocol provides secure access to a computer, even if it’s on an
unsecured network. SSH is particularly useful for network administrators who need to manage
different systems remotely.

(3) Short Message Service (SMS): This communications protocol was created to send and receive
text messages over cellular networks. SMS refers exclusively to text-based messages. Pictures,
videos or other media require Multimedia Messaging Service (MMS), an extension of the SMS
protocol.
Routing
Another major protocols, in addition to the previously discussed is the routing protocols however
before we take a look at routing protocols, lets discuss the overview of ROUTING as a concept.

Routing: is a process of selecting path along which the data can be transferred from source to the
destination. Routing is performed by a special device known as a router.

Routing Protocols are the set of defined rules used by the routers to communicate between source
& destination. They do not move the information to the source to a destination, but only update
the routing table that contains the information.

A Router works at the network layer in the OSI model and internet layer in TCP/IP model

A router is a networking device that forwards the packet based on the information available in the
packet header and forwarding table.
Routing
The routing protocols use the metric to determine the best path for the packet delivery. The metric
is the standard of measurement such as hop count, bandwidth, delay, current load on the path, etc.
used by the routing algorithm to determine the optimal path to the destination.

The routing algorithm initializes and maintains the routing table for the process of path
determination.

Routing Metrics and Costs


Routing metrics and costs are used for determining the best route to the destination. The factors
used by the protocols to determine the shortest path, these factors are known as a metric.

Metrics are the network variables used to determine the best route to the destination. For some
protocols use the static metrics means that their value cannot be changed and for some other
routing protocols use the dynamic metrics means that their value can be assigned by the system
administrator.
Routing
The most common metric values are given below:
(1) Hop count: Hop count is defined as a metric that specifies the number of passes through
internetworking devices such as a router, a packet must travel in a route to move from source to the
destination. If the routing protocol considers the hop as a primary metric value, then the path with
the least hop count will be considered as the best path to move from source to the destination.

(2) Delay: It is a time taken by the router to process, queue and transmit a datagram to an interface.
The protocols use this metric to determine the delay values for all the links along the path end-to-
end. The path having the lowest delay value will be considered as the best path.

(3) Bandwidth: The capacity of the link is known as a bandwidth of the link. The bandwidth is
measured in terms of bits per second. The link that has a higher transfer rate like gigabit is
preferred over the link that has the lower capacity like 56 kb.
Routing

(4) Load: Load refers to the degree to which the network resource such as a router or network link
is busy. A Load can be calculated in a variety of ways such as CPU utilization, packets processed per
second. If the traffic increases, then the load value will also be increased. The load value changes
with respect to the change in the traffic.

(5) Reliability: Reliability is a metric factor may be composed of a fixed value. It depends on the
network links, and its value is measured dynamically. Some networks go down more often than
others. After network failure, some network links repaired more easily than other network links.
Any reliability factor can be considered for the assignment of reliability ratings, which are generally
numeric values assigned by the system administrator.
Routing

Types of Routing
Routing can be classified into three categories:
1. Static Routing
2. Default Routing
3. Dynamic Routing
Routing
What is the purpose of Routing Protocols?

Routing protocols are required for the following reasons:

1. Allows optimal path selection


2. Offers loop-free routing
3. Fast convergence
4. Minimize update traffic
5. Easy to configure
6. Adapts to changes
7. Scales to a large size
8. Compatible with existing hosts and routers
9. Supports variable length
Routing
[1] Static Routing Protocols
✓ Static Routing is also known as Nonadaptive Routing.
✓ It is a technique in which the administrator manually adds the routes in a routing table.
✓ In this technique, routing decisions are not made based on the condition or topology of the
networks

Advantages Of Static Routing


Following are the advantages of Static Routing:
(1) No Overhead: It has no overhead on the CPU usage of the router. Therefore, the cheaper router
can be used to obtain static routing.

(2) Bandwidth: It has not bandwidth usage between the routers.

(3) Security: It provides security as the system administrator is allowed only to have control over the
routing to a particular network.
Routing
Disadvantages of Static Routing:
Following are the disadvantages of Static Routing:
1. For a large network, it becomes a very difficult task to add each route manually to the routing
table.
2. The system administrator should have a good knowledge of a topology as he has to add each
route manually.

[2] Default Routing Protocols


Default Routing is a technique in which a router is configured to send all the packets to the same
device, and it doesn't matter whether it belongs to a particular network or not. A Packet is
transmitted to the device for which it is configured in default routing.

Default Routing is used when networks deal with the single exit point.
Routing
[3] Dynamic Routing
✓ It is also known as Adaptive Routing.
✓ It is a technique in which a router adds a new route in the routing table for each packet in
response to the changes in the condition or topology of the network.
✓ Dynamic protocols are used to discover the new routes to reach the destination.
✓ If any route goes down, then the automatic adjustment will be made to reach the destination.

Features of Dynamic protocol:


1. All the routers must have the same dynamic routing protocol in order to exchange the routes.
2. If the router discovers any change in the condition or topology, then router broadcast this
information to all other routers.
Routing

Advantages of Dynamic Routing Protocols:


✓ It is easier to configure even on larger networks.
✓ It is more effective in selecting the best route in response to the changes in the condition or
topology.
✓ It helps you to do load balancing between multiple links.

Disadvantages of Dynamic Routing Protocols :


✓ It is more expensive in terms of CPU and bandwidth usage.
✓ It is less secure as compared to default and static routing.
✓ Updates are shared between routers, so it consumes bandwidth.
Other Routing Protocols
Distance Vector Routing Protocol (DVR)

Internet Routing Protocols: The following are types of protocols which help data packets find their
way across the Internet:
Routing Information Protocol (RIP)
RIP is used in both LAN and WAN Networks. It also runs on the Application layer of the OSI model..
Two versions of RIP are
1. RIPv1
2. RIPv2

Interior Gateway Routing Protocol (IGRP):


IGRP is a subtype of the distance-vector interior gateway protocol developed by CISCO.
Routing
Link State Routing Protocol:
Link State Protocols take a unique approach to search the best routing path.

Routing protocol tables:


Link state routing protocol maintains three tables:
(1) Neighbor table: This table contains information about the neighbors of the router only. For
example, adjacency has been formed.

(2) Topology table: This table stores information about the whole topology. For example, it contains
both the best and backup routes to a particular advertised network.

(3) Routing table: This type of table contains all the best routes to the advertised network.
Routing
Exterior Gateway Protocol (EGP)
EGP is a protocol used to exchange data between gateway hosts that are neighbors with each other
within autonomous systems.

Enhanced Interior Gateway Routing Protocol (EIGRP)


EIGRP is a hybrid routing protocol that provides routing protocols, distance vector, and link-state
routing protocols.

Open Shortest Path First (OSPF)


Open Shortest Path First (OSPF) protocol is a link-state IGP tailor-made for IP networks using the
Shortest Path First (SPF) method.

Border Gateway Protocol (BGP)


is classified as a DPVP (distance path vector protocol). This type of routing protocol sends updated
router table data when changes are made.
Network Addressing
Classful Vs. Classless Routing Protocols
Here are some main difference between these routing protocols:

Classful Routing Protocols Classless Routing Protocols


never send subnet mask detail during routing can send IP subnet mask information while
updates. doing routing updates.
RIPv2, OSPF, EIGRP, and IS-IS are all types of
RIPv1 and IGRP are classful protocols as they
classless routing protocols which has subnet
do not include subnet mask information.
mask information within updates.
TUTORIAL
1. You have been saddled with the responsibility of dividing a single network to two or more
network. Based on your practical understanding and application of concept in this module.
(a) What action will you perform to carry out this task?
(b) Explain the concept behind this action.
(HINT: S10)

2. Explain the following Terms


a. Hop Count
b. Delay
c. Bandwidth
(Hint: S40)
TUTORIAL
3. What is the difference between Port address and service point address (S26)

4. Highlight one major responsibility of ; (S26)


a. The transport layer
b. The network Layer
5. Define the following terms
a. Port Address (S26)
b. Network ID (12)
c. Host ID (12)
d. Subnet ID (11)
e. IP Address (8)
6. List two major services provided by the Transport Layer (S27)
7. Discuss five (5) functions of the Transport layer (S26-S27)
TUTORIAL

8. As a trainee network support engineer, one of your users is currently facing a challenge relating
to accessing files, retrieving and managing other related resources remotely. Which layer of the OSI
model is responsible for this function for proper troubleshooting?
(S31)

9. What is the difference between the presentation layer and the syntax layer (S29)

10. Explain three(3) Functions of the presentation layer (S30)

11. Give two examples of classful and classless protocols each (S51)
TUTORIAL
12. Define the following Terms
1. Cryptographic Protocols
2. Entity Authentication Protocols
3. Transportation Security Protocols
4. Encryption Protocols
(S36)

13. Explain the three (3) commonly used network protocols (S37)

14. How many types of routing metrics do we have? list them. (S39)

15. Explain Nonadaptive Routing in details. (S44)

16. List two(2) major features of the dynamic Protocol (S46)


TUTORIAL
17. You have been commissioned as part of the network team to carry out a project for standard
bank Namibia, one of the requirements is the routing protocol configuration. In a contribution as a
project team member, List five (5) metrics that can determine the best path for the packet delivery.
(S40-41)

18. You just completed a network infrastructure design for MALCOM Foods situated in Outapi,
Namibia. One of the implementation involved routing protocols configuration and the dynamic
routing was deployed, this choice of protocol is being questioned by other professionals. Give
two(2) merits and two (2) demerits to justify this decision. (S47)

19. In the IPv4 addressing format, the number of networks allowed under
Class C addresses is: (A) 214 (B) 27 (C) 221 (B) 224
(S17)
TUTORIAL
20. Convert the following binary to decimal addresses:
TUTORIAL
21a. 21b.
TUTORIAL
22.
TUTORIAL
23.
TUTORIAL
24.
TUTORIAL
25.
TUTORIAL
26.
TUTORIAL
27.
SUMMARY

For any given IP Address,


If the range of first octet is [1, 126], then IP Address belongs to class A.
If the range of first octet is [128, 191], then IP Address belongs to class B.
If the range of first octet is [192, 223], then IP Address belongs to class C.
If the range of first octet is [224, 239], then IP Address belongs to class D.
If the range of first octet is [240, 254], then IP Address belongs to class E.

I wish us all the best as we go through the module


THANK YOU

You might also like