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
- 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-
- 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: EC 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