0% found this document useful (0 votes)
22 views

Unit 3

The document discusses topics related to computer networks including network layer design issues, routing algorithms, congestion control, quality of service, IPv4, IPv6, network layer protocols like ARP, RARP, ICMP, IGMP and DHCP. It also covers routing techniques, forwarding process, intra-domain and inter-domain routing, static and dynamic routing.

Uploaded by

carrot officer
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views

Unit 3

The document discusses topics related to computer networks including network layer design issues, routing algorithms, congestion control, quality of service, IPv4, IPv6, network layer protocols like ARP, RARP, ICMP, IGMP and DHCP. It also covers routing techniques, forwarding process, intra-domain and inter-domain routing, static and dynamic routing.

Uploaded by

carrot officer
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 220

20CSC21

DATA COMMUNICATION AND


COMPUTER NETWORKS

1 Pallati Narsimhulu
Assistant Professor, Dept. of CSE
UNIT III
 Network layer
 Network layer design issues,
 Routing algorithms,
 Congestion control algorithms,
 Quality of service,
 Ipv4, ipv6,
 Network layer protocols:
 ARP,
 RARP,

 ICMP,

 IGMP and

 DHCP.

2
NETWORK LAYER DESIGN ISSUES &
ROUTING ALGORITHMS
 Forwarding Techniques
 Forwarding Process
 Intra domain and Inter-domain Routing
 Static and Dynamic Routing
 Distance Vector Routing
 Link State Routing
 Path Vector Routing
 RIPv1
 RIPv2
 OSPF
 EIGRP
 BGP 3
DELIVERY
 The network layer supervises the handling of the packets
by the underlying physical networks.
 We define this handling as the delivery of a packet.

 Direct Versus Indirect Delivery

4
DIRECT AND INDIRECT DELIVERY

5
FORWARDING
 Forwarding means to place the packet in its route to its
destination. Forwarding requires a host or a router to
have a routing table.
 When a host has a packet to send or when a router has
received a packet to be forwarded, it looks at this table
to find the route to the final destination.
 Topics discussed in this section
 Forwarding Techniques
 Forwarding Process
 Routing Table

6
ROUTE METHOD VERSUS NEXT-HOP
METHOD

7
HOST-SPECIFIC VERSUS NETWORK-SPECIFIC METHOD

8
DEFAULT METHOD

9
SIMPLIFIED FORWARDING MODULE IN CLASSLESS
ADDRESS

Note

In classless addressing, we need at least four columns in a


routing table.

10
MAKE A ROUTING TABLE FOR ROUTER R1, USING THE
CONFIGURATION BELOW

11
SHOW THE FORWARDING PROCESS IF A PACKET ARRIVES AT R1
IN SLIDE 11 WITH THE DESTINATION ADDRESS 180.70.65.140.

 Solution
 The router performs the following steps:

 1. The first mask (/26) is applied to the destination


address.
The result is 180.70.65.128, which does not match the
corresponding network address.
 2. The second mask (/25) is applied to the destination
address. The result is 180.70.65.128, which matches the
corresponding network address. The next-hop address
and the interface number m0 are passed to ARP for
further processing.
12
SHOW THE FORWARDING PROCESS IF A PACKET ARRIVES AT
R1 IN SLIDE 11 WITH THE DESTINATION ADDRESS 201.4.22.35.

 Solution: The router performs the following steps:


 1. The first mask (/26) is applied to the destination
address. The result is 201.4.22.0, which does not
match the corresponding network address.
 2. The second mask (/25) is applied to the destination
address. The result is 201.4.22.0, which does not match
the corresponding network address (row 2).
 3. The third mask (/24) is applied to the destination
address. The result is 201.4.22.0, which matches the
corresponding network address. The destination
address of the packet and the interface number m3
13
are passed to ARP.
SHOW THE FORWARDING PROCESS IF A PACKET ARRIVES AT
R1 IN SLIDE 11 WITH THE DESTINATION ADDRESS 18.24.32.78.

 Solution
 This time all masks are applied, one by one, to the
destination address, but no matching network address is
found.
 When it reaches the end of the table, the module gives
the next-hop address 180.70.65.200 and interface
number m2 to ARP.
 This is probably an outgoing package that needs to be
sent, via the default router, to someplace else in the
Internet.
14
ADDRESS AGGREGATION

15
 As an example of hierarchical routing, let us consider figure in
slide 18.
 A regional ISP is granted 16,384 addresses starting from
120.14.64.0.
 The regional ISP has decided to divide this block into four sub-
blocks, each with 4096 addresses.
 Three of these sub-blocks are assigned to three local ISPs; the
second sub-block is reserved for future use.
 Note that the mask for each block is /20 because the original block
with mask /18 is divided into 4 blocks.
 The first local ISP has divided its assigned sub-block into 8
smaller blocks and assigned each to a small ISP. Each small
ISP provides services to 128 households, each using four
addresses.
16
 The second local ISP has divided its block into 4 blocks and
has assigned the addresses to four large organizations.
 The third local ISP has divided its block into 16 blocks and
assigned each block to a small organization. Each small
organization has 256 addresses, and the mask is /24.
 There is a sense of hierarchy in this configuration.

 All routers in the Internet send a packet with destination


address 120.14.64.0 to 120.14.127.255 to the regional ISP.

17
HIERARCHICAL ROUTING WITH ISPS

18
COMMON FIELDS IN A ROUTING TABLE

19
Example

 One utility that can be used to find the contents of a routing table
