0% found this document useful (0 votes)
21 views83 pages

Lecture 1

Uploaded by

Abc
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views83 pages

Lecture 1

Uploaded by

Abc
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 83

TCN2141 Computer Networks

Trimester: 1 (2022 / 2023)

Coordinator /Lecturer:
Dr. Subarmaniam Kannan

Group CN1

Lecture 1

1
McGraw-Hill © The McGraw-Hill Companies, Inc., 2000
Coursework Marks

Assessment Percentage

Project (Final
40%
Assessment)

Quiz 10%

Mid-term Test 20%

Lab Assignment 30%

1.2
Learning Objectives COURSE Domain
LEARNING Level
OUTCOMES
LO1
Discuss basic networking concepts including
network layers, network devices and network Affective 2
topologies
LO2
Explain the operation of the TCP/IP networks,
including network protocols and routing Cognitive 5
algorithms
LO3
Describe various networking technologies
including Local Area Networks (LANs) and Cognitive 5
Wide Area Networks (WANs)
LO4
Construct basic network topologies for LANs
and WANs Psychomotor 4

1.3
References
 James F Kurose, (2017). Computer Networking, A
top-down approach featuring internet, 7th Edition,
Prentice Hall. ISBN-13: 978-0133594140
 Behrouz Forouzan, (2012). Data Communications
and Networking, 5th Edition. McGraw-Hill
 Tanenbaum, Andrew S., (2010). Computer
Networks, 5th Ed., New Jersey, Prentice Hall.
ISBN: 0-13-038488-7.
 Dougles E. Comer, (2015) Computer Networks
and Internets, 6th Edition, Prentice.

1.4
Lecture 1
Chapter 18

Introduction to
Network Layer

.
Outline

18.1 NETWORK-LAYER SERVICES

18.2 PACKET SWITCHING

18.3 NETWORK-LAYER PERFORMANCE

18.4 IPv4 ADDRESSES

18.5 FORWARDING OF IP PACKETS


Objective
 The first section introduces the network layer by defining the
services provided by this layer. It first discusses packetizing. It
then describes forwarding and routing and compares the two.
The section then briefly explains the other services such as flow,
error, and congestion control.

 The second section discusses packet switching, which occurs at


the network layer. The datagram approach and the virtual-circuit
approach of packet switching are described in some detail in this
section.
 The third section discusses network-layer performance. It
describes different delays that occur in network-layer
communication. It also mentions the issue of packet loss. Finally,
it discusses the issue of congestion control at the network layer.
Objective (continued)
 The fourth section discusses IPv4 addressing, probably the most
important issue in the network layer. It first describes the address
space. It then briefly discusses classful addressing, which
belongs to the past but is useful in understanding classless
addressing. The section then moves to classless addressing and
explains several issues related to this topic. It then discusses
DHCP, which can be used to dynamically assign addresses in an
organization. Finally, the section discusses NAT, which can be
used to relieve the shortage of addresses to some extent.

 The fifth section discusses forwarding of network-layer packets.


It first shows how forwarding can be done based on the
destination address in a packet. It then discusses how forwarding
can be done using a label.
INTRODUCTI
ON

1.9
Interaction between layers in the OSI
Model

10
OSI model and TCP/IP Model

Comput
er
Networ Routing
ks and
Switchin
Data g
Communica
tion LAN, WAN – Updated
TCP/IP High Speed
1.11 Networks
1-4 TCP/IP PROTOCOL SUITE

The layers in the TCP/IP protocol suite do not exactly


match those in the OSI model. The original TCP/IP
protocol suite was defined as having four layers: host-to-
network, internet, transport, and application. However,
when TCP/IP is compared to OSI, we can say that the
TCP/IP protocol suite is made of five layers: physical,
data link, network, transport, and application.
Topics discussed in this section:
Physical and Data Link Layers
Network Layer
Transport Layer
Application Layer
12
SCTP: Stream Control transmission Protocol
Figure 1.16 TCP/IP and OSI model
Combine UDP + TCP 791-804

ICMP: Internet Control Message Protocol


Error Reporting Messages
Query Messages Pg.574-580
IGMP: Internal Group Management Protocol
pg.568-682 manage group membership -
Multicasting
ARP: Address Resolution Protocol-
Broadcast “I have IP add ! MAC add ?” Pg245

13
1-5 ADDRESSING

