The network layer
This presentation is the property of its rightful owner.
Sponsored Links
1 / 74

The Network Layer PowerPoint PPT Presentation

  • Uploaded on
  • Presentation posted in: General

The Network Layer. Introduction. Route packets through subnet So, it must know the topology of the subnet It should also be able to choose path from it It should do load balancing between routers and communication lines

Download Presentation

The Network Layer

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript

The network layer

The Network Layer



  • Route packets through subnet

  • So, it must know the topology of the subnet

  • It should also be able to choose path from it

  • It should do load balancing between routers and communication lines

  • When source and destination are in different networks, it solves the differences

Store and forward packet switching

Store-and-Forward Packet Switching

  • The packet is stored at router until it has fully arrived so the checksum can be verified. Then it is forwarded to the next router

Services provided to the transport layer

Services Provided to the Transport Layer

  • Connectionless Service

    • packets are injected into the subnet individually and routed independently of each other

      • Internet

  • Connection-Oriented Service

    • a path from the source router to the destination router must be established before any data packets can be sent. This connection is called a VC (virtual circuit)

      • ATM networks

Connectionless service

Connectionless Service

Connection oriented service

Connection-Oriented Service

Comparison of datagram and virtual circuit subnets

Comparison of datagram and virtual-circuit subnets

Routing algorithms

Routing Algorithms

  • deciding which output line an incoming packet should be transmitted on

  • datagram :

    • decision must be made anew for every arriving data packet

  • virtual circuits :

    • decisions are made only when a new virtual circuit is being set up

    • Also called session routing

Conflict between fairness and optimality

Conflict between fairness and optimality.

Routing algorithms1

Routing Algorithms

  • Nonadaptive algorithms

    • choice of the route to use to get from I to J is computed in advance, off-line, and downloaded to the routers when the network is booted.

    • This procedure is sometimes called static routing.

  • Adaptive algorithms

    • choice of the route to use to get from I to J is computed during transmission.

    • This procedure is sometimes called dynamic routing.

The optimality principle

The Optimality Principle

  • If router J is on the optimal path from router I to router K, then the optimal path from router J to router K also falls along it

  • The set of optimal routes from all sources to a given destination forms a tree

  • This tree has destination as a root and is known as sink tree

  • All routing algo tries to discover it

A subnet and a sink tree for router b

A Subnet And A Sink Tree for Router B

Shortest path routing

Shortest Path Routing

  • Represent Subnet as a graph where routers are nodes and com lines are edges or links

  • The metric or weight of an edge is imp

  • No. of Hops, Physical distance, time to reach the destination are the examples

  • It can be bandwidth, average traffic, com cost, mean delay, or any combination of it

Shortest path from a to d

Shortest Path From A to D

Dijkstra s algorithm

Dijkstra's Algorithm

  • Each node is labeled from the source node

  • Label can be temporary or permanent

  • The starting node is permanent, nearest node is made permanent & is the next node

  • All other neighbors are temp’ly labeled



  • Every IC packet is sent to all OG lines

  • Generates vast numbers of duplicate packets

  • It is highly robust, useful in military apps

  • Selective flooding for better throughput

Distance vector routing

Distance Vector Routing

  • It operates by maintaining best known distance to each destination and an OG line

  • These tables are updated by exchanging info with its neighbors

  • It is also known as distributed Bellman-Ford or Ford-Fulkerson algo

  • It’s original Arpanet routing algo

A subnet

A Subnet

Inputs from a i h k and new rt

Inputs from A I H K and New RT

The count to infinity problem

The Count-to-Infinity Problem

  • Consider a linear subnet having A, B, C, D, E nodes, with metric is no of hops

  • The figure shows two cases,

    • When A is up

    • when A is down

Count to infinity problem

Count to Infinity Problem

Count to infinity problem1

Count to Infinity Problem

Link state routing

Link State Routing

  • DV used delay metric not considering line BW

    • The algo take very long time to converge

  • Each router using LSR must do

    • Discover the neighbors and their NW addresses

    • Measure the delay or cost to them

    • Construct a packet

    • send to all neighbors

    • Compute the shortest path to every other router

1 learning about the neighbors

1) Learning About The Neighbors

  • Sending special HELLO packet to each PtoP lines when booted

  • Names of routers must be globally unique

Learning about the neighbors

Learning About The Neighbors

(a) Nine routers and a LAN. (b) A graph model of (a).

2 measuring line cost

2) Measuring Line Cost

  • Delay is used as a metric, so special ECHO packet is sent the RTT is calculated

  • RTT (round-trip time) is divided by 2 to get the estimate

  • Whether to consider load or not is crucial

    • Load Considered : RTT to start when Echo packet is queued

    • Load Not Considered : when it comes to the front of queue