for a host or router is netstat in UNIX or LINUX.
 The next slide shows the list of the contents of a default server.
We have used two options, r and n.
 The option r indicates that we are interested in the routing table,
and the option n indicates that we are looking for numeric
addresses.
 Note that this is a routing table for a host, not a router.
 Although we discussed the routing table for a router throughout this
chapter, a host also needs a routing table.

20
Example Contd…

 More information about the IP address and physical address


of the server can be found by using the ifconfig command on
the given interface (eth0).

21
CONFIGURATION OF THE SERVER FOR THE
PREVIOUSLY DISCUSSED EXAMPLE

22
UNICAST ROUTING PROTOCOLS

 A routing table can be either static or dynamic.


 A static table is one with manual entries.

 A dynamic table is one that is updated automatically


when there is a change somewhere in the Internet.
 A routing protocol is a combination of rules and
procedures that lets routers in the Internet inform each
other of changes.

23
UNICAST ROUTING PROTOCOLS

Optimization
Intra- and Inter-domain routing
Distance Vector Routing and RIP
Link State Routing and OSPF
Path Vector Routing and BGP

24
AUTONOMOUS SYSTEMS

25
POPULAR ROUTING PROTOCOLS

26
DISTANCE VECTOR ROUTING TABLES

27
INITIALIZATION OF TABLES IN DISTANCE VECTOR ROUTING

28
NOTE

 Indistance vector routing, each node shares its


routing table with its immediate neighbors
periodically and when there is a change.

29
UPDATING IN DISTANCE VECTOR ROUTING

30
TWO-NODE INSTABILITY

31
THREE-NODE INSTABILITY

32
EXAMPLE OF A DOMAIN USING RIP

NOTE: The distance is defined as the number of links (networks) to reach the
destination. For this reason, the metric in RIP is called a hop count. Infinity is
defined as 16, which means that any route in an autonomous system using
RIP cannot have more than 15 hops.
33
CONCEPT OF LINK STATE ROUTING

34
LINK STATE KNOWLEDGE

35
DIJKSTRA ALGORITHM

36
EXAMPLE OF FORMATION OF SHORTEST
PATH TREE

Routing table for node A

37
AREAS IN AN AUTONOMOUS SYSTEM

38
TYPES OF LINKS

39
POINT-TO-POINT LINK

40
TRANSIENT LINK

41
STUB LINK

42
EXAMPLE OF AN AS AND ITS GRAPHICAL
REPRESENTATION IN OSPF

43
INITIAL ROUTING TABLES IN PATH VECTOR ROUTING

44
STABILIZED TABLES FOR THREE AUTONOMOUS SYSTEMS

45
INTERNAL AND EXTERNAL BGP SESSIONS

46
CONGESTION CONTROL AND
QUALITY OF SERVICE
 DATA TRAFFIC

 The main focus of congestion control and quality


of service is data traffic.
 In congestion control we try to avoid traffic
congestion. In quality of service, we try to create
an appropriate environment for the traffic.
 So, before talking about congestion control and
quality of service, we discuss the data traffic itself.

47
TRAFFIC DESCRIPTORS

48
THREE TRAFFIC PROFILES

49
CONGESTION
 Congestion in a network may occur if the load on the
network —the number of packets sent to the network —is
greater than the capacity of the network —the number of
packets a network can handle.
 Congestion control refers to the mechanisms and
techniques to control the congestion and keep the load
below the capacity.

50
CONGESTION CONTROL
INTRODUCTION
 When too many packets are present in (a part of) the subnet, performance
degrades. This situation is called congestion.
 As traffic increases too far, the routers are no longer able to cope and they
begin losing packets.
 At very high traffic, performance collapses completely and almost no
packets are delivered.
 Reasons of Congestion:
 Slow Processors.
 High stream of packets sent from one of the sender.
 Insufficient memory.
 High memory of Routers also add to congestion as becomes un manageable and
un accessible. (Nagle, 1987).
 Low bandwidth lines.

 Then what is congestion control? Congestion control has to do with


making sure the subnet is able to carry the offered traffic.
 Congestion control and flow control are often confused but both helps 51
reduce congestion.
GENERAL PRINCIPLES OF CONGESTION CONTROL

 Three step approach to apply congestion control:


 Monitor the system .
 Detect when and where congestion occurs.
 Pass information to where action can be taken.
 Adjust system operation to correct the problem.

 How to monitor the subnet for congestion.


 Percentage of all packets discarded for lack of buffer space,
 Average queue lengths,
 Number of packets that time out and are retransmitted,
 Average packet delay
 Standard deviation of packet delay (jitter control).

52
 Knowledge of congestion will cause the hosts to take
appropriate action to reduce the congestion.
 For a scheme to work correctly, the time scale must be
adjusted carefully.
 If every time two packets arrive in a row, a router shouts
STOP and every time a router is idle for 20 µsec, it yells GO,
the system will oscillate wildly and never converge.
 Dividing all algorithms into

 open loop or
 closed loop
 They further divide the open loop algorithms into ones that
act at the source versus ones that act at the destination.

53
 The closed loop algorithms are also divided into two
subcategories:
 (i) Explicit feedback and (ii) Implicit feedback.
 In explicit feedback algorithms, packets are sent back from
the point of congestion to warn the source.
 In implicit algorithms, the source deduces the existence of
congestion by making local observations, such as the time
needed for acknowledgements to come back.
 The presence of congestion means that the load is
(temporarily) greater than the resources can handle.
 Solution?
 increase the resources or
 decrease the load.
 That is not always possible. So we have to apply some