Four levels of addresses are used in


an internet employing the TCP/IP
protocols:
physical, logical, port, and specific.

pics discussed in this section:


Physical Addresses
Logical Addresses
Port Addresses
Specific Addresses
14
Figure 1.17 Addresses in TCP/IP

MAC Address IP Address 16-bit unsigned Email add


48 bit in Hex 32 bit in binary integer, 0 to Host names
65535

21: File Transfer


Protocol (FTP) 22:
Secure Shell (SSH)
23: Telnet remote login
service
25: Simple Mail
Transfer Protocol
(SMTP)
53: Domain Name
System (DNS)
service 15
Figure 1.18 Relationship of layers and addresses in TCP/IP

16
18-1 NETWORK-LAYER SERVICES

• Before discussing the network layer in the


Internet today, let’s briefly discuss the
network-layer services that, in general, are
expected from a network-layer protocol.

• Figure 18.1 shows the communication


between Alice and Bob at the network
layer. This is the same scenario we used in
Chapters 3 and 9 to show the
communication at the physical and the
data-link layers, respectively.

1.17
Figure 18.1: Communication at the network layer

1.18
18.1.1 Packetizing

The first duty of the network layer is definitely packetizing:


encapsulating the payload in a network-layer packet at the
source and decapsulating the payload from the network-layer
packet at the destination.

In other words, one duty of the network layer is to carry a


payload from the source to the destination without changing it
or using it.

The network layer is doing the service of a carrier such as the


postal office, which is responsible for delivery of packages
from a sender to a receiver without changing or using the
contents.

1.19
1.20
Other duties of the network layer, which are as important as
the first, are routing and forwarding, which are directly related
to each other.

Routers run routing protocols to discover neighbouring routers


and the networks attached to them. These protocols let routers
exchange information about the network topology as it
changes due to new or failed links

1.21
Intermediary devices that connect the networks are called
routers. The role of the router is to select paths for and direct
packets toward their destination. This process is known as
routing.

1.22
Classifying Routing
Protocols Dynamic Routing
Protocols

Interior Gateway Exterior Gateway


Purpose Protocols Protocols
(IGP) (EGP)

Distance Vector Link-State Path-Vector


Operation Routing Protocols Routing Protocols Routing Protocol

RIPv1 IGRP Classful


Behaviour
RIPv2 EIGRP OSPF IS-IS BGP Classless

RIPv1 and IGRP are legacy Link-state routing


protocols that have evolved protocols are classless
into the classless routing by nature.
protocols, RIPv2 and EIGRP.

23
Routing Process and Routing Table
172.16.1.0/24 192.168.1.0/30 192.168.2.0/30 172.16.2.0/24
.1 .1 .2 .2 .1 .1
S0/0/0 S0/0/0 S0/0/1 S0/0/1
G0/0 R1 R2 R3 G0/0

Routing
My 30 seconds are up. update:
I’m sending an update 172.16.0.0
to my RIP neighbor(s).

R2# show ip route | begin Gateway


Gateway of last resort is not set

R 172.16.0.0/16 [120/1] via 192.168.1.1, 00:00:11, Serial0/0/0


192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.1.0/30 is directly connected, Serial0/0/0
L 192.168.1.2/32 is directly connected, Serial0/0/0
192.168.2.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.2.0/30 is directly connected, Serial0/0/1
L 192.168.2.2/32 is directly connected, Serial0/0/1
R2#

24
Forwarding Send the packet
value out of interface 2
B Data B Data

Figure 18.2: Forwarding process

1.25
18.1.3 Other Services

Let us briefly discuss other services expected from


the network layer. (pg. 514-515)

1. Error Control- not directly ; ICMP, Checksum


2. Flow Control
3. Congestion Control- datagram dropped
4. Quality of Services- Real-time communication
5. Security- IPv4 + IPSec

1.26
18-1 NETWORK-LAYER SERVICES

• We discussed the network-layer services that,


in general, are expected from a network-layer
protocol.
18.1.1 Packetizing

Other services expected from the network layer. (pg. 514-515)


1. Error Control- not directly ; ICMP, Checksum
2. Flow Control
3. Congestion Control- datagram dropped
4. Quality of Services- Real-time communication
5. Security- IPv4 + IPSec

1.27
18-2 PACKET SWITCHING

• From the discussion of routing and forwarding in


