SlideShare a Scribd company logo
Computer Networks
&
Internetworking Layers
Prepared by: Reshma Dayma
Computer
Network
 A computer network is a group of computer systems and other
computing hardware devices that are linked together through
communication channels to facilitate communication and
resource-sharing among a wide range of users.
 There are many types of networks:
LocalArea Networks (LAN)
PersonalArea Networks (PAN)
Home Area Networks (HAN)
Wide Area Networks (WAN)
MetropolitanArea Networks (MAN)
Protocol
 In computer networks, for communication to occur between
sender and receiver, both the entity must agree on a protocol.
 Protocol in computer network is set of rules that governs data
communication.
 There are two protocol stack.
OSI( Open System Interconnection)
TCP/IP
OpenSystem
Interconnection
OpenSystem
Interconnection
Application Layer: application layer enables user to access network. It
provides user interface like mail, remote file access, transfer etc for
various purpose.
Presentation Layer: presentation layer is concerned with syntax and
semantics of the information exchanged between two system.This layer
performs translation, encryption, compression.
Session layer: session layer is responsible for dialog control and
synchronization.
Transport layer:Transport layer is responsible process to process delivery
of entire message.
Network layer: Network layer is responsible for source to destination
delivery of a packet.
Data Link Layer: Data link layer handles moving the moving of data in and
out of across physical layer.
Physical Layer: Physical layer coordinates the function required to carry a
bit stream over physical medium.
Network layer
 Network layer is responsible for getting the packets from source
to destination.
 To deliver the packet, network layer must know about the
topology of network and choose appropriate path among it.
 Every layer in protocol stack provides service to layer above it, in
this regard, network layer uses service provided by data link layer
and gives service to transport layer.
Store & Forward
Packet
Switching
The environment of the network layer protocols.
Services to
Transport Layer
 Network layer provides two types of services to transport layer.
o Connection oriented service
o Connectionless service
 Service provided by network layer need to meet following goal.
o Service should be independent of router technology.
o Transport layer should be shielded from number, type and
topology of routers present.
o Network address available at transport layer should use
uniform numbering plan.
Implementation
of
Connectionless
service
 Connectionless communication is just packet switching where no
connection(path) establishment and release occur.
 A message is broken into packets, and each packet is transferred
separately.The packets can travel different route to the
destination since there is no connection.
 Here packets is called datagrams and network is called datagram
network.
Implementation
of
Connectionless
service
Routing within a diagram subnet.
Implementation
of
Connectionless
service
 The algorithm that manages routing table and makes routing
decision is called routing algorithm.
 IP (Internet Protocol) is dominant example of a connectionless
service.
 Each packet carries destination IP address that router uses to
forward the packet individually.
Implementation
of
Connection-
oriented
service
 In connection oriented service, a connection (path) from source to
destination must be established before any data packet can be
sent.
 A virtual circuit, sometimes called a logical circuit, is a path
between two or more points that seems like a fixed physical path,
but actually is one path out of many possible physical paths that
can be arranged.
 This connection is called virtual circuit and network is called virtual
circuit network.
Implementation
of
Connection-
oriented
service
Routing within a virtual-circuit subnet.
Implementation
of
Connection-
oriented
service
 In figure, router A assigns different connection identifier to each
outgoing packet of second connection.This process is called label
switching.
 Example of connection oriented service is MPLS(Multiprotocol
label switching).
Comparison
Routing
Algorithms
 Main function of network layer is to route the packet from source
machine to destination machine.
 Routing algorithm is part of network layer software responsible
for deciding which output line should be use to deliver the packet
to destination.
 If network uses virtual circuit, decision of routing are made when
circuit is being set up.
 If network uses datagram, then routing decision need to make for
each arriving packet.
 Certain properties are desirable in routing algorithm like,
correctness, simplicity, robustness, fairness, stability, efficiency.
Routing
Algorithms
 Correctness: The routing should be done properly and correctly so
that the packets may reach their proper destination.
 Simplicity: The routing should be done in a simple manner so that
the overhead is as low as possible.With increasing complexity of
the routing algorithms the overhead also increases.
 Robustness: Once a major network becomes operative, it may be
expected to run continuously for years without any failures.The
algorithms designed for routing should be robust enough to
handle hardware and software failures and should be able to cope
with changes in the topology and traffic without requiring all jobs
in all hosts to be aborted and the network rebooted every time
some router goes down.
 Stability: The routing algorithms should be stable under all
possible circumstances.
 Fairness: Every node connected to the network should get a fair
chance of transmitting their packets.This is generally done on a
first come first serve basis.
 Efficiency: The routing algorithms should be optimal in terms of
throughput and minimizing mean packet delays. Here there is a
trade-off and one has to choose depending on his suitability.
Routing
Algorithms
 Routing algorithms are grouped into two classes:
 Adaptive algorithm.
 Non adaptive algorithm.
 Non adaptive algorithm do not change their routing decision on
base of current topology and traffic. Routes are computed in
advance and loaded into router.These procedure is also called
static routing.
 Adaptive algorithm changes their routing decision to reflect
current topology and traffic.These algorithm are also called
dynamic routing algorithm.
Optimality
Principle
 Optimality Principle says if a router J is on optimal path from
router I to K, then optimal path from router J to K also falls among
same route.
 Set of optimal routes from all source to given destination forms a
tree routed at the destination. Such a tree is called sink tree.
(a) A network. (b) A sink tree for router B.
Shortest Path
Algorithm
 Shortest path algorithm works on graph of network, each node in
graph represents router and each edge represents a
communication link.
 To choose route between given source and destination, this
algorithm finds shortest path between them.
 Number of hopes, geographical distance, delay are some of the
criteria on base of which, algorithm finds shortest path.
 One of algorithm to find shortest path is given Dijkstra.
Shortest Path
Algorithm
 In Dijkstra shortest path algorithm, each node is labelled with
distance from source and previous node.
 Initially, when path are not known, all the node(router ) are
labelled with infinity.As the algorithm progress, labels may
change reflecting a better path.
 A label may be tentative or permanent.
 Initially all the labels are tentative, when it is found that the
tentative label represents shortest possible path from source, it is
made permanent.
Shortest Path
Algorithm
Shortest Path
Algorithm
Dijkstra’s algorithm to compute the shortest path through a graph.
Shortest Path
Algorithm
Dijkstra’s algorithm to compute the shortest path through a graph.
. . .
. . .
Shortest Path
Algorithm
Dijkstra’s algorithm to compute the shortest path through a graph.
. . .
Example
1
5
0
2
3
4
6
2
4
21
3
4
2
3
2
1





Flooding
 Flooding is also a routing technique in which every incoming
packet is sent to every out going line except the line from which it
arrived.
 Flooding generates vast number of packet and some measures are
required to control this process.
 One solution is hop count, every packet contains hop count, this
hop count decreases at each hop packet reach.
 When the hop count of packet becomes zero, packets is discarded.
In this way number of packets are controlled while flooding.
 Hop count should be initialize to the length of path from source to
destination.
 If sender does not know about path length, it can be initialized
with diameter of network.
Flooding
Flooding
 Another solution to control the packet is to keep a record of which
packets have been flooded.
 For this, sender inserts contains sequence number in packet and
every router keeps list of packets per source those have been
flooded.
 if incoming packet’s sequence number is in list, it will not be
flooded.
 Flooding is not practical for use, but it have some advantage.
oIt ensures that packet is delivered to every node, so it can be
used for broadcasting.
oIn military network, it makes sure that packet gets delivered if
the path exists.
oFlooding always chooses shortest path and gives minimum
delay(if overhead due to flooding is ignored).
Distance
Vector Routing
 Distance vector routing is dynamic routing algorithm.
 Distance vector routing is also called distributed bellman-ford
routing algorithm.
 In Distance vector routing algorithm, each router maintains a
table (vector) that stores best known distance for each router in
network and link to use to reach there.
 Router is assumed to know the distance to each of its neighbor.
 Distance may be measured in term of number of hop, delay or
other metric.
 These tables are updated by exchanging information with
neighbor routers
Distance
Vector Routing
 Assume that delay is used as metric and router knows delay to
each of its neighbor.
 Router measures delay to neighbor by sending ECHO packet,
receiver just timestamp the packet and sends back the packet as
fast as possible.
 Once everyT msec, each router sends each neighbor the list of
estimated delay to each destination.
 It also receive same list from each its neighbor.
 Assume router A has receive list from B,C. router A knows delay to
its neighbor B and C, delay is AB andAC. BD is delay from B to D.
delay from A to D would be calculated like
AD = AB+BD
• Similarly distance to D is calculated using every neighbor and
minimum distance is chosen.
Distance
Vector Routing
(a) A network.
(b) Input from A, I, H, K, and the new routing table for J.
Count to
Infinity
problem
 The settling of routes to best path across the network is called
convergence.
 DVR has drawback, although it converges to correct answer but it
may do slowly.
 React rapidly to positive news, leisurely to bad one.
 Suppose router A has long route to destination X. but in next
exchange if router B report short path, router A will switch to B to
go to X.
Count to
Infinity
problem
The count-to-infinity problem
Core Problem is when X tellsY that it has path somewhere,Y has no way to know weather it itself is on the path.
LinkState
Routing
 Link state routing is also a dynamic algorithm. It has following five
steps procedure.
1) Discover neighbor and learn network addresses.
2) Set the distance or cost metric to each of its neighbor.
3) Construct the packet which contains distance to its neighbor.
4) Send this packet to and receive packets from all other routers.
5) Compute the shortest path to every other router.
LinkState
Routing
Learning about the Neighbor
 When a router a booted, first of all it learns who its neighbor are, this