54
congestion prevention policy.
QUEUES IN A ROUTER

55
PACKET DELAY AND THROUGHPUT AS
FUNCTIONS OF LOAD

56
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: open-loop congestion control
(prevention) and closed-loop congestion control
(removal).
 Open-Loop Congestion Control

 Closed-Loop Congestion Control

57
CONGESTION CONTROL CATEGORIES

58
WARNING BIT OR BACKPRESSURE:

 DECNET(Digital Equipment Corporation to connect mini


computers) architecture signaled the warning state by setting
a special bit in the packet's header.
 The source then cut back on traffic.

 The source monitored the fraction of acknowledgements


with the bit set and adjusted its transmission rate
accordingly.
 As long as the warning bits continued to flow in, the source
continued to decrease its transmission rate. When they
slowed to a trickle, it increased its transmission rate.
 Disadvantage: Note that since every router along the path
could set the warning bit, traffic increased only when no 59
router was in trouble.
BACKPRESSURE METHOD FOR
ALLEVIATING CONGESTION

60
CHOKE PACKETS
 The router sends a choke packet back to the source host, giving it the
destination found on the path.
 The original packet is tagged (a header bit is turned on) so that it will
not generate any more choke packets farther along the path and is then
forwarded in the usual way.
 When the source host gets the choke packet, it is required to reduce the
traffic sent to the specified destination by X percent.
 See next figure, flow starts reducing from step 5.

 Reduction from 25% to 50% to 75% and so on.

 Router maintains threshold. And based on it gives


 Mild Warning
 Stern Warning
 Ultimatum.
 Variation: Use queue length or buffers instead of line utilization as 61
trigger signal. This will reduce traffic. Chocks also increase traffic.
CHOKE PACKET

62
CONGESTION PREVENTION POLICIES

63
 Systems are designed to minimize congestion in the first
place, rather than letting it happen and reacting after the fact.
1. Data Link Layer:
 The retransmission policy is concerned with how fast a sender times
out and retransmits. A jumpy sender that times out quickly and
retransmits all outstanding packets using go back n will put a
heavier load on the system than will a leisurely sender that uses
selective repeat.
 Out of order packets management depends upon buffering policy. If
receivers routinely discard all out-of-order packets, these packets
will have to be transmitted again later, creating extra load i.e prefer
selective repeat instead of GoBackN.
 Acknowledgement packets generate extra traffic. Solution?
Piggyback.
 Flow Control: Tight Flow and Loose Flow. Tight flow means
smaller windows protocols, reduces data rate, helps fight
64
congestion.
2. Network Layer:
 Choice between using virtual circuits and using datagram's affects
congestion since many congestion control algorithms work only
with virtual-circuit subnets.
 Packet queuing and service policy relates to whether routers have
one queue per input line, one queue per output line, or both.
round robin or priority based?
 Discard policy is the rule telling which packet is dropped when
there is no space.
 Routing policy we have already discussed a lot upon.
 Packet lifetime management deals with how long a packet may
live before being discarded.
3. Transport Layer:
 Same issues occur as in the data link layer
 If the timeout interval is too short, extra packets will be sent
unnecessarily. If it is too long, congestion will be reduced but the 65
response time will suffer whenever a packet is lost.
TWO EXAMPLES
 To better understand the concept of congestion control,
let us give two examples: one in TCP and the other in
Frame Relay.
 Congestion Control in TCP

 Congestion Control in Frame Relay

66
SLOW START, EXPONENTIAL INCREASE

67
Note

In the slow-start algorithm, the size of


the congestion window increases
exponentially until it reaches a
threshold.

68
CONGESTION AVOIDANCE, ADDITIVE
INCREASE

69
Note

In the congestion avoidance algorithm,


the size of the congestion window
increases additively until
congestion is detected.

70
TCP CONGESTION POLICY SUMMARY

71
CONGESTION EXAMPLE

72
BACKWARD EXPLICIT CONGESTION NOTIFICATION (BECN) 

Alert sent to the sender of Frame Relay traffic to indicate that congestion has been
detected; it is the sender’s responsibility to implement congestion voidance procedures.

73
FORWARD EXPLICIT CONGESTION NOTIFICATION (FECN) 

FECN is a networking function that is added to a received frame and lets


the receiver know that congestion is occurring. Although the problem is the
sender’s responsibility, the receiver can inform the sender to implement
congestion avoidance procedures.
74
FOUR CASES OF CONGESTION

75
QUALITY OF SERVICE
 Quality of service (QoS) is an internetworking issue that
has been discussed more than defined.
 We can informally define quality of service as something
a flow seeks to attain.
 Flow Characteristics

 Flow Classes

76
FLOW CHARACTERISTICS

77
TECHNIQUES TO IMPROVE QOS
 Four common methods:
 Scheduling,

 Traffic shaping,

 Admission control, and

 Resource reservation.

78
SCHEDULING

Scheduling

Priority Weighted
FIFO RED
Queue Fair Queue

79
FIFO QUEUE

80
PRIORITY QUEUING

81
WEIGHTED FAIR QUEUING

82
RANDOM EARLY DETECTION
 It is the idea of discarding packets before all the buffer space is really
exhausted.
 A popular algorithm for doing this is called RED (Random Early Detection)
(Floyd and Jacobson, 1993).
 Response to lost packets is the source to slow down.
 Lost packets are mostly due to buffer overruns rather than transmission errors.
 The idea is that there is time for action to be taken before it is too late.
 To determine when to start discarding? For this, routers maintain a running