the previous section, we infer that a kind of
switching occurs at the network layer.

• A router, in fact, is a switch that creates a


connection between an input port and an output
port (or a set of output ports), just as an
electrical switch connects the input to the output
to let electricity flow.

1.28
Types of Switching
Message
Packet switching
Circuit switching
switching is a network
involves
involves switching
setting
splitting up atechnique
information series in
of
into data
which data
intermediate
packets, is nodes,
routed in
transmitted its entirety
order
separatelyto by from
propagatethe source node
the sending
intermediate nodes
to
and the
node's destination
data to thewhen
reassembled node,
theyone
receiving node.
reach hope at aarecipient.
In such
the final time. During
situation, the
message
communicationrouting,lineevery
can intermediate
be likened toswitch in the
a dedicated
network stores the
communication whole message.
pipe.
Switching

Circuit Switching Packet Switching Message Switching

Connection Oriented Connectionless

Virtual circuit Datagram Switching


Switching
18-3 NETWORK-LAYER PERFORMANCE

• The upper-layer protocols that use the service of


the network layer expect to receive an ideal
service, but the network layer is not perfect.

• The performance of a network can be measured


in terms of delay, throughput, and packet loss.

• Congestion control is an issue that can improve


the performance.

1.30
Q4 List four types of delays in a packet-switched
network.
 Four types: transmission delay,
propagation delay, processing delay,
and queuing delay. (pg. 522).
18.3.3 Packet Loss

• Another issue that severely affects the performance of


communication is the number of packets lost during
transmission.
• When a router receives a packet while processing another
packet, the received packet needs to be stored in the input
buffer waiting for its turn.

• A router, however, has an input buffer with a limited size. A


time may come when the buffer is full and the next packet
needs to be dropped.
• The effect of packet loss on the Internet network layer is
that the packet needs to be resent, which in turn may create
overflow and cause more packet loss.

1.32
1.33
18.3.4 Congestion Control

• Congestion control is a mechanism for improving


performance.
• In Chapter 23, we will discuss congestion at the transport
layer.

• Although congestion at the network layer is not explicitly


addressed in the Internet model, the study of congestion at
this layer may help us to better understand the cause of
congestion at the transport layer and find possible remedies
to be used at the network layer.
• Congestion at the network layer is related to two issues,
throughput and delay, which we discussed in the previous
section.

1.34
Figure 18.13. Packet delay and throughput as
functions of load
• When the load is below the capacity of the network, the throughput increases proportionally with

the load.

• We expect the throughput to remain constant after the load reaches the capacity, but instead the

throughput declines sharply.

• The reason is the dis- carding of packets by the routers. When the load exceeds the capacity, the

queue become full and the routers have to discard some packets.

• Discarding packets does not reduce the number of packets in the network because the sources

retransmit the packets, using time-out mechanisms, when the packets do not reach the

destinations.

• When the load is much less than the capacity of the network, the delay is at a

minimum.

• This minimum delay is composed of propagation delay and processing delay, both

of which are negligible.

• However, when the load reaches the network capacity, the delay increases sharply

because we now need to add the queuing delay to the total delay.

1.35 • Note that the delay becomes infinite when the load is greater than the capacity.
Congestion Control

Congestion control refers to techniques and mechanisms


that can either prevent congestion before it happens or
remove congestion after it has happened.
In general, we can divide congestion control mechanisms
into two broad categories:

a. Open-loop congestion control (prevention) and


b. Closed-loop congestion control (removal).

1.36
(prevention) (removal).

1.37
Open-loop congestion control (prevention)
Retransmission Policy

If the sender feels that a sent packet is lost or corrupted, the packet needs to be

retransmitted. Retransmission in general may increase congestion in the

network. However, a good retransmission policy can prevent congestion. The

retransmission policy and the retransmission timers must be designed to

optimize efficiency and at the same time prevent congestion.

Window Policy The type of window at the sender may also affect congestion.

The Selective Repeat window is better than the Go-Back-N window for

congestion control. In the Go-Back-N window, when the timer for a packet times

out, several packets may be resent, although some may have arrived safe and

sound at the receiver. This duplication may make the congestion worse. The

Selective Repeat window, on the other hand, tries to send the specific packets

that have been lost or corrupted.


1.38
1.39
Discarding Policy

A good discarding policy by the routers may prevent congestion and at the

