UNIT 3 Network layer

Download as pdf or txt
Download as pdf or txt
You are on page 1of 80

UNIT III

NETWORK LAYER
Network layer – Switching concepts –
Circuit switching – Packet switching – IP
Addressing –IPV4, IPV6 – Routing
Protocols – Distance Vector – Link State.
UNIT – III

NETWORK LAYER
OVERVIEW
• Network Layer
• Switching Concepts
• Circuit Switching
• Packet Switching
• Message Switching
• IP Addressing
• IPV4
• IPV6
• Routing Protocols
• Distance Vector Routing
• Link State Routing
Network Layer
• The Network layer is responsible for
the source-to-destination delivery of a
packet possible across multiple
networks.
• It converts Frames into packets.
• Source-to-Destination delivery of a packet
• Logical addressing
• Routing
• Internetworking
Network layer Duties

3
Switching Concepts
Switches are hardware or software devices used
for temporary connection b/w 2 or more devices
linked to the switch in network but not to each
another
Switches are needed to connect multiple devices
for making one-one communication

TYPES:



Circuit switching
It creates direct physical connection
b/w two devices such as phone or
computers.
Any computer can be connected to any
other using Levers.
N-by-N folded switches can connect n
lines in full duplex mode.
2 types:


Space Division Switch
Path in the circuit are separatedfrom each other
It is used both in analog and digital
communication
2 Types:
◦ Crossbar switch
◦ Multistage switch
• Crossbar Switch:
It connects n inputs to m outputs using cross points
• Limitation:
More cross points needed(1000 I/P - 1000 O/P requires
1000000 crosspoints)
Crossbar Switch:
Multistage switch
Devices are linked to switches ,that are in turn
linked to another switches(Hierarchy of
switches)
Blocking:
The reduction in a number of cross
points causes a phenomena called
Blocking.
During heavy traffic one input cannot be
connected to output because no path
available
Time Division Switches
It uses time division multiplexing