average of their queue lengths.
 When the average queue length on some line exceeds a threshold, the line is
said to be congested and action is taken.
 How should the router tell the source about the problem?
 One way is to send it a choke packet.
 Other option? Just discard the selected packet and don’t report even.
 Source will eventually notice lack of Ack and takes action. 83
 Thus, slowing down instead of trying harder.
TRAFFIC SHAPING

Traffic Shaping

Leaky Bucket Token Bucket

84
LEAKY BUCKET
 The leaky bucket takes data and collects it up to a
maximum capacity.
 Data in the bucket is only released from the bucket at a set
rate and size of packet.
 When the bucket runs out of data, the leaking stops.

 If incoming data would overfill the bucket, then the packet


is considered to be non-conformant and is not added to
the bucket.
 Data is added to the bucket as space becomes available
for conforming packets.
 The leaky bucket algorithm can also detect both gradually
increasing and dramatic memory error increases by
comparing how the average and peak data rates exceed 85
set acceptable background amounts.
LEAKY BUCKET

86
LEAKY BUCKET IMPLEMENTATION

A leaky bucket algorithm shapes bursty traffic into fixed-rate


traffic by averaging the data rate. It may drop the packets if the
bucket is full.
The token bucket allows bursty traffic at a regulated maximum
rate.
87
TOKEN BUCKET
 The leaky bucket algorithm enforces output patterns at the
average rate, no matter how busy the traffic is. So, to deal
with the more traffic, we need a flexible algorithm so that the
data is not lost. One such approach is the token bucket
algorithm.
 Let us understand this algorithm step wise as given below −

• Step 1 − In regular intervals tokens are thrown into the


bucket f.
• Step 2 − The bucket has a maximum capacity f.

• Step 3 − If the packet is ready, then a token is removed from


the bucket, and the packet is sent.
• Step 4 − Suppose, if there is no token in the bucket, the88
packet cannot be sent.
TOKEN BUCKET

89
RESOURCE RESERVATION AND
ADMISSION CONTROL
 Buffer, CPU Time, Bandwidth are the resources that can
be reserved for particular flows for particular time to
maintain the QoS.
 Mechanism used by routers to accept or reject flows
based on flow specifications is what we call Admission
Control.

90
IP ADDRESSING
91
INTRODUCTION TO TCP/IP ADDRESSES

172.18.0.1 172.16.0.1

172.18.0.2 172.16.0.2
HDR SA DA DATA
10.13.0.0 192.168.1.0
10.13.0.1 172.17.0.1 172.17.0.2 192.168.1.1

 Unique addressing allows communication


between end stations
 Path choice is based on location

Location is represented by an address

92
Internet Address

93
Internet Classes

94
IP Addresses in Decimal Notation

95
Class Ranges of Internet Addresses

96
IP ADDRESSING

32 bits
Dotted
Decimal Network Host

Maximum 255 255 255 255

97
IP ADDRESSING

32 bits
Dotted
Decimal Network Host

Maximum 255 255 255 255


1 8 9 16 17 24 25 32

Binary 11111111 11111111 11111111 11111111

64
32
16
8
4
2
1
128
32
16
64

8
4
2
1
128
64
32

32
16
128

16
8
4
2
1

64

8
4
2
1
128

98
IP ADDRESSING

32 bits
Dotted
Decimal Network Host

Maximum 255 255 255 255


1 8 9 16 17 24 25 32

Binary 11111111 11111111 11111111 11111111

16
128
64
32
8
4
2
1
128
64
32
16
8
4
2
1
128

128
64
32
16
8
4
2
1

64
32
16
8
4
2
Example 1
Decimal 172 16 122 204
Example 10101100 00010000 01111010 11001100
Binary

99
IP ADDRESS CLASSES

8 bits 8 bits 8 bits 8 bits


Class A: Network Host Host Host

Class B: Network Network Host Host

Class C: Network Network Network Host

Class D: Multicast
Class E: Research

100
UNICAST, MULTICAST, AND RESERVED
ADDRESSES

 Unicast address – identifies a specific device


 Multicast address – identifies a host belongs to a group
or groups (used only as a destination address)
 Reserved addresses – class E addresses; only used in
special cases

101
CLASS A ADDRESSES

 Numerically the lowest


 Use only one byte to identify the class type and netid
 Three bytes are available for hostid numbers
 127 possible class A networks with a maximum of
16,777,214 computers on each network
 Designed for large organizations with a large number of hosts
or routers
 Many addresses are wasted

102
CLASS B ADDRESSES

 First two octets are the network number and the last two octets
are the host number
 16,382 possible blocks for assignment to organizations with a
maximum of 65,534 computers on each network
 Designed for mid-size organizations that may have tens of
thousands of hosts or routers
 Many addresses are wasted

103
CLASS C ADDRESSES
 The first three octets are the network number and the last octet
is the host number
 2,096,896 blocks for assignment to organizations

 First three bytes (netid) are the same

 Each block only contains 256 addresses, which may be smaller


than what many organizations need

104
BLOCKS IN CLASS C

105
CLASS D AND CLASS E ADDRESSES
 Class D – reserved for multicast addresses
 Multicasting – transmission method which allows copies of a single
packet to be sent to a selected group of receivers
 Class E – reserved for future use

106
NETWORK ADDRESS

 First address in the block, assigned to the organization


 Defines the network itself and cannot be assigned to a host

 Has both netid and hostid, with 0s for the hostid

 Defines the network to the rest of the Internet