same time may not harm the integrity of the transmission. For example, in

audio transmission, if the policy is to discard less sensitive packets when

congestion is likely to happen, the quality of sound is still preserved and

congestion is prevented or alleviated.

Admission Policy An admission policy, which is a quality-of-service

mechanism, can also prevent congestion in virtual-circuit networks.

Switches in a flow first check the resource requirement of a flow before

admitting it to the network. A router can deny establishing a virtual-circuit


1.40 connection if there is congestion in the network or if there is a possibility of
Admission Policy An admission policy, which is a quality-of-service mechanism

1.41
Closed-loop congestion control (removal)
Techniques

Figure 18.14: Backpressure method for alleviating


congestion

The technique of backpressure refers to a congestion control mechanism

in which a congested node stops receiving data from the immediate

upstream node or nodes. This may cause the upstream node or nodes to

become congested, and they, in turn, reject data from their upstream

node or nodes, and so on. Backpressure is a node- to-node congestion

control that starts with a node and propagates, in the opposite direction

of data flow, to the source. The backpressure technique can be applied


1.42
Figure 4.15: Choke packet

A choke packet is used in network maintenance and quality


management to inform a specific node or transmitter that its
transmitted traffic is creating congestion over the network. This
forces the node or transmitter to reduce its output rate.

Choke packets are used for congestion and flow control over a
network. The source node is addressed directly by the router,
forcing it to decrease its sending rate .The source node
acknowledges this by reducing the sending rate by some
percentage.

An Internet Control Message Protocol (ICMP) source quench packet


1.43 is a type of choke packet normally used by routers.
https://www.techopedia.com/definition/3763/choke-packet
Implicit signaling

In implicit signaling, there is no communication between the congested node or

nodes and the source. The source guesses that there is congestion somewhere in

the network from other symptoms. For example, when a source sends several

packets and there is no acknowledgment for a while, one assumption is that the

network is congested. The delay in receiving an acknowledgment is interpreted

as congestion in the network; the source should slow down.

Explicit Signaling The node that experiences congestion can explicitly send a

signal to the source or destination. The explicit-signaling method, however, is

different from the choke-packet method. In the choke-packet method, a separate

packet is used for this purpose; in the explicit-signaling method, the signal is

1.44included in the packets that carry data (Piggybacking). Explicit signaling can
18-4 IPv4 ADDRESSES

• The identifier used in the IP layer of the


TCP/IP protocol suite to identify the
connection of each device to the Internet
is called the Internet address or IP
address.

• An IPv4 address is a 32-bit address that


uniquely and universally defines the
connection of a host or a router to the
Internet.

1.45 • The IP address is the address of the


18.4.1 Address Space
• A protocol like IPv4 that defines addresses has an
address space. An address space is the total
number of addresses used by the protocol.

• If a protocol uses b bits to define an address, the


address space is 2b because each bit can have two
different values (0 or 1).

• IPv4 uses 32-bit addresses, which means that the


address space is 232 or 4,294,967,296 (more than
four billion). If there were no restrictions, more
than 4 billion devices could be connected to the
Internet.
1.46
Figure 18.16: Three different notations in IPv4
addressing

1.47
Figure 18.17: Hierarchy in addressing

1.48
18.4.2 Classful Addressing

• When the Internet started, an IPv4 address was


designed with a fixed-length prefix, but to
accommodate both small and large networks, three
fixed-length prefixes were designed instead of one
(n = 8, n = 16, and n = 24).
• The whole address space was divided into five
classes (class A, B, C, D, and E), as shown in
Figure 18.18.
• This scheme is referred to as classful addressing.
• Although classful addressing belongs to the past, it
helps us to understand classless addressing,
discussed later.
1.49
Figure 18.18: Occupation of the address space in classful
addressing

1.50
18.4.3 Classless Addressing
With the growth of the Internet, it was clear that a larger
address space was needed as a long-term solution.

The larger address space, however, requires that the length of


IP addresses also be increased, which means the format of the
IP packets needs to be changed.

Although the long-range solution has already been devised and


is called IPv6, a short-term solution was also devised to use the
same address space but to change the distribution of addresses
to provide a fair share to each organization.

The short-term solution still uses IPv4 addresses, but it is


called classless addressing.

1.51
Subnetting and Supernetting

To alleviate address depletion, two strategies were proposed and,

