UNIT 3 Network layer
UNIT 3 Network layer
UNIT 3 Network layer
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
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):
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
3FFE:85B:1F1F::A9:1234
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.