107
ADDRESSING WITHOUT SUBNETS

172.16.0.1 172.16.0.2 172.16.0.3 172.16.255.253 172.16.255.254

…...

172.16.0.0

108
ADDRESSING WITH SUBNETS

172.16.3.0

172.16.4.0

172.16.1.0 172.16.2.0

Network 172.16.0.0

109
SUBNETTING

 IP addressing is hierarchical
 First reach a device through its network id (netid)

 Then reach the host itself using the second portion


(hostid)
 Since an organization may not have enough address,
subnetting may be used to divide the network into
smaller networks or sub-networks

110
CONTD..
 Sub-netting creates an intermediate level of hierarchy
 IP datagram routing then involves three steps:
 Delivery to the site,
 Delivery to the sub-network, and
 Delivery to the host

111
DECIMAL EQUIVALENTS OF BIT PATTERNS

128 64 32 16 8 4 2 1

1 0 0 0 0 0 0 0 = 128
1 1 0 0 0 0 0 0 = 192
1 1 1 0 0 0 0 0 = 224
1 1 1 1 0 0 0 0 = 240
1 1 1 1 1 0 0 0 = 248
1 1 1 1 1 1 0 0 = 252
1 1 1 1 1 1 1 0 = 254
1 1 1 1 1 1 1 1 = 255

112
CLASS C SUBNETS

Class C IP addresses are normally assigned to a very small size network because it can
only have 254 hosts in a network. Given below is a list of all possible combination of
subnetted Class B IP address

113
“C- CLASS ADDRESSING”

114
SUB-NETTING “C- CLASS ADDRESSING”

C- Class IP address
192 168 10 0 to 255

192 168 10 0
11000000 10101000 00001010 00000000

192 168 10 1
11000000 10101000 00001010 00000001
192 168 10 2
11000000 10101000 00001010 00000010

192 168 10 255


11000000 10101000 00001010 11111111

115
DEFAULT SUBNET MASK
 Class A – 255.0.0.0
 Class B – 255.255.0.0

 Class C – 255.255.255.0

116
MASKING

 Extracts the address of the physical network from an IP address


 Used by routers inside the organization

117
SUB-NETTING “C- CLASS ADDRESSING”
IP address
192 168 10 35 11000000 10101000 00001010 00100011
Subnet Mask
255 255 255 0 11111111 11111111 11111111 00000000

AND 11000000 10101000 00001010 00000000


operation

Subnet ID - Binary 11000000 10101000 00001010 00000000

Subnet ID - Decimal 192 168 10 0

118
DECIMAL EQUIVALENTS OF BIT PATTERNS

128 64 32 16 8 4 2 1

1 0 0 0 0 0 0 0 = 128
1 1 0 0 0 0 0 0 = 192
1 1 1 0 0 0 0 0 = 224
1 1 1 1 0 0 0 0 = 240
1 1 1 1 1 0 0 0 = 248
1 1 1 1 1 1 0 0 = 252
1 1 1 1 1 1 1 0 = 254
1 1 1 1 1 1 1 1 = 255

119
SUB-NETTING “C- CLASS ADDRESSING”

IP address
192 168 10 35 11000000 10101000 00001010 00100011
Subnet Mask
255 255 255 128 11111111 11111111 11111111 10000000

AND 11000000 10101000 00001010 00000000


operation

Subnet ID - Binary 11000000 10101000 00001010 00000000

Subnet ID - Decimal 192 168 10 0

120
SUB-NETTING “C- CLASS ADDRESSING”

IP address
192 168 10 132 11000000 10101000 00001010 10000100
Subnet Mask
255 255 255 128 11111111 11111111 11111111 10000000

AND 11000000 10101000 00001010 10000000


operation

Subnet ID - Binary 11000000 10101000 00001010 10000000

Subnet ID - Decimal 192 168 10 128

121
SUB-NETTING “C- CLASS ADDRESSING”

IP address
192 168 10 35 11000000 10101000 00001010 00100011
Subnet Mask
255 255 255 192
11111111 11111111 11111111 11000000
AND
operation 11000000 10101000 00001010 00000000

Subnet ID - Decimal 192 168 10 0

122
SUB-NETTING “C- CLASS ADDRESSING”

IP address
192 168 10 75 11000000 10101000 00001010 01001011
Subnet Mask
255 255 255 192 11111111 11111111 11111111 11000000

AND 11000000 10101000 00001010 01000000


operation

Subnet ID - Decimal 192 168 10 64

123
SUB-NETTING “C- CLASS ADDRESSING”

IP address
192 168 10 137 11000000 10101000 00001010 10001001
Subnet Mask
255 255 255 192 11111111 11111111 11111111 11000000

AND 11000000 10101000 00001010 10000000


operation

Subnet ID - Decimal 192 168 10 128

124
SUB-NETTING “C- CLASS ADDRESSING”

IP address
192 168 10 199 11000000 10101000 00001010 11000111
Subnet Mask
255 255 255 192 11111111 11111111 11111111 11000000

AND 11000000 10101000 00001010 11000000


operation

Subnet ID - Decimal 192 168 10 192

125
Subnet Mask
255 255 255 192

192.168.10.0 Subnet work Identification 00 000000

Subnet ID - 1 192.168.10.1 to 62 Valid IP address 00 000001 to 111110


192.168.10.62
192.168.10.63 Broadcast Address 00 111111
192.168.10.64 Subnet work Identification 01 000000