toInsome extent,aimplemented:
subnetting, subnetting
class A or class and
B block or supernetting.
class C block is divided

into several subnets. Each subnet has a larger prefix length than

the original network

1.52
While subnetting was devised to divide a large block into smaller ones,
Supernetting was devised to combine several class C blocks into a larger
block.
A supernetwork, or supernet, is an Internet Protocol (IP) network that is
formed from the combination of two or more networks (or subnets) with a
common Classless Inter-Domain Routing (CIDR) prefix. The new routing
prefix for the combined network aggregates the prefixes of the constituent
network.

1.53
Figure 18.24: Example of address aggregation

Supernetting

1.54
Four Subnetting Steps

• To correctly subnet a given network


address into subnet addresses, ask
yourself the following questions:
1. How many bits do I need to borrow?
2. What’s the subnet mask?
3. What’s the “magic number” or multiplier?
4. What are the first three subnetwork
addresses?
• Let’s look at each of these questions in
detail
Logical Addressing
 At the network layer, we use logical, hierarchical
addressing.
 With Internet Protocol (IP), this address is a 32-bit
addressing scheme divided into four octets.
 Do you remember the classes 1st octet’s value?
 Class A: 1 - 126

 Class B: 128 - 191

 Class C: 192 - 223

 Class D: 224 - 239 (multicasting)

 Class E: 240 - 255 (experimental)


Network vs. Host
Class A: 27 = 126 networks; 224 > 16 million
hosts
N H H H

Class B : 214 = 16,384 networks; 216 > 65,534


hosts
N N H H

Class C : 221 > 2 million networks; 28 = 254


hosts
N N N H
 IP Address : 193.16.2.0
 Address Class : C FORMULA: TB= BB + BL
Question:
8 = 23 + 25 -2
 Network Address : 193.16.2.0
Need 5 subnet
23 = 8 subnets
25 -2 = 32 -2 = 30 hosts
 Subnet Address : 193.16.2.0
per subnet
 Subnet Mask : 255.255.255.224
 Subnet bit mask :
110nnnnn.nnnnnnnn.nnnnnnnn.ssshhhhh
CIDR: /27
 Subnet Bits : 27 TB = BB = BL
 Host Bits :5 32 = 27 + 5
 27 – 24
Possible Number of Subnets : = 3 bits borrowed
8
23 = 8 subnets
 Hosts per Subnet : 30 32 – 27 = 5 bit left
25 – 2 = 32 -2 = 30 host per
58
subnet
IP Address : 185.75.0.0
Address Class : B
Network Address : 185.75.0.0

Subnet Address : 185.75.0.0


Subnet Mask : 255.255.255.128
Subnet bit mask : 10nnnnnn.nnnnnnnn.ssssssss.shhhhhhh
Subnet Bits : 25
Host Bits :7
Possible Number of Subnets : 512
Hosts per Subnet : 126

59
# Subnet Mask Host Range Broadcast
1 185.75.0.0 255.255.255.128 185.75.0.1 to 185.75.0.126 185.75.0.127
2 185.75.0.128 255.255.255.128 185.75.0.129 to 185.75.0.254 185.75.0.255
3 185.75.1.0 255.255.255.128 185.75.1.1 to 185.75.1.126 185.75.1.127
4 185.75.1.128 255.255.255.128 185.75.1.129 to 185.75.1.254 185.75.1.255
5 185.75.2.0 255.255.255.128 185.75.2.1 to 185.75.2.126 185.75.2.127
6 185.75.2.128 255.255.255.128 185.75.2.129 to 185.75.2.254 185.75.2.255
7 185.75.3.0 255.255.255.128 185.75.3.1 to 185.75.3.126 185.75.3.127
8 185.75.3.128 255.255.255.128 185.75.3.129 to 185.75.3.254 185.75.3.255
9 185.75.4.0 255.255.255.128 185.75.4.1 to 185.75.4.126 185.75.4.127
10 185.75.4.128 255.255.255.128 185.75.4.129 to 185.75.4.254 185.75.4.255
11 185.75.5.0 255.255.255.128 185.75.5.1 to 185.75.5.126 185.75.5.127
12 185.75.5.128 255.255.255.128 185.75.5.129 to 185.75.5.254 185.75.5.255
13 185.75.6.0 255.255.255.128 185.75.6.1 to 185.75.6.126 185.75.6.127
14 185.75.6.128 255.255.255.128 185.75.6.129 to 185.75.6.254 185.75.6.255
15 185.75.7.0 255.255.255.128 185.75.7.1 to 185.75.7.126 185.75.7.127
16 185.75.7.128 255.255.255.128 185.75.7.129 to 185.75.7.254 185.75.7.255
17 185.75.8.0 255.255.255.128 185.75.8.1 to 185.75.8.126 185.75.8.127
18 185.75.8.128 255.255.255.128 185.75.8.129 to 185.75.8.254 185.75.8.255
19 185.75.9.0 255.255.255.128 185.75.9.1 to 185.75.9.126 185.75.9.127
20 185.75.9.128 255.255.255.128 185.75.9.129 to 185.75.9.254 185.75.9.255

