0% found this document useful (0 votes)
40 views40 pages

Ec3401 Networks and Security-Unit Ii-Notes

The document discusses network layer protocols, focusing on IPv4 and IPv6 addressing, routing protocols such as RIP and OSPF, and the concepts of forwarding and routing. It explains the differences between forwarding and routing tables, the distance vector and link state routing algorithms, and the challenges faced in routing, including the count-to-infinity problem. Additionally, it highlights the features of RIP and OSPF, including their mechanisms for route discovery and management within networks.

Uploaded by

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

Ec3401 Networks and Security-Unit Ii-Notes

The document discusses network layer protocols, focusing on IPv4 and IPv6 addressing, routing protocols such as RIP and OSPF, and the concepts of forwarding and routing. It explains the differences between forwarding and routing tables, the distance vector and link state routing algorithms, and the challenges faced in routing, including the count-to-infinity problem. Additionally, it highlights the features of RIP and OSPF, including their mechanisms for route discovery and management within networks.

Uploaded by

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

UNIT II

NETWORK LAYER PROTOCOLS


Network Layer – IPv4 Addressing – Network Layer Protocols (IP, ICMP and Mobile IP) Unicast and
Multicast Routing – Intradomain and Interdomain Routing Protocols – IPv6 Addresses – IPv6 –
Datagram Format - Transition from IPv4 to IPv6.

ROUTING:
Routers have enough knowledge of the network topology so they can choose the right port onto which each
packet should be output

Forwarding versus Routing


– Forwarding:
– to select an output port based on destination address and routing table
– Routing:
– process by which routing table is built.
– Process of finding a path from source to destination to deliver the packets. It is n/w layer
responsibility for deciding o/p lines for an incoming packet.
Forwarding table VS Routing table
– Forwarding table
– Used when a packet is being forwarded and so must contain enough information
to accomplish the forwarding function
– A row in the forwarding table contains the mapping from a network number to an
outgoing interface and some MAC information, such as Ethernet Address of the
next hop
– Routing table
– Built by the routing algorithm as a precursor to build the forwarding table
– Generally contains mapping from network numbers to next hops

Example rows from (a) routing and (b) forwarding tables


Routing Protocols
Network as a Graph

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)

Routing Information Protocol (RIP)


• 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.
Distance Vector Routing:
 The distance vector routing algorithm is sometimes called as Bellman-Ford algorithm.
 Every T seconds each router sends its table to its neighbor each router then updates its table based on
the new information.
 Problems include fast response to good new and slow response to bad news. Also too many messages
to update.

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.

Initial distances stored at


each node (global view)

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.

Final distances stored at each node (global view)


4
When a node detects a link failure
 F detects that link to G has failed
 F sets distance to G to infinity and sends update to A
 A sets distance to G to infinity since it uses F to reach G
 A receives periodic update from C with 2-hop path to G
 A sets distance to G to 3 and sends update to F
 F decides it can reach G in 4 hops via A

Count-to-Infinity problem:
Slightly different circumstances can prevent the network from stabilizing

 Suppose the link from A to E goes down


 In the next round of updates, A advertises a distance of infinity to E, but B and C advertise a
distance of 2 to E
 Depending on the exact timing of events, the following might happen
 Node B, upon hearing that E can be reached in 2 hops from C, concludes that it can
reach E in 3 hops and advertises this to A
 Node A concludes that it can reach E in 4 hops and advertises this to C
 Node C concludes that it can reach E in 5 hops; and so on.
 This cycle stops only when the distances reach some number that is large enough to be
considered infinite

Partial solutions to this problem are


1) To use some relatively small number as an approximation of infinity.
2) Split horizon.
When a node sends a routing update to its neighbors, it does not send those routes itlearned from each
neighbor back to that neighbor.
Solution
 split horizon:If B has the route (E, 2, A) in its table, then it knows it must have learned this route from
