Unit Iv BCN
Unit Iv BCN
1 LAYERED TASKS
2
Figure 1.1 Tasks involved in sending a letter
3
2-2 THE OSI MODEL
Established in 1947, the International Standards
Organization (ISO) is a multinational body dedicated to
worldwide agreement on international standards. An ISO
standard that covers all aspects of network
communications is the Open Systems Interconnection
(OSI) model. It was first introduced in the late 1970s.
4
Note
5
Figure 1.2 Seven layers of the OSI model
6
Figure 1.3 The interaction between layers in the OSI model
7
Figure 1.4 An exchange using the OSI model
8
2-3 LAYERS IN THE OSI MODEL
9
Figure 1.5 Physical layer
10
Note
11
Figure 1.6 Data link layer
12
Note
13
Figure 1.7 Hop-to-hop delivery
14
Figure 1.8 Network layer
15
Note
16
Figure 1.9 Source-to-destination delivery
17
Figure 1.10 Transport layer
18
Note
19
Figure 1.11 Reliable process-to-process delivery of a message
20
Figure 1.12 Session layer
21
Note
22
Figure 1.13 Presentation layer
23
Note
24
Figure 1.14 Application layer
25
Note
26
Figure 1.15 Summary of layers
27
2-4 TCP/IP PROTOCOL SUITE
29
2-5 ADDRESSING
30
Figure 1.17 Addresses in TCP/IP
31
Figure 1.18 Relationship of layers and addresses in TCP/IP
32
Example 1.1
33
Figure 1.19 Physical addresses
34
Example 1.2
07:01:02:01:2C:4B
35
Example 1.3
36
Figure 1.20 IP addresses
37
Example 1.4
38
Figure 1.21 Port addresses
39
Note
40
Example 1.5
753
41
Network Layer Services:
1.Guaranteed delivery
2.Guaranteed delivery with bounded
delay
3.In-order packet delivery
4.Guaranteed minimal bandwidth
5.Guaranteed maximum jitter
6.Security services
19.2 Addressing
Internet Address
Classful Addressing
Subnetting
Supernetting
Classless Addressing
Dynamic Address Configuration
Network Address Translation
43
Note:
44
Note:
45
Figure 19.9 Dotted-decimal notation
46
Example 1
Change the following IP addresses from binary notation to dotted-
decimal notation.
a. 10000001 00001011 00001011 11101111
b. 11111001 10011011 11111011 00001111
Solution
We replace each group of 8 bits with its equivalent decimal
number (see Appendix B) and add dots for separation:
a. 129.11.11.239
b. 249.155.251.15
47
Example 2
Change the following IP addresses from dotted-decimal notation to
binary notation.
a. 111.56.45.78
b. 75.45.34.78
Solution
We replace each decimal number with its binary equivalent (see
Appendix B):
48
Note:
49
Figure 19.10 Finding the class in binary notation
50
Figure 19.11 Finding the address class
51
Example 3
Find the class of each address:
a. 00000001 00001011 00001011 11101111
b. 11110011
1111 10011011 11111011 00001111
Solution
See the procedure in Figure 19.11.
52
Figure 19.12 Finding the class in decimal notation
53
Example 4
Find the class of each address:
a. 227.12.14.87
b. 252.5.15.111
c. 134.11.78.56
Solution
a. The first byte is 227 (between 224 and 239); the class is D.
b. The first byte is 252 (between 240 and 255); the class is E.
c. The first byte is 134 (between 128 and 191); the class is B.
54
Figure 19.13 Netid and hostid
55
Figure 19.14 Blocks in class A
56
Note:
57
Figure 19.15 Blocks in class B
58
Note:
59
Note:
60
Figure 19.16 Blocks in class C
61
Figure 19.17 Network address
62
Note:
63
Example 5
Given the address 23.56.7.91, find the network address.
Solution
The class is A. Only the first byte defines the netid. We can find the network
address by replacing the hostid bytes (56.7.91) with 0s. Therefore, the network
address is 23.0.0.0.
64
Example 6
Given the address 132.6.17.85, find the network address.
Solution
The class is B. The first 2 bytes defines the netid. We can find the network
address by replacing the hostid bytes (17.85) with 0s. Therefore, the network
address is 132.6.0.0.
65
Example 7
Given the network address 17.0.0.0, find the class.
Solution
The class is A because the netid is only 1 byte.
66
Note:
67
Figure 19.18 Sample internet
68
Note:
69
Figure 19.19 A network with two levels of hierarchy
70
Figure 19.20 A network with three levels of hierarchy (subnetted)
71
Figure 19.21 Addresses in a network with and without subnetting
72
Figure 19.22 Hierarchy concept in a telephone number
73
Table 19.1 Default masks
In Dotted-
Class In Binary Using Slash
Decimal
74
Note:
75
Example 8
A router outside the organization receives a packet with destination
address 190.240.7.91. Show how it finds the network address to
route the packet.
Solution
The router follows three steps:
1. The router looks at the first byte of the address to find the
class. It is class B.
2. The default mask for class B is 255.255.0.0. The router ANDs
this mask with the address to get 190.240.0.0.
3. The router looks in its routing table to find out how to route the
packet to this destination. Later, we will see what happens if
this destination does not exist.
76
Figure 19.23 Subnet mask
77
Example 9
A router inside the organization receives the same packet with
destination address 190.240.33.91. Show how it finds the
subnetwork address to route the packet.
Solution
The router follows three steps:
1. The router must know the mask. We assume it is /19, as shown in Figure
19.23.
2. The router applies the mask to the address, 190.240.33.91. The subnet
address is 190.240.32.0.
3. The router looks in its routing table to find how to route the packet to this
destination. Later, we will see what happens if this destination does not
exist.
78
Figure 19.24 DHCP transition diagram
79
Table 19.2 Default masks
Range Total
80
Figure 19.25 NAT
81
Figure 19.26 Address translation
82
Figure 19.27 Translation
83
Table 19.3 Five-column translation table
Private Private External External Transport
Address Port Address Port Protocol
84
Subnetting/Supernetting
and
Classless Addressing
85
CONTENTS
• SUBNETTING
• SUPERNETTING
• CLASSLESS ADDRSSING
86
5.1
SUBNETTING
87
IP addresses are designed with
two levels of hierarchy.
88
Figure 5-1
A network with two levels of
hierarchy (not subnetted)
89
Figure 5-2
A network with three levels of
hierarchy (subnetted)
90
Figure 5-3
Addresses in a network with
and without subnetting
91
Figure 5-4
92
Figure 5-5
Default mask and subnet mask
93
Finding the Subnet Address
Given an IP address, we can find the
subnet address by applying the mask to the
address. We can do this in two ways:
straight or short-cut.
94
Straight Method
In the straight method, we use binary
notation for both the address and the
mask and then apply the AND operation
to find the subnet address.
95
Example 1
96
Solution
97
Short-Cut Method
** If the byte in the mask is 255, copy
the byte in the address.
** If the byte in the mask is 0, replace
the byte in the address with 0.
** If the byte in the mask is neither 255
nor 0, we write the mask and the address
in binary and apply the AND operation.
98
Example 2
99
Figure 5-6
Example 2
100
Figure 5-7
101
The number of subnets must be
a power of 2.
102
Example 3
103
Solution (Continued)
104
Solution (Continued)
106
Example 4
107
Solution (Continued)
108
Solution (Continued)
The mask is
11111111 11111111 11111111 11000000
or
255.255.255.192.
The number of subnets is 1024.
The number of addresses in each subnet is 26
(6 is the number of 0s) or 64.
See Figure 5.9
109
Figure 5-9
Example 4
110
Figure 5-10
Variable-length subnetting
111
5.2
SUPERNETTING
112
Figure 5-11
A supernetwork
113
Rules:
** The number of blocks must be a power of 2 (1,
2, 4, 8, 16, . . .).
** The blocks must be contiguous in the address
space (no gaps between the blocks).
** The third byte of the first address in the
superblock must be evenly divisible by the number
of blocks. In other words, if the number of blocks is
N, the third byte must be divisible by N.
114
Example 5
115
Solution
116
In subnetting,
we need the first address of the
subnet and the subnet mask to
define the range of addresses.
117
In supernetting,
we need the first address of
the supernet
and the supernet mask to
define the range of addresses.
118
Figure 5-12
Comparison of subnet, default,
and supernet masks
119
Example 6
We need to make a supernetwork out of 16
class C blocks. What is the supernet mask?
Solution
We need 16 blocks. For 16 blocks we need to
change four 1s to 0s in the default mask. So the
mask is
11111111 11111111 11110000 00000000
or
255.255.240.0
120
Example 7
121
Solution
122
Example 8
A supernet has a first address of 205.16.32.0 and a
supernet mask of 255.255.248.0. How many blocks are in
this supernet and what is the range of addresses?
Solution
124
Figure 5-13
Variable-length blocks
125
Number of Addresses in a Block
There is only one condition on the number
of addresses in a block; it must be a power
of 2 (2, 4, 8, . . .). A household may be
given a block of 2 addresses. A small
business may be given 16 addresses. A large
organization may be given 1024 addresses.
126
Beginning Address
The beginning address must be evenly divisible
by the number of addresses. For example, if a
block contains 4 addresses, the beginning
address must be divisible by 4. If the block has
less than 256 addresses, we need to check only
the rightmost byte. If it has less than 65,536
addresses, we need to check only the two
rightmost bytes, and so on.
127
Example 9
Which of the following can be the beginning address of a
block that contains 16 addresses?
205.16.37.32
190.16.42.44
17.17.33.80
123.45.24.52
Solution
Solution
To be divisible by 1024, the rightmost byte of an
address should be 0 and the second rightmost byte
must be divisible by 4. Only the address 17.17.32.0
meets this condition. 129
Figure 5-14
Slash notation
130
Slash notation is also called
CIDR
notation.
131
Example 11
A small organization is given a block with the beginning
address and the prefix length 205.16.37.24/29 (in slash
notation). What is the range of the block?
Solution
The beginning address is 205.16.37.24. To find the
last address we keep the first 29 bits and change
the last 3 bits to 1s.
Beginning:11001111 00010000 00100101 00011000
Ending : 11001111 00010000 00100101 00011111
There are only 8 addresses in this block.
132
Example 12
We can find the range of addresses in Example 11 by
another method. We can argue that the length of the
suffix is 32 29 or 3. So there are 23 8 addresses in this
block. If the first address is 205.16.37.24, the last address
is 205.16.37.31 (24 7 31).
133
A block in classes A, B, and C
can easily be represented in slash
notation as
A.B.C.D/ n
where n is
either 8 (class A), 16 (class B), or
24 (class C).
134
Example 13
What is the network address if one of the addresses is
167.199.170.82/27?
Solution
The prefix length is 27, which means that we must
keep the first 27 bits as is and change the
remaining bits (5) to 0s. The 5 bits affect only the
last byte. The last byte is 01010010. Changing the
last 5 bits to 0s, we get 01000000 or 64. The
network address is 167.199.170.64/27.
135
Example 14
An organization is granted the block 130.34.12.64/26.
The organization needs to have four subnets. What are the
subnet addresses and the range of addresses for each
subnet?
Solution
136
Solution (Continued)
Let us first find the subnet prefix (subnet mask).
We need four subnets, which means we need to
add two more 1s to the site prefix. The subnet
prefix is then /28.
Subnet 1: 130.34.12.64/28 to 130.34.12.79/28.
Subnet 2 : 130.34.12.80/28 to 130.34.12.95/28.
Subnet 3: 130.34.12.96/28 to 130.34.12.111/28.
Subnet 4: 130.34.12.112/28 to 130.34.12.127/28.
See Figure 5.15 137
Figure 5-15
Example 14
138
Example 15
An ISP is granted a block of addresses starting with
190.100.0.0/16. The ISP needs to distribute these
addresses to three groups of customers as follows:
Design the subblocks and give the slash notation for each
subblock. Find out how many addresses are still available
after these allocations.
139
Solution
Group 1
For this group, each customer needs 256 addresses.
This means the suffix length is 8 (2 8 256). The
prefix length is then 32 8 24.
01: 190.100.0.0/24190.100.0.255/24
02: 190.100.1.0/24 190.100.1.255/24
…………………………………..
64: 190.100.63.0/24190.100.63.255/24
Total 64 256 16,384 140
Solution (Continued)
Group 2
For this group, each customer needs 128 addresses.
This means the suffix length is 7 (2 7 128). The
prefix length is then 32 7 25. The addresses
are:
001: 190.100.64.0/25 190.100.64.127/25
002: 190.100.64.128/25 190.100.64.255/25
003: 190.100.127.128/25 190.100.127.255/25
Total 128 128 16,384
141
Solution (Continued)
Group 3
For this group, each customer needs 64 addresses.
This means the suffix length is 6 (2 6 64). The
prefix length is then 32 6 26.
001:190.100.128.0/26 190.100.128.63/26
002:190.100.128.64/26 190.100.128.127/26
…………………………
128:190.100.159.192/26 190.100.159.255/26
Total 128 64 8,192 142
Solution (Continued)
143
IP Fragmentation
144
Computer Networks
Network Layer
Part - I
145
Chapter Overview
The Network Layer is concerned about
getting packets from source to
destination, no matter how many hops it
may take. It’s all about routing.
4 Internetworking
Working with multiple networks and protocols
in order to deliver packets.
146
Network Layer Overview
Design Issues
1 Network Layer Design Issues Who does what with regard to:
2 Routing Algorithms
3 Congestion Control Algorithms 1. Routing issues.
2. Congestion
4 Internetworking 3. Internetworking
5 The Network Layer in the
Internet We also throw in a few definitions.
147
Network Layer Overview
Design Issues
WHO-DOES-WHAT-ISSUES:
The network layer is responsible for routing packets from the source to destination.
The routing algorithm is the piece of software that decides where a packet goes next
(e.g., which output line, or which node on a broadcast channel).
For connectionless networks, the routing decision is made for each datagram. For
connection-oriented networks, the decision is made once, at circuit setup time.
148
Network Layer Overview
Design Issues
ROUTING ISSUES:
2. Stability: if a link or router fails, how much time elapses before the
remaining routers recognize the topology change? (Some never do..)
When we look at routing in detail, we'll consider both adaptive-those that take
current traffic and topology into consideration-and nonadaptive algorithms.
149
Network Layer Overview
Design Issues
CONGESTION (NOT CONTENTION):
When more packets enter an area than can be processed, delays increase and performance
decreases. If the situation continues, the subnet may have no alternative but to discard
packets.
If the delay increases, the sender may (incorrectly) retransmit, making a bad situation even
worse.
Overall, performance degrades because the network is using (wasting) resources processing
packets that eventually get discarded.
INTERNETWORKING:
The Transport layer should do exactly the same thing, whether sending across
LAN or across the country on the Internet.
Should the host or the subnet be responsible for the delivery of all packets in
order ?
151
Network Layer Services Provided to the
Design Issues Transport Layer
Review of Definitions:
Connection-Oriented Service: The subnet, with the help of the network layer,
should provide the following operations:
1. The sending side of the pair should open a connection with its peer.
2. This connection has properties negotiated by the pair.
3. Communication is bi-directional and packets are delivered in order.
4. Flow control is accomplished in the subnet.
Virtual Circuit: Avoids choosing a new route for each packet. A virtual circuit is a
state -- it remembers how to send a packet from source to destination. This
state is held in the subnet, in the source DLL or in each of the DLL layers
along the route.
153
Overview
Networks are used to interconnect many devices.
We have checked with Local Area Networks.
Now, wide area networks
Since the invention of the telephone, circuit switching
has been the dominant technology for voice
communications.
Since 1970, packet switching has evolved
substantially for digital data communications. It was
designed to provide a more efficient facility than circuit
switching for bursty data traffic.
Two types of packet switching:
Datagram (such as today’s Internet)
Virtual circuit (such as Frame Relay, ATM)
154
Switched Communications Networks
155
Simple Switching Network
156
Switching Nodes
Nodes may connect to other nodes,
or to some stations.
Network is usually partially
connected
However, some redundant connections
are desirable for reliability
Two different switching technologies
Circuit switching
Packet switching
157
Circuit Switching
Circuit switching:
There is a dedicated communication path between two
stations (end-to-end)
The path is a connected sequence of links between
network nodes. On each physical link, a logical channel is
dedicated to the connection.
Communication via circuit switching has three
phases:
Circuit establishment (link by link)
Routing & resource allocation (FDM or TDM)
Data transfer
Circuit disconnect
Deallocate the dedicated resources
The switches must know how to find the route to
the destination and how to allocate bandwidth
(channel) to establish a connection.
158
Circuit Switching Properties
Inefficiency
Channel capacity is dedicated for the whole duration of a
connection
If no data, capacity is wasted
Delay
Long initial delay: circuit establishment takes time
Low data delay: after the circuit establishment,
information is transmitted at a fixed data rate with no
delay other than the propagation delay. The delay at each
node is negligible.
Developed for voice traffic (public telephone
network) but can also applied to data traffic.
For voice connections, the resulting circuit will enjoy a
high percentage of utilization because most of the time
one party or the other is talking.
But how about data connections?
159
Public Circuit Switched
Network
162
Use of Packets
163
Advantages of Packet Switching
Line efficiency
Single node-to-node link can be dynamically shared by many packets over time
Packets are queued up and transmitted as fast as possible
Data rate conversion
Each station connects to the local node at its own speed
In circuit-switching, a connection could be blocked if there lacks free resources. On a
packet-switching network, even with heavy traffic, packets are still accepted, by
delivery delay increases.
Priorities can be used
On each node, packets with higher priority can be forwarded first. They will
experience less delay than lower-priority packets.
164
Packet Switching Technique
A station breaks long message into packets
Datagram approach
Virtual circuit approach
165
Datagram
Each packet is treated independently, with no reference to
packets that have gone before.
Each node chooses the next node on a packet’s path.
166
Datagram
167
Virtual Circuit
In virtual circuit, a preplanned route is established before
any packets are sent, then all packets follow the same
route.
Each packet contains a virtual circuit identifier instead of
destination address, and each node on the preestablished
route knows where to forward such packets.
The node need not make a routing decision for each
packet.
Example: X.25, Frame Relay, ATM
168
Virtual
Circuit
A route between stations is set up
prior to data transfer.
All the data packets then follow the
same route.
But there is no dedicated resources
reserved for the virtual circuit!
Packets need to be stored-and-
forwarded.
169
Virtual Circuits v Datagram
Virtual circuits
Network can provide sequencing (packets arrive at the same
order) and error control (retransmission between two nodes).
Packets are forwarded more quickly
Based on the virtual circuit identifier
No routing decisions to make
Less reliable
If a node fails, all virtual circuits that pass through that node fail.
Datagram
No call setup phase
Good for bursty data, such as Web applications
More flexible
If a node fails, packets may find an alternate route
Routing can be used to avoid congested parts of the network
170
171
Comparison of
communication
switching
techniques
172
Network Layer TWO VIEWS OF THE WORLD
Design Issues
COMPARISON OF VIRTUAL CIRCUITS
AND DATAGRAMS:
Note that:
Connection Oriented Service
generally use Virtual Circuits.
173
Routing Algorithms Overview
5.1 Network Layer Design Issues What matters when doing routing?
5.2 Routing Algorithms
5.3 Congestion Control What are various techniques to do that
Algorithms routing?
5.4 Internetworking
5.5 The Network Layer in the
Internet Which is best?
174
Routing Algorithms Overview
Routing is concerned with the question: Which line should router J use when
forwarding a packet to router K ?
Adaptive algorithms - use such dynamic information as current topology, load, delay,
etc. to select routes.
Nonadaptive algorithms - routes never change once initial routes have been
selected. Also called static routing.
175
Routing Algorithms Overview
1. Isolated: each router makes its routing decisions using only the local information it
has on hand. Specifically, routers do not even exchange information with their
neighbors.
176
Routing Algorithms Optimality Principle
This simply states that if router J is on the optimal path from router I to router K,
then the optimal path from J to K also falls along this same path.
177
Routing Algorithms Shortest Path
What if we `know' the complete topology of the network? Can look at computing the optimal path.
What if we have the following network and we want to route a packet from node A to node G. What
is the shortest path (do not initially show distance).
Choose the source, and put nodes connected to source in list to consider.
Non-Adaptive
Algorithm
178
Routing Algorithms Shortest Path
Algorithm results:
Guaranteed to get the shortest path? How to prove? If an alternate shorter path to a node then
we would have already tried the path.
Non-Adaptive
Algorithm
179
Routing Algorithms Flooding
Flooding is a form of isolated routing. Does not select a specific route. When a router
receives a packet, it sends a copy of the packet out on each line (except the one on
which it arrived):
To prevent packets from looping forever, each router decrements a hop count contained in
the packet header. Whenever the hop count decrements to zero, the router discards
the packet.
180
Routing Algorithms Flooding
In selective flooding, a router sends packets out only on those lines in the general
direction of the destination. That is, don't send packets out on lines that
clearly lead in the wrong direction.
Non-Adaptive
Algorithm
181
Routing Algorithms Flow Based Routing
Takes into account both the topology AND the load (BUT still static.)
Assumes:
1. Traffic flows remain constant over time.
2. We can estimate the flow between all pairs of routers.
3. We know the topology of the network and the capacity of each link.
Given the line capacity and the flow, we can determine the delay. From that, we can
calculate the delay for the whole subnet, and between any two nodes.
Non-Adaptive
182
Algorithm
Routing Algorithms Adaptive Routing
Adaptive
Algorithm
183
Routing Algorithms Adaptive Routing
Backward learning - each packet contains source address and number of hops so far.
Use this information to learn shortest path to each source. Will learn shortest
path to all routers. Only deal with good news, not bad. `Good' may no longer
be good due to down router or congestion.
Must periodically forget and start over (with sub optimal performance after a purge).
Adaptive
Algorithm
184
Routing Algorithms Distance Vector Routing
1. Each router maintains a table (vector) giving the best known distance to
a destination and the line to use for sending there. Tables are updated
by exchanging information with neighbors.
2. Each router knows the distance (cost) of reaching its neighbors (e.g.
send echo requests).
Compares the metric in its local table with the metric in the
neighbor's table plus the cost of reaching that neighbor.
if the path via the neighbor has a lower cost, the router updates its
local table to forward packets to the neighbor.
Adaptive
Algorithm
185
Distance Vector Routing
This is an adaptive algorithm. In distance vector routing, each
router periodically shares its knowledge about the entire
network with its neighbors. The three steps in this algorithm
are
This algorithm was used in the original ARPANET. Unfortunately, it suffers from the problem:
good news travels quickly, bad news travels slowly (count-to-infinity problem).
The fundamental problem with the old Arpanet algorithm is that it continues to use `old'
information that is invalid, even after newer information becomes available.
Adaptive
Algorithm
187
Distance Vector Routing
191
Learning about the
Neighbors
193
Building Link State Packets
195
Hierarchical Routing
Hierarchical routing.
196
Broadcast Routing
Reverse path forwarding. (a) A subnet. (b) a Sink tree. (c) The
tree built by reverse path forwarding.
197
Multicast Routing
199
The Count-to-Infinity
Problem
AA
1
BB
1
CC
C 2 C oo
C - oo C A 3
C oo C 3
C B 4 C - oo
C 4 C oo
200
Count-to-Infinity
The reason for the count-to-infinity problem is
that each node only has a “next-hop-view”
For example, in the first step, A did not realize
that its route (with cost 2) to C went through node
B
201
Count-to-Infinity
The reason for the count-to-infinity problem is that each node only
has a “next-hop-view”
For example, in the first step, A did not realize that its route (with
cost 2) to C went through node B
202
Count-to-Infinity
The reason for the count-to-infinity problem is that each node only
has a “next-hop-view”
For example, in the first step, A did not realize that its route (with
cost 2) to C went through node B
203
Routing Algorithms Link State Routing
The `old' Arpanet routing algorithm was replaced in 1979. Problems with
old algorithm included:
This works only if all lines have the same capacity and
propagation delay.d
Doesn't take into account that packets have varying sizes.
Adaptive
Algorithm
204
Routing Algorithms Link State Routing
In the new algorithm:
1. Each router maintains a database describing the topology and link delays between each
router. That is, each router keeps track of the full graph of links and nodes.
5. Each router uses an SPF algorithm to calculate shortest paths based on the current values
in its database.
6. Because each router makes its calculation using the same information, better routing
decisions are made.
Adaptive
Algorithm
205
Routing Algorithms Link State Routing
2. Doesn't scale well, as each router receives updates from all other
routers.
Today, we need to think of scaling to a system with a million
nodes and many more links!
After all, 5 billion people will (eventually) be on the network!
Adaptive
Algorithm
206
Routing Algorithms Hierarchical Routing
Divide the network into regions, with a router only knowing the details of how to
route to other routers in its region.
a) In particular, a router does not know about the internal topology of other
regions.
b) Gateway is a router that knows about other regions.
A node in each region is designated as an entry point, and the entry point knows
how to reach the entry points in all the other regions. Adaptive
When traffic flows from A to B, it actually follows the path Algorithm
A - AENTRY - BENTRY - B,
where AENTRY and BENTRY are the entry points to the respective regions.
207
Routing Algorithms Hierarchical Routing
Advantage: Scaling. Each router needs less information (table space)
to perform routing.
Adaptive
Algorithm
208
Routing Algorithms Broadcast Routing
2. Flood packets to all nodes. Flooding generates many packets and consumes too much bandwidth.
209
Routing Algorithms Broadcast Routing
If the packet arrives on another line, assume that the packet is a copy -
it didn't arrive on the shortest path - and discard it.
Adaptive
Algorithm
210
Congestion Control Overview
CONGESTION MECHANISMS:
When one part of the subnet (e.g. one or more routers in an area) becomes
overloaded, congestion results. Congestion can be dealt with by:
1. Congestion control - when the problem occurs, limit senders or reroute. This
is a reactive mode. (No, this is not an antihistamine!!)
Congestion control means making sure the subnet can handle the offered traffic.
Flow control means preventing one sender from overflowing one receiver.
Congestion deals with wires and routers, while flow deals with hosts.
211
Congestion Control Overview
The subnet must prevent additional packets
from entering the congested region until those
already present can be processed.
The congested routers can discard queued
packets to make room for those that are
arriving.
212
Congestion Control Congestion Prevention Policies
Pre-allocation schemes aim to prevent congestion from happening in the first place.
For example, we can require that resources be pre-allocated before any packets can
be sent, guaranteeing that resources will be available to process each packet.
In virtual circuit networks, for example, the sender opens a connection before sending
data.
The circuit setup operation selects a path through the subnet, and each router on
the path dedicates buffer space and bandwidth to the new circuit.
What happens when a user attempts to open a virtual circuit and the subnet is
congested?
The subnet can refuse to open the connection, forcing the user to wait until
sufficient resources become available.
Note: The ability of the subnet to reject requests to open connections is an important
property of connection oriented networks.
213
Congestion Control Traffic Shaping
Control the rate at which packets are sent (not just how many). Widely used in ATM
networks.
At set up, the sender and carrier negotiate a traffic pattern (shape).
Leaky Bucket Algorithm used to control rate in a datagram network. Fig. 5.24.
A single-server queue with constant service time.
If bucket (buffer) overflows then packets are discarded.
Enforces a constant output rate regardless of burstiness of input. Does nothing when
input is idle.
The Token Bucket Algorithm causes a token to be generated periodically, which during
idle periods can be saved up.
214
Congestion Control Flow Control
Flow control is one way of preventing a fast sender from overwhelming a slow receiver. Flow
control can be helpful at reducing congestion, but it can't really solve the congestion
problem. For example, suppose we connect a fast sender and fast receiver (e.g., two
Crays) using a 9.6 kbps line:
If the two machines use a sliding window protocol, and the window is large, the link will
become congested in a hurry.
If the window size is small (e.g., 2 packets), the link won't become congested. Note how
the window size limits the total number of packets that can be in transmission at one
time.
User process to user process (end-to-end). Later, we'll see how TCP uses flow control at
the end-to-end level.
Host to host. For example, if multiple application connections share a single virtual circuit
between two hosts.
215
Congestion Control Choke Packets
Advantage:
1. Dynamic. Host sends as much data as it wants, the network informs it
when it is sending too much.
216
Congestion Control Choke Packets
Disadvantages:
1. Difficult to tune.
a) By how much should a host slow down?
b) The answer depends on how much traffic the host is sending, how much
of the congestion it is responsible for, and the total capacity of the
congested region.
c) Such information is not readily available in practice.
Desirable:
More attention paid to reserving resources so that chances of congestion are
reduced and the quality of service is more reliable.
217
Congestion Control Load Shedding
Opposite Approach:
We could preallocate no resources in advance, and take our chances
that resources will be available when we need them.
When insufficient resources are present to process existing packets,
discard queued packets to make room for newly arriving ones.
218
Congestion Control Load Shedding
If two adjacent routers, A and B, are sending packets to each other, since
both are waiting for the other to accept a packet, neither can proceed.
Solution: Reserve at least one buffer for each input line and use it to hold
incoming packets. Note that we can extract the ACK field and still discard
the packet, if we don't have buffers to hold it.
219
Congestion Control Load Shedding
2. Non-deterministic. There is less guarantee than with virtual circuits that packets
will ever reach their destination.
3. Requires that sending hosts pay attention to congestion. If the network can't
prevent a host from sending data, a host can overload the network. In particular,
a `broken' host may cause the network to become overly congested.
220
RIP - OSPF
CST 415
221
Topics
Definitions
RIP
OSPF
222
Definitions
BGP – Boundary Gateway Protocol
IGP – Interior Gateway Protocol
RIP – Routing Information Protocol
OSPF – Open Shortest Path First
223
Definitions
224
Definitions
There are many IGP protocols.
The specific protocol a specific
router depends on
The router manufacturer
e.g. Cisco may have a proprietary
protocol that relies on a specific
hardware implementation.
The generation of the router
IGPs continued to be refined from
router generation to generation.
225
RIP
routed
RIP became widely used through
RIP Operation
Uses simple distance-vector
routing
Partitions participants into
added.
229
RIP
and Y
Dx(Y,Z) : Distance at X from Y to Z
X 3 Z 2 Y
Dx(Y,Z) = 2
Intermediary
X Z Network Y
What is the
Dz(Y,w) = (2,4,8,3) necessary topology
w-set of network routes of the Intermediary
Network?
Dx(Y,Z) = c(X,Z) + minw{Dz(Y,w)}
= 1 + min(2,4,8,3)
= 3
234
RIP
RIP defines a maximum hop
count for a valid route to be 16.
This helps avoid the propagation
of circular routes.
235
RIP
236
RIP – Message Format
237
RIP – Message Format
Command Meaning
1 Request routing information
2 Response containing network-distance pairs from
senders routing tables.
238
OSPF
Open Shortest Path First
• Areas communicate
through Area Border
Routers.
• The backbone
network connects areas
together.
• A Area Border
Router maintains
topological information
about networks it is in
241 charge of bridging.
OSPF – Shortest Path
3
R5
242
OSPF – Shortest Path
3
R5
243
OSPF – Shortest Path
R3
5
3
R5
244
OSPF – Shortest Path
R3, R0
5
3
R5
245
OSPF – Shortest Path
R3, R0, R1
5
3
R5
246
OSPF – Shortest Path
3
R5
247
OSPF – Shortest Path
248
OSPF – Shortest Path
The algorithm described above
is a simplified version of
Dijkstras algorithm.
The BBN algorithm is a further
251
OSPF – Message Format :
Header
252
OSPF – Message Format :
Header
254
Basic BGP Review
255
Border Gateway Protocol
256
BGP
Path Vector Protocol
Incremental Updates
Many options for policy enforcement
Classless Inter Domain Routing (CIDR)
Widely used for Internet backbone
Autonomous systems
257
Path Vector Protocol
BGP is classified as a path vector
routing protocol (see RFC 1322)
A path vector protocol defines a route as
a pairing between a destination and the
attributes of the path to that
destination.
12.6.126.0/24
12.6.126.0/24 207.126.96.43
207.126.96.43 1021
1021 006461
64617018
70186337
633711268
11268i i
AS Path
258
AS-Path
Sequence of ASes a
route has traversed AS 200 AS 100
Loop detection 170.10.0.0/16 180.10.0.0/16
259
AS-Path loop detection
AS 200 AS 100
170.10.0.0/16 180.10.0.0/16
260
Autonomous System (AS)
AS 100
261
BGP Basics
Peering
A C
AS 100 AS 101
B D
E
BGP speakers are
called peers
AS 102
262
BGP General Operation
Learns multiple paths via internal
and external BGP speakers
Picks the best path and installs in
the forwarding table
Policies applied by influencing the
best path selection
263
External BGP Peering (eBGP)
AS 100 AS 101
C
E
Topology independent
Each iBGP speaker must peer with
every other iBGP speaker in the AS
265
Internal BGP (iBGP)
BGP peer within the same AS
Not required to be directly connected
iBGP speakers need to be fully
meshed
they originate connected networks
they do not pass on prefixes learned
from other iBGP speakers
266
Figure 13-50
267
Figure 13-51
268
BGP supports classless
addressing and CIDR.
269
Figure 13-52
270
Figure 13-53
Open message
271
Figure 13-54
Update
message
272
Figure 13-55
Keepalive message
273
Figure 13-56
Notification message
274
BGP uses the
services of TCP on port 179.
275
Dynamic Host Configuration
Protocol (DHCP)
276
Dynamic Assignment of IP
addresses
Dynamic assignment of IP addresses
is desirable for several reasons:
IP addresses are assigned on-demand
Avoid manual IP configuration
Support mobility of laptops
277
Solutions for dynamic assignment of IP
addresses
Reverse Address Resolution Protocol
(RARP)
Works similar to ARP
Broadcast a request for the IP address
associated with a given MAC address
RARP server responds with an IP address
Only assigns IP address (not the default
router and subnetmask)
IP address ARP Ethernet MAC
address
(32 bit)
(48 bit)
RARP
278
BOOTP
BOOTstrap Protocol (BOOTP)
From 1985
Host can configure its IP parameters at boot time.
3 services.
IP address assignment.
Detection of the IP address for a serving machine.
The name of a file to be loaded and executed by the client
machine (boot file name)
279
Dynamic Host Configuration
Protocol (DHCP)
280
DHCP
Dynamic Host Configuration Protocol (DHCP)
From 1993
An extension of BOOTP, very similar to DHCP
Same port numbers as BOOTP
Extensions:
Supports temporary allocation (“leases”) of IP addresses
DHCP client can acquire all IP configuration parameters
needed to operate
DHCP is the preferred mechanism for dynamic
assignment of IP addresses
DHCP can interoperate with BOOTP clients.
281
BOOTP Interaction
(b)
(a) Argon
Argon 128.143.137.144
00:a0:24:71:e4:44 BOOTP Server 00:a0:24:71:e4:44 DHCP Server
BOOTP Response:
IP address: 128.143.137.144
BOOTP Request
00:a0:24:71:e4:44 Server IP address: 128.143.137.100
Sent to 255.255.255.255 Boot file name: filename
DHCP Request
00:a0:24:71:e4:44
Sent to 255.255.255.255
Argon
128.143.137.144
00:a0:24:71:e4:44 DHCP Server
DHCP Response:
IP address: 128.143.137.144
Default gateway: 128.143.137.1
Netmask: 255.255.0.0
283
BOOTP/DHCP Message
Format
OpCode Hardware Type
Hardware Address
Length
Hop Count
Unused (in BOOTP)
Number of Seconds
Flags (in DHCP)
Transaction ID
Client IP address
Your IP address
Server IP address
Gateway IP address
Options
285
DHCP Message Type
Value Message Type
Message type is sent as
an option. 1 DHCPDISCOVER
2 DHCPOFFER
3 DHCPREQUEST
4 DHCPDECLINE
5 DHCPACK
6 DHCPNAK
7 DHCPRELEASE
8 DHCPINFORM
286
Other options (selection)
Other DHCP information that is sent as an
option:
DHCPDISCOVER
DCHP DISCOVER Sent to 255.255.255.255
DHCP Server
DHCP Client
00:a0:24:71:e4:44 DHCPOFFER DHCP Server
DHCPOFFER
DCHP OFFER
DHCP Server
288
DHCP Operation
DHCP Client
00:a0:24:71:e4:44 DHCP Server
DHCPREQUEST
DHCP Client
00:a0:24:71:e4:44 DHCP Server
DHCPREQUEST
DCHP RELEASE
290
19.3 Routing
Routing Techniques
291
Figure 19.28 Next-hop routing
292
Figure 19.29 Network-specific routing
293
Figure 19.30 Host-specific routing
294
Figure 19.31 Default routing
295
Figure 19.32 Classful addressing routing table
296
Example 10
Using the table in Figure 19.32, the router receives a packet for
destination 192.16.7.1. For each row, the mask is applied to the
destination address until a match with the destination address is
found. In this example, the router sends the packet through
interface m0 (host specific).
297
Example 11
Using the table in Figure 19.32, the router receives a packet for
destination 193.14.5.22. For each row, the mask is applied to the
destination address until a match with the next-hop address is
found. In this example, the router sends the packet through
interface m2 (network specific).
298
Example 12
Using the table in Figure 19.32, the router receives a packet for
destination 200.34.12.34. For each row, the mask is applied to the
destination address, but no match is found. In this example, the
router sends the packet through the default interface m0.
299
Chapter 7
ARP
and
RARP
300
CONTENTS
• ARP
• ARP PACKAGE
• RARP
301
Figure 7-1
302
Figure 7-2
303
7.1
ARP
304
Figure 7-3
ARP operation
305
Figure 7-4
ARP packet
306
Figure 7-5
307
Figure 7-6:a
308
Figure 7-6:b
309
Figure 7-6:c
310
Figure 7-6:d
311
An ARP request is broadcast;
an ARP reply is unicast.
312
7.3
RARP
313
Figure 7-10
RARP
operation
314
The RARP request packets are
broadcast;
the RARP reply packets are
unicast.
315
Figure 7-11
RARP packet
316
Figure 7-12
317
Internet Control Message
Protocol (ICMP)
318
Overview
The IP (Internet Protocol) relies on
several other protocols to perform
necessary control and routing
functions:
Control functions (ICMP)
Routing
RIP
Multicast signaling (IGMP)
OSPF BGP PIM
Setting up routing tables (RIP, OSPF, BGP,
PIM(Protocol-Independent Multicast), …)
ICMP IGMP Control
319
Overview
The Internet Control Message Protocol (ICMP) is a
helper protocol that supports IP with facility for
Error reporting
Simple queries
IP payload
320
ICMP message format
bit # 0 7 8 15 16 23 24 31
additional information
or
0x00000000
4 byte header:
• Type (1 byte): type of ICMP message
• Code (1 byte): subtype of ICMP message
• Checksum (2 bytes): similar to IP header checksum. Checksum is calculated over entire
ICMP message
If there is no additional data, there are 4 bytes set to zero.
each ICMP messages is at least 8 bytes long
321
ICMP Query message
ICMP Request
ICMP Reply
ICMP query:
• Request sent by host to a router or host
• Reply sent back to querying host
322
Example of ICMP Queries
Type/Code: Description
323
Example of a Query:
Echo Request and Reply
324
Example of a Query:
ICMP Timestamp
A system (host or router) asks Sender
Sender
Timestamp
Request
another system for the current
time. Receiver
Receiver
Time is measured in
Timestamp
milliseconds after midnight Reply
UTC (Universal Coordinated
Time) of the current day
Sender sends a request,
receiver responds with reply
Type Code
Checksum
(= 17 or 18) (=0)
identifier sequence number
325
ICMP Error message
IP datagram IP datagram
is discarded
ICMP Error
Message
326
ICMP Error message
ICMP Message
Unused (0x00000000)
• ICMP error messages include the complete IP header and the first 8 bytes of the
payload (typically: UDP, TCP)
327
Frequent ICMP Error
message
Type Code Description
328
Some subtypes of the “Destination
Unreachable”
329
Example: ICMP Port
Unreachable
RFC 792: If, in the destination host, the IP module cannot deliver the datagram because the indicated
active, the destination host may send a destination unreachable message to the source host.
protocol module or process port is not
Scenario:
Request
a
service
No process
at a por
t 80 is waiting
at port 80
Client
Client Server
Server
t e
Por achabl
e
Unr
330
IPv4
331
MTU
IP Packet
332
IP Fragmentation
If IP packet is longer than the MTU, the
router breaks packet into smaller packets
Called IP fragments
MTU
IP Packet 3 2 1
IP Packets
Fragmentation
333
IP Fragmentation
What is Fragmented?
Only the original data field
New headers are created
MTU
IP Packet 3 2 1
IP Packets
Fragmentation
334
IP Fragmentation
What Does the Fragmentation?
The router
Not the subnet
MTU
IP Packet 3 2 1
IP Packets
Fragmentation
335
Multiple Fragmentations
Fragmentation
336
Defragmentation
Source Destination
Host Host
Internet Internet
Process Process
Defragmentation
337
Fragmentation and IP
Fields
More Fragments field (1 bit)
1 if more fragments
0 if not
Source host internet process sets to 0
If router fragments, sets More
Fragments field in last fragment to 0
In all other fragments, sets to 1
0 0 1 1
338
Identification Field
IP packet has a 16-bit Identification
field
Version Hdr Len
(4) (4)
TOS (8) Total Length in bytes (16)
Source IP Address
Destination IP Address
Data Field
339
Identification Field
IP packet has a 16-bit Identification
field
Source host internet process places a
random number in the Identification
field
Version Hdr Len
Different for
TOSeach
(8) IP packet
Total Length in bytes (16)
(4) (4)
Indication (16 bits) Flags (3) Fragment Offset (13)
340
Identification Field
IP packet has a 16-bit Identification
field
If router fragments, places the original
Identification field value in the
Identification field of each fragment
47 47 47 47
341
Identification Field
Purpose
Allows receiving host’s internet layer
process know what fragments belong
to each original packet
Works even if an IP packet is
fragmented several times
47 47 47 47
342
Fragment Offset Field
343
Fragment Offset Field
Receiving host’s internet layer
process assembles fragments in
order of increasing fragment offset
field value
This works even if fragments arrive
out of order!
Works even if fragmentation occurs
Fragment Offset Field
multiple times
730 212 0
344
Fragmentation: Recap
IP Fragmentation
Data field of a large IP packet is
fragmented
The fragments are sent into a
series of smaller IP packets fitting a
network’s MTU
Fragmentation is done by routers
Fragmentation may be done
multiple times along the route
345
Defragmentation: Recap
IP Defragmentation
Defragmentation (reassembly) is done
once, by destination host’s internet
layer process
346
Defragmentation: Recap
348
Outline
349
Internet Protocol
Transports a datagram from source host to
destination, possibly via several intermediate
nodes (“routers”)
Service is:
Unreliable: Losses, duplicates, out-of-order
delivery
Best effort: Packets not discarded capriciously,
independently
350
IP Datagram Header
0 4 8 16 19 31
VERS HLEN TOS TOTAL LENGTH
SOURCE ADDRESS
DESTINATION ADDRESS
351
Problems with IPv4: Limited
Address Space
IPv4 has 32 bit addresses.
Flat addressing (only netid + hostid with
“fixed” boundaries)
Results in inefficient use of address space.
Class B addresses are almost over.
Addresses will exhaust in the next 5 years.
IPv4 is victim of its own success.
352
Problems with IPv4: Routing
Table
Explosion
IP does not permit route aggregation
(limited supernetting possible with new
routers)
Mostly only class C addresses remain
Number of networks is increasing very fast
(number of routes to be advertised goes up)
Very high routing overhead
lot more memory needed for routing table
lot more bandwidth to pass routing information
lot more processing needed to compute routes
353
Problems with IPv4:
Header Limitations
Maximum header length is 60 octets.
(Restricts options)
Maximum packet length is 64K octets.
(Do we need more than that ?)
ID for fragments is 16 bits. Repeats every
65537th packet.
(Will two packets in the network have same ID?)
Variable size header.
(Slower processing at routers.)
No ordering of options.
(All routers need to look at all options.)
354
Problems with IPv4: Other
Limitations
Lack of quality-of-service support.
Only an 8-bit ToS field, which is hardly
used.
Problem for multimedia services.
No support for security at IP layer.
Mobility support is limited.
355
IP Address Extension
Strict monitoring of IP address assignment
Private IP addresses for intranets
Only class C or a part of class C to an organization
Encourage use of proxy services
Application level proxies
Network Address Translation (NAT)
Remaining class A addresses may use CIDR
Reserved addresses may be assigned
356
IPng Criteria
At least 109 networks, 1012 end-systems
Datagram service (best effort delivery)
Independent of physical layer technologies
Robust (routing) in presence of failures
Flexible topology (e.g., dual-homed nets)
Better routing structures (e.g., aggregation)
High performance (fast switching)
Support for multicasting
357
IPng Criteria
Support for mobile nodes
Support for quality-of-service
Provide security at IP layer
Extensible
Auto-configuration (plug-and--play)
Straight-forward transition plan from
IPv4
Minimal changes to upper layer
protocols
358
IPv6: Distinctive Features
Header format simplification
Expanded routing and addressing
capabilities
Improved support for extensions and
options
Flow labeling (for QoS) capability
Auto-configuration and Neighbour discovery
Authentication and privacy capabilities
Simple transition from IPv4
359
IPv6 Header Format
0 4 12 16 24 31
Vers Traffic Class Flow Label
Source Address
Destination Address
360
IPv6 Header Fields
Version number (4-bit field)
The value is always 6.
Flow label (20-bit field)
Used to label packets requesting special handling by
routers.
Traffic class (8-bit field)
Used to mark classes of traffic.
Payload length (16-bit field)
Length of the packet following the IPv6 header, in octets.
Next header (8-bit field)
The type of header immediately following the IPv6 header.
361
IPv6 Header Fields
Hop limit (8-bit field)
Decremented by 1 by each node that forwards the
packet.
Packet discarded if hop limit is decremented to
zero.
Source Address (128-bit field)
An address of the initial sender of the packet.
Destination Address (128-bit field)
An address of the intended recipient of the packet.
May not be the ultimate recipient, if Routing
Header is present.
362
Header Changes from IPv4
Longer address - 32 bits 128 bits
Fragmentation field moved to separate header
Header checksum removed
Header length removed (fixed length header)
Length field excludes IPv6 header
Time to live Hop limit
Protocol Next header
64-bit field alignment
TOS replaced by flow label, traffic class
363
Extension Headers
Less used functions moved to extension headers.
Only present when needed.
Processed only by node identified in IPv6
destination field.
=> much lower overhead than IPv4 options
Exception: Hop-by-Hop option header
Eliminated IPv4’s 40-byte limit on options
Currently defined extension headers: Hop-by-hop,
Routing, Fragment, Authentication, Privacy, End-to-
end.
Order of extension headers in a packet is defined.
Headers are aligned on 8-byte boundaries.
364
Address Types
Unicast Address for a single interface.
Multicast Identifier for a set of interfaces.
Packet is sent to all these
interfaces.
Anycast Identifier for a set of interfaces.
Packet is sent to the nearest
one.
365
Text Representation of
Addresses
HEX in blocks of 16 bits
BC84 : 25C2 : 0000 : 0000 : 0000 : 55AB : 5521 : 0018
leading zero suppression
BC84 : 25C2 : 0 : 0 :55AB : 5521 : 18
Compressed format removes strings of 0s
BC84 : 25C2 :: 55AB : 5521 : 18
:: can appear only once in an address.
can also be used to compress leading or trailing 0s
Mixed Notation (X:X:X:X:X:X:d.d.d.d)
e.g., ::144.16.162.21
366
IPv6 Addresses
128-bit addresses
Multiple addresses can be assigned to an interface
Provider-based hierarchy to be used in the
beginning
Addresses should have 64-bit interface IDs in EUI-
64 format
Following special addresses are defined :
IPv4-mapped
IPv4-compatible
link-local
site-local
367
Unicast Addresses
Examples
3
Global Aggregate Address
13 32 16 64 bits
FP TLA NLA SLA Interface ID
Public Topology Site Interface Identifier
Topology
Link local address
10 bits 54 bits 64 bits
1111111010 0 Interface ID
Site-local address
368
Multicast Address
Scope 2 link-local
5 site-local
8 org-local
E global
Permanent groups are formed independent of scope.
369
IPv6 Routing
Hierarchical addresses are to be used.
Initially only provider-based hierarchy will be
used.
Longest prefix match routing to be used.
(Same as IPv4 routing under CIDR.)
OSPF, RIP, IDRP, ISIS, etc., will continue as is
(except 128-bit addresses).
Easy renumbering should be possible.
Provider selection possible with anycast groups.
370
QoS Capabilities
Protocol aids QoS support, not provide it.
Flow labels
To identify packets needing same quality-of-service
20-bit label decided by source
Flow classifier: Flow label + Source/Destination addresses
Zero if no special requirement
Uniformly distributed between 1 and FFFFFF
Traffic class
8-bit value
Routers allowed to modify this field
371
IPv6: Security Issues
Provision for
Authentication header
Guarantees authenticity and integrity of data
Encryption header
Ensures confidentiality and privacy
Encryption modes:
Transport mode
Tunnel mode
Independent of key management
algorithm.
Security implementation is mandatory
requirement in IPv6.
372
Mobility Support in IPv6
Mobile computers are becoming commonplace.
Mobile IPv6 allows a node to move from one link to
another without changing the address.
Movement can be heterogeneous, i.e., node can move
from an Ethernet link to a cellular packet network.
Mobility support in IPv6 is more efficient than mobility
support in IPv4.
There are also proposals for supporting micro-mobility.
373
Neighbour Discovery
Router Discovery - determines set of routers on the
link.
Prefix Discovery - set of on-link address prefixes.
Parameter Discovery - to learn link parameters such
as link MTU, or internet parameters like hop limit, etc.
Address Auto-configuration - address prefixes
that can be used for automatically configuring interface
address.
Address resolution - IP to link-layer address mapping.
Duplicate Address Detection.
Route Redirect - inform of a better first hop node to
reach a particular destination.
374
Neighbour Discovery
Operation
Based on ICMPv6 messages
Router Solicitation (RS)
Router Advertisement (RA)
Neighbour Solicitation (NS)
Neighbour Advertisement (NA)
Redirect
Router Solicitation
sent when an interface becomes enabled,
hosts request routers to send RA immediately.
375
Neighbour Discovery
Operation (contd..)
Router advertisement
Sent by routers periodically or in
response to RS.
Hosts build a set of default routers based
on this information.
Provides information for address auto-
configuration, set of on-link prefixes etc.
Supplies internet/subnet parameters, like
MTU, and hop limit.
Includes router’s link-layer address.
376
Neighbour Discovery
Operation (contd..)
Neighbour Solicitation
To request link-layer address of neighbour
Also used for Duplicate Address Detection
Neighbour Advertisement
Sent in response to NS
May be sent without solicitation to announce
change in link-layer address
Redirect - used to inform hosts of a
better first hop for a destination.
377
Additional Features
Anycast Addresses
Multiple nodes on link may have this address
override.
Proxy advertisements
Router may send NA on behalf of others.
378
Address Auto-
configuration
The problem
System bootstrap (“plug and play”)
Address renumbering
Addressing Possibilities
Manual Address configured by hand
Autonomous Host creates address with no external
interaction (e.g., link local)
Semi-autonomous Host creates address by combining a priori
information and some external information.
Stateless Server Host queries a server, and gets an address.
Server does not maintain a state.
Stateful Server Host queries a server, and gets an address.
Server maintains a state.
379
Auto-configuration in IPv6
Link-local prefix concatenated with 64-bit MAC
address. (Autonomous mode)
Prefix advertised by router concatenated with
64-bit MAC address. (Semi-autonomous mode.)
DHCPng (for server modes)
Can provide a permanent address (stateless mode)
Provide an address from a group of addresses, and
keep track of this allocation (stateful mode)
Can provide additional network specific information.
Can register nodes in DNS.
380
Address Renumbering
To migrate to a new address
change of provider
change in network architecture
Methods
router adds a new prefix in RA, and informs that the
old prefix is no longer valid.
When DHCP lease runs out, assign a new address to
node.
DHCPng can ask nodes to release their addresses.
Requires DNS update. DHCPng can update DNS for clients.
Existing conversations may continue if the old
address continues to be valid for some time.
381
Upper Layer Issues
Minor changes in TCP
Maximum segment size should be based on Path MTU.
The packet size computation should take into account larger size
of IP header(s).
Pseudo-header for checksum is different.
UDP checksum computation is now
mandatory.
Most application protocol specifications are
independent of TCP/IP - hence no change.
FTP protocol exchanges IPv4 addresses -
hence needs to be changed.
382
The pseudo-header is changed in
checksum computation:
Address are 128 bits.
Payload length is 32 bits.
Payload length is not copied from IPv6 header.
(Extension headers should not be counted.)
Next header field of last extension header is used in place
of protocol.
UDP packets must also have
checksum.
(Since no IP checksum now.)
383
Changes in Other Protocols
ICMPv6
Rate limiting feature added
Timer based
Bandwidth based
IGMP, ARP merged
Larger part of offending packet is included
DNS
AAAA type for IPv6 addresses
A6 type: recursive definition of IP address
Queries that do additional section processing are
redefined to do processing for both ‘A’ and ‘AAAA’
type records
384
Socket API
“Sockets” interface – the de facto standard API for
TCP/IP Applications.
Need to change Socket API in order to reflect the
increased address length in IPv6.
Also need to make new features like flow label,
visible to applications.
A few new library routines
Complete source and binary compatibility with
original API.
One can have some sockets using IPv4 and others
using IPv6.
385
Transition to IPv6: Design
Goal
No “flag”day.
Incremental upgrade and deployment.
Minimum upgrade dependencies.
Interoperability of IPv4 and IPv6 nodes.
Let sites transition at their own pace.
Basic migration tools
Dual stack and tunneling
Translation
386
Transition Mechanisms: Dual
Stack
387
Transition Mechanism:
Tunnels
Tunnel IPv6 packets across IPv4
topology.
Configured tunnels:
Explicitly configured tunnel endpoints.
Router to router, host to router.
Automatic tunnels:
Automatic address resolution using
embedded IPv4 address (like IPv4-
compatible address).
Host to host, router to host
388
Transition mechanism:
Translation
This will allow communication between IPv6
only hosts and IPv4 only hosts.
A typical translator consists of two components:
translation between IPv4 and IPv6 packets.
Address mapping between IPv4 and IPv6
For translation, three technologies are
available:
header conversion
transport relay
application proxy
389
NAT-PT
Combination of Network Address
Translation (NAT) and Protocol
Translation (PT)
Meant for communication between
IPv6-only and IPv4-only nodes.
No change is needed on the IPv6-
only nodes.
But translation is not stateless.
Hence, single point of failure.
390
NAPT-PT
391
Stateless IP-ICMP Translation
(SIIT)
SIIT also translates between IPv4 and
IPv6 headers.
Stateless: Translator does not keep
address mapping.
There has to be a translator on every
path, not necessarily on all physical links.
Uses IPv4-translatable addresses.
Assumes that there is an IPv4 address
pool of addresses for the subnet.
392
Issues in Translation
393
Transition Plan for Internet
Maintain complete V4 routing till
addresses last.
Upgrade V4 routers to dual stack.
Incrementally build up V6 backbone
routing system.
Use v6-over-v4 tunnels to construct 6bone.
Grow like Mbone (multicast backbone).
De-activate tunnels as soon as underlying
path upgraded to V6.
394
Transition Options for User
Sites
Incrementally upgrade V4 hosts to dual
V4/V6
Use IPv4-compatible addresses with existing IPv4
address assignments
Host-to-host automatic tunneling over IPv4
Upgrade routers to IPv6.
Hosts may require native IPv6 addresses
DNS upgrade is needed before hosts get IPv6
addresses
Connect IPv6 router to an IPv6-enabled ISP.
Install translators like NAT-PT or SIIT.
395