60
Subnet Mask Host Range Broadcast
193.16.2.0 255.255.255.224
193.16.2.1 to 193.16.2.30 193.16.2.31
193.16.2.32 255.255.255.224
193.16.2.33 to 193.16.2.62 193.16.2.63
193.16.2.64 255.255.255.224
193.16.2.65 to 193.16.2.94 193.16.2.95
193.16.2.96 255.255.255.224
193.16.2.97 to 193.16.2.126 193.16.2.127
193.16.2.128 255.255.255.224
193.16.2.129 to 193.16.2.158 193.16.2.159
193.16.2.160 255.255.255.224
193.16.2.161 to 193.16.2.190 193.16.2.191
193.16.2.192 255.255.255.224
193.16.2.193 to 193.16.2.222 193.16.2.223
193.16.2.224 255.255.255.224
193.16.2.225 to 193.16.2.254 193.16.2.255

61
CIDR Notation
A Different Way to Represent a Subnet
Mask

McGraw-Hill © The McGraw-Hill Companies, Inc., 2000


CIDR Notation
• Classless Interdomain Routing is a method of
representing an IP address and its subnet
mask with a prefix.
• For example: 192.168.50.0/27
• What do you think the 27 tells you?
– 27 is the number of 1 bits in the subnet

mask. Therefore, 255.255.255.224


– Also, you know 192 is a Class C, so we

borrowed 3 bits!!
– Finally, you know the magic number is 256 -

224 = 32, so the 2nd subnet address is


197.168.50.32!!
• Let’s see the power of CIDR notation.
202.151.37.0/26
 Subnet mask?
 255.255.255.192
 Bits borrowed?
 Class C so 2 bits borrowed
 Magic Number?
 256 - 192 = 64
 2nd subnet address?
 202.151.37.64
 3rd subnet address?
 so 202.151.37.128
198.53.67.0/30
 Subnet mask?
 255.255.255.252
 Bits borrowed?
 Class C so 6 bits borrowed
 Magic Number?
 256 - 252 = 4
 3rd subnet address?
 4 + 4 = 8, so 198.53.67.8
 2nd subnet’s broadcast address?
 4 + 4 - 1 = 7, so 198.53.67.7
200.39.89.0/28
 What kind of address is 200.39.89.0?
 Class C, so 4 bits borrowed
 Last non-zero octet is 240
 Magic number is 256 - 240 = 16
 32 is a multiple of 16 so 200.39.89.32 is a
subnet address--the 3rd subnet address!!
 What’s the broadcast address of
200.39.89.32?
 32 + 16 -1 = 47, so 200.39.89.47
194.53.45.0/29
 What kind of address is 194.53.45.26?
 Class C, so 5 bits borrowed
 Last non-zero octet is 248
 Magic number is 256 - 248 = 8
 Subnets are 0. 8, .16, .24, .32, ect.
 So 194.53.45.26 belongs to the 4th subnet
address (194.53.45.24) and is a host
address.
 What broadcast address would this host
use to communicate with other devices
on the same subnet?
 It belongs to .24 and the next is .32, so 1
less is .31 (194.53.45.31)
No Worksheet Needed!
 After some practice, you should never
need a subnetting worksheet again.
 The only information you need is the IP
address and the CIDR notation.
 For example, the address 221.39.50/26
 You can quickly determine that the 2nd
subnet address is 221.39.50.0 How?
 Class C, 2 bits borrowed
 256 - 192 = 64, so 221.39.50.64
 For the rest of the addresses, just do
multiples of 64 (.0 .64, .128, .192).
The Key!!
 MEMORIZE THIS TABLE!!!