The two line problem

The Two Line Problem

3 building ls packets

3) Building LS Packets

  • The packet contains, ID of sender, seq, age, and list of neighbors with respective delay

  • One possibility is to do it periodically

  • Another is to do when some significant like router coming up or going down happens

Link state packets for a subnet

Link State Packets for a Subnet

The age field

The Age field

  • Age is included in every packets and is decremented once per second

  • When age hits zero, info from that router is discarded

  • It ensures that no packet gets lost and live forever

4 distributing link state packets

4) Distributing Link State Packets

  • Flooding is used for distributing,seq no is used for checking

  • Routers keep track of all the source, seq pairs they see

  • If seq is new it is forwarded

The packet buffer for router b refinements

The Packet Buffer for Router B--- Refinements

5 computing new routes

5) Computing New Routes

  • Once router receives all LSPs, it can construct the whole graph for the subnet

  • Dijkstra's algorithm now can run locally to construct shortest paths to all possible dest

Routing to mobile hosts

Routing to Mobile Hosts

  • Users who never move are known as stationary, they use copper or fiber to communicate

  • Migratory users are stationary but moving from one fixed site to another

  • Roaming users are connected to the internet wherever they are

Routing for mobile hosts

Routing for Mobile Hosts

The registration process

The Registration Process

  • Periodically each agent broadcasts a packet

    • Packet contains it’s address

  • MH registers with FA, giving HA, current DLL address, + some security info

  • FA contacts MH’s HA and convince him

  • FA gets ack and inform MH about registration, and add info in routing table

Packet routing for mobile hosts

Packet Routing for Mobile Hosts

Routing in adhoc networks

Routing in AdHoc Networks

  • Hosts are mobile and also routers are mobile in Adhoc networks

  • Also known as MANET(Mobile AdHoc Networks)

  • No Fixed topologies, no fixed neighbors etc

  • AODV(Ad hoc Distance Vector) Routing Algorithm

Route discovery

Route Discovery

Route discovery1

Route Discovery

Route maintenance

Route Maintenance

Congestion control algorithms

Congestion Control Algorithms

  • Defn:-

    • When too many packets are present in (a part of) the subnet, performance degrades. This situation is called congestion

General principles of cc

General Principles of CC

  • Open Loop attempts to solve it by good design

    • Once the system is up and running, midcourse corrections are not made.

  • Closed Loop based on the concept of feedback

    • Monitor the system to detect congestion

    • Pass the information elsewhere to take action

General principles of cc1

General Principles of CC

  • In Open, act at source or at a destination

  • In Closed, explicit vs. implicit feedback

    • In explicit feedback case, the router sends the packets back

    • In implicit feed back the source deduce it by making local observations

      • Delay in receiving ack

Open loop solution

Open Loop Solution

  • Minimize congestion in the first place, rather than letting it happen and reacting after the fact

  • Goal is achieved by using appropriate policies at various layers

Congestion prevention policies

Congestion Prevention Policies

Closed loop solutions

Closed loop Solutions

  • Let Congestion occur first and than control it

    • Congestion Control in Virtual-Circuit Subnets

    • Congestion Control in Datagram Subnets

    • Load Shedding

    • Jitter Control

Congestion control in virtual circuit subnets