A, and so whenever B sends a routing update to A, it does not include the route for E
 split horizon with poison reverse:B actually sends that route back to A, but it puts negative
information in the route to ensure that A will not eventually use B to get to
E.ie ( E, ∞ ) to A .

Routing Information Protocol (RIP)

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.

Example Network Running RIP

The message format is as shown:


RIP v2 Packet Format

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)

Special Features of OSPF


 Authentication of routing messages: Routing updates is to be authenticated. Early versions of
OSPF used a simple 8- byte password for authentication.
 Additional hierarchy:OSPF introduces another layer of hierarchy into routing by allowing a
domain to be partitioned into areas.
 Load balancing:OSPF allows multiple routes to the sample place to be assigned the same cost
and will cause traffic to be distributed evenly over those routes.
OSPF Header Format

 Arealdis a 32-bit identifier of the area in which the node is located.


 The entire packet, except the authentication data, is protected by a 16-bit checksum.
 Authentication type is
 0 if no authentication is used;
 1, implying a simple password is used
 2, that a cryptographic authentication checksum
OSPF Link State Advertisement

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

Problems with New Metric:


• Works well for light to moderate load
– Static values dominate
• Oscillates under heavy load
– Queuing dominates
– Congested link advertising high cost pushes traffic away => some links temporarily
underutilized during heavy load – 50% given 2 links between 2 nodes
• Range is too wide
– 9.6 Kbps highly loaded link can appear 127 times costlier than 56 Kbps lightly loaded link
• Can make a 127-hop path look better than 1-hop
– Satellite links penalized, though they’d better suit playback video (high BW, non-delay
sensitive)
Revised ARPANET:
 The major changes were to compress the dynamic range of the metric considerably, to account for the
link type, and to smooth the variation of the metric with time.The smoothing was achieved by several
mechanisms.
 First, the delay measurement was transformed to a link utilization, and this number was
averaged with the last reportedutilization to suppress sudden changes.
 Second, there was a hard limit on how much themetric could change from one measurement
cycle to the next.
 By smoothing the changesin the cost, the likelihood that all nodes would abandon a route at
once is greatly reduced.
 The compression of the dynamic range was achieved by feeding the measured utilization,the
link type, and the link speed into a function that is shown graphically inFigure 4.21. Observe
the following:

 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.

Revised ARPANET routing metric vs Link Utilization

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

A workstation used as a packet switch


A general purpose processor used as a packet 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.

Input Switch Output


port fabric port

14
Original packet header

Input Switch Output


port fabric port

Self-routing header

Input Switch Output


port fabric port

GLOBAL INTERNET
ADDRESSING :
An Internet Address is made of four bytes (32 bits) that define a host’s connection to a network.

There are some special IP addresses:


1. Broadcast Addresses They are of two types:
(i) Limited Broadcast: It consists of all 1's, i.e., the address is 255.255.255.255 . It is used only
on the LAN, and not for any external network.
(ii) Directed Broadcast: It consists of the network number + all other bits as1's. It reaches the
router corresponding to the network number, and from there it broadcasts to all the nodes in the
network.
2. Network ID = 0
It means we are referring to this network and for local broadcast we make the host ID zero.
3. Host ID = 0
This is used to refer to the entire network in the routing table.
4. Loop-back Address
Here we have addresses of the type 127.0.0.1. It goes down way upto the IP layer and comes back to
the application layer on the same host.

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.

Class A Range :0.0.0. 0to 127.255.255.255Addresses are numerically the lowest.


Class B Range :128.0.0.0 to 191.255.255.255
Class C Range :192.0.0.0 to 223.255.255.255
Class D Range : 224.0.0.0 to 239.255.255.255Itis reserved for multicast address, it allows copy’s of a
datagram to be passed to a selected group of hosts rather than to a individual host. It is similar to broadcasting.
Class E Range : 240.0.0.0 to 255.255.255.255Addresses are reserved for further use the structure of each IP
address class.

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.

IP address Class Network