Subnet ID - 2 192.168.10.65 to 62 Valid IP address 01 000001 to 111110


192.168.10.126
192.168.10.127 Broadcast Address 01 111111
192.168.10.128 Subnet work Identification 10 000000

Subnet ID - 3 192.168.10.129 to 62 Valid IP address 10 000001 to 111110


192.168.10.190
192.168.10.191 Broadcast Address 10 111111
192.168.10.192 Subnet work Identification 11 000000

Subnet ID - 4 192.168.10.193 to 62 Valid IP address 11 000001 to 111110


192.168.10.254
192.168.10.255 Broadcast Address 11 111111
SUB-NETTING “C- CLASS ADDRESSING”

Subnet Mask
255 255 255 128 11111111 11111111 11111111 1 0000000

192 168 10 0 11000000 10101000 00001010 00000000


192 168 10 1 11000000 10101000 00001010 00000001
IP address
192 168 10 35 11000000 10101000 00001010 00100011

192 168 10 126 11111111 11111111 11111111 01111110

192 168 10 127 11111111 11111111 11111111 01111111

192 168 10 128 11111111 11111111 11111111 10000000

192 168 10 129 11000000 10101000 00001010 10000001

192 168 10 254 11000000 10101000 00001010 11111110

192 168 10 255 11000000 10101000 00001010 11111111


127
Change the following IPv4 addresses from binary notation to dotted-decimal
notation.

Solution
We replace each group of 8 bits with its equivalent decimal number (see
Appendix B) and add dots for separation.

128
Change the following IPv4 addresses from dotted-decimal notation to binary
notation.

Solution
We replace each decimal number with its binary equivalent (see Appendix B).

129
Find the error, if any, in the following IPv4 addresses.

Solution
a. There must be no leading zero (045).
b. There can be no more than four numbers.
c. Each number needs to be less than or equal to 255.
d. A mixture of binary notation and dotted-decimal
notation is not allowed.

130
SUPERNETTING
 Class C blocks have a maximum number of 256
addresses
 Supernetting allows an organization to combine several
class C blocks to create a larger range of addresses

131
132
SUPERNETTING IN NETWORK LAYER

 Supernetting is the opposite of Subnetting. In subnetting,


a single big network is divided into multiple smaller
subnetworks.
 In Supernetting, multiple networks are combined into a
bigger network termed as a Supernetwork or Supernet.
 Supernetting is mainly used in Route Summarization,
where routes to multiple networks with similar network
prefixes are combined into a single routing entry, with the
routing entry pointing to a Super network, encompassing all
the networks.
 This in turn significantly reduces the size of routing tables
and also the size of routing updates exchanged by routing 133
protocols.
SUPERNETTING IN NETWORK LAYER

 More specifically,
 When multiple networks are combined to form a bigger
network, it is termed as super-netting
 Super netting is used in route aggregation to reduce the size of
routing tables and routing table updates
 There are some points which should be kept in mind while
supernetting:
 All the Networks should be contiguous.

 The block size of every networks should be equal and must be


in form of 2n.
 First Network id should be exactly divisible by whole size of
supernet. 134
 Example – Suppose 4 small networks of class C:
SUPERNETTING IN NETWORK LAYER

 Example – Suppose 4 small networks of class C:


 200.1.0.0,

 200.1.1.0,

 200.1.2.0,

 200.1.3.0

 Build a bigger network which have a single Network Id

135
EXPLANATION – BEFORE SUPER-NETTING ROUTING
TABLE WILL BE LOOK LIKE AS:

Network Id Subnet Mask Interface

200.1.0.0 255.255.255.0 A

200.1.1.0 255.255.255.0 B

200.1.2.0 255.255.255.0 C

200.1.3.0 255.255.255.0 D

136
FIRST, LETS CHECK WHETHER THREE CONDITION
ARE SATISFIED OR NOT:
 Contiguous: You can easily see that all network are
contiguous all having size 256 hosts.
Range of first Network from 200.1.0.0 to 200.1.0.255. If
you add 1 in last IP address of first network that is
200.1.0.255 + 0.0.0.1, you will get the next network id
that is 200.1.1.0. Similarly, check that all network are
contiguous.
 Equal size of all network: As all networks are of class
C, so all of the have a size of 256 which in turn equal to
28 .

137
 First IP address exactly divisible by total size: When a binary
number is divided by 2n then last n bits are the remainder.
 Hence in order to prove that first IP address is exactly divisible by
while size of Supernet Network.
 You can check that if last n v=bits are 0 or not.In given example first
IP is 200.1.0.0 and whole size of supernet is 4*28 = 210.
 If last 10 bits of first IP address are zero then IP will be divisible.

 Last 10 bits of first IP address are zero (highlighted by green color).


 So 3rd condition is also satisfied.
 Therefore, you can join all these 4 networks and can make a
Supernet. New Supernet Id will be 200.1.0.0.

138
ADVANTAGES & DISADVANTAGES OF
SUPER-NETTING 
 Advantages of Supernetting –
 Control and reduce network traffic

 Helpful to solve the problem of lacking IP addresses

 Minimizes the routing table

 Disadvantages of Supernetting –
 Itcannot cover different area of network when combined
 All the networks should be in same class and all IP should be
contiguous

139
PROBLEMS & EXERCISES - 1
 You have been allocated a class A network address
of 29.0.0.0. You need to create at least 20 networks and
each network will support a maximum of 160 hosts.
Would the following two subnet masks Work?
 255.255.0.0 and or 255.255.255.0