goal is accomplished by sending HELLO packet on point-to – point line.
 Receiver router is expected to send a reply giving its name.
LinkState
Routing
Setting Link Cost
• Link state routing requires each line to have a cost for finding shortest
path.
• Cost to neighbor can be calculated automatically, a common choice is
to make cost inverse of bandwidth.
• Other way to determine delay is to send a ECHO packet. Receiver
router will send it back immediately.
• By measuring RoundTripTime(RTT), dividing it by two, sending router
can get a estimated delay.
LinkState
Routing
Building State Packet
 Once the information needed is collected, next step is to build the
packet containing all the data.
 Packet start by identity of sender, sequence number, age and list of
neighbor along with distance to that neighbor.
 Packets are build periodically or when some significant event occurs.
(a) A network. (b) The link state packets for this network.
LinkState
Routing
Distributing Link State Packets
 All of the routers in network must get link state packet.
 Flooding is used to distribute link state packets.
 To keep check, each packet contains sequence number, sequence
number is incremented for every new packet sent from source router.
 Routers keep information, source router, max sequence number seen.
 When a new packet arrives at any routers, it checks its sequence
number against highest sequence number seen, if packet is having is
lower seq. number means its already flooded so it is discarded
otherwise it is flooded.
 Age of each packet decrements once per second.When age reach to
zero, packet will be discarded.
 Due to age, packet will not be for infinite period of time.
LinkState
Routing
 There are few problem with algorithm. First is if sequence number
wrap around, confusion will occur. Solution is to use 32 bit sequence
number.
 Second is if router ever crashes, it will lose track of sequence number
sent. So it will start from 0 and packet will be rejected as duplicate.
 Third is if sequence number ever corrupted. For example in case of 1
bit error packet number 4 will be received as 65540. so all the packet
from 5 to 65540 will be rejected.
LinkState
Routing
The packet buffer for router B
LinkState
Routing
Computing the New Routes
 Once router has a full set of packet, it will construct entire network
graph.
 Dijkstra algorithm can be used to construct shortest path to all
possible destination. this information is installed to routing table.
 Compare to distant vector routing, link state requires more
memory and computation.
Hierarchical
Routing
 As network grows, routing table grows in size. So not only router
memory, more CPU time to process the entry also requires.
 At certain point , network may grow to point, where it is not
longer feasible to have entry for every other router.
 Solution is to have hierarchical routing.
 In hierarchical routing, routers are divided into regions. Each
routers knows all about destination within its own regions and
nothing about internal structure of other region.
Hierarchical
Routing
Hierarchical routing.
Hierarchical
Routing
Hierarchical
routing.
 if there are 720 routers and they are divided into 24 regions, each
contains 30 routers then how many entry will be there in each router?
 If three level hierarchy is chosen, 8 clusters each contains 9 regions
and each regions contains 10 routers, then number of entry will be
= 10 entry of each router in same region + 8 entry to route to other
region in same cluster + 7 entry for other clusters.
= 25 entries.
 optimal number of levels for N router network is ln N.
Broadcast
Routing
 In some application, hosts need to send messages to many or all other
host.
 Sending a packet to all destination simultaneously is called
broadcasting.
 One method is that source send a distinct packet to each destination. It
wastes bandwidth and slow.
 Another is multi-destination routing.in this, each packet contains entire
list of destination.
 When packet comes at router, it finds line for all destination.Then router
generates new copy of packet for each output line, that packet contains
only those list of destination that are to use that line.
 Eventually after some hopes, each packet will carry only one destination
like normal packet.
 Requires less bandwidth but much work from router.
 One more method is flooding.
Broadcast
Routing
Reverse Path Forwarding
 Router checks whether broadcast packet arrived on interface that is used to
send packets to source of broadcast.
 If so, it’s likely that it followed best route and thus not a duplicate;
router forwards packet on all lines.
 If not, packet discarded as likely duplicate.

Broadcast
Routing
Reverse path Forwarding
Broadcast
Routing
SpanningTree Routing
 Use spanning tree (sink tree) rooted at broadcast initiator.
 No need for destination list.
 Each router forwards packets on all lines on the spanning tree (except the
one the packet arrived on).
 Efficient but needs to generate the spanning tree and routers must have that
information.
Broadcast
Routing
 SpanningTree Routing Example
Multicast
Routing
 Sending a message to group is called multicast. Routing
algorithm used is called multicast routing.
 If group is dense, then broadcast using spanning tree is good
option. But broadcast will deliver the packets to some of member
that are not part of group.Which is waste of bandwidth.
 Another option is to prune “broadcast spanning tree” by removing
links that do not leads to group member.This is called “multicast
spanning tree”.
 Multicast spanning tree is used to deliver a packet to a group.
Multicast
Routing
(a) A network. (b) A spanning tree for the leftmost router.
(c) A multicast spanning tree for group 1. (d) A multicast spanning tree for group 2.
Multicast
Routing
 Different ways of pruning spanning tree are possible.
 One is if link state routing is used, each router knows about complete
topology of network including which host belong to which group.
 Each router construct sink tree for each host in network, prunes that
tree for each of the group.
 with distance vector routing, reverse path forwarding approach is
followed.Whenever router that is not part of group receives multicast
message for that group. It replies with PRUNE message.
 In this way spanning tree is recursively pruned.
 Disadvantage of multicast spanning tree is that routers requires lots of
work and memory.
 For n groups and m nodes, at each router, for each group m pruned
trees must be stored.Total m*n tress need to be stored.
Multicast
Routing
 Another approach is core based tree, that computes single
spanning tree for group.
 Here all the routers agrees on point called root(called core).
 Tree is build by sending a packet from each member to root. tree
is union of path traced by these packets.
 To send packet to group, sender sends packets to core, then core
forwards packet to all the member.
Multicast
Routing
(a)Core-based multicast tree for group 1.
(b)Sending to group 1.
Multicast
Routing
 For performance optimization, packet is not necessary to reach to
core before multicast.
 Disadvantage of shared tree is that it is not optimal for all sources.
 Advantage is that it saves memory and computation. Each router
keeps only one tree per group.
Routing for
Mobile host
 Mobile host are those that are not stationary, they moves from
one location to another hence their network also keeps changing.
 One approach is, in which when mobile host moves to new
location, acquires new address, there will not be any association
between old address and new address. In this model, old
connection will not work on new address.
 For example, host can do surfing, but mail or any connection
orient service will lost the connection.And connection need to be
establish again.
 In this case, network layer mobility is required to solve problem.
Routing for
Mobile host
 Basic idea used in internet and cellular network is that mobile host
tells host at a home location where it is now.The host which act on
behalf of mobile host is called home agent.
 Home agent accepts packets on behalf of mobile host and
forwards to it.
Routing in ad
hoc Networks
 An Ad hoc network is a decentralized type of network.
 The network is ad hoc because it does not rely on a pre existing
infrastructure, such as routers in wired networks or access points in
managed (infrastructure) wireless networks. Instead,
each node participates in routing by forwarding data for other nodes, so
the determination of which nodes forward data is made dynamically on the
basis of network connectivity.
 AODV (Ad hoc on-demand distance vector) routing algorithm is one of the
most popular algorithm for ad hoc network.
Ad hoc
Networks
 Infrastructure-based Networks
 traditional cellular systems (base station infrastructure)
 Space divided into cells
 A base station is responsible to communicate with hosts in its cell
 Mobile hosts can change cells while communicating
Ad hoc
Networks
Mobile Ad Hoc Networks (MANET)
 Host movement frequent
 Topology change frequent
 No pre existing infrastructure.
A
B A
B
Ad hoc
Networks
Routing in ad
hoc Networks
 AODV
 Route discovery
 InAODV, routes to destination is computed on demand.When
someone wants to send packets to that destination.
 at any time, topology of network is defined by graph of connected
nodes.
Range of
A’s Broadcast
Routing in ad
hoc Networks
(a) Range of A's broadcast.
(b) After B and D have received A's broadcast.
(c) After C, F, and G have received A's broadcast.
(d) After E, H, and I have received A's broadcast.
Shaded nodes are new recipients. Arrows show possible reverse routes.
Routing in ad
hoc Networks
Route Maintenance
 In ad hoc network, nodes can be moved out of range any time.
 To deal with the problem, algorithm periodically send “hello”
packet to each neighbor.
 If neighbor does not reply, means that neighbor is no longer
connected, so all the routes that goes through that are removed
from routing table.
 Other neighbors are also informed about the same, they also
remove route.
 To save battery life and bandwidth, router will keep information
only about the routes which are in use. Other routes learned
during broadcast are timed out after some time.
Congestion
 When too many packets are presents in network, network will not
able to deliver all the packet or packets are delayed.This situation
is called congestion.
 Goodput is rate at which useful packets are delivered by network.
General
principles of
congestion
control
 Solutions of congestion control are divided into two groups.
 open loop
 closed loop
 open loop approach are based on good design, they design policies
such that congestion does not occur,
 Closed loop solution are reactive.They monitor the network to find
whether congestion has occurred or not. If it has take place then it
steps to correct the situation.
1. monitor the system to detect when and where congestion occur.
2. pass the information to places where action can be taken.
3. adjust system operation to correct the problem.
General
principles of
congestion
control
 To monitor network, various metrics are used like percentage of
packet discarded, average queue length, number of packets time
out, average delay of packet etc.
 If congestion is detected, information about it sent from point
where congestion occurs to the source of the traffic.
 As the source receives the congestion notification, it will take