Congestion Control in Virtual-Circuit Subnets

  • Admission control (Don't allow new connection after congestion detection)

    • once congestion has been signaled, no more virtual circuits are set up until the problem has gone away

A congested subnet

A Congested Subnet

Congestion control in datagram subnets

Congestion Control in Datagram Subnets

  • The Warning Bit

  • Choke Packets

  • Hop-by-Hop Choke Packets

The warning bit

The Warning Bit

  • setting a special bit in the packet's header

    • into the next acknowledgement sent back to the source.

  • The source then cut back on traffic.

  • As long as the warning bits continued to flow in, the source continued to decrease its transmission rate

Choke packets

Choke Packets

  • the router sends a choke packet back to the source host

  • the host should ignore choke packets referring to that destination for a fixed time interval

  • After that period has expired, the host listens for more choke packets for another interval.

  • If one arrives, the line is still congested, so the host reduces the flow still more and begins ignoring choke packets again.

  • If no choke packets arrive during the listening period, the host may increase the flow again

Hop by hop chock packets

Hop by Hop Chock Packets

  • At long lines, chock packet will take little long to reach source

  • Instead, at each hop the traffic is slowed down when choke packet passes thru

  • Intermediate buffers are needed to be increased

  • Immediate relief to the congested area

The network layer

A choke packet that affects each hop it passes through.

A choke packet that affects only the source.

Load shedding

Load Shedding

  • when routers are being inundated by packets that they cannot handle, they just throw them away

  • Router can do it randomly picking packets

  • Dropping can be done better dependent on app

  • In some app old packet is more important than new one and vice versa

  • Still improvement : (intelligent discard policy) applications must mark their packets in priority classes to indicate how important they are (VERY IMPORTANT— NEVER, EVER DISCARD )

Random early detection

Random Early Detection

  • idea of discarding packets before all the buffer space is really exhausted

  • When the average queue length on some line exceeds a threshold, the line is said to be congested and action is taken.

Jitter control

Jitter Control

  • The variation (i.e., standard deviation) in the packet arrival times is called jitter. High jitter, for example, having some packets taking 20 msec and others taking 30 msec to arrive

Jitter control1

Jitter Control

Mpls conventional routing model

MPLS – Conventional routing model

  • In a traditional connectionless network, every router along the path makes an independent forwarding decision for every packet.

  • In an IP network, this process involves matching the destination address stored in the IP header of each packet with the most specific route obtained from the IP routing table.

  • Processor-intensive.

  • Occurs at every node along the end-to-end path.

Mpls multiprotocol label switching

MPLS – MultiProtocol Label Switching

  • Introducing a connection oriented mechanism inside the connectionless IP networks

  • Adding a label in front of each packet

    • Doing the routing based on label than on the destination address

  • Label as index in routing table

  • This is much the same way as a ZIP code is shorthand for the house, street and city in a postal address,

  • MPLS is called multiprotocol because it works with the Internet Protocol (IP), Asynchronous Transport Mode (ATM), and frame relay network protocols.

The network layer


  • A label is used to identify a Forwarding Equivalence Class (FEC).

  • In MPLS, data transmission occurs on Label-Switched Paths (LSPs)

  • LSPs are a sequence of labels at each and every node along the path from the source to the destination.

  • LSPs are established either prior to data transmission (control-driven) or upon detection of a certain flow of data (data-driven).

  • Needs MPLS capable router

The network layer


  • QOS – bandwidth, delay, jitter, reliability

  • S –Bottom of the Stack, 1-bit field set to one for the last entry in the label stack and zero for all other label stack entries.

    • Stacking multiple labels

Ip v4 header

IPv4 Header

The network layer


  • Why IPV6?

    • Address space exhaustion

    • Simplification of header

    • Security

  • IPV4 – 32 bits

  • IPV6 – 128 bits

Ipv6 pdu packet structure

IPv6PDU(Packet) Structure

Ip v6 header

IP v6 Header

Ipv6 header

IPV6 Header

  • Traffic Class – identifies packet with different real time delivery requirements

  • Flow Label - The flow can be set up in advance and given an identifier.

    • what kind of special treatment it requires.

    • Delay requirements, reserved BW

    • treats flows differently

      • buffer sizes, different forwarding precedence, different quality of service

  • Next Header – 6 extension headers

    • Last header will have TCP/UDP protocol

Ip address

IP Address

  • 128 bit or 16 byte

    • 2128 = 3 x 1038

  • 8 groups of 4 hexadecimal digits

  • Ex: 8000:0000:0000:0000:0123:4567:89AB:CDEF

    • Zeros -- 8000::123:4567:89AB:CDEF

    • Ipv4 -- ::

Ipv6 extension headers

IPV6 Extension Headers

  • Some headers have a fixed format; others contain variable-length fields.

Hop by hop extension header

Hop by Hop Extension Header

  • Support of datagrams exceeding 64K

  • The use of jumbograms is important for supercomputer applications that must transfer gigabytes of data efficiently across the Internet.

Routing header

Routing Header

  • The destination options header is intended for fields that need only be interpreted at the destination host.

  • The routing header lists one or more routers that must be visited on the way to the destination.

    • addresses listed must be visited in order, but other routers not listed may be visited in between.

Routing header1

Routing Header

  • The Routing type field gives the format of the rest of the header.

  • Segments left field keeps track of how many of the addresses in the list have not yet been visited.

    • It is decremented every time one is visited.

    • When it hits 0, the packet is on its own with no more guidance about what route to follow.

  • Type 0 routing provides a list of addresses

    • initial destination address is first on list

    • current destination address is next on list

    • final destination address will be last in list

Fragmentation header

Fragmentation Header

  • Fragmentation only allowed at source

  • No fragmentation at intermediate routers

  • Header includes

    • fragment offset

    • more fragments bit

    • identification

  • Login