2 methods:
Time slot interchange
TDM bus
Time slot interchange:
It changes the ordering of the slot based on the
desired connection
It uses RAM to store time slot
Ex:
1->3 2->4 3->1 4->2
A B C D -> C D A B
TSI
TDM Bus- Time Div ision Multiplexing
Here each input and output lines are connected
to high speed bus
Each bus is closed during one of the four time slots
Limitations of Circuit Switching
• It is specially designed for voice
communication(telephone). Not suitable
for data communication.
• Once a circuit is established, it remains for
duration of the session. It creates
dialed(temporary)and leased(Permanent).
• Less data rate because of point to point
connection.
Packet switching
• Packet switching is better for data
transmission.
• Here data are transmitted through unit of
variable length blocks called packets.
• Longer transmission are divided into
multiple packets.
• Packet length is decided by network.
DatagramApproach
• In this approach a message is divided into
multiple packets.
• All packets choose various routes and
reaches the destination.
• Ordering of packets in destination is done by
transport layer.
DatagramApproach
Virtual Circuit approach
It uses single route to send all packets of the
message
Two formats:
◦ Switched virtual circuit
◦ Permanent virtual circuit
SVC
• Connection is temporary
• Dial-up lines
DuringTransmission.
A connection is established-all packets are sent –
proper ACK- Connection is terminated
PVC
• Connection is permanent.
• Circuit is dedicated for two users, No one else can
use the line when communication takes place.
• It always gets the same route.
• Leased lines.
During Transmission.
No connection establishment or termination
PVC
Circuit switchedVs Virtual Circuit
Path Vs Route:
Circuit switched->Path
Virtual Circuit->route
Message Switching
• It uses amechanism called store and forward
• Here a message is received and stored until a
appropriate route is free, then sends along.
• Message switching- uses secondary
storage(Disk)
• Packet switching – uses primary
storage(RAM)
Routers
• The routers decide which route is best among
many routes in a particular transmission.
• Routers are like stations on the network
Routing concepts:
Least cost routing:
Cheaper
Shortest path(using small number of relays or hops.
Hop-count ->Number of relays
Non - Adaptive Routing
In some routing protocols , once a pathway
to a destination is selected ,the router sends
all packets in that way.
Adaptive Routing:
The router may select new route for each
packet.
Packet Life Time (or)Time to Live:
The problem created by looping or
bouncing is avoided by destroying the packet
without looping, New packet is
retransmitted
• To route the packet with optimal cost many
routing algorithms are used to Calculating the
shortest path between 2 routers
1. Distance Vector Routing
2. Link State Routing
Distance vector Routing
Def:
• Each router periodically shares its knowledge about
the entire network with its neighbor.
• It is represented by graph.

Key Works:
• Each router shares its knowledge about the entire
network to neighbors.
• Routing only to the directly linked routers.
• Information sharing at regular interval(each 30
seconds).
The Concept of Distance Vector Routing
2
8
1

Distance Vector Routing Table

12/28/2020 Unit-3 : Network Layer


Routing Table Distribution
Link State Routing
Def:
Each router shares its knowledge of it neighborhood with
all routers in the internetwork.
It is represented by directed graph with weight.
Key work:
Each router shares its knowledge about the
neighborhood
Each router sends its knowledge to all router.
Flooding -> Each router share info to neighbor, The
neighbor to its own neighbor and so on.,
Information sharing when there is a change.
Concept of Link State Routing
Cost in Link State Routing
2
8
6
Link State Packet

12/28/2020 Unit-3 : Network Layer


2
8
7
Link State Database

12/28/2020 Unit-3 : Network Layer


TCP/IP
• It was developed before OSI
• This project was funded by ARPA of U.S called
ARPANET which is turned into TCP/IP
• In internet it acts like a single network
connection many of any size and type.
• TCP and UDP creates a data unit called
Segment or datagram.
What is an IP address?
An Internet Protocol address is a numerical
label assigned to each device connected to a
computer network that uses the Internet
Protocol for communication.
An IP address serves two principal functions:
host or network interface identification
location addressing.
IP (Internet Proocol)
Network layer of TCP/IP supports IP in turn four
other supporting protocol
◦ ICMP
◦ IGMP
◦ ARP
◦ RARP
It is a transmission mechanism used by TCP/IP
protocols
IP datagram
C ont.,

IP Is a unreliable and connection less


datagram protocol.
No error checking or tracking.
Data transmitted to destination but no
guarantees.
IP must be paired with TCP.
IP Addressing
In addition to physical address (NIC) ,to identify
each device in the network it requires IP address.
Address that identify host of its network.
An IP address is a 32-bit address.
The IP addresses are unique and
universal.
It Represented in a Dotted-decimal
Notation.
Example 1
Change the following IP addresses from binary notation to dotted-
decimal notation.
a. 10000001 00001011 00001011 11101111
b. 11111001 10011011 11111011 00001111

Solution
We replace each group of 8 bits with its equivalent decimal
number and add dots for separation:
a. 129.11.11.239
b. 249.155.251.15
Example 2
Change the following IP addresses from dotted-decimal notation to
binary notation.
a. 111.56.45.78
b. 75.45.34.78

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

a. 01101111 00111000 00101101 01001110


b. 01001011 00101101 00100010 01001110
Figure 19.10 Finding the class in binary notation
Finding the class in decimal notation (changes from 0 to 255)
Private and Public IPAddress
Class Starting IPAddress Ending IPAddress # of Hosts

A 10.0.0.0 10.255.255.255 16,777,216

B 172.16.0.0 172.31.255.255 1,048,576

C 192.168.0.0 192.168.255.255 65,536


Types of IP address
Static address
Dynamic address

Static IP address
◦ manually input by network administrator.
◦ manageable for small networks.
◦ requires careful checks to avoid
duplication.
Types of IP address
Dynamic IP address
examples - BOOTP, DHCP
◦ Assigned by server when host boots
◦ Derived automatically from a range of
addresses
◦ Duration of ‘lease’ negotiated, then address
released back to server
Subnetting
Dividing the network into several smaller
groups (subnets) with each group having its
own subnet IP address.
Site looks to rest of internet like single
network and routers outside the organization
route the packet based on the main Network
address.
Local routers route within subnetted
network using subnet address.
Subnetting
Host portion of address partitioned into subnet
number (most significant part) and host number
(least significant part)
In this case, IP address will have 3 levels
(Main network, subnet, host)
Subnet mask is a 32-bit consists of zeros and ones
that indicates which bits of the IP address are
subnet number and which are host number
Subnet mask when AND ed with the IP address
it gives the subnetwork address
Masking.
Masking is a process that extracts the address
of the physical network from an IP address.
Boundary level masking: Here the mask
numbers are either 255 or 0, finding the
subnetwork address is very easy.
Non-boundary level masking.
If mask numbers are not just 255 or 0,
finding the subnetwork address involves
using the bitwise A N D operators
Supernetting:
• Supernetting combines several networks into
one lager one (Because of Address reduction)
IP Network Addressing
INTERNET  world’s largest public data
network, doubling in size every nine months
IPv4, defines a 32-bit address - 232
(4,294,967,296) IPv4 addresses available
The first problem is concerned with the
eventual depletion of the IP address space.
Traditional model of classful addressing does not
allow the address space to be used to its
maximum potential.
ClassfulAddressing
When IP was first standardized in Sep 1981,
each system attached to the IP based Internet
had to be assigned a unique 32-bit address
The 32-bit IP addressing scheme involves a
two level addressing hierarchy

Network Number/Prefix Host Number


Internet Protocol (IP)
What is Internet Protocol?
◦ Internet Protocol is a set of technical rules
that defines how computers communicate
over a network.

◦ Currently, There are two versions of IP


IP version 4 (IPv4)
IP version 6 (IPv6).
Internet Protocol (IP)
What is IPv4?
◦ IPv4 was the first version of Internet
Protocol to be widely used, and accounts
for most of today’s Internet traffic.

◦ There are just over 4 billion IPv4 addresses.


While that is a lot of IP addresses, it is not
enough to last forever.
Internet Protocol (IP)
What is IPv6?
◦ IPv6 is a newer numbering system that
provides a much larger address pool than
IPv4. It was deployed in 1999 and should
meet the world’s IP addressing needs well
into the future.
Internet Protocol (IP)
What is the major difference?
◦ The major difference between IPv4 and
IPv6 is the number of IP addresses.

◦ There are 4,294,967,296 IPv4 addresses.


◦ while, there are
340,282,366,920,938,463,463,374,607,431,
768,211,456 IPv6 addresses.
128-bit IPv6 Address
3FFE:085B:1F1F:0000:0000:0000:00A9:1234

8 groups of 16-bit hexadecimal numbers separated by “:”


Leading zeros can be
removed

3FFE:85B:1F1F::A9:1234

:: = all zeros in one or more group of 16-bit hexadecimal numbers


IPv4 vs. IPv6
IPv6

IPv4 addresses are 32 IPv6 addresses are 128


bit length. bit length.

IPv4 addresses are binary IPv6 addresses are binary


numbersrepresented in numbers represented in
decimals. hexadecimals.

IPSec support is
Inbuilt IPSec support.
only optional.
Fragmentation is done by
Fragmentation is done only
sender and forwarding
by sender.
routers.
Packet flow identification is
available within the IPv6 header
No packet flow identification.
using the Flow Label field.

Checksum field is No checksum field in


available in IPv4 IPv6 header.
header

Options fields are No option fields, but


available in IPv4 IPv6 Extension headers
header. are available.

Address Resolution Protocol


Address Resolution Protocol
(ARP) is replaced with a
(ARP) is available to map IPv4
function of Neighbor Discovery
addresses to MAC addresses.
Protocol (NDP).
Internet Group
IGMP is replaced with
Management Protocol
Multicast Listener
(IGMP) is used to manage
Discovery (MLD) messages.
multicast group
membership.
Broadcast messages are not
available. Instead a link- local
scope "All nodes" multicast
Broadcast messages are IPv6 address(FF02::1) is used
available. for broadcast similar
functionality.

Manual configuration Auto-configuration of


(Static) of IPv4 addresses or addresses is available.
DHCP (Dynamic Host
IPv4 companion protocols (1)
ARP: Address Resolution Protocol
◦ Mapping from IP address to MAC address
ICMP: Internet Control Message Protocol
◦ Error reporting & Query
IGMP: Internet Group Management Protocol
◦ Multicast member join/leave
Unicast Routing Protocols (Intra-AS)
◦ Maintaining Unicast Routing Table
◦ E.g. RIP, OSPF (Open Shortest Path First)
IPv4 companion protocols (2)
Multicast Routing Protocols
◦ Maintaining Multicast Routing Table
◦ E.g. DVMRP, MOSPF, CBT, PIM
Exterior Routing Protocols (Inter-AS)
◦ E.g. BGP (Border Gateway Protocol)
Quality-of-Service Frameworks
◦ Integrated Service (ISA, IntServ)
◦ Differentiated Service (DiffServ)
Why IPv6?
Deficiency of IPv4
Address space exhaustion
New types of service  Integration
◦ Multicast
◦ Quality of Service
◦ Security
◦ Mobility (MIPv6)
Header and format limitations
Advantages of IPv6 over IPv4
Larger address space
Better header format
New options
Allowance for extension
Support for resource allocation
Support for more security
Support for mobility
THANK YOU

You might also like