action to reduce the congestion.One option is source cuts down
the sending rate.
 Closed loop algorithms are further divided into two group.
Explicit feedback algorithm
Implicit feedback algorithm
Congestion
Prevention
Policies
 Policies that affects congestion are listed below.
Data Link Layer Policies
Retransmission Policy
Out of order caching policy
Acknowledgment policy
Flow control policy
Network Layer Policies
Virtual circuit versus datagram
Packet queueing and service policy
Packet discard policy
Routing algorithm
Packet lifetime management
Transport Layer Policies
Retransmission Policy
Out of order caching policy
Acknowledgment policy
Flow control Policy
Timeout Determination
TrafficShaping
 One of main reason of congestion is that the burst of traffic comes
suddenly. If hosts are made to transmit at uniform rate,
congestion could be avoided.
 One of the open loop approach is to forcing the host to send the
traffic at predictable and uniform rate.This approach is a called
traffic shaping.
 For traffic shaping in virtual circuit, agreement between sender
and carrier is made regarding traffic rate send by sender.
 If sender follows agreement, carrier will deliver all the packet on
time.
 To keep check on sender, carrier monitor traffic flow, this
monitoring is called traffic policing.
 For datagram subnet, other approach need to follow.
Leaky Bucket
Algorithm
(a) A leaky bucket with water. (b) a leaky bucket with packets.
Leaky Bucket
Algorithm
Leaky Bucket
Algorithm
Leaky Bucket
Algorithm
(a) Input to a leaky bucket.
(b) Output from a leaky bucket.
Token Bucket
Algorithm
Token Bucket
Algorithm
Token Bucket
Algorithm
 Time till the data can be sent in burst(means in one bunch) with maximum
speed is called burst time.
 If token bucket if full, then burst time S can be calculated
S= C/(M-p)
C= bucket capacity in bytes
M= maximum speed of sender
p=restricted speed
• data that send during burst time is = capacity of bucket+ token arrived during
burst time
M*S = C bytes+ (p*S) bytes
Token Bucket
Algorithm
Output from a token bucket with capacities of
Congestion
Control in
Virtual Circuit
Subnet
 One of technique to control congestion in virtual subnet is
admission control.
 In this approach, once congestion is detected, no more virtual
circuits are allowed to set up until congestion gets over.
 Another approach allows virtual circuit to establish, but it carefully
avoids congested path.
Congestion
Control in
Virtual Circuit
Subnet
 Another strategy in virtual circuit subnet is, whenVC is
established, sender gives details volume and shape of traffic and
other parameter and subnet reserves resources so congestion will
unlikely to occur.
Choke Packets
(for both,VC &
datagram subnet)
A choke packet that affects
only the source of traffic.
Hop by Hop
Choke Packets
A choke packet that affects each
hop it passes through.
LoadShedding
 When none of the approach work, finally router stats discarding
packet.This Is called load shedding.
 Instead of randomly discarding packets, if packets are discarded
on base of application, less retransmission will occur.
 For example in case of file transfer, old packet worth more so
newer should be discarded.While in case of multimedia transfer,
new packets worth more.
 To implement intelligent dropping policy requires support from
sender. Sender will mark packet with priority.
 Packets with lower priority will be discarded first.
Internetworking
 Internet is interconnected network. Using internet host in one
network can communicate host in another network.
 A computer network is a group of computer systems and other
computing hardware devices that are linked together through
communication channels to facilitate communication and resource-
sharing among a wide range of users.
 There are various types of network like LAN, MAN,WAN, ad hoc
network, ATM etc.
 Different types of network varies from each other mainly due to
protocol suite and technology used by network and various other
parameters.
Internetworking
Some of the many ways networks can differ
Internetworking
A collection of interconnected networks.
Internetworking
 Problem: Networks with different protocol stacks → how to let
them talk to each other?
 Non solution:Why not enforce all networks to run same protocol
stack?
 Solution:Construct some gateways that connect different kinds of
networks.
 Repeaters or hubs at physical layer: operate on bits, do not
understand protocols, just regenerate signals.
Bridges or switches at data link layer: operate on frames,
examine MAC addresses, do minor protocol translation, e.g.
Ethernet to 802.11.
Multiprotocol router at network layer: operate on packets,
translate between different packet formats, possibly split up
packets.
Concatenated
VirtualCircuit
Internetworking using concatenated virtual circuits.
Connectionless
Internetworking
A connectionless internet.
Advantage &
Disadvantage
Virtual Circuit:
Advantage: resources can be reserved & QoS can be guaranteed.
Disadvantage:
Table space required in each router to store info aboutVC.
No alternate route to avoid congestion that occurs while circuit is
active.
Affected by path failure.
Datagram:
Advantage:
Multiple routes available to avoid congestion.
This approach can be used over the subnet which does not supportVC.
Disadvantage:
 longer header.
 for every packet, route needs to decided.
Tunneling
Tunneling a packet from Paris to London.
Tunneling
Tunneling a car from France to England.
Internetwork
Routing
(a) An internetwork. (b) A graph of the internetwork.
Internetwork
Routing
 How routing is performed?
 Interior gateway protocol, exterior gateway protocol.
 Autonomous System(AS): In the internet, every network works
independent of other network, it is called autonomous system.
 Difference between Inter-network routing & Intra-network
Routing.
 quality of service.
 rules of some of the countries.
 cost of routing
Fragmentation
 Each network has put limit on maximum packet size due to various
reason like hardware, operating system, protocol, international standard
etc.
 InTCP/IP, IP packet has maximum payload size 65535 bytes.
 ATM network has limitation of 53 byte packet.
 PROBLEM?
 large packet need to pass through network having small packet size.
• Solution: Fragmentation
fragmentation is to break large packet into small packets.
Fragmentation
(a)Transparent fragmentation.
(b) Non-transparent fragmentation
Fragmentation
 Transparent Fragmentation Issues:
 Exit gateway need to know about all the packets that were part of
same big packet.
 all the small packets that belongs to same big packet need to travel
through same exit gateway.
 repeated work of fragment and reassemble.
Non-transparent Fragmentation Issues:
 All the host should have capability of reassembly.
 Small packets increase overhead because each packet carries header.
Fragmentation
Original packet, containing 10 data bytes.
Fragmentation
Fragments after passing through a network
with maximum packet size of 8 payload bytes plus header.
Fragmentation
Fragments after passing through a size 5 gateway.
IPV4
Header
The IPv4 (Internet Protocol) header.
IPV4
Header
Some of the IP options.
Classful IP
Address
Special IP addresses.
CIDR
(Classless Inter
Domain
Routing)
 Networks are not assigned according to classA,B,C.
 Networks are created with varying network bits. For example. If ISP
is having one IP address block of 8192 addresses starting at
194.24.0.0.
 If university1 requires 2040 address, means host address should be 11
bit long.
 So address space will be 194.24.0.0 to 194.24.7.255 with 21 bit
network mask.There will be one network consist of 2040 host and 21
bit long network id.
 If university2 requires 1012 address, host address requires 10 bit,
network address will be of 22 bits.
 So address space 194.24.8.0 to 194.24.11.0 with 22 bit subnet mask
will be allotted to univetsiry2.
NAT
(Network
Address
Translation)
Placement and operation of a NAT box.
10.0.0.1
10.0.0.4
10.0.0.3
10.0.0.2
web server
a
b
c
NAT
204.x.1.10
Internet
Outgoing PPTPClientThrough NAT
Internet
10.0.0.1
10.0.0.4
10.0.0.3
10.0.0.2
Web servera
b
c
NAT
204.1.1.10
Connection request to port 80
from ‘c‘ to <web server>
source 10.0.0.4, port 1025.
10.0.0.4, port 1025
mapped to
204.1.1.10, port 2000
Connection request from ‘c’ forwarded to <web
server> source 204.1.1.10, port 2000.
Request received and accepted.
OutgoingWebClientThrough
NAT
Index
Inside IP Inside
Port
Out IP
… … … …
2000 10.0.0.4 1025 204.1.1.10
2001 10.0.0.2 1026 204.1.1.10
Connection request to port 80 from ‘c‘
to <web server> source 10.0.0.2,
port 1026.
10.0.0.2, port 1026
mapped to
204.1.1.10, port 2001
Connection request from ‘a’ forwarded to <web
server> source 204.1.1.10, port 2001.
Internet
10.0.0.1
10.0.0.4
10.0.0.3
10.0.0.2
Web servera
b
c
NAT
Response sent to 204.1.1.10,
port 2000.
Translate 204.1.1.10, port
2000 to 10.0.0.4 port 1025
NAT
Index
Inside IP Inside
Port
Out IP
… … … …
2000 10.0.0.4 1025 204.1.1.10
2001 10.0.0.2 1026 204.1.1.10
Response sent to 204.1.1.10,
port 2001.
Translate 204.1.1.10, port
2001 to 10.0.0.2 port 1026
NAT
(Network
Address
Translation)
Objection against NAT.
 NAT violates the rules that every IP address uniquely identifies the
machine.
 Mapping in NAT is set up by outgoing packet, incoming packet
cannot be accepted until after outgoing.
 NAT is dependent on header format ofTCP, if header format will
change it will not able to work.
 If source uses any other protocol other thanTCP/UDP, then also NAT
will fail.
 NAT keeps the information about every connection passing through
it.This is property of connection oriented, but NAT also keeps the
state information of connection less.
Internet
Control
Protocols
ICMP (Internet Control Message Protocol)
 Operation of network is monitor by router.When some undesired event