140
PROBLEMS & EXERCISES - 2
 You have been allocated a class B network address of
135.1.0.0 and and need to create 4 subnets each with
around 200 hosts what is the easiest mask to use to
satisfy the criteria?

141
PROBLEMS & EXERCISES - 3
 You have been allocated a class C network address of
211.1.1.0 and are using the default subnet mask of
255.255.255.0 how may hosts can you have?

142
PROBLEMS & EXERCISES - 4
 Subnet the Class C IP Address 195.1.1.0 So that you
have 10 subnets each with a maximum 12 hosts on each
subnet. List the Address on host 1 on subnet 0,1,2,3,10

143
PROBLEMS & EXERCISES - 5
 Subnet the Class C IP Address 205.11.2.0 so that you
have 30 subnets.
 What is the subnet mask for the maximum number of
hosts?
 How many hosts can each subnet have?

 What is the IP address of host 3 on subnet 2 ?

144
PROBLEMS & EXERCISES - 6
 Subnet the Class C IP Address 195.1.1.0 So that you
have at least 2 subnets each subnet must have room for
48 hosts .
 What are the two possible subnet masks?

145
PROBLEMS & EXERCISES - 7
 Given the subnet Mask 255.255.255.192 What is the host
address and subnet of the following IP address
197.1.2.67.

146
CLASSLESS ADDRESSING

 Addressing mechanism in which the IP address space is


not divided into classes
 Block ranges are variable, as long as they are a power of
2 (2, 4, 8,…)
 Masking is also used as well as subnetting

 Requires a different routing scheme, discussed later

147
Note

In classful addressing, the address space is divided into five


classes:
A, B, C, D, and E.

148
Finding the classes in binary and dotted-decimal notation

149
Find the class of each address.
a. 00000001 00001011 00001011 11101111
b. 11000001 10000011 00011011 11111111
c. 14.23.120.8
d. 252.5.15.111

Solution
a. The first bit is 0. This is a class A address.
b. The first 2 bits are 1; the third bit is 0. This is a class C
address.
c. The first byte is 14; the class is A.
d. The first byte is 252; the class is E.

150
Number of blocks and block size in classful IPv4 addressing

151
Note

In classful addressing, a large part of the available addresses


were wasted.

152
Default masks for classful addressing

153
Note

Classful addressing, which is almost obsolete, is replaced with


classless addressing.

154
Note

An IPv6 address is 128 bits long.

155
IPv6 address in binary and hexadecimal colon notation

156
Abbreviated IPv6 addresses

157
Example

Expand the address 0:15::1:12:1213 to its original.

Solution
We first need to align the left side of the double colon to the left of the original
pattern and the right side of the double colon to the right of the original
pattern to find how many 0s we need to replace the double colon.

This means that the original address is.

158
Type prefixes for IPv6 addresses

159
Type prefixes for IPv6 addresses (continued)

160
Prefixes for provider-based unicast address

161
Multicast address in IPv6

162
Reserved addresses in IPv6

163
Local addresses in IPv6

164
ARP - ADDRESS RESOLUTION
PROTOCOL

 Although network communications can readily be


thought of as an IP address, the packet delivery depends
ultimately on the media access control (MAC).
 This is where the protocol for address resolution comes
into effect.
 You can add the remote host IP address, which is an arp
-a command, in case you have issues to communicate
with a given host.
 The ARP command provides information like Address,
Flags, Mask, IFace, Hardware Type, Hardware Address,
etc.
165
ARP and RARP
(Address Resolution Protocol and Reverse ARP)

166
Position of ARP and RARP in TCP/IP protocol suite

167
ARP
 ARP associates an IP address with its physical
address. On a typical physical network, such as
a LAN, each device on a link is identified by a
physical or station address that is usually
imprinted on the NIC.

168
ARP operation

169
ARP packet

170
Encapsulation of ARP packet

171
Four cases using ARP
Note:

An ARP request is broadcast;


an ARP reply is unicast.

173
Example 1

A host with IP address 130.23.43.20 and physical


address B2:34:55:10:22:10 has a packet to send to
another host with IP address 130.23.43.25 and
physical address A4:6E:F4:59:83:AB (which is
unknown to the first host). The two hosts are on the
same Ethernet network. Show the ARP request and
reply packets encapsulated in Ethernet frames.

See Next Slide


174
Example 1 (Continued)

Solution
Slide 25 shows the ARP request and reply packets.
Note that the ARP data field in this case is 28 bytes,
and that the individual addresses do not fit in the 4-
byte boundary. That is why we do not show the
regular 4-byte boundaries for these addresses. Also
note that the IP addresses are shown in hexadecimal.
For information on binary or hexadecimal notation
see Appendix B.

See Next Slide 175


Example 1

176
Proxy ARP

177
RARP
RARP finds the logical address for a machine that only knows its physical
address.

Note:

The RARP request packets are broadcast;

the RARP reply packets are unicast.

178
RARP operation

179
RARP packet

180
Encapsulation of RARP packet

181
INTERNET CONTROL MESSAGE
PROTOCOL VERSION 4 (ICMPV4)
 The IP protocol has no error-reporting or error correcting
mechanism.
 What happens if something goes wrong?

 What happens if a router must discard a datagram


because it cannot find a router to the final destination, or
because the time-to-live field has a zero value?
 These are examples of situations where an error has
occurred and the IP protocol has no built-in mechanism
to notify the original host.

182
ICMP
The position of ICMP in the TCP/IP suite

Encapsulation of ICMP Packets