Subnetted
IP Class Network Subnet Host
address
Subnet
Mask 11 1111111111111 111111 00000
111 11 000
Examples
Boundary level Mask with subnetting
Class Mask Address N/w Address & Subnet ID

A 255.255.0.0 15.32.56.7 15.32.0.0

B 255.255.255.0 135.67.13.9 135.67.0.0

C 255.255.255.192 201.34.12.72 201.34.12.64

Calculating the subnet id from IP address and subnet mask by performing ‘and’ function

17
Example of Subnetting

Forwarding Table at Router R1:

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)

Selecting any B class address from 128.0.0.0 to 191.255.255.255 as 130.5.0.0 (2)


Subnet Mask for B class: 255.255.0.0 (2)
Given in the problem: Number of subnets = 11
Max number of hosts in a single n/w = 500
So subnet mask: 255.255. 11111100.00000000 (4)
(So that the number of subnets can be increased to 64 in future and each can have a maximum of 1024 hosts
with best performance)

Routing Table (8)


Description of Given Subnets Sub-net Interface
Subnet- id
Mask connecting
CSE – I: 130.5.0.0 to 130.5.3.255 130.5.0.0
CSE
CSE – II: 130.5.4.0 to 1 30.5.7.255 130.5.4.0
CC–I: 130.5.8.0 to 130.5.11.255 130.5.8.0
Compute Center
CC–II: 130.5.12.0 to 130.5.15.255 130.5.12.0
ECE –I: 130.5.16.0 to 130.5.19.255 130.5.16.0 ECE
EEE –I: 130.5.20.0 to130.5.23.255 130.5.20.0 EEE
Sci : 130.5.24.0 to 130.5.27.255 130.5.24.0 Science block
Engg – I : 130.5.28.0 to 130.5.31.255 130.5.28.0 255.255.252.0 Other Engg.
Engg – II : 130.5.32.0 to130.5.35.255 130.5.32.0 Blocks
Hostel – I: 130.5.36.0 to 130.5.39.255 130.5.36.0
Hostel
Hostel – II:130.5.40.0 to 130.5.43.255 130.5.40.0

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.

A domain divided into areas

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

 Inter-domain Routing Protocols


 Exterior Gateway Protocol (EGP)
 Forced a tree-like topology onto the Internet
 Did not allow for the topology to become general
 Tree like structure: there is a single backbone and autonomous systems are
connected only as parents and children and not as peers
 Border Gateway Protocol (BGP)
 Assumes that the Internet is an arbitrarily interconnected set of ASs.
 Today’s Internet consists of an interconnection of multiple backbone networks (they are
usually called service provider networks, and they are operated by private companies
rather than the government)
 Sites are connected to each other in arbitrary ways

Border Gateway Protocol(BGP) is a distance-vector protocol used to communicate between different


ASes. Instead of maintaining just the cost to each destination, each BGP router keeps track of the exact path
used. Similarly, instead of periodically giving each neighbour its estimated cost to each destination, each BGP
router tells its neighbours the path it is using. Every BGP router contains a module that examines routes to a
given destination and scores them returning a number for destination to each route. Any route violating a
policy constraint automatically gets a score of infinity. The router adapts a route with shortest distance. The
scoring function is not a part of the BGP protocol and can be any function that the system managerswant.BGP
easily solves the count to infinity problem that plagues other distance-vector algorithms as whole path is
known.

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

Example of a network running BGP

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.

 Speaker for AS 2 advertises reachability to P and Q


 Network 128.96, 192.4.153, 192.4.32, and 192.4.3, can be reached directly from AS 2.
 Speaker for backbone network then advertises
 Networks 128.96, 192.4.153, 192.4.32, and 192.4.3 can be reached along the path <AS 1, AS
2>.
 Speaker can also cancel previously advertised paths
 It should be apparent that the AS numbers carried in BGP need to be unique
 For example, AS 2 can only recognize itself in the AS path in the example if no other AS identifies