occur during packet processing, it is reported to sender by ICMP.
Internet
Control
Protocols
ARP (Address Resolution Protocol)
 Sender need have information about Ethernet address to send a packet.
 ARP is used to find out Ethernet address of given IP address.
Internet
Control
Protocols
DHCP (Dynamic Host Configuration Protocol)
 DHCP is used to assign IP address dynamically to the host.
 Whenever computer is started, it has Ethernet address, but no IP address.
 To get IP address, computer broadcast request to get IP address, this
request is done using DHPC DISCOVER packet.
 This packet must reach to DHCP server.
 When DHCP server will get a request, it will allocate IP address from pool
of IP address.
 The packet that DHCP give as reply with IP address is called DHCP OFFER
packet.
OSPF
(OpenShortest
Path First)
 Internet is made up of different Autonomous systems. Each of the ASes
is operated by different organization, can use different interior gateway
protocol.
 Original interior gateway protocol was Distance vector protocol but it
was not working well for larger AS.
 So distance vector was replaced by link state routing protocol, then IETF
work on successor, which was OSPF( open shortest path first).
 There are some of the requirement that need to be satisfy by OSPF.
• protocol need to support routing according to type of service required,
need to support various distance metrics, need to be dynamic, support
load balancing, distribute load among multiple lines etc.
OSPF
(OpenShortest
Path First)
 OSPF works on graph representationAS.Then it computes shortest path
based on arcs weights.
 Connection between two routers are shown using two arcs, one in each
direction. Connection between network and router are shown using single
arc from router to network.
OSPF
(OpenShortest
Path First)
 When router boots, it send HELLO packets to its neighbor and on the LAN.
 OSPF works by exchanging information between adjacent router.
Adjacent here is not neighbor.
 One router is selected as designated router(DR) and this is said to be
adjacent to all other router in LAN.A backup designated router is also
selected to use in case of DR router crash.
 During normal operation, each router periodically sends LINK STATE
UPDATE packet to adjacent router.These packets are also acknowledge
by LINK STATE ACK packet.
 There are two more type of packets.
DATABASE DESCRIPTION
LINK STATE REQUEST
OSPF
(OpenShortest
Path First)
 If AS is large, it can be divided in number of arears, each area is non
overlapping.
 Every AS has area 0 (area zero), backbone area. Every other area is
connected with backbone area.
 Each router in area have same link state database and calculates shortest
path to all the other router in the area.
 Router that is connected with two or more area will have database of both
the area.
 During normal operation, three types of routes are required.
1. intra-area 2. inter-area 3. inter AS
 In case of inter-area routing, packet will first go from source area to
backbone, backbone area to destination area, from there to destination.
OSPF
(OpenShortest
Path First)
BGP
(Border
Gateway
Protocol)
 Within single autonomous system (AS), interior gateway protocols are used
like OSPF.
 Between ASes, exterior gateway protocol like BGP is used.
 Exterior gateway protocol is used to convey routing information between
ASes.
 Intra-domain (AS) routing protocol need to look at how packet can be
transfer efficiently between source and destination.
 Inter-domain (AS) routing protocol need to look at the efficient path
between AS and politics.
 Examples of routing constraints:
1.No commercial traffic on educational network
2.Never put Iraq on route starting at Pentagon
3.Choose cheaper network
4.Choose better performing network
5.Don’t go from Apple to Google to Apple
BGP
(a) A set of BGP routers. (b) Information sent to F.
BGP
 Pair of BGP router communicate with each other by establishing
TCP connection.
 Instead of maintaining cost to each destination, each BGP router
keeps track of exact path used.
 After all the paths come in from the neighbor to F, it examines all
the path, choses the best.
 BGP solves count to infinity problem. If router G crashes, F
receives paths from all the neighbor are BCD, IFGCD, EFGCD.
 Here F can see that remaining two path pass through G, so it will
choose BCD.
BGP
 From point of BGP router, networks are divided into three categories.
stub network: which have only one connection to BGP graph.
multi-connected network: which have multiple connection which BGP
graph.This network may be used as transit network if it allows.
Transit network: such a backbone network.These type of network are
willing to handle third party packets.
BGP
AS 1 and AS 5 are stub
networks
AS 2 is a multi-connected
network
AS 3 and AS 4 are transit
networks

More Related Content

What's hot

5. protocol layering
5. protocol layering5. protocol layering
5. protocol layering
JAIGANESH SEKAR
 
Network Layer,Computer Networks
Network Layer,Computer NetworksNetwork Layer,Computer Networks
Network Layer,Computer Networks
guesta81d4b
 
Congetion Control.pptx
Congetion Control.pptxCongetion Control.pptx
Congetion Control.pptx
Naveen Dubey
 
QOS (Quality of Services) - Computer Networks
 QOS (Quality of Services) - Computer Networks QOS (Quality of Services) - Computer Networks
QOS (Quality of Services) - Computer Networks
IIIT Manipur
 
Computer Network - Network Layer
Computer Network - Network LayerComputer Network - Network Layer
Computer Network - Network Layer
Manoj Kumar
 
Tcp IP Model
Tcp IP ModelTcp IP Model
Tcp IP Model
Ankur Kumar
 
Transport services
Transport servicesTransport services
Transport services
Navin Kumar
 
Unit 3 Network Layer PPT
Unit 3 Network Layer PPTUnit 3 Network Layer PPT
Unit 3 Network Layer PPT
KalpanaC14
 
OsI reference model
OsI reference modelOsI reference model
OsI reference model
LakshmiSamivel
 
Osi reference model
Osi reference modelOsi reference model
Osi reference model
vasanthimuniasamy
 
TCP & UDP ( Transmission Control Protocol and User Datagram Protocol)
TCP & UDP ( Transmission Control Protocol and User Datagram Protocol)TCP & UDP ( Transmission Control Protocol and User Datagram Protocol)
TCP & UDP ( Transmission Control Protocol and User Datagram Protocol)
Kruti Niranjan
 
Distance vector routing
Distance vector routingDistance vector routing
Distance vector routing
Siddique Ibrahim
 
Distance Vector Routing Protocols
Distance Vector Routing ProtocolsDistance Vector Routing Protocols
Distance Vector Routing Protocols
KABILESH RAMAR
 
TCP/IP Model
TCP/IP ModelTCP/IP Model
TCP/IP Modelfarhan516
 
Routing algorithm
Routing algorithmRouting algorithm
Routing algorithm
Bushra M
 

What's hot (20)

5. protocol layering
5. protocol layering5. protocol layering
5. protocol layering
 
Network Layer,Computer Networks
Network Layer,Computer NetworksNetwork Layer,Computer Networks
Network Layer,Computer Networks
 
Congetion Control.pptx
Congetion Control.pptxCongetion Control.pptx
Congetion Control.pptx
 
Multiple access protocol
Multiple access protocolMultiple access protocol
Multiple access protocol
 
Quality of Service
Quality of ServiceQuality of Service
Quality of Service
 
The medium access sublayer
 The medium  access sublayer The medium  access sublayer
The medium access sublayer
 
QOS (Quality of Services) - Computer Networks
 QOS (Quality of Services) - Computer Networks QOS (Quality of Services) - Computer Networks
QOS (Quality of Services) - Computer Networks
 
Computer Network - Network Layer
Computer Network - Network LayerComputer Network - Network Layer
Computer Network - Network Layer
 
Tcp IP Model
Tcp IP ModelTcp IP Model
Tcp IP Model
 
Transport services
Transport servicesTransport services
Transport services
 
Unit 3 Network Layer PPT
Unit 3 Network Layer PPTUnit 3 Network Layer PPT
Unit 3 Network Layer PPT
 
Gsm radio-interface
Gsm radio-interfaceGsm radio-interface
Gsm radio-interface
 
OsI reference model
OsI reference modelOsI reference model
OsI reference model
 
Osi reference model
Osi reference modelOsi reference model
Osi reference model
 
TCP & UDP ( Transmission Control Protocol and User Datagram Protocol)
TCP & UDP ( Transmission Control Protocol and User Datagram Protocol)TCP & UDP ( Transmission Control Protocol and User Datagram Protocol)
TCP & UDP ( Transmission Control Protocol and User Datagram Protocol)
 
Distance vector routing
Distance vector routingDistance vector routing
Distance vector routing
 
Distance Vector Routing Protocols
Distance Vector Routing ProtocolsDistance Vector Routing Protocols
Distance Vector Routing Protocols
 
TCP/IP Model
TCP/IP ModelTCP/IP Model
TCP/IP Model
 
Network Layer
Network LayerNetwork Layer
Network Layer
 
Routing algorithm
Routing algorithmRouting algorithm
Routing algorithm
 

Similar to Network Layer

Network layer new
Network layer newNetwork layer new
Network layer new
reshmadayma
 
Network layer (Unit 3) part1.pdf
Network  layer (Unit 3) part1.pdfNetwork  layer (Unit 3) part1.pdf
Network layer (Unit 3) part1.pdf
BharatiPatelPhDStude
 
Routing algorithm
Routing algorithmRouting algorithm
Routing algorithm
Siva Priya
 
Network layer u3
Network  layer u3Network  layer u3
Network layer u3
IndrajaMeghavathula
 
Understanding Network Routing Problem and Study of Routing Algorithms and Heu...
Understanding Network Routing Problem and Study of Routing Algorithms and Heu...Understanding Network Routing Problem and Study of Routing Algorithms and Heu...
Understanding Network Routing Problem and Study of Routing Algorithms and Heu...
IRJET Journal
 