183
MESSAGES
 ICMP messages are divided into two broad categories:
Error-reporting messages and Query messages.
 The error-reporting messages report problems that a
router or a host (destination) may encounter when it
processes an IP packet.
 The query messages, which occur in pairs, help a host or
a network manager get specific information from a
router or another host.
 Also, hosts can discover and learn about routers on their
network and routers can help a node redirect its messages.

184
DISCUSSIONS
 Message Format
 Error Reporting Messages
 Query Messages
 Checksum

185
GENERAL FORMAT OF ICMP MESSAGES

Note

ICMP always reports error messages to


the original source.
186
ERROR-REPORTING MESSAGES

187
CONTENTS OF DATA FIELD FOR THE
ERROR MESSAGE

188
DESTINATION-UNREACHABLE FORMAT

Note

Destination-unreachable messages with codes 2 or 3 can be


created only by the destination host.

Other destination-unreachable messages can be created only by


routers.

A router cannot detect all problems that prevent the


delivery of a packet.
There is no flow-control or congestion-control mechanism 189
in the IP protocol.
SOURCE-QUENCH FORMAT

Note

A source-quench message informs the source that a datagram


has been discarded due to congestion in
a router or the destination host.

The source must slow down the sending of datagrams until the
congestion is relieved.

190
Note

One source-quench message is sent for each datagram that is


discarded due to congestion.

Whenever a router decrements a datagram with a time-to-live


value to zero, it discards the datagram and
sends a time-exceeded message to the original source.

When the final destination does not receive all of the fragments
in a set time, it discards the received fragments and sends a
time-exceeded message to the original source.

191
TIME-EXCEEDED MESSAGE FORMAT

192
Note

In a time-exceeded message, code 0 is used only by routers to


show that the value of the time-to-live field is zero.

Code 1 is used only by the destination host to show that not all
of
the fragments have arrived
within a set time.

A parameter-problem message can be created by a router or the


destination host.

193
PARAMETER-PROBLEM MESSAGE
FORMAT

Redirection concept

IP packet 1

RM
2

3 4
IP packet IP packet

194
Note

A host usually starts with a small


routing table that is gradually
augmented and updated.

One of the tools to accomplish this


is the redirection message.

195
REDIRECTION MESSAGE FORMAT

Note

A redirection message is sent from a router to a host on the


same local network.
An echo-request message can be sent by a host or router.

An echo-reply message is sent


by the host or router that receives
an echo-request message.
196
Note

Echo-request and echo-reply messages can be used


by network managers to check the operation of the IP
protocol.

Echo-request and echo-reply messages can be used


by network managers to check the operation of the IP
protocol.

197
Echo-request and echo-reply message

Timestamp-request and timestamp-reply message format

198
Note

Timestamp-request and timestamp-reply messages


can be used to calculate the
round-trip time between a source and a destination
machine even if their
clocks are not synchronized.
The timestamp-request and timestamp-reply
messages can be used to synchronize two clocks in
two
machines if the exact one-way
time duration is known.

199
INTERNET GROUP MANAGEMENT PROTOCOL
 Group management
 IGMP is a protocol that manages group membership. The
IGMP protocol gives the multicast routers information about
the membership status of hosts (routers) connected to the
network. .
 IGMP is a group management protocol. It helps a multicast
router create and update a list of loyal members related to each
router interface.
 IGMP messages
 IGMP has three types of messages:
 The query,
 The membership report, and
 The leave report.
200
There are two types of query messages, general and special.
IGMP message types

201
IGMP message format & IGMP type field

202
IGMP OPERATION
 A multicast router connected to a network has a list of
multicast addresses of the groups with at least one loyal
member in that network.
 For each group, there is one router that has the duty of
distributing the multicast packets destined for that group.
 Joininga Group
 Leaving a Group
 Monitoring Membership

203
Membership report

204

In IGMP, a membership report is sent twice, one after the other.


Leave report

205

The general query message does not define a particular group.


General query message

206
ENCAPSULATION
 The IGMP message is encapsulated in an IP datagram,
which is itself encapsulated in a frame.
 IP Layer

ENCAPSULATION OF IGMP PACKET

207
HOST CONFIGURATION: DHCP
 Each computer that uses the TCP/IP protocol suite needs
to know its IP address.
 If the computer uses classless addressing or is a member
of a subnet, it also needs to know its subnet mask.
 Most computers today need two other pieces of
information:
 The address of a default router to be able to communicate
with other networks and the address of a name server to be
able to use names instead of addresses as we will see in the
next chapter.
 In other words, four pieces of information are normally
needed. 208
DHCP OPERATION
 The DHCP client and server can either be on the same
network or on different networks.
 Let us discuss each situation separately.

209
TOPICS DISCUSSION
 Same Network
 Different Networks
 UDP Ports
 Using TFTP
 Error Control
 Packet Format

210
CLIENT AND SERVER ON THE SAME
NETWORK

211
CLIENT AND SERVER ON TWO DIFFERENT
NETWORKS

212
USE OF UDP PORTS

213
DHCP PACKET FORMAT

214
FLAG FORMAT & OPTION FORMAT

215
216
CONFIGURATION
The DHCP has been devised to provide static and
dynamic address allocation.
Static Address Allocation
 Dynamic Address Allocation
 Transition States
 Other Issues
 Exchanging Messages

217
OPTION WITH TAG 53

218
DHCP CLIENT TRANSITION DIAGRAM

219
EXCHANGING MESSAGES

220

You might also like