Network LAYER
Download
Report
Transcript Network LAYER
Network Layer
COMPUTER NETWORKS
Networking Standards
(Network LAYER)
Network Layer
Question to be answered ?
• What is the main goal of Network
layer?
•
How does Network layer achieve
its goal?
Computer Networks
2
Network Layer
Network Layer
- The network layer is concerned with
getting packets from the source all
the way to the destination.
- Therefore, the main function (goal)
of network layer is routing packets
from the source machine to the
destination machine.
Computer Networks
3
Network Layer
To achieve its goal the network layer
must:
1- Know about the topology of the
communication subnet.
2- Choose appropriate paths through the
subnet.
3- Avoid overloaded communication lines
and routers (avoid congestion).
Computer Networks
4
Store-and-Forward Packet Switching
fig 5-1
The environment of the network layer protocols.
Network Layer
Store-and-Forwarding Packet Switching
• In Store-and Forwarding Packet Switching
mechanism, a host transmits a packet to the
nearest router, the packet is stored there
until it has fully arrived so the checksum can
be verified, then it is forwarded to the next
router along the path until it reaches the
destination host.
Computer Networks
6
Network Layer
Services provided to the Transport Layer
• There are two services provided by the
network layer to the transport layer:
1) Connectionless service.
2) Connection-Oriented Service.
Computer Networks
7
Implementation of Connectionless Service
Routing within a diagram subnet.
Implementation of Connection-Oriented Service
Routing within a virtual-circuit subnet.
Comparison of Virtual-Circuit and Datagram
Subnets
5-4
Network Layer
Routing Algorithms
• In most subnets, packets require multiple
hops to reach their destinations.
• The Routing algorithm is the software
part of the network layer responsible for
deciding which output line an incoming
packet should be transmitted on.
Computer Networks
11
Network Layer
Routing Algorithms
• The decision about the best route either
calculated once as the case with
connection-oriented paradigm or for
every arriving data packet in the case of
the subnet uses connectionless
paradigm.
Computer Networks
12
Network Layer
Routing Algorithms
Desirable properties in a routing algorithm:
1) Correctness
2) Simplicity
3) Robustness (hardware or software failures)
4) Stability (to be run for long time)
5) Fairness
6) Optimality
Computer Networks
13
Routing Algorithms
Conflict between fairness and optimality.
The Optimality Principle
(a) A subnet. (b) A sink tree for router B.
Network Layer
Routing Algorithms
Routing Algorithms can be grouped in two
major classes:
1) Non-adaptive algorithms (Static Routing)
2) Adaptive algorithms (Dynamic Routing)
Computer Networks
16
Network Layer
Routing Algorithms
1) Non-adaptive algorithms, they do not
base their routing decision on
measurements or estimates of the
current traffic and topology. Instead the
route is computed in advance, off-line,
and downloaded to the routers when the
network is booted.
Computer Networks
17
Network Layer
Routing Algorithms
2) Adaptive algorithms, they change their
routing decisions to reflect changes in
the topology, and usually the traffic as
well.
- Adaptive algorithms differ in where they
get their information.
Computer Networks
18
Network Layer
Routing Algorithms
- What metric is used for optimization?
- Distance
- number of hops
- estimated transit time
- delay
- bandwidth
Computer Networks
19
Network Layer
Shortest Path Routing
- The technique that is used in many
routing algorithms is simple and easy to
understand.
- The idea is to build a graph of the subnet,
with each node of the graph representing
a router and each arc of the graph
representing a communication line
(link). To choose a route between a given
pair of routers, the algorithm just finds the
shortest path between them on the graph.
Computer Networks
20
Network Layer
Shortest Path Routing
B
C
7
2
2
E
2
F
3
3
A
1
D
2
4
6
G
Metric is number of hops
-The path ABC is equal to path
ABE.
2
H
Computer Networks
Metric is the distance in km
- the path ABC is longer than
the path ABE
21
Network Layer
Shortest Path Routing
There are several algorithms to compute the
shortest path between two nodes of a
graph. The most popular is Dijkstra
algorithm.
In this algorithm each node is labeled (in
parentheses) with its distance from the
source node along the best known path.
Computer Networks
22
Network Layer
Shortest Path Routing
- In Flooding Algorithm every packet is sent
out on every outgoing line except the one it
arrived on.
- Timer is used to stop (limit) this flooding
which can be a hop counter.
- A practical selective flooding algorithm is
used where the packets are sent only to
the approximately in the right direction.
- It is suitable for military applications.
Computer Networks
23
Collection of Subnetworks
The Internet is an interconnected collection of many networks.
The IP Protocol
The IPv4 (Internet Protocol) header.
The IP Protocol (2)
5-54
Some of the IP options.
IP Addresses
IP address formats.
IP Addresses (2)
Special IP addresses.
Subnets
A campus network consisting of LANs for various
departments.
Subnets (2)
A class B network subnetted into 64 subnets.