Unit-3-Part-1 [Autosaved].ppt
Unit-3-Part-1 [Autosaved].pptUnit-3-Part-1 [Autosaved].ppt
Unit-3-Part-1 [Autosaved].ppt
Ramya Nellutla
 
An Insight on Routing
An Insight on RoutingAn Insight on Routing
An Insight on Routing
E-Lins Technology Co. Ltd.
 
ANALYSIS OF ROUTING PROTOCOLS IN WIRELESS MESH NETWORK
ANALYSIS OF ROUTING PROTOCOLS IN WIRELESS MESH NETWORKANALYSIS OF ROUTING PROTOCOLS IN WIRELESS MESH NETWORK
ANALYSIS OF ROUTING PROTOCOLS IN WIRELESS MESH NETWORK
IJCSIT Journal
 
Opportunistic Data Forwarding in Manet
Opportunistic Data Forwarding in ManetOpportunistic Data Forwarding in Manet
Opportunistic Data Forwarding in Manet
IJTET Journal
 
Ijtra130510
Ijtra130510Ijtra130510
Solving QoS multicast routing problem using ACO algorithm
Solving QoS multicast routing problem using ACO algorithmSolving QoS multicast routing problem using ACO algorithm
Solving QoS multicast routing problem using ACO algorithm
Abdullaziz Tagawy
 
P01754110117
P01754110117P01754110117
P01754110117
IOSR Journals
 
COMPUTER NETWORKS CHAPTER 3 NETWORK LAYER NOTES CSE 3RD year sem 1
COMPUTER NETWORKS CHAPTER 3 NETWORK LAYER NOTES CSE 3RD year sem 1COMPUTER NETWORKS CHAPTER 3 NETWORK LAYER NOTES CSE 3RD year sem 1
COMPUTER NETWORKS CHAPTER 3 NETWORK LAYER NOTES CSE 3RD year sem 1
aishwaryaarrao3
 
Module 3 Part B - computer networks module 2 ppt
Module 3 Part B - computer networks module 2 pptModule 3 Part B - computer networks module 2 ppt
Module 3 Part B - computer networks module 2 ppt
anushaj46
 
Simulation of Route Optimization with load balancing Using AntNet System
Simulation of Route Optimization with load balancing Using AntNet SystemSimulation of Route Optimization with load balancing Using AntNet System
Simulation of Route Optimization with load balancing Using AntNet System
IOSR Journals
 
An Enhanced DSR Protocol for Improving QoS in MANET
An Enhanced DSR Protocol for Improving QoS in MANETAn Enhanced DSR Protocol for Improving QoS in MANET
An Enhanced DSR Protocol for Improving QoS in MANET
KhushbooGupta145
 
Optimized Fuzzy Routing for MANET
Optimized Fuzzy Routing for MANETOptimized Fuzzy Routing for MANET
Optimized Fuzzy Routing for MANET
iosrjce
 
D017252327
D017252327D017252327
D017252327
IOSR Journals
 

Similar to Network Layer (20)

Network layer new
Network layer newNetwork layer new
Network layer new
 
Network Layer
Network LayerNetwork Layer
Network Layer
 
Network layer (Unit 3) part1.pdf
Network  layer (Unit 3) part1.pdfNetwork  layer (Unit 3) part1.pdf
Network layer (Unit 3) part1.pdf
 
Routing algorithm
Routing algorithmRouting algorithm
Routing algorithm
 
Network layer u3
Network  layer u3Network  layer u3
Network layer u3
 
Understanding Network Routing Problem and Study of Routing Algorithms and Heu...
Understanding Network Routing Problem and Study of Routing Algorithms and Heu...Understanding Network Routing Problem and Study of Routing Algorithms and Heu...
Understanding Network Routing Problem and Study of Routing Algorithms and Heu...
 
Unit-3-Part-1 [Autosaved].ppt
Unit-3-Part-1 [Autosaved].pptUnit-3-Part-1 [Autosaved].ppt
Unit-3-Part-1 [Autosaved].ppt
 
An Insight on Routing
An Insight on RoutingAn Insight on Routing
An Insight on Routing
 
ANALYSIS OF ROUTING PROTOCOLS IN WIRELESS MESH NETWORK
ANALYSIS OF ROUTING PROTOCOLS IN WIRELESS MESH NETWORKANALYSIS OF ROUTING PROTOCOLS IN WIRELESS MESH NETWORK
ANALYSIS OF ROUTING PROTOCOLS IN WIRELESS MESH NETWORK
 
Opportunistic Data Forwarding in Manet
Opportunistic Data Forwarding in ManetOpportunistic Data Forwarding in Manet
Opportunistic Data Forwarding in Manet
 
ROUTING
ROUTINGROUTING
ROUTING
 
Ijtra130510
Ijtra130510Ijtra130510
Ijtra130510
 
Solving QoS multicast routing problem using ACO algorithm
Solving QoS multicast routing problem using ACO algorithmSolving QoS multicast routing problem using ACO algorithm
Solving QoS multicast routing problem using ACO algorithm
 
P01754110117
P01754110117P01754110117
P01754110117
 
COMPUTER NETWORKS CHAPTER 3 NETWORK LAYER NOTES CSE 3RD year sem 1
COMPUTER NETWORKS CHAPTER 3 NETWORK LAYER NOTES CSE 3RD year sem 1COMPUTER NETWORKS CHAPTER 3 NETWORK LAYER NOTES CSE 3RD year sem 1
COMPUTER NETWORKS CHAPTER 3 NETWORK LAYER NOTES CSE 3RD year sem 1
 
Module 3 Part B - computer networks module 2 ppt
Module 3 Part B - computer networks module 2 pptModule 3 Part B - computer networks module 2 ppt
Module 3 Part B - computer networks module 2 ppt
 
Simulation of Route Optimization with load balancing Using AntNet System
Simulation of Route Optimization with load balancing Using AntNet SystemSimulation of Route Optimization with load balancing Using AntNet System
Simulation of Route Optimization with load balancing Using AntNet System
 
An Enhanced DSR Protocol for Improving QoS in MANET
An Enhanced DSR Protocol for Improving QoS in MANETAn Enhanced DSR Protocol for Improving QoS in MANET
An Enhanced DSR Protocol for Improving QoS in MANET
 
Optimized Fuzzy Routing for MANET
Optimized Fuzzy Routing for MANETOptimized Fuzzy Routing for MANET
Optimized Fuzzy Routing for MANET
 
D017252327
D017252327D017252327
D017252327
 

Recently uploaded

CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
R&R Consult
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
Kamal Acharya
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
ViniHema
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
Divya Somashekar
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
SamSarthak3
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
JoytuBarua2
 
space technology lecture notes on satellite
space technology lecture notes on satellitespace technology lecture notes on satellite
space technology lecture notes on satellite
ongomchris
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
Osamah Alsalih
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
VENKATESHvenky89705
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
thanhdowork
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
gerogepatton
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
karthi keyan
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
ydteq
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
AJAYKUMARPUND1
 
Runway Orientation Based on the Wind Rose Diagram.pptx
Runway Orientation Based on the Wind Rose Diagram.pptxRunway Orientation Based on the Wind Rose Diagram.pptx
Runway Orientation Based on the Wind Rose Diagram.pptx
SupreethSP4
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
obonagu
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
Vijay Dialani, PhD
 
English lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdfEnglish lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdf
BrazilAccount1
 

Recently uploaded (20)

CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
 
space technology lecture notes on satellite
space technology lecture notes on satellitespace technology lecture notes on satellite
space technology lecture notes on satellite
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
 
Runway Orientation Based on the Wind Rose Diagram.pptx
Runway Orientation Based on the Wind Rose Diagram.pptxRunway Orientation Based on the Wind Rose Diagram.pptx
Runway Orientation Based on the Wind Rose Diagram.pptx
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
 
English lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdfEnglish lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdf
 