Bits Non-Zero
Borrowed Octet Hosts
2 192 62
3 224 30
4 240 14
5 248 6
6 252 2
Classful and Classless Addressing
Classful Addressing

Classful addressing means that we are using default


Classes.

Class A 255.0.0.0
Class B 255.255.0.0
Class C 255.255.255.0

The subnet mask for default classes is standard.

So no need of sending subnet mask along with IP address.


So the Router only need to check first 2 bits of
first octet of an IP address for applying the
subnet mask…..

If first two bits = 00  Class A


10  Class B
110  Class C
Classless Addressing

If you are using any other mask other than /8, /16, and /24 ,then
it is called Classless IP addressing.

In the case of a Classless addressing, we have to


send subnet mask along with IP address.

Otherwise it will not work . . .


Classless Addressing

Total Bits = Bit borrowed + Bit Left (TB=BB+BL)

 No of subnet = 2borrowed bits

VLSM more focused on


 No of host per subnet = 2Left bits - 2
Same Size Subnets

 So far, every subnet was the same size and all accommodated the
same number of hosts.
 If all the subnets have the same requirements for the number of
hosts, these fixed size address blocks would be efficient.
 However, that’s rarely the case.

Point-to-point link Point-to-point link Point-to-point link

 For example, how many subnets are required?


 7 subnets of varying size.

75
Same Size Subnets = Wasted Addresses
 To meet the host requirement of the largest LAN we could borrow 3
bits (/27) to create 8 subnets of 30 hosts each.
 But it also wastes addresses on the point-to-point links and limits
future growth by reducing the total number of subnets available.

Point-to-point link Point-to-point link Point-to-point link

 Solution:
 “Subnet a subnet” using Variable Length Subnet Mask
(VLSM).

76
Before VLSM

 In all previous subnetting examples, the same subnet mask was


applied for all the subnets.

 For example, a 255.255.255.224 (/27) mask creates 8 of 30 hosts


each:

77
With VLSM

 VLSM allows a network space to be divided in unequal parts.

 With VLSM the subnet mask will vary depending on how many bits
have been borrowed for a particular subnet, thus the “variable” part
of the VLSM.

78
With VLSM

 VLSM subnetting is similar to traditional subnetting.


 Bits are still borrowed to create subnets.
 The formulas to calculate the number of hosts per subnet and
the number of subnets created still apply.

 The difference is that subnetting is not a single pass activity.


 With VLSM, the network is first subnetted, and then the subnets
are subnetted again.
 This process can be repeated multiple times to create subnets of
various sizes.

79
Variable-Length Subnet Masks (VLSM)

 In 1987, RFC 1009 specified how a subnetted network could use


more than one subnet mask.

 VLSM = Subnetting a Subnet

 “If you know how to subnet, you can do VLSM!”

80
Variable-Length Subnet Masks (VLSM)

 VLSM enables a network number to be configured with different


subnet masks on different interfaces.
 Subnet an already subnetted network address.
 Conserves IP addresses.
 More efficient use of available address space.

 Allows for more hierarchical levels within an addressing plan.


 Allows for better route summarization.

81
VLSM Example
 The four LANs in our previous example can be accommodated
using a /27 subnet mask.

 This would create subnets with increments of 32, therefore:


Building A
 Building A: 192.168.20.0 /27 192.168.20.0/27
.224 - 255 .0 - .31

 Building B: 192.168.20.32 /27 Building B


.32 - .63
 Building C: 192.168.20.64 /27 192.168.20.32/27

.192 - 223
 Building D: 192.168.20.96 /27
.64 - 95
.160 - 191
Building C
192.168.20.64/27
 This leaves four /27 subnets. .128 - 159 .96 - .127

Building D
192.168.20.96/27
82
VLSM Example
 The WAN interfaces of the routers are assigned the IP addresses
and mask for the /30 subnets (2 hosts).

 In this example, the last subnet is subnetted into /30 subnets to


accommodate WAN interfaces: Building A
192.168.20.0/27

 R1 to R2: 192.168.20.224 /30


Building B
 R2 to R3: 192.168.20.228 /30 192.168.20.32/27

 R3 to R4: 192.168.20.232 /30

Building C
 This leaves 3 /27 and five /30 subnets. 192.168.20.64/27

Building D
192.168.20.96/27
83

You might also like