itself in the same way
 AS numbers are 16-bit numbers assigned by a central authority

Integrating Interdomain and Intradomain Routing


A BGP speaker learns interdomain routing information and it should be informed to all the other
routers within the domain.The border router is the only choice for knowing all routes that are outside the AS
and informing the same within the domain.
So BGP works as two variants, which are
i) iBGP(internal BGP)
ii) eBGP(external BGP)
All routers run iBGPalong with an intradomain routing(RIP or OSPF) protocol it runs.Border routers
also run eBGP to know about external networks.

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:

Support for real-time services


->

->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.

Address Space Allocation

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.

Global Unicast Address

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

An IPv6 provider-based unicast address.


Packet Format

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.

IPv6 fragmentation extension header.

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.

Additonal notes for IPV6

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

Address Length – 32 bits 128 bits

Address Representation - decimal hexadecimal

Internet address classes Not applicable in IPv6

Multicast addresses (224.0.0.0/4) IPv6 multicast addresses (FF00::/8)


Class D

Broadcast addresses Not applicable in IPv6

Unspecified address is 0.0.0.0 Unspecified address is ::

Loopback address is 127.0.0.1 Loopback address is ::1

32
Public IP addresses Global unicast addresses

Private IP addresses (10.0.0.0/8, 172.16.0.0/12, Site-local addresses (FEC0::/10)


and 192.168.0.0/16)

Autoconfigured addresses (169.254.0.0/16) Link-local addresses (FE80::/64)

Text representation: Dotted decimal notation Text representation: Colon


hexadecimal format with
Network bits representation: Subnet mask in Network bits representation: Prefix
suppression of leading zeros and
dotted decimal notation or prefix length length notation only
zero compression. IPv4-compatible
addresses are expressed in dotted
DNS name resolution: IPv4 host address (A) DNS name
decimal resolution: IPv6 host
notation.
resource record address (AAAA) resource record

DNS reverse resolution: IN-ADDR.ARPA DNS reverse resolution: IP6.ARPA


domain domain

IPv4 vs IPv6 Header

1. Fixed Length for the basic header


1. IPv4 header of variable length = minm20 bytes
2. IPv6 = main header length fixed at 40 bytes
 Leads to fast header processing
 No need of Header Length (Hd Len) field in IPv4 – obsolete
2. Fragmentation only by traffic source
33
1. Source does Path MTU (PMTU) discovery.
2. Freeing routers from having to fragment them
3. No need of IPv4 Identification, Flag, Fragment Offset
3. Header checksums are eliminated
1. IP header checksum recalculated by every node switching the packet due to changing TTL
values, thus taxing router resources.
2. Improvements on L2 technologies and their 32-bit CRC support since the introduction of IPv4
combined with layer 4 checksums provides sufficient protection to make the layer 3 header
checksum unnecessary.
3. Packet Header Checksum was eliminated in IPv6 and is in turn enforced at upper layers.

IPv6 header fields:


1. Version (4 bits)
 4 bits are used to indicate the version of IP and is set to 6
2. Traffic Class (8 bits)
 same function as the Type of Service field in the IPv4 header.
3. Flow Label (20 bits)
 identifies a flow and it is intended to enable the router to identify packets that should be
treated in a similar way without the need for deep lookups within those packets.
 set by the source and should not be changed by routers along the path to destination.
 unique & powerful tool to IPv6
 Can be used with differentiated services (DiffServ) as well as integrated services
(IntServ) and Resource ReSerVation Protocol (RSVP2).
4. Payload Length (16 bits)
 With the header length fixed at 40 bytes, it is enough to indicate the length of the payload to
determine the length of the entire packet.
5. Next Header (8 bits)
 Indicates either the first extension header (if present) or the protocol in the upper layer PDU
(such as TCP, UDP, or ICMPv6).
 When indicating an upper layer protocol above the Internet layer, the same values used in the