Network Layer

  • 2. Computer Network  A computer network is a group of computer systems and other computing hardware devices that are linked together through communication channels to facilitate communication and resource-sharing among a wide range of users.  There are many types of networks: LocalArea Networks (LAN) PersonalArea Networks (PAN) Home Area Networks (HAN) Wide Area Networks (WAN) MetropolitanArea Networks (MAN)
  • 3. Protocol  In computer networks, for communication to occur between sender and receiver, both the entity must agree on a protocol.  Protocol in computer network is set of rules that governs data communication.  There are two protocol stack. OSI( Open System Interconnection) TCP/IP
  • 5. OpenSystem Interconnection Application Layer: application layer enables user to access network. It provides user interface like mail, remote file access, transfer etc for various purpose. Presentation Layer: presentation layer is concerned with syntax and semantics of the information exchanged between two system.This layer performs translation, encryption, compression. Session layer: session layer is responsible for dialog control and synchronization. Transport layer:Transport layer is responsible process to process delivery of entire message. Network layer: Network layer is responsible for source to destination delivery of a packet. Data Link Layer: Data link layer handles moving the moving of data in and out of across physical layer. Physical Layer: Physical layer coordinates the function required to carry a bit stream over physical medium.
  • 6. Network layer  Network layer is responsible for getting the packets from source to destination.  To deliver the packet, network layer must know about the topology of network and choose appropriate path among it.  Every layer in protocol stack provides service to layer above it, in this regard, network layer uses service provided by data link layer and gives service to transport layer.
  • 7. Store & Forward Packet Switching The environment of the network layer protocols.
  • 8. Services to Transport Layer  Network layer provides two types of services to transport layer. o Connection oriented service o Connectionless service  Service provided by network layer need to meet following goal. o Service should be independent of router technology. o Transport layer should be shielded from number, type and topology of routers present. o Network address available at transport layer should use uniform numbering plan.
  • 9. Implementation of Connectionless service  Connectionless communication is just packet switching where no connection(path) establishment and release occur.  A message is broken into packets, and each packet is transferred separately.The packets can travel different route to the destination since there is no connection.  Here packets is called datagrams and network is called datagram network.
  • 11. Implementation of Connectionless service  The algorithm that manages routing table and makes routing decision is called routing algorithm.  IP (Internet Protocol) is dominant example of a connectionless service.  Each packet carries destination IP address that router uses to forward the packet individually.
  • 12. Implementation of Connection- oriented service  In connection oriented service, a connection (path) from source to destination must be established before any data packet can be sent.  A virtual circuit, sometimes called a logical circuit, is a path between two or more points that seems like a fixed physical path, but actually is one path out of many possible physical paths that can be arranged.  This connection is called virtual circuit and network is called virtual circuit network.
  • 14. Implementation of Connection- oriented service  In figure, router A assigns different connection identifier to each outgoing packet of second connection.This process is called label switching.  Example of connection oriented service is MPLS(Multiprotocol label switching).
  • 16. Routing Algorithms  Main function of network layer is to route the packet from source machine to destination machine.  Routing algorithm is part of network layer software responsible for deciding which output line should be use to deliver the packet to destination.  If network uses virtual circuit, decision of routing are made when circuit is being set up.  If network uses datagram, then routing decision need to make for each arriving packet.  Certain properties are desirable in routing algorithm like, correctness, simplicity, robustness, fairness, stability, efficiency.
  • 17. Routing Algorithms  Correctness: The routing should be done properly and correctly so that the packets may reach their proper destination.  Simplicity: The routing should be done in a simple manner so that the overhead is as low as possible.With increasing complexity of the routing algorithms the overhead also increases.  Robustness: Once a major network becomes operative, it may be expected to run continuously for years without any failures.The algorithms designed for routing should be robust enough to handle hardware and software failures and should be able to cope with changes in the topology and traffic without requiring all jobs in all hosts to be aborted and the network rebooted every time some router goes down.  Stability: The routing algorithms should be stable under all possible circumstances.  Fairness: Every node connected to the network should get a fair chance of transmitting their packets.This is generally done on a first come first serve basis.  Efficiency: The routing algorithms should be optimal in terms of throughput and minimizing mean packet delays. Here there is a trade-off and one has to choose depending on his suitability.
  • 18. Routing Algorithms  Routing algorithms are grouped into two classes:  Adaptive algorithm.  Non adaptive algorithm.  Non adaptive algorithm do not change their routing decision on base of current topology and traffic. Routes are computed in advance and loaded into router.These procedure is also called static routing.  Adaptive algorithm changes their routing decision to reflect current topology and traffic.These algorithm are also called dynamic routing algorithm.
  • 19. Optimality Principle  Optimality Principle says if a router J is on optimal path from router I to K, then optimal path from router J to K also falls among same route.  Set of optimal routes from all source to given destination forms a tree routed at the destination. Such a tree is called sink tree. (a) A network. (b) A sink tree for router B.
  • 20. Shortest Path Algorithm  Shortest path algorithm works on graph of network, each node in graph represents router and each edge represents a communication link.  To choose route between given source and destination, this algorithm finds shortest path between them.  Number of hopes, geographical distance, delay are some of the criteria on base of which, algorithm finds shortest path.  One of algorithm to find shortest path is given Dijkstra.
  • 21. Shortest Path Algorithm  In Dijkstra shortest path algorithm, each node is labelled with distance from source and previous node.  Initially, when path are not known, all the node(router ) are labelled with infinity.As the algorithm progress, labels may change reflecting a better path.  A label may be tentative or permanent.  Initially all the labels are tentative, when it is found that the tentative label represents shortest possible path from source, it is made permanent.
  • 23. Shortest Path Algorithm Dijkstra’s algorithm to compute the shortest path through a graph.
  • 24. Shortest Path Algorithm Dijkstra’s algorithm to compute the shortest path through a graph. . . . . . .
  • 25. Shortest Path Algorithm Dijkstra’s algorithm to compute the shortest path through a graph. . . .
  • 27. Flooding  Flooding is also a routing technique in which every incoming packet is sent to every out going line except the line from which it arrived.  Flooding generates vast number of packet and some measures are required to control this process.  One solution is hop count, every packet contains hop count, this hop count decreases at each hop packet reach.  When the hop count of packet becomes zero, packets is discarded. In this way number of packets are controlled while flooding.  Hop count should be initialize to the length of path from source to destination.  If sender does not know about path length, it can be initialized with diameter of network.
  • 29. Flooding  Another solution to control the packet is to keep a record of which packets have been flooded.  For this, sender inserts contains sequence number in packet and every router keeps list of packets per source those have been flooded.  if incoming packet’s sequence number is in list, it will not be flooded.  Flooding is not practical for use, but it have some advantage. oIt ensures that packet is delivered to every node, so it can be used for broadcasting. oIn military network, it makes sure that packet gets delivered if the path exists. oFlooding always chooses shortest path and gives minimum delay(if overhead due to flooding is ignored).
  • 30. Distance Vector Routing  Distance vector routing is dynamic routing algorithm.  Distance vector routing is also called distributed bellman-ford routing algorithm.  In Distance vector routing algorithm, each router maintains a table (vector) that stores best known distance for each router in network and link to use to reach there.  Router is assumed to know the distance to each of its neighbor.  Distance may be measured in term of number of hop, delay or other metric.  These tables are updated by exchanging information with neighbor routers
  • 31. Distance Vector Routing  Assume that delay is used as metric and router knows delay to each of its neighbor.  Router measures delay to neighbor by sending ECHO packet, receiver just timestamp the packet and sends back the packet as fast as possible.  Once everyT msec, each router sends each neighbor the list of estimated delay to each destination.  It also receive same list from each its neighbor.  Assume router A has receive list from B,C. router A knows delay to its neighbor B and C, delay is AB andAC. BD is delay from B to D. delay from A to D would be calculated like AD = AB+BD • Similarly distance to D is calculated using every neighbor and minimum distance is chosen.
  • 32. Distance Vector Routing (a) A network. (b) Input from A, I, H, K, and the new routing table for J.
  • 33. Count to Infinity problem  The settling of routes to best path across the network is called convergence.  DVR has drawback, although it converges to correct answer but it may do slowly.  React rapidly to positive news, leisurely to bad one.  Suppose router A has long route to destination X. but in next exchange if router B report short path, router A will switch to B to go to X.
  • 34. Count to Infinity problem The count-to-infinity problem Core Problem is when X tellsY that it has path somewhere,Y has no way to know weather it itself is on the path.
  • 35. LinkState Routing  Link state routing is also a dynamic algorithm. It has following five steps procedure. 1) Discover neighbor and learn network addresses. 2) Set the distance or cost metric to each of its neighbor. 3) Construct the packet which contains distance to its neighbor. 4) Send this packet to and receive packets from all other routers. 5) Compute the shortest path to every other router.
  • 36. LinkState Routing Learning about the Neighbor  When a router a booted, first of all it learns who its neighbor are, this goal is accomplished by sending HELLO packet on point-to – point line.  Receiver router is expected to send a reply giving its name.
  • 37. LinkState Routing Setting Link Cost • Link state routing requires each line to have a cost for finding shortest path. • Cost to neighbor can be calculated automatically, a common choice is to make cost inverse of bandwidth. • Other way to determine delay is to send a ECHO packet. Receiver router will send it back immediately. • By measuring RoundTripTime(RTT), dividing it by two, sending router can get a estimated delay.
  • 38. LinkState Routing Building State Packet  Once the information needed is collected, next step is to build the packet containing all the data.  Packet start by identity of sender, sequence number, age and list of neighbor along with distance to that neighbor.  Packets are build periodically or when some significant event occurs. (a) A network. (b) The link state packets for this network.
  • 39. LinkState Routing Distributing Link State Packets  All of the routers in network must get link state packet.  Flooding is used to distribute link state packets.  To keep check, each packet contains sequence number, sequence number is incremented for every new packet sent from source router.  Routers keep information, source router, max sequence number seen.  When a new packet arrives at any routers, it checks its sequence number against highest sequence number seen, if packet is having is lower seq. number means its already flooded so it is discarded otherwise it is flooded.  Age of each packet decrements once per second.When age reach to zero, packet will be discarded.  Due to age, packet will not be for infinite period of time.
  • 40. LinkState Routing  There are few problem with algorithm. First is if sequence number wrap around, confusion will occur. Solution is to use 32 bit sequence number.  Second is if router ever crashes, it will lose track of sequence number sent. So it will start from 0 and packet will be rejected as duplicate.  Third is if sequence number ever corrupted. For example in case of 1 bit error packet number 4 will be received as 65540. so all the packet from 5 to 65540 will be rejected.
  • 42. LinkState Routing Computing the New Routes  Once router has a full set of packet, it will construct entire network graph.  Dijkstra algorithm can be used to construct shortest path to all possible destination. this information is installed to routing table.  Compare to distant vector routing, link state requires more memory and computation.
  • 43. Hierarchical Routing  As network grows, routing table grows in size. So not only router memory, more CPU time to process the entry also requires.  At certain point , network may grow to point, where it is not longer feasible to have entry for every other router.  Solution is to have hierarchical routing.  In hierarchical routing, routers are divided into regions. Each routers knows all about destination within its own regions and nothing about internal structure of other region.
  • 46. Hierarchical routing.  if there are 720 routers and they are divided into 24 regions, each contains 30 routers then how many entry will be there in each router?  If three level hierarchy is chosen, 8 clusters each contains 9 regions and each regions contains 10 routers, then number of entry will be = 10 entry of each router in same region + 8 entry to route to other region in same cluster + 7 entry for other clusters. = 25 entries.  optimal number of levels for N router network is ln N.
  • 47. Broadcast Routing  In some application, hosts need to send messages to many or all other host.  Sending a packet to all destination simultaneously is called broadcasting.  One method is that source send a distinct packet to each destination. It wastes bandwidth and slow.  Another is multi-destination routing.in this, each packet contains entire list of destination.  When packet comes at router, it finds line for all destination.Then router generates new copy of packet for each output line, that packet contains only those list of destination that are to use that line.  Eventually after some hopes, each packet will carry only one destination like normal packet.  Requires less bandwidth but much work from router.  One more method is flooding.
  • 48. Broadcast Routing Reverse Path Forwarding  Router checks whether broadcast packet arrived on interface that is used to send packets to source of broadcast.  If so, it’s likely that it followed best route and thus not a duplicate; router forwards packet on all lines.  If not, packet discarded as likely duplicate. 
  • 50. Broadcast Routing SpanningTree Routing  Use spanning tree (sink tree) rooted at broadcast initiator.  No need for destination list.  Each router forwards packets on all lines on the spanning tree (except the one the packet arrived on).  Efficient but needs to generate the spanning tree and routers must have that information.
  • 52. Multicast Routing  Sending a message to group is called multicast. Routing algorithm used is called multicast routing.  If group is dense, then broadcast using spanning tree is good option. But broadcast will deliver the packets to some of member that are not part of group.Which is waste of bandwidth.  Another option is to prune “broadcast spanning tree” by removing links that do not leads to group member.This is called “multicast spanning tree”.  Multicast spanning tree is used to deliver a packet to a group.
  • 53. Multicast Routing (a) A network. (b) A spanning tree for the leftmost router. (c) A multicast spanning tree for group 1. (d) A multicast spanning tree for group 2.
  • 54. Multicast Routing  Different ways of pruning spanning tree are possible.  One is if link state routing is used, each router knows about complete topology of network including which host belong to which group.  Each router construct sink tree for each host in network, prunes that tree for each of the group.  with distance vector routing, reverse path forwarding approach is followed.Whenever router that is not part of group receives multicast message for that group. It replies with PRUNE message.  In this way spanning tree is recursively pruned.  Disadvantage of multicast spanning tree is that routers requires lots of work and memory.  For n groups and m nodes, at each router, for each group m pruned trees must be stored.Total m*n tress need to be stored.
  • 55. Multicast Routing  Another approach is core based tree, that computes single spanning tree for group.  Here all the routers agrees on point called root(called core).  Tree is build by sending a packet from each member to root. tree is union of path traced by these packets.  To send packet to group, sender sends packets to core, then core forwards packet to all the member.
  • 56. Multicast Routing (a)Core-based multicast tree for group 1. (b)Sending to group 1.
  • 57. Multicast Routing  For performance optimization, packet is not necessary to reach to core before multicast.  Disadvantage of shared tree is that it is not optimal for all sources.  Advantage is that it saves memory and computation. Each router keeps only one tree per group.
  • 58. Routing for Mobile host  Mobile host are those that are not stationary, they moves from one location to another hence their network also keeps changing.  One approach is, in which when mobile host moves to new location, acquires new address, there will not be any association between old address and new address. In this model, old connection will not work on new address.  For example, host can do surfing, but mail or any connection orient service will lost the connection.And connection need to be establish again.  In this case, network layer mobility is required to solve problem.
  • 59. Routing for Mobile host  Basic idea used in internet and cellular network is that mobile host tells host at a home location where it is now.The host which act on behalf of mobile host is called home agent.  Home agent accepts packets on behalf of mobile host and forwards to it.
  • 60. Routing in ad hoc Networks  An Ad hoc network is a decentralized type of network.  The network is ad hoc because it does not rely on a pre existing infrastructure, such as routers in wired networks or access points in managed (infrastructure) wireless networks. Instead, each node participates in routing by forwarding data for other nodes, so the determination of which nodes forward data is made dynamically on the basis of network connectivity.  AODV (Ad hoc on-demand distance vector) routing algorithm is one of the most popular algorithm for ad hoc network.
  • 61. Ad hoc Networks  Infrastructure-based Networks  traditional cellular systems (base station infrastructure)  Space divided into cells  A base station is responsible to communicate with hosts in its cell  Mobile hosts can change cells while communicating
  • 62. Ad hoc Networks Mobile Ad Hoc Networks (MANET)  Host movement frequent  Topology change frequent  No pre existing infrastructure. A B A B
  • 64. Routing in ad hoc Networks  AODV  Route discovery  InAODV, routes to destination is computed on demand.When someone wants to send packets to that destination.  at any time, topology of network is defined by graph of connected nodes. Range of A’s Broadcast
  • 65. Routing in ad hoc Networks (a) Range of A's broadcast. (b) After B and D have received A's broadcast. (c) After C, F, and G have received A's broadcast. (d) After E, H, and I have received A's broadcast. Shaded nodes are new recipients. Arrows show possible reverse routes.
  • 66. Routing in ad hoc Networks Route Maintenance  In ad hoc network, nodes can be moved out of range any time.  To deal with the problem, algorithm periodically send “hello” packet to each neighbor.  If neighbor does not reply, means that neighbor is no longer connected, so all the routes that goes through that are removed from routing table.  Other neighbors are also informed about the same, they also remove route.  To save battery life and bandwidth, router will keep information only about the routes which are in use. Other routes learned during broadcast are timed out after some time.
  • 67. Congestion  When too many packets are presents in network, network will not able to deliver all the packet or packets are delayed.This situation is called congestion.  Goodput is rate at which useful packets are delivered by network.
  • 68. General principles of congestion control  Solutions of congestion control are divided into two groups.  open loop  closed loop  open loop approach are based on good design, they design policies such that congestion does not occur,  Closed loop solution are reactive.They monitor the network to find whether congestion has occurred or not. If it has take place then it steps to correct the situation. 1. monitor the system to detect when and where congestion occur. 2. pass the information to places where action can be taken. 3. adjust system operation to correct the problem.
  • 69. General principles of congestion control  To monitor network, various metrics are used like percentage of packet discarded, average queue length, number of packets time out, average delay of packet etc.  If congestion is detected, information about it sent from point where congestion occurs to the source of the traffic.  As the source receives the congestion notification, it will take action to reduce the congestion.One option is source cuts down the sending rate.  Closed loop algorithms are further divided into two group. Explicit feedback algorithm Implicit feedback algorithm
  • 70. Congestion Prevention Policies  Policies that affects congestion are listed below. Data Link Layer Policies Retransmission Policy Out of order caching policy Acknowledgment policy Flow control policy Network Layer Policies Virtual circuit versus datagram Packet queueing and service policy Packet discard policy Routing algorithm Packet lifetime management Transport Layer Policies Retransmission Policy Out of order caching policy Acknowledgment policy Flow control Policy Timeout Determination
  • 71. TrafficShaping  One of main reason of congestion is that the burst of traffic comes suddenly. If hosts are made to transmit at uniform rate, congestion could be avoided.  One of the open loop approach is to forcing the host to send the traffic at predictable and uniform rate.This approach is a called traffic shaping.  For traffic shaping in virtual circuit, agreement between sender and carrier is made regarding traffic rate send by sender.  If sender follows agreement, carrier will deliver all the packet on time.  To keep check on sender, carrier monitor traffic flow, this monitoring is called traffic policing.  For datagram subnet, other approach need to follow.
  • 72. Leaky Bucket Algorithm (a) A leaky bucket with water. (b) a leaky bucket with packets.
  • 75. Leaky Bucket Algorithm (a) Input to a leaky bucket. (b) Output from a leaky bucket.
  • 78. Token Bucket Algorithm  Time till the data can be sent in burst(means in one bunch) with maximum speed is called burst time.  If token bucket if full, then burst time S can be calculated S= C/(M-p) C= bucket capacity in bytes M= maximum speed of sender p=restricted speed • data that send during burst time is = capacity of bucket+ token arrived during burst time M*S = C bytes+ (p*S) bytes
  • 79. Token Bucket Algorithm Output from a token bucket with capacities of
  • 80. Congestion Control in Virtual Circuit Subnet  One of technique to control congestion in virtual subnet is admission control.  In this approach, once congestion is detected, no more virtual circuits are allowed to set up until congestion gets over.  Another approach allows virtual circuit to establish, but it carefully avoids congested path.
  • 81. Congestion Control in Virtual Circuit Subnet  Another strategy in virtual circuit subnet is, whenVC is established, sender gives details volume and shape of traffic and other parameter and subnet reserves resources so congestion will unlikely to occur.
  • 82. Choke Packets (for both,VC & datagram subnet) A choke packet that affects only the source of traffic.
  • 83. Hop by Hop Choke Packets A choke packet that affects each hop it passes through.
  • 84. LoadShedding  When none of the approach work, finally router stats discarding packet.This Is called load shedding.  Instead of randomly discarding packets, if packets are discarded on base of application, less retransmission will occur.  For example in case of file transfer, old packet worth more so newer should be discarded.While in case of multimedia transfer, new packets worth more.  To implement intelligent dropping policy requires support from sender. Sender will mark packet with priority.  Packets with lower priority will be discarded first.
  • 85. Internetworking  Internet is interconnected network. Using internet host in one network can communicate host in another network.  A computer network is a group of computer systems and other computing hardware devices that are linked together through communication channels to facilitate communication and resource- sharing among a wide range of users.  There are various types of network like LAN, MAN,WAN, ad hoc network, ATM etc.  Different types of network varies from each other mainly due to protocol suite and technology used by network and various other parameters.
  • 86. Internetworking Some of the many ways networks can differ
  • 87. Internetworking A collection of interconnected networks.
  • 88. Internetworking  Problem: Networks with different protocol stacks → how to let them talk to each other?  Non solution:Why not enforce all networks to run same protocol stack?  Solution:Construct some gateways that connect different kinds of networks.  Repeaters or hubs at physical layer: operate on bits, do not understand protocols, just regenerate signals. Bridges or switches at data link layer: operate on frames, examine MAC addresses, do minor protocol translation, e.g. Ethernet to 802.11. Multiprotocol router at network layer: operate on packets, translate between different packet formats, possibly split up packets.
  • 91. Advantage & Disadvantage Virtual Circuit: Advantage: resources can be reserved & QoS can be guaranteed. Disadvantage: Table space required in each router to store info aboutVC. No alternate route to avoid congestion that occurs while circuit is active. Affected by path failure. Datagram: Advantage: Multiple routes available to avoid congestion. This approach can be used over the subnet which does not supportVC. Disadvantage:  longer header.  for every packet, route needs to decided.
  • 92. Tunneling Tunneling a packet from Paris to London.
  • 93. Tunneling Tunneling a car from France to England.
  • 94. Internetwork Routing (a) An internetwork. (b) A graph of the internetwork.
  • 95. Internetwork Routing  How routing is performed?  Interior gateway protocol, exterior gateway protocol.  Autonomous System(AS): In the internet, every network works independent of other network, it is called autonomous system.  Difference between Inter-network routing & Intra-network Routing.  quality of service.  rules of some of the countries.  cost of routing
  • 96. Fragmentation  Each network has put limit on maximum packet size due to various reason like hardware, operating system, protocol, international standard etc.  InTCP/IP, IP packet has maximum payload size 65535 bytes.  ATM network has limitation of 53 byte packet.  PROBLEM?  large packet need to pass through network having small packet size. • Solution: Fragmentation fragmentation is to break large packet into small packets.
  • 98. Fragmentation  Transparent Fragmentation Issues:  Exit gateway need to know about all the packets that were part of same big packet.  all the small packets that belongs to same big packet need to travel through same exit gateway.  repeated work of fragment and reassemble. Non-transparent Fragmentation Issues:  All the host should have capability of reassembly.  Small packets increase overhead because each packet carries header.
  • 100. Fragmentation Fragments after passing through a network with maximum packet size of 8 payload bytes plus header.
  • 101. Fragmentation Fragments after passing through a size 5 gateway.
  • 102. IPV4 Header The IPv4 (Internet Protocol) header.
  • 103. IPV4 Header Some of the IP options.
  • 106. CIDR (Classless Inter Domain Routing)  Networks are not assigned according to classA,B,C.  Networks are created with varying network bits. For example. If ISP is having one IP address block of 8192 addresses starting at 194.24.0.0.  If university1 requires 2040 address, means host address should be 11 bit long.  So address space will be 194.24.0.0 to 194.24.7.255 with 21 bit network mask.There will be one network consist of 2040 host and 21 bit long network id.  If university2 requires 1012 address, host address requires 10 bit, network address will be of 22 bits.  So address space 194.24.8.0 to 194.24.11.0 with 22 bit subnet mask will be allotted to univetsiry2.
  • 109. Internet 10.0.0.1 10.0.0.4 10.0.0.3 10.0.0.2 Web servera b c NAT 204.1.1.10 Connection request to port 80 from ‘c‘ to <web server> source 10.0.0.4, port 1025. 10.0.0.4, port 1025 mapped to 204.1.1.10, port 2000 Connection request from ‘c’ forwarded to <web server> source 204.1.1.10, port 2000. Request received and accepted. OutgoingWebClientThrough NAT Index Inside IP Inside Port Out IP … … … … 2000 10.0.0.4 1025 204.1.1.10 2001 10.0.0.2 1026 204.1.1.10 Connection request to port 80 from ‘c‘ to <web server> source 10.0.0.2, port 1026. 10.0.0.2, port 1026 mapped to 204.1.1.10, port 2001 Connection request from ‘a’ forwarded to <web server> source 204.1.1.10, port 2001.
  • 110. Internet 10.0.0.1 10.0.0.4 10.0.0.3 10.0.0.2 Web servera b c NAT Response sent to 204.1.1.10, port 2000. Translate 204.1.1.10, port 2000 to 10.0.0.4 port 1025 NAT Index Inside IP Inside Port Out IP … … … … 2000 10.0.0.4 1025 204.1.1.10 2001 10.0.0.2 1026 204.1.1.10 Response sent to 204.1.1.10, port 2001. Translate 204.1.1.10, port 2001 to 10.0.0.2 port 1026
  • 111. NAT (Network Address Translation) Objection against NAT.  NAT violates the rules that every IP address uniquely identifies the machine.  Mapping in NAT is set up by outgoing packet, incoming packet cannot be accepted until after outgoing.  NAT is dependent on header format ofTCP, if header format will change it will not able to work.  If source uses any other protocol other thanTCP/UDP, then also NAT will fail.  NAT keeps the information about every connection passing through it.This is property of connection oriented, but NAT also keeps the state information of connection less.
  • 112. Internet Control Protocols ICMP (Internet Control Message Protocol)  Operation of network is monitor by router.When some undesired event occur during packet processing, it is reported to sender by ICMP.
  • 113. Internet Control Protocols ARP (Address Resolution Protocol)  Sender need have information about Ethernet address to send a packet.  ARP is used to find out Ethernet address of given IP address.
  • 114. Internet Control Protocols DHCP (Dynamic Host Configuration Protocol)  DHCP is used to assign IP address dynamically to the host.  Whenever computer is started, it has Ethernet address, but no IP address.  To get IP address, computer broadcast request to get IP address, this request is done using DHPC DISCOVER packet.  This packet must reach to DHCP server.  When DHCP server will get a request, it will allocate IP address from pool of IP address.  The packet that DHCP give as reply with IP address is called DHCP OFFER packet.
  • 115. OSPF (OpenShortest Path First)  Internet is made up of different Autonomous systems. Each of the ASes is operated by different organization, can use different interior gateway protocol.  Original interior gateway protocol was Distance vector protocol but it was not working well for larger AS.  So distance vector was replaced by link state routing protocol, then IETF work on successor, which was OSPF( open shortest path first).  There are some of the requirement that need to be satisfy by OSPF. • protocol need to support routing according to type of service required, need to support various distance metrics, need to be dynamic, support load balancing, distribute load among multiple lines etc.
  • 116. OSPF (OpenShortest Path First)  OSPF works on graph representationAS.Then it computes shortest path based on arcs weights.  Connection between two routers are shown using two arcs, one in each direction. Connection between network and router are shown using single arc from router to network.
  • 117. OSPF (OpenShortest Path First)  When router boots, it send HELLO packets to its neighbor and on the LAN.  OSPF works by exchanging information between adjacent router. Adjacent here is not neighbor.  One router is selected as designated router(DR) and this is said to be adjacent to all other router in LAN.A backup designated router is also selected to use in case of DR router crash.  During normal operation, each router periodically sends LINK STATE UPDATE packet to adjacent router.These packets are also acknowledge by LINK STATE ACK packet.  There are two more type of packets. DATABASE DESCRIPTION LINK STATE REQUEST
  • 118. OSPF (OpenShortest Path First)  If AS is large, it can be divided in number of arears, each area is non overlapping.  Every AS has area 0 (area zero), backbone area. Every other area is connected with backbone area.  Each router in area have same link state database and calculates shortest path to all the other router in the area.  Router that is connected with two or more area will have database of both the area.  During normal operation, three types of routes are required. 1. intra-area 2. inter-area 3. inter AS  In case of inter-area routing, packet will first go from source area to backbone, backbone area to destination area, from there to destination.
  • 120. BGP (Border Gateway Protocol)  Within single autonomous system (AS), interior gateway protocols are used like OSPF.  Between ASes, exterior gateway protocol like BGP is used.  Exterior gateway protocol is used to convey routing information between ASes.  Intra-domain (AS) routing protocol need to look at how packet can be transfer efficiently between source and destination.  Inter-domain (AS) routing protocol need to look at the efficient path between AS and politics.  Examples of routing constraints: 1.No commercial traffic on educational network 2.Never put Iraq on route starting at Pentagon 3.Choose cheaper network 4.Choose better performing network 5.Don’t go from Apple to Google to Apple
  • 121. BGP (a) A set of BGP routers. (b) Information sent to F.
  • 122. BGP  Pair of BGP router communicate with each other by establishing TCP connection.  Instead of maintaining cost to each destination, each BGP router keeps track of exact path used.  After all the paths come in from the neighbor to F, it examines all the path, choses the best.  BGP solves count to infinity problem. If router G crashes, F receives paths from all the neighbor are BCD, IFGCD, EFGCD.  Here F can see that remaining two path pass through G, so it will choose BCD.
  • 123. BGP  From point of BGP router, networks are divided into three categories. stub network: which have only one connection to BGP graph. multi-connected network: which have multiple connection which BGP graph.This network may be used as transit network if it allows. Transit network: such a backbone network.These type of network are willing to handle third party packets.
  • 124. BGP AS 1 and AS 5 are stub networks AS 2 is a multi-connected network AS 3 and AS 4 are transit networks