Ec3401 Networks and Security-Unit Ii-Notes
Ec3401 Networks and Security-Unit Ii-Notes
ROUTING:
Routers have enough knowledge of the network topology so they can choose the right port onto which each
packet should be output
1
The nodes of the graph, labeled Athrough F, may be hosts, switches, routers, or networks. For our
initialdiscussion, we will focus on the case where the nodes are routers.
Theedges of the graph correspond to the network links. Each edge has anassociated cost, which gives
some indication of the desirability of sendingtraffic over that link.
The basic problem of routing is to find the lowest-cost path between any two nodes, where the cost of a
path equals the sum of the costs of all the edges that make up the path.
Routing is the process by which routing tables are built. The routing tables are used to find the path
between every pair of nodes in a network.
The routing depends on complex distributed algorithms.There are two types of routing protocols. They
are
1. Intra domain routing protocol or Interior Gateway Protocol –– all the routers are under the same
administrative control.
2. Inter domain routing protocol ––controlled by different administrative control.
For a simple network, we can calculate all shortest paths and load them into some nonvolatile storage
on each node.
Such a static approach has several shortcomings
• It does not deal with node or link failures
• It does not consider the addition of new nodes or links
• It implies that edge costs cannot change
Need a distributed and dynamic protocol
• Two main classes of protocols
• Distance Vector(RIP)
• Link State (OSPF)
2
Each node constructs a one dimensional array (a vector) containing the “distances” (costs) to all other
nodes and distributes that vector to its immediate neighbors
Initialization
The tables are stable; each node knows how to reach any other node and the cost. Each node can know
only the distance between itself and its immediate neighbors, those directly connected to it.
So for the moment, we assume that each node can send a message to the immediate neighbors and find
the distance between itself and these neighbors. The distance for any entry that is not a neighbor is
marked as infinite.
Sharing
The whole idea of distance vector routing is the sharing of information between neighbors.
Node A does not know about node G, node F does. So if node F shares its routing table with A, node A
can also know how to reach node G.
Nodes A and F, as immediate neighbors, can improve their routing tables if they help each other.
3
There is only one problem. How much of the table must be shared with each neighbor? A node
is not aware of a neighbor's table.
The best solution for each node is to send its entire table to the neighbor and let the neighbor
decide what part to use and what part to discard. However, the third column of a table (next
stop) is not useful for the neighbor.
When the neighbor receives a table, this column needs to be replaced with the sender's name. If
any of the rows can be used, the next node is the sender of the table.
A node therefore can send only the first two columns of its table to any neighbor. Sharing here
means sharing only the first twocolumns.
means sharing only the first twocolumns.
Updating
When a node receives a two-column table from a neighbor, it needs to update its routingtable. Updating
takes three steps:
1.The receiving node needs to add the cost between itself and the sending node to each value in the
second column.
2. The receiving node needs to add the name of the sending node to each row as the third column if the
receiving node uses information from any row. The sending node is the next node in the route.
3. The receiving node needs to compare each row of its old table with the corresponding row of the
modified version of the received table.
a. If the next-node entry is different, the receiving node chooses the row with the smaller cost. If
there is a tie, the old one is kept.
b. If the next-node entry is the same, the receiving node chooses the new row.
c. Node A must not ignore this value even though its old entry is smaller. The old route does
not exist anymore. The new route has a distance of infinity.
Count-to-Infinity problem:
Slightly different circumstances can prevent the network from stabilizing
This is one of the most widely used IGP. It was developed at Berkeley. This is also known by the name of the
program that implements it, routed .This implements Distance Vector algorithm.
Features of RIP:
RIP uses a hop count metric to measure the distance to a destination. To compensate for differences in
technologies, many RIP implementations allow managers to configure artificially high hop counts
when advertising connections to slow networks. All routing updates are broadcast. This allows all hosts
on the network to know about the routes.
To prevent routes from oscillating between two or more equal cost paths, RIP specifies that existing
routes should be retained until a new route has strictly lower cost. Since RIP does not explicitly detect
5
routing loops, RIP must either assume participants can be trusted (being part of one autonomous
system) or take precautions to prevent such loops.
To prevent instabilities, RIP must use a low value for the maximum possible distance.RIP uses 16 as
the maximum hop count. This restricts the maximum network diameter of the system to 16.
To solve the slow convergence problem arising due to slow propagation of routing information, RIP
uses Hold Down. If a particular link is down, any new information about that link is not accepted till
some time. This is because the router must wait till the information about the link being down
propagates to another router before accepting information from that router about that down link.
RIP runs on top of TCP/IP. RIP allows addresses to be of a maximum size of 14 Bytes. The Distance
varies from 1 to 16 (where 16 is used to signify infinity). RIP address 0.0.0.0 denotes a default route.
There is no explicit size of the RIP message and any number of routes can be advertised.
6
Link State Routing(OSPF)
In link state routing, four sets of actions are required to ensure that each node has the routing table
showing the least-cost node to every other node.
1. Creation of the states of the links by each node, called the link state packet (LSP).
2. Dissemination of LSPs to every other router, called flooding, in an efficient and reliable way.
3. Formation of a shortest path tree for each node.
4. Calculation of a routing table based on the shortest path tree.
Strategy: Send to all nodes (not just neighbors) information about directly connected links (not entire
routing table).
Creation of Link State Packet (LSP)
A link state packet can carry a large amount of information. For the moment, however, we assume that
it carries a minimum amount of data:
o ID of the node that created the LSP
o cost of link to each directly connected neighbor
o sequence number (SEQNO)
o time-to-live (TTL) for this packet
The first two, node identity and the list of links, are needed to make the topology. The third, sequence
number, facilitates flooding and distinguishes new LSPs from old ones. The fourth, age,prevents old
LSPs from remaining in the domain for a long time.
LSPs are generated on two occasions:
1. When there is a change in the topology of the domain. Triggering of LSP dissemination is the main
way of quickly informing any node in the domain to update its topology.
2. On a periodic basis. The period in this case is much longer compared to distance vector routing. As a
matter of fact, there is no actual need for this type of LSP dissemination. It is done to ensure that old
information is removed from the domain.
Flooding of LSPs
After a node has prepared an LSP, it must be disseminated to all other nodes, not only to its neighbors.
The process is called flooding and based on the following:
1. The creating node sends a copy of the LSP out of each interface.
2. A node that receives an LSP compares it with the copy it may already have. If the newly
arrived LSP is older than the one it has (found by checking the sequence number), it discards
the LSP. If it is newer, the node does the following:
a. It discards the old LSP and keeps the new one.
b. It sends a copy of it out of each interface except the one from which the packet
arrived. This guarantees that flooding stops somewhere in the domain .
7
Flooding of link-state packets
(a) LSP arrives at node X; (b) X floods LSP to A and C;
(c) A and C flood LSP to B (but not X); (d) flooding is complete
Formation of Shortest Path Tree: DijkstraAlgorithm :
After receiving all LSPs, each node will have a copy of the whole topology. However, the topology is
not sufficient to find the shortest path to every other node; a shortest path tree is needed.
A tree is a graph of nodes and links; one node is called the root. All other nodes can be reached from
the root through only one single route. A shortest path tree is a tree in which the path between the root
and every other node is the shortest. What we need for each node is a shortest path tree with that node
as the root.
The Dijkstra algorithm creates a shortest path tree from a graph. The algorithm divides the nodes into
two sets: tentative and confirmed .It finds the neighbors of a current node, makes them tentative,
examines them, and if they pass the criteria,makes them permanent.
In practice, each switch computes its routing table directly from the LSP’s it has collected using a
realization of Dijkstra’s algorithm called the forward search algorithm. Specifically each switch maintains two
lists, known as Tentative and Confirmed. Each of these lists contains a set of entries of the form (Destination,
Cost, NextHop)
Algorithm:
Initialize the Confirmed list with an entry for myself; this entry has a cost of 0
Next = node just added to the Confirmed list in the previous step, select its LSP
For each neighbor (Neighbor) of Next,
calculate the cost (Cost) to reach this Neighbor as the sum of the cost from myself to
Next and from Next to Neighbor
If Neighbor is currently on neither the Confirmed nor the Tentative list, then add
(Neighbor, Cost, Nexthop) to the Tentative list, where Nexthop is the direction I go to
reach Next
If Neighbor is currently on the Tentative list, and the Cost is less than the currently listed
cost for the Neighbor, then replace the current entry with (Neighbor, Cost, Nexthop)
where Nexthop is the direction I go to reach Next
If the Tentative list is empty, stop. Otherwise, pick the entry from the Tentative list with the
lowest cost, move it to the Confirmed list, and return to Step 2.
Example:
8
OSPF(Open Shortest Path First )
This is an Interior Gateway Protocol designed by the Internet Engineering Task Force (IETF). This
algorithm scales better than the vector distance algorithms. This Protocol tackles several goals:
OSPF includes type of service(ToS) routing. So, you can install multiple routers to a given destination,
one for each type of service. When routing a datagram, a router running OSPF uses both the destination
address and type of service fields in the IP Header to choose a route.
OSPF provides load balancing. If there are multiple routes to a given destination at the same cost,
OSPF distributes traffic over all the routes equally.
OSPF allows for creation of AREA HIERARCHIES. This makes the growth of the network easier and
makes the network at a site easier to manage. Each area is self-contained, so, multiple groups within a
site can cooperate in the use of OSPF for routing.
OSPF protocol specifies that all exchanges between the routers be authenticated. OSPF allows variety
of authentication schemes, and even allows one area to choose a different scheme from the other areas.
To accommodate multi-access networks like ethernet, OSPF allows every multi-access network to have
a designated router( designated gateway).
To permit maximum flexibility, OSPF allows the description of a virtual network topology that
abstracts away from details of physical connections.
OSPF also allows for routers to exchange routing information learned from other sites. The message
format distinguishes between information acquired from external sources and information acquired
from routers interior to the site, so there is no ambiguity about the source or reliability of routes.
Messages in OSPF
There are 5 types of messages in OSPF:
9
1. Hello message
Allow routers to test if a node is reachable
2. Link State Advertisement (LSA)
Topology information from a router (i.e. LSPs)
3. Link status request (LSR)
Request to another router to determine the status of one or more links
4. Link status update (LSU)
Responses to a link status request message
5. Link status acknowledgement
Used to indicate that the LSU was received (reliable transfer)
10
LS Age is the equivalent of a time to live, expect that it counts up and the LSA expires when the age
reaches a defined maximum value.
Type field tells us that is a type 1 LSA.
Link stateand the Advertising router field are identical.
LS Sequence numberis used to detect old or duplicate LSAs.
LS Checksumis for error control
Length is the length in bytes of the complete LSA
TOS --type of service information
LSA is represented by a Link ID, some Link Data and a metric. The first two of these fields identify
the link
Metric is the cst of the link.
Type tells something about the link like point-to-point link.
METRICS:
Link costs, or metrics, are known when we execute the routing algorithm. Routers use various metrics
and calculations to determine the best route for a packet to reach its final network destination.One
example, which is quite reasonable and very simple, is to assign a cost of 1 to all links—the least-cost
route will then be the one with the fewest hops.
Such an approach has several drawbacks,
First, it does not distinguish between links on a latency basis.
Second, it does not distinguish between routes on a capacity basis,
Third, it does not distinguish between links based on their current load, making it impossible to
route around overloaded links.
The ARPANET was the testing ground for a number of different approaches to link cost calculation.
The original ARPANET routing metric measured the number of packets queued for transmission on
each link.
The second version of ARPANET took both bandwidth and latency as a measure of load.This was done
as follows.
First, each incoming packet was timestamped with its time of arrival at the router
(ArrivalTime); its departure time from the router (DepartTime) was also recorded.
Second, when the link-level ACK was received from the other side, the sender node computed
the delay for that packet as
Delay = (depart time - arrival time) + transmissiontime + link propagation delay
11
whereTransmission Time and Latency were statically defined for the link and captured the
link’s bandwidth and latency, respectively.
(DepartTime− ArrivalTime) represents the amount of time the packet was delayed (queued) in
the node due to load. If the ACK did not arrive, but instead the packet timedout, then
DepartTime was reset to the time the packet was retransmitted.
In this case,DepartTime− ArrivalTime captures the reliability of the link—the more frequent
the retransmission of packets, the less reliable the link, and the more we want to avoid it.
Finally, the weight assigned to each link was derived from the average delay experiencedby the
packets recently sent over that link.(Depart time - arrival time) captures queuing length.
If the packet was retransmitted the ‘depart time’ is updated with the new one.Repeated
transmissions declare the link is unreliable.
Measurements are averaged over 10 seconds
o Update is sent if difference > threshold, or for every 50 seconds
Achieves better network utilization
A highly loaded link never shows a cost of more than three times its cost whenidle;
The most expensive link is only seven times the cost of the least expensive;
A high-speed satellite link is more attractive than a low-speed terrestrial link;
Cost is a function of link utilization only at moderate to high loads.
12
All these factors mean that a link is much less likely to be universally abandoned, since
a threefold increase in cost is likely to make the link unattractive for some paths while letting it remain
the best choice for others.
The slopes, offsets, and breakpoints for the curves in Figure 4.21 were arrived at by a great deal of trial
and error, and they werecarefully tuned to provide good performance.
SWITCH BASICS
Switch
A mechanism that allows us to interconnect links to form a large network
A multi-input, multi-output device which transfers packets from an input to one or more outputs
Block diagram of Switch/Router
A 4 x 4 Switch
Control
processor
Switch
Input Fabric Output
portsports
The control processor is responsible for running the routing protocols(in case of router) and generally
acts as the central point of control of the switch/router. The switching fabric transfers packets from input ports
to output ports. It may have internal buffer spaceand the ports provide a range of functionality to allow the
router to interface to links of various types (e.g. Ethernet, SONET, etc.).
13
Types of Switch fabrics
1. Shared bus
2. Shared memory
3. Crossbar
Shared bus
I/O bus is shared
Bus bandwidth determines the throughput of the switch
A conventional workstation can be used as a switch
I/O bus
CPU Interface 1
Memory busInterface 2
Interface 3
Main memory
Shared memory
Memory bus is shared
Memory bandwidth determines switch’s throughput
Packets are written into a memory location by an input port and then read from memory by
output ports
Crossbar Switch
A crossbar switch is a matrix of pathways configured to connect any input port to output port.
4 X 4 crossbar switch
Self-routing fabric
A special ‘self routing header’ is appended to the packet by the input port after it has determined which
output the packet needs to go to.
14
Original packet header
Self-routing header
GLOBAL INTERNET
ADDRESSING :
An Internet Address is made of four bytes (32 bits) that define a host’s connection to a network.
Address Classes
The IP specifications divide addresses into the following classes :
15
Class A - For large networks
0 7 bits of the network address 24 bits of host address
Class B - For medium networks
1 0 14 bits of the network address 16 bits of host address
Class C - For small networks
1 1 0 21 bits of the network address 8 bits of host address
Class D - For multi-cast messages ( multi-cast to a "group" of networks )
1 1 1 0 28 bits for some sort of group address
Class E - Currently unused, reserved for potential uses in the future
1 1 1 1 28 bits
There are currently 5 different field lengths patterns, each define a class of addresses. These are designed to
cover the needs of different types of organizations, class A, B, C, D, E.
SUBNETTING :
IP address is 32 bits long.
One portion is net id, another portion is host id.
There exists 2 levels of hierarchy.
To reach host, first search for network with netid, then search host with host id. So in any organization, if
hosts are to be grouped, it is not possible. Hence the solution for this program is subnetting.
16
Subnettingis the process of dividing a single network into smaller networks. The networks are called
subnetworks such that for the rest of the internet, it is a single network.
To create a subnet address, a network administrator borrows bits from the original host portion and
designates them as the subnet field.
Adding subnetwork creates 3 level hierarchy in IP Address, Net id, subnet id, host id.
Subnet Mask
Masking is a process that extracts sub network address from an IP Address if it is a sub network.
• Determines which part of an IP address is the network field and which part is the host field
• Follow these steps to determine the subnet mask:
– 1. Express the subnetwork IP address in binary form.
– 2. Replace the network and subnet portion of the address with all 1s.
– 3. Replace the host portion of the address with all 0s.
– 4. Convert the binary expression back to dotted-decimal notation.
Calculating the subnet id from IP address and subnet mask by performing ‘and’ function
17
Example of Subnetting
18
PROBLEM
Design a subnet addressing scheme for our college with one class B address. Individual networks to be
supported CSE 2 networks with 300 systems each. Computer center – 2 networks with 500 systems each,
ECE – 1 network with 100 systems, EEE – 1 network with 100 systems, Science Block – 1 network with
100 systems, other Engg faculty – 2 networks with 100 systems each, Hostel - 2 networks with 100
systems each. Show the entries to be used at the routers.
(16)
Routing Areas
19
As a first example of using hierarchy to scale up the routing system, we’ll examine how link-state
routing protocols (such as OSPF and IS-IS) can be used to partition a routing domain into subdomains called
areas. (Theterminology varies somewhat among protocols—we use the OSPF terminologyhere.) By adding
this extra level of hierarchy, we enable singledomains to grow larger without overburdening the routing
protocols orresorting to the more complex interdomain routing protocols describedbelow.An area is a set of
routers that are administratively configured toexchange link-state information with each other. There is one
specialarea—the backbone area, also known as area 0. An example of a routingdomain divided into areas is
shown in Figure Routers R1, R2, and R3are members of the backbone area. They are also members of at least
onenonbackbone area; R1 is actually a member of both area 1 and area 2.A router that is a member of both the
backbone area and a nonbackbonearea is an area border router (ABR).
Note that these are distinct from therouters that are at the edge of an AS, which are referred to as AS
borderrouters for clarity.Routing within a single area is exactly as described .All the routers in the area send
link-state advertisements to each otherand thus develop a complete, consistent map of the area. However, the
link-state advertisements of routers that are not area border routers do
not leave the area in which they originated. This has the effect of makingthe flooding and route calculation
processes considerably more scalable.For example, router R4 in area 3 will never see a link-state
advertisementfrom router R8 in area 1. As a consequence, it will know nothing about thedetailed topology of
areas other than its own.
How, then, does a router in one area determine the right next hopfor a packet destined to a network in
another area? The answer to thisbecomes clear if we imagine the path of a packet that has to travel fromone
nonbackbone area to another as being split into three parts. First, it
travels from its source network to the backbone area, then it crosses thebackbone, then it travels from the
backbone to the destination network.To make this work, the area border routers summarize routing
informationthat they have learned from one area and make it available in theiradvertisements to other areas.
For example, R1 receives link-state advertisements
from all the routers in area 1 and can thus determine the cost ofreaching any network in area 1. When R1 sends
link-state advertisementsinto area 0, it advertises the costs of reaching the networks in area 1 muchas if all
those networks were directly connected to R1This enables all the area 0 routers to learn the cost to reach all
networks in area 1. The areaborder routers then summarize this information and advertise it into
thenonbackbone areas. Thus, all routers learn how to reach all networks inthe domain.
20
Interdomain Routing (BGP):
Autonomous system
An autonomous system (AS) is a network or a collection of networks that are all managed and
supervised by a single entity or organization.
An AS is a heterogeneous network typically governed by a large enterprise. An AS has many different
subnetworks with combined routing logic and common routing policies. Each subnetwork is assigned a
globally unique 16 digit identification number (known as the AS number or ASN) by the Internet Assigned
Numbers Authority (IANA).
Some large corporations connect directly to one or more of the backbone, while others connect to
smaller, non-backbone service providers.
Many service providers exist mainly to provide service to “consumers” (individuals with PCs in their
homes), and these providers must connect to the backbone providers
Often many providers arrange to interconnect with each other at a single “peering point”
Assumes the Internet is an arbitrarily interconnected set of AS's.
Define localtraffic as traffic that originates at or terminates on nodes within an AS, and transit traffic as
traffic that passes through an AS.
We can classify AS's into three types:
Stub AS: an AS that has only a single connection to one other AS; such an AS will only carry
local traffic (small corporation).
Multihomed AS: an AS that has connections to more than one other AS, but refuses to carry
transit traffic (large corporation).
Transit AS: an AS that has connections to more than one other AS, and is designed to carry both
transit and local traffic (backbone providers).
Internet is organized as autonomous systems (AS) each of which is under the control of a single
administrative entity.
A corporation’s internal network might be a single AS, as may the network of a single Internet service provider
21
A network with two autonomous systems
22
The Border Gateway Protocol(BGP) is the routing protocol used to exchange routing information
across the Internet. It makes it possible for ISPs to connect to each other and for end-users to connect to more
than one ISP. BGP is the only protocol that is designed to deal with a network of the Internet's size, and the
only protocol that can deal well with having multiple connections to unrelated routing domains.
The goal of Inter-domain routing is to find any path to the intended destination that is loop free
We are concerned with reachability than optimality
Finding path anywhere close to optimal is considered to be a great achievement
Scalability: An Internet backbone router must be able to forward any packet destined anywhere in the
Internet
Having a routing table that will provide a match for any valid IP address
Autonomous nature of the domains
It is impossible to calculate meaningful path costs for a path that crosses multiple ASs
A cost of 1000 across one provider might imply a great path but it might mean an unacceptable
bad one from another provider
Issues of trust
Provider A might be unwilling to believe certain advertisements from provider B
Each AS has:
One BGP speaker that advertises:
local networks
other reachable networks (transit AS only)
gives path information
In addition to the BGP speakers, the AS has one or more border “gateways” which need not be the
same as the speakers
The border gateways are the routers through which packets enter and leave the AS
BGP advertises complete paths as an enumerated lists of ASs to reach a particular network
23
For this example, let AS1-AS3 be transit AS’s and AS4-AS7 are stubs AS’s.AS2 would advertise the
networks of P and Q. AS1 would advertise all networks received from AS2 to all other AS’s it had connection
to. AS3 would then get an advertisement of network 128.96 as being AS1,AS2 Note that in addition to
advertising the routes, the AS also includes other transits AS’s in the path. This helps to avoid loops since two
paths to a network with a common AS in the center would not be confused as separate routes. The transit AS’s
identifying numbers are thus not random and are assigned by a global authority. Current AS numbers are 16
bits in length. Only transit AS’s need these unique, non-duplicated numbers. The AS number space was
expanded to 32 bits in 2009 and usage has started so address space will not be a problem.
24
Here is a small example of a domain with three border routers(A, D, and E). All routers(A,B,C,D & E)
run both iBGP and an intradomain routing protocol. Border routers (A, D, E) also run eBGP to use a unified
picture of the external network so packets destined outside the domain use the best available border router.
BGP routing table for AS, IGP routing table of router B, and combined table at router B are shown
below.
25
Combining the two, router B will send a packet destined for 18.0/16 to router C on its way to router E,
the border router advertising that route.
IPv6
Internet Protocol version 6 (IPv6) is the latest revision of the Internet Protocol (IP), the
communication protocol that provides an identification and location system for computers on networks and
routes traffic across the Internet. IPv6 was developed by the Internet Engineering Task Force (IETF) to deal
with the long-anticipated problem of IPv4 address exhaustion.
Every device on the Internet must be assigned an IP address in order to communicate with other
devices. With the ever-increasing number of new devices being connected to the Internet, the need arose for
more addresses than IPv4 is able to accommodate. IPv6 uses a 128-bit address, allowing 2128, or approximately
3.4×1038 addresses, or more than 7.9×1028 times as many as IPv4, which uses 32-bit addresses. IPv4 allows
only approximately 4.3 billion addresses. The two protocols are not designed to be interoperable, complicating
the transition to IPv6.
IPv6 is an Internet Layer protocol for packet-switchedinternetworking and provides end-to-end
datagram transmission across multiple IP networks, closely adhering to the design principles developed in the
previous version of the protocol, Internet Protocol Version 4 (IPv4). In addition to offering more addresses,
IPv6 also implements features not present in IPv4. It simplifies aspects of address assignment (stateless address
autoconfiguration), network renumbering and router announcements when changing network connectivity
providers. It simplifies processing of packets by routers by placing the need for packet fragmentation into the
end points.
26
The IPv6 subnet size is standardized by fixing the size of the host identifier portion of an address to 64
bits to facilitate an automatic mechanism for forming the host identifier from link layer addressing information
(MAC address). Network security was a design requirement of the IPv6 architecture, and included the original
specification of IPsec.
IPv6 does not specify interoperability features with IPv4, but essentially creates a parallel, independent
network. Exchanging traffic between the two networks requires translator gateways or other transition
technologies, such as the tunneling protocols6to4, 6in4, and Teredo.
Historical Perspective
The IETF began looking at the problem of expanding the IP address spacein 1991, and several alternatives
were proposed. Since the IP address iscarried in the header of every IP packet, increasing the size of the
addressdictates a change in the packet header. This means a new version of theInternet Protocol and, as a
consequence, a need for new software for everyhost and router in the InternetIn addition to the need to
accommodate scalable routing and addressing, someof the other wish list items for IPng included:
->Security support
->Autoconfiguration (i.e., the ability of hosts to automaticallyconfigure themselves with such
information as their own IPaddress and domain name)
->Enhanced routing functionality, including support for mobile hosts
The IETF appointed a committee called the IPng Directorate to collectall the inputs on IPng requirements and
to evaluate proposals for aprotocol to become IPng. Over the life of this committee there were numerous
proposals, some of which merged with other proposals, andeventually one was chosen by theDirectorate to be
the basis for IPng. Thatproposal was called Simple Internet Protocol Plus (SIPP). SIPP originallycalled for a
doubling of the IP address size to 64 bits. When the Directorateselected SIPP, they stipulated several changes,
one of which wasanother doubling of the address to 128 bits (16 bytes).
Addresses and Routing
First and foremost, IPv6 provides a 128-bit address space, as opposedto the 32 bits of version 4. Thus, while
version 4 can potentially address4 billion nodes if address assignment efficiency reaches 100%, IPv6
canaddress 3.4×1038 nodes, again assuming 100% efficiency. As we haveseen, though, 100% efficiency in
address assignment is not likely. Someanalysis of other addressing schemes, such as those of the French
andU.S. telephone networks, as well as that of IPv4, have turned up someempirical numbers for address
assignment efficiency. Based on the mostpessimistic estimates of efficiency drawn fromthis study, the IPv6
addressspace is predicted to provide over 1500 addresses per square foot of theEarth’s surface, which certainly
seems like it should serve us well evenwhen toasters on Venus have IP addresses.
27
Address Notation
Just as with IPv4, there is some special notation for writing down IPv6addresses. The standard representation
is x:x:x:x:x:x:x:x, where each “x” isa hexadecimal representation of a 16-bit piece of the address. An
examplewould be
47CD:1234:4422:ACO2:0022:1234:A456:0124
Any IPv6 address can be written using this notation. Since there are afew special types of IPv6 addresses, there
are some special notations thatmay be helpful in certain circumstances. For example, an address with alarge
number of contiguous 0s can be written more compactly by omittingall the 0 fields. Thus,
47CD:0000:0000:0000:0000:0000:A456:0124
could be written
47CD::A456:0124
Clearly, this formof shorthand can only be used for one set of contiguous0s in an address to avoid
ambiguity.The two types of IPv6 addresses that contain an embedded IPv4address have their own special
notation that makes extraction of theIPv4 address easier. For example, the IPv4-mapped IPv6 address of a
hostwhose IPv4 address was 128.96.33.81 could be written as
::FFFF:128.96.33.81
That is, the last 32 bits are written in IPv4 notation, rather than as a pairof hexadecimal numbers separated by a
colon.Note that the double colonat the front indicates the leading 0s.
By far the most important sort of addressing that IPv6 must provide isplain old unicast addressing. It must do
this in a way that supports therapid rate of addition of new hosts to the Internet and that allows routingto be
done in a scalable way as the number of physical networks in theInternet grows. Thus, at the heart of IPv6 is
the unicast address allocationplan that determines how unicast addresses will be assigned to serviceproviders,
autonomous systems, networks, hosts, and routers.In fact, the address allocation plan that is proposed for IPv6
unicastaddresses is extremely similar to that being deployed with CIDR in IPv4.To understand how it works
and how it provides scalability, it is helpfulto define some new terms. We may think of a nontransit AS (i.e.,
astub or multihomed AS) as a subscriber, and we may think of a transit AS
as a provider. Furthermore, we may subdivide providers into direct andindirect. The former are directly
connected to subscribers. The latter primarilyconnect other providers, are not connected directly to
subscribers,and are often known as backbone networks.of routing information to reduce the burden on
intradomainrouters. Again, the key idea is to use an address prefix—a set of contiguousbits at the most
28
significant end of the address—to aggregate reachabilityinformation to a large number of networks and even to
a large number ofautonomous systems. The main way to achieve this is to assign an addressprefix to a direct
provider and then for that direct provider to assign longerprefixes that begin with that prefix to its subscribers
As with many headers, this one starts with a Version field, which is setto 6 for IPv6. The Version field is in the
same place relative to the start ofthe header as IPv4’s Version field so that header-processing software
canimmediately decide which header format to look for. The TrafficClass andFlowLabel fields both relate to
quality of service issues The PayloadLen field gives the length of the packet, excluding the IPv6header,
measured in bytes. The NextHeader field cleverly replaces boththe IP options and the Protocol field of IPv4. If
options are required, then they are carried in one or more special headers following the IP header,and this is
indicated by the value of the NextHeader field. If there areno special headers, the NextHeader field is the
demux key identifyingthe higher-level protocol running over IP (e.g., TCP or UDP); that is, it
serves the same purpose as the IPv4 Protocol field. Also, fragmentation isnow handled as an optional header,
which means that the fragmentationrelatedfields of IPv4 are not included in the IPv6 header. The
HopLimitfield is simply the TTL of IPv4, renamed to reflect the way it is actuallyused.
Finally, the bulk of the header is taken up with the source and destinationaddresses, each of which is 16 bytes
(128 bits) long. Thus, the IPv6header is always 40 bytes long. Considering that IPv6 addresses are fourtimes
longer than those of IPv4, this compares quite well with the IPv4header, which is 20 bytes long in the absence
of options.The way that IPv6 handles options is quite an improvement over IPv4.In IPv4, if any options were
present, every router had to parse the entireoptions field to see if any of the options were relevant. This is
because the options were all buried at the end of the IP header, as an unorderedcollection of htype, length,
valueituples. In contrast, IPv6 treats optionsas extension headers that must, if present, appear in a specific
order. Thismeans that each router can quickly determine if any of the options are relevantto it; in most cases,
they will not be. Usually this can be determinedby just looking at the NextHeader field. The end result is that
option processingis much more efficient in IPv6, which is an important factor inrouter performance. In
addition, the new formatting of options as extensionheaders means that they can be of arbitrary length, whereas
in IPv4they were limited to 44 bytes at most
29
IPv6 packet header.
Consider the example of the fragmentation header, shown inFigure . This header provides functionality similar
to the fragmentationfields in the IPv4 header described in Section 3.2.2, but it is onlypresent if fragmentation is
necessary. Assuming it is the only extensionheader present, then the NextHeader field of the IPv6 header
wouldcontain the value 44, which is the value assigned to indicate the fragmentationheader. The NextHeader
field of the fragmentation header itselfcontains a value describing the header that follows it. Again,
assumingno other extension headers are present, then the next header mightbe the TCP header, which results in
NextHeader containing the value 6,just as the Protocol field would in IPv4.
Autoconfiguration
While the Internet’s growth has been impressive, one factor that hasinhibited faster acceptance of the
technology is the fact that getting connectedto the Internet has typically required a fair amount of
systemadministration expertise. In particular, every host that is connected to the
Internet needs to be configured with a certain minimum amount of information,such as a valid IP address, a
subnet mask for the link to whichit attaches, and the address of a name server. Thus, it has not been possibleto
unpack a new computer and connect it to the Internet withoutsome preconfiguration. One goal of IPv6,
therefore, is to provide supportfor autoconfiguration, sometimes referred to as plug-and-play operation Recall
that IPv6 unicast addresses are hierarchical, and that the leastsignificant portion is the interface ID. Thus, we
can subdivide the autoconfigurationproblem into two parts:
1. Obtain an interface ID that is unique on the link to which the host
30
is attached.
2. Obtain the correct address prefix for this subnet.
The first part turns out to be rather easy, since every host on a link musthave a unique link-level address. For
example, all hosts on an Ethernethave a unique 48-bit Ethernet address. This can be turned into a validlink-
local use address by adding the appropriate prefix from Table 4.1
(1111 1110 10) followed by enough 0s to make up 128 bits. For somedevices—for example, printers or hosts
on a small routerless network thatdo not connect to any other networks—this address may be perfectly
adequate.Those devices that need a globally valid address depend on a routeron the same link to periodically
advertise the appropriate prefix for thelink. Clearly, this requires that the router be configured with the
correctaddress prefix, and that this prefix be chosen in such a way that there isenough space at the end (e.g., 48
bits) to attach an appropriate link-leveladdress.The ability to embed link-level addresses as long as 48 bits into
IPv6addresses was one of the reasons for choosing such a large addresssize. Not only does 128 bits allow the
embedding, but it leaves plentyof space for the multilevel hierarchy of addressing
Advanced Routing Capabilities
Another of IPv6’s extension headers is the routing header. In the absenceof this header, routing for
IPv6 differs very little from that of IPv4 underCIDR. The routing header contains a list of IPv6 addresses that
representnodes or topological areas that the packet should visit en routeto its destination. A topological area
may be, for example, a backboneprovider’s network. Specifying that packets must visit this network wouldbe a
way of implementing provider selection on a packet-by-packet basis.Thus, a host could say that it wants some
packets to go through aprovider that is cheap, others through a provider that provides high reliability,
and still others through a provider that the host trusts to providesecurity.
To provide the ability to specify topological entities rather than individualnodes, IPv6 defines an
anycastaddress. An anycast address isassigned to a set of interfaces, and packets sent to that address will go
tothe “nearest” of those interfaces, with nearest being determined by therouting protocols. For example, all the
routers of a backbone providercould be assigned a single anycast address, which would be used in therouting
header.
Addressing
Compared to IPv4, the most obvious advantage of IPv6 is its larger address space. IPv4 addresses are
32 bits long and number about 4.3×109 (4.3 billion). IPv6 addresses are 128 bits long and number about
3.4×1038 (340 undecillion). IPv6's addresses are deemed enough for the foreseeable future.
IPv6 addresses are classified by three types of networking methodologies:
1. Unicast addresses identify each network interface,
2. Anycast addresses identify a group of interfaces, usually at different locations of which the
nearest one is automatically selected,
3. Multicast addresses are used to deliver one packet to many interfaces.
The broadcast method is not implemented in IPv6. Each IPv6 address has a scope, which specifies in
which part of the network it is valid and unique. Some addresses are unique only on the local (sub-network).
Others are globally unique.
Address representation
31
The 128 bits of an IPv6 address are represented in 8 groups of 16 bits each. Each group is written as 4
hexadecimal digits and the groups are separated by colons (:). The address
2001:0db8:0000:0000:0000:ff00:0042:8329 is an example of this representation.
For convenience, an IPv6 address may be abbreviated to shorter notations by application of the following
rules, where possible.
1. One or more leading zeroes from any groups of hexadecimal digits are removed; this is usually done to
either all or none of the leading zeroes. For example, the group 0042 is converted to 42.
2. Consecutive sections of zeroes are replaced with a double colon (::). The double colon may only be
used once in an address, as multiple uses would render the address indeterminate. RFC 5952
recommends that a double colon should not be used to denote an omitted single section of zeroes.
An example of application of these rules:
Initial address: 2001:0db8:0000:0000:0000:ff00:0042:8329
After removing all leading zeroes: 2001:db8:0:0:0:ff00:42:8329
After omitting consecutive sections of zeroes: 2001:db8::ff00:42:8329
The loopback address, 0000:0000:0000:0000:0000:0000:0000:0001, may be abbreviated to ::1 by using
both rules.
As an IPv6 address may have more than one representation, the IETF has issued a proposed standard
for representing them in text.
IPv6 features
128-bit addresses
Multicast
Real-time service
Authentication and security
Auto-configuration
End-to-end fragmentation
Enhanced routing functionality, including support for mobile hosts
IPv4 vs IPv6:
IPv4 Address IPv6 Address
32
Public IP addresses Global unicast addresses
MULTICAST:
Multicast is grossly defined as sending a single packet to multiple selected destinations. Multicast
supports one to many or many to many communications. Each group has its own IP multicast address. A single
copy of the packet is addressed to group’s multicast address.
34
One-to-many(Source Specific Multicast(SSM))
Radio station broadcast
Transmitting news, stock-price
Software updates to multiple hosts
Many-to-many(Any Source Multicast(ASM))
Multimedia teleconferencing
Online multi-player games
Distributed simulations
Without support for multicast
A source needs to send a separate packet with the identical data to each member of the group
This redundancy consumes more bandwidth
Redundant traffic is not evenly distributed, concentrated near the sending host
Source needs to keep track of the IP address of each member in the group
Group may be dynamic
Uses of multicasting:
i. Sender has no need to know each host’s individual Unicast IP address
ii. Sender has no need to send multiple copies of packet
iii. It eliminates redundant traffic.
iv. Routing information can be distributed among routers in internetwork.
Protocols used for maintaining groups:
A host signals its desire to join or leave a multicast group by communicating with its local router using
a special protocol
– IGMP (Internet Group Management Protocol) [in IPv4]
– MLD(Multicast Listener Discovery) [in IPv6]
Therefore local routers are responsible for multicasting. So it periodically polls the LAN to determine
groups.
MULTICAST ADDRESSES
IP has a subrange of its address space reserved for multicasting. IP provides an IP-level multicastto
support many-to-many and one-to-many communication. Class D IP addresses are used for multicasting.There
are 28 bits of possible multicast addresses in IPv4. Among these 28 bits, lower order 23 bits are mapped to
Ethernet 23 bit multicast addresses. Therefore high order 5 bits are remaining. So only 32(2^5) IP addresses
map into each one of Ethernet addresses. Some subranges of the multicast ranges are reserved for intradomain
multicast, so they can be reused independently by different domains.
MULTICAST ROUTING
It is a process of building multicast forwarding tables, which is otherwise known as multicast
distribution trees.
A router’s unicast forwarding tables indicate for any IP address, which link to use to forward the
unicast packet
To support multicast, a router must additionally have multicast forwarding tables that indicate, based on
multicast address, which links to use to forward the multicast packet
35
Unicast forwarding tables collectively specify a set of paths
Multicast forwarding tables collectively specify a set of trees(ieMulticast distribution trees)
To support source specific multicast, the multicast forwarding tables must indicate which links to use
based on the combination of multicast address and the unicast IP address of the source
37
a) R4 sends join message to RP and joins shared tree;
b) R5 sends join message to RP and joins shared tree;
c) RP builds source specific tree to R1 by sending Join message to R1
d) R4 and R5 builds source specific tree to R1 by sending Join messages to R1
When a router sends a Join message toward the RP for a group G,it is sent using normal IP unicast
transmission. This is illustrated in Figure(a), inwhich router R4 is sending a Join to the rendezvous point for
some group. The initial Join message is “wildcarded”; that is, it applies to all senders. A Join message clearly
must pass through some sequence of routers before reaching the RP (e.g., R2). Each router along the path looks
at the Join and creates a forwarding table entry for the shared tree, called a (*, G) entry (where * means “all
senders”). To create the forwarding table entry, it looks at the interface on which the Join arrived and marks
that interface as one on which it should forward data packets for this group. It then determines which interface
it will use to forward the Join toward the RP. This will be the only acceptable interface for incoming packets
sent to this group. It then forwards the Join toward the RP. Eventually, the message arrives at the RP,
completing the construction of the tree branch. The shared tree thus constructed is shown as a solid line from
the RP to R4.
As more routers send Joins toward the RP, they cause new branches to be added to the tree, as illustrated in
Figure (b).Note that, in this case,the Join only needs to travel to R2, which can add the new branch to the tree
simply by adding a new outgoing interface to the forwarding table entry created for this group. R2 need not
forward the Join on to the RP.Note also that the end result of this process is to build a tree whose root is the
RP.At this point, suppose a host wishes to send a message to the group. To do so, it constructs a packet with
the appropriate multicast group address as its destination and sends it to a router on its local network known as
the designated router (DR).
An important detail to note at this stage is that the Join message sent by the RP to the sending host is
specific to that sender, whereas the previous ones sent by R4 and R5 applied to all senders. Thus, the effect
ofthe new Join is to create sender-specific state in the routers between the identified source and the RP. This is
referred to as (S, G) state, since it applies to one sender to one group, and contrasts with the (*, G) state
thatwas installed between the receivers and the RP that applies to all senders.Thus, in Figure (c), we see a
source-specific route from R1 to the RP (indicated by the dashed line) and a tree that is valid for all senders
fromthe RP to the receivers (indicated by the solid line).
Multicast packet is constructed by the sending host with the appropriate multicast group address as its
destination and sends it to local router. Then the local router encapsulates the multicast packet inside a PIM
‘Register’ message and sends to RP. RP receiving this packet looks at the payload of the Register message
and finds inside an IP packet addressed to the multicast address of a group. It transmits the IP packet to all
members of the group.
38
Delivery of a packet along a shared tree
Host sends a multicast packet to its local router(R1). R1 tunnels that packet to the RP, which forwards it along
the shared tree to R4 and R5.The complete delivery of a packet fromR1 to R4 and R5 is shown in Figure.
In the early days of the Internet, the IANA (Internet Assigned Numbers Authority) defined five classes of public
IP addresses as shown below.
39
Class A IP addresses, where the 1st bit is 0, encompass the range of 0.0.0.0 to
127.255.255.255. This class is for large networks and has 8 bits for network and 24
bits for hosts.
Class B IP addresses, where the 1st two bits are 10, are in the range of 128.0.0.0 to
191.255.255.255. This class is for medium networks and has 16 bits for network and
16 bits for hosts.
Class C IP addresses, where the 1st three bits are 110, are in the range of 192.0.0.0
to 223.255.255.255. This class is for smaller networks and has 24 bits for network
and 8 bits for hosts.
Class D or multicast IP addresses, where the 1st four bits are 1110 are in the range of
224.0.0.0 to 239.255.255.255.
Class E or experimental IP addresses, where the 1st four bits are 11110, are in the
range of 192.0.0.0 to 254.255.255.255.
40