Brief About Network Layer, Lecture notes of Network Technologies and TCP/IP

Topics of Computer Networks

Typology: Lecture notes

2021/2022

Available from 01/21/2022

suryansh-garg
suryansh-garg 🇮🇳

7 documents

1 / 89

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Unit-III
Network Layer
Routing Protocols
(Unicast & Multicast)
Internetworking
IPv4 and IPv6
Addressing techniques
Address Mapping
HCST@HOD-IT-2019
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59

Partial preview of the text

Download Brief About Network Layer and more Lecture notes Network Technologies and TCP/IP in PDF only on Docsity!

Unit-III

Network Layer

• Routing Protocols

 (Unicast & Multicast)

• Internetworking

 IPv4 and IPv

 Addressing techniques

• Address Mapping

HCST@HOD-IT-

Question

• What is count to infinity problem (5 Marks)

• What is unicast routing. Discuss unicast routing

protocols. (10 Marks)

• What is meant by unicast and multicast routing,

explain with suitable example.

• What is adaptive routing algorithm. Explain various

types of adaptive routing algorithms (5Marks )

  • We have shown F as being outside the oval because it does not belong to the carrier, but in terms of construction, software, and protocols, it is probably no different from the carrier's routers. Whether it belongs to the subnet is arguable, but for the purposes of this chapter, routers on customer premises are considered part of the subnet.
  • A host with a packet to send transmits it to the nearest router, either on its own LAN or over a point-to-point link to the carrier
  • 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, where it is delivered.
  • This mechanism is store-and-forward packet switching.

1. Network Layer Design Issues

Service Provided to the transport Layer

1. CONNECTIONLESS SERVICE :

  • If connectionless service is offered, packets are injected into the subnet individually and routed independently of each other. No advance setup is needed. In this context, the packets are frequently called datagrams (in analogy with telegrams) and the subnet is called a datagram subnet.
  • If connection-oriented service is used, a path from the source router to the destination router must be established before any data packets can be sent. This connection is called a VC (virtual circuit), in analogy with the physical circuits set up by the telephone system, and the subnet is called a virtual-circuit subnet.
  • Let us now see how a datagram subnet works. Suppose that the process P1 in Figure2 has a long message for P2. It hands the message to the transport layer with instructions to deliver it to process P2 on host H2. The transport layer code runs on H1 , add header to the front of the message and hands the result to the network layer.

2. CONNECTIONORIENTED SERVICE :

For connection-oriented service, we need a virtual-circuit subnet.

  • when a connection is established, a route from the source machine to the destination machine is chosen as part of the connection setup and stored in tables inside the routers.
  • That route is used for all traffic flowing over the connection, exactly the same way that the telephone system works.
  • When the connection is released, the virtual circuit is also terminated. With connection- oriented service, each packet carries an identifier telling which virtual circuit it belongs to.
  • As an example, consider the situation of Fig. 3. Here, host H1 has established connection 1 with host H2. It is remembered as the first entry in each of the routing tables. The first line of A 's table says that if a packet bearing connection identifier 1 comes in from H1 , it is to be sent to router C and given connection identifier 1. Similarly, the first entry at C routes the packet to E , also with connection identifier 1.

COMPARISON OF VIRTUAL-CIRCUIT AND DATAGRAM SUBNETS

UNICAST ROUTING PROTOCOLS

  • Unicast Routing algorithms are grouped into two types- 1. Non-Adaptive (static) a. Shortest path routing 2. Adaptive (Dynamic) a. Distance vector Routing b. Link state routing
  1. In Non-adaptive algorithm , route for the packet is computed in advance, off-line and downloaded to the router when the network is booted. This procedure is some time called static routing 2. Adaptive algorithms, in contrast , change their routing decisions to reflect changes in the topology and usually the traffic as well. This procedure is sometimes called dynamic routing
  • Unicast Routing algorithms may be static or dynamic.
    • Static-
      • Shortest path
      • Flooding
    • Dynamic
      • Distance vector
      • Link state
  • Unicast protocols are also classified as-

Static Routing- Shortest Path Routing Algorithm

  • It is a static routing algorithm
  • In this method, subnet is converted into graph where each node represent a router and each edge of a graph represent a communication link.
  • An Algorithm find shortest path between pair of routers.
  • The cost of link may be a function of
    • Distance
    • Bandwidth
    • Average traffic
    • Communication cost
    • Delays etc.
  • Dijkstra’s algorithm is used to find the shortest path
  • [Note : take any example as simple undirected graph with weights and show shortest path from source to destination]

Shortest Path Routing

Following figure illustrate the working of shortest path routing using Dijkstra’s algorithm. ( In fig-b at node B the value (2,A) indicate cost of node B is 2 when going from node A i.e. (2,A) )

Distance Vector Routing Algorithm

  • It is a dynamic routing algorithm
  • It take decisions based on current load of the network.
  • In this method each router maintain a vector (table) of minimum distance to every router.
  • It is some time called Bellman-Ford routing.
  • It was the original ARPANET routing algorithm and used in Internet with name RIP (Routing Information Protocol)

Figure- Distance Vector Routing table

  • In this method each node share its routing table to its immediate neighbors. (periodically or change in topology)
  • Each router update its routing table according to received vector from neighbors
    • Let us assume - D Send Vector to E, so the routing table of E is updated as:

Note: In initial state table each row indicate routing table of each node

Routing Table of Node : D ∞ ∞ 2 0 2

Routing Table of Node : E 1 8 ∞ 2 0

Updated Routing Table of Node : E 1 8 4 2 0

Note: EC via D= ED+DC = 2+2=4 < (^)

A 1 B 1 C

A's Routing Table B's Routing Table

C

to (^) (next hop)via cost B 2 C

to (^) (next hop)via cost C 1 now link B-C goes down

C 2 C oo

C B 2 C - oo

C oo C 3

C - oo C A 3

C 4 C oo

C B 4 C - oo

Count to Infinity Problem

  • One of the main issue in distance vector routing is- routing loops
  • The problem occurs when an link between routers goes down and two nodes send update to each other at the same time.

This problem continue as infinite loop, called count to infinity problem.

Link state routing Algorithm

  • Distance vector routing was used in ARPANET until 1979, when it was

replaced by link state routing.

  • Node use Dijkstra’s Algorithm to build routing table
  • Each node uses same topology to build routing table
  • Topology Must be dynamic