IPv4 Protocol field are used here.
6. Hop Limit (8 bits)
 In IPv6, the IPv4 TTL was appropriately renamed Hop Limit because it is a variable that is
decremented at each hop, and it does not have a temporal dimension.
7. Source IPv6 Address (128 bits)
• Stores the IPv6 address of the originating host.
8. Destination IPv6 Address (128 bits)
 Stores the IPv6 address of the current destination host.

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

MULTICAST ROUTING PROTOCOLS


1. DVMRP (Distance Vector Multicast Routing Protocol)
2. PIM(Protocol Independent Multicast)

DVMRP (Distance Vector Multicast Routing Protocol)


This is the first multicast routing protocol. Distance Vector Routing for unicast is extended to support
multicast.Since distance vector routers only have NEXTHOP type of data they do not have the full network
picture provided by link state routing. It works as a two stage process.
Stage 1: Flood
Stage 2:Prune
Flood stage:
The packets are first broadcasted to all downstream ports.Each router already knows that shortest path
to source S goes through router NextHop(N) by means of unicast routing table.Whenever it receives multicast
packet from S, the router forwardspacket on all outgoing links (except the one on which the packet arrived), if
and only if packet arrived from N.
 Eliminate duplicate broadcast packets by only allowing“parent” router for LAN (relative to S) to
forward multicast packets.
Selecting ‘parent router for any S
 It should have shortest path to S (learn via distance vector)
 smallest address is taken to break ties
Reverse Path Broadcast (RPB) or Reverse Path Forwarding
The path is reverse because we consider the shortest path toward the source when making forwarding
decisions.
Prune stage:
Goal: Prune networks that have no hosts in group G
Step 1: Recognize a leafnetwork with no members in G
 A network is leaf if parent is only router on the LAN
 determine if any hosts are members of G reside on the network using IGMP
Step 2: Propagate “no members of G here” information to RP
 Router augments(Destination, Cost)pairs update sent to neighbors with set of groups for which
this network is interested in receiving multicast packets.
 This information is propagated from router to router.
So that for each of its links, a given router knows for what groups it should forward multicast packets.
Since routing update is fairly expensive, it only happens when multicast address becomes active.

PIM(Protocol Independent Multicast)


PIM was developed in response to the scaling problems of earlier multicast routing protocols. ‘Protocol
Independent’ refers that PIM does not depend on any particular sort of unicast routing. PIM divides the
36
problem space into two modes, depending on the proportion of routers that will want the multicast. The two
modes are
i. dense mode (PIM-DM)
ii. sparse mode. (PIM-SM)
In PIM-SM, routers explicitly join the multicast distribution tree by sending ‘Join’
messagestoRendezvouspoint (RP)using normal IP unicast transmission.RP is a special router assigned for a
group to manage that group. All routers in a domain know the unicast IP address of RP.A multicast forwarding
tree is built as a result of routers sending ‘Join’ messages to the RP. Two types of tree are constructed.
i) Shared tree – used by all senders
A ‘Join’ message clearly must pass through some routers before reaching RP.
Each router along the path creates a forwarding table entry (*, G) for the shared tree. *
indicates all senders.
ii) Source specific tree – used only by a specific sending host
Each router along the path also creates a forwarding table entry (S, G) to create
sender-specific tree. S indicates the source identified.

a) & b)Shared Tree c) & d) Source specific tree

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.

IPv4 Address Classes

In the early days of the Internet, the IANA (Internet Assigned Numbers Authority) defined five classes of public
IP addresses as shown below.

Ipv4 Address Classes

Class Theoretical Address Range Binary Start Used for

A 0.0.0.0 to 127.255.255.255 0 Very large networks

B 128.0.0.0 to 191.255.255.255 10 Medium networks

C 192.0.0.0 to 223.255.255.255 110 Small networks

D 224.0.0.0 to 239.255.255.255 1110 Multicast

E 240.0.0.0 to 247.255.255.255 1111 Experimental

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

You might also like