66
RMK College of Engineering and Technology CS 6551 Computer Networks Department of Electronics and Communication Engineering

Computer networks unit iii

Embed Size (px)

Citation preview

Page 1: Computer networks    unit iii

RMK College of Engineering and Technology

CS 6551

Computer Networks

Department of

Electronics and Communication Engineering

Page 2: Computer networks    unit iii

Unit 3

Routing

Prepared by

Jai Ganesh S

Asst.Professor - ECE

Page 3: Computer networks    unit iii

Syllabus

• Routing

• RIP

• OSPF

• Metrics

• Switch basics

• Global internet

• Areas

• BGP

• IPV6

• Multicast Addresses

• Multicast Routing

• DVMRP

• PIM

Page 4: Computer networks    unit iii

Routing

Page 5: Computer networks    unit iii

Introduction

• Routing is the most important task in the networks to forward packets from source to

destination

• The devices like switches and routers take the responsibility of delivering the packets to right

destination

• This is accomplished by referring to their forwarding table and routing table respectively

• The fundamental problem is “how routers acquire the information about the network in their

routing table?”

Page 6: Computer networks    unit iii

Understanding – Routing in Real time

Page 7: Computer networks    unit iii

Understanding – Routing in Networks

Page 8: Computer networks    unit iii

Representing Network as a graph

• The routing process is well understood by representing

a network as a graph.

• Each node on the network may represent any host or

switch or router.

• Each link on the network is associated with a cost.

• The ultimate work of the router is to find the path with the

lowest cost between any nodes.

• These are performed by routing algorithm or routing

protocols.

Page 9: Computer networks    unit iii

Types of routing protocols

Page 10: Computer networks    unit iii

Distance Vector Algorithm

• The idea behind the DVR is that it maintains a table

with distance to every node

Assumptions:

• Each node contains the cost of link to the other node. These cost are configured by the administrator.

• The link that is down is assign with infinite cost.

Page 11: Computer networks    unit iii

Stages in DVR

• There are 3 stages in DVR

Initialization

Sharing

Updating

Page 12: Computer networks    unit iii

1. Initialization

Consider the given example networkEach node creates an initialization table with the cost to reach all other nodes. Since they do not know about all the

nodes, they create only for the neighboring node.

Page 13: Computer networks    unit iii

2. Sharing

From the given network Node A do not know about Node E but Node C knows about Node E.

Similarly Node C do not know about Node D

but Node A knows about Node D

Thus by sharing Node A’s Table to Node C ,

Node C learns about Node D.

By sharing Node C’s Table to Node A ,

Node A learns about Node E

Page 14: Computer networks    unit iii

3. UpdatingEach and every node in the network updates its own table from the table received from the neighbor nodes.Updating process happens in 3 steps

1. Receiving node need to add the cost between itself (A) and sending node(C). (Cost of A C is 2)2. Receiving node have to add the name of the sending node to each row as third column. This acts as the next node

information when the table is updated

3. The receiving node compares each row of its old table with the modified table.

If the next node entry is different, then the receiving node chooses the lowest value.

If the there is a tie, then old value is maintained

After several sharing and updates process all nodes in the network becomes stable and knows about the path to

reach any node on the network.

Page 15: Computer networks    unit iii

When to update??

• 2 methods

• Periodic update

• Triggered update

Page 16: Computer networks    unit iii

Instability problem

• 2 node instability

• 3 node instability

Page 17: Computer networks    unit iii

2 node instability

Page 18: Computer networks    unit iii

Remedies for 2 node instability

• Defining infinity

• Split horizon

• Split horizon with poison reverse

Page 19: Computer networks    unit iii

3 node instability

Page 20: Computer networks    unit iii

Routing Information Protocol

• Considerations

• Only networks have routing table not networks

• Metric used in Hop Count

• Infinity is 16

• Next node column defines the address of the router to reach the destination

Page 21: Computer networks    unit iii

Example scenario

Page 22: Computer networks    unit iii

Link State Routing Alg

Page 23: Computer networks    unit iii

Steps in Link state alg

• Reliable dissemination of LSP

• Creation of LSP

• Flooding of LSP

• Calculation of Routes from all received LSP

• Formation of Shortest path tree for each node

• Calculation of Routing Table

Page 24: Computer networks    unit iii

Creation of LSP

• LSP are created with 4 main information

• Node identity

• The list of links

• Sequence numbers

• Age (TTL)

Page 25: Computer networks    unit iii

Flooding

• Steps in flooding

• Creating node floods the LSP

• Receiving node compares the LSP with old LSP

• If received is old – discarded

• If received is new – old is discarded and new LSP is Flooded

• Old and new are differentiated by sequence numbers

• TTL helps in removing the old packets from the network.

Page 26: Computer networks    unit iii

Formation of shortest path

• It is created by using “Dijkstra Algorithm”

Page 27: Computer networks    unit iii
Page 28: Computer networks    unit iii
Page 29: Computer networks    unit iii

Calculation of Routing Table

Page 30: Computer networks    unit iii

OSPF Protocol

• One of the widely used link state routing is OSPF.

• OSPF offers many features

• Authentication of routing messages

Routing messages are sent to all the nodes. Thus they should be authenticated.

• Additional hierarchy

This is the tool to make the system more scalable. It allows many networks to be grouped as “Areas”

• Load balancing

OSPF allows multiple routes with the same cost. Thus the traffic gets distributed all over the network.

Page 31: Computer networks    unit iii

Example Network

Page 32: Computer networks    unit iii

OSPF Header Format

Describes the version of the OSPF Describes the total length of the mesasageUsed to identify the sender of the message

Used to identify in which area the node is locatedEntire packet except the data field is protected by check sum

Defines the type of authentication0 - No Authentication

1 – simple password2 – cryptographic authentication

Data

Page 33: Computer networks    unit iii

LSP Advertising Packet

• The basic building block of OSPF is creating the link state packet and

advertising them. There are 2 types of advertisements.

• Router should advertise the LSP packets to the directly connected networks

• Router should advertise information about the loss of link throughout the

network.

Page 34: Computer networks    unit iii

LSP Advertisement Packet Format

They are equal to the TTL. Defines the router that created the advertisementThey are used to detect the old or duplicate LSA’sThey are used to protect the entire advertisement packet.It defines the length of the complete LSA in bytesLink ID and Link DataThey are used to identify the link along with the router IDThey are used to define the cost of the link

It defines the type of the link. There are 4 types of links1. Point to point link2. Transient link3. Stub link4. Virtual link

It is used for defining the type of service. It is possible to assign different cost for the same route based on the type of service

Page 35: Computer networks    unit iii

Metrics

• The metrics that we have discussed so far were assumed that they are a known

factor for executing the algorithm.

• Drawbacks in simply assuming the metric

• They do not distinguish links on latency basis

• They do no distinguish links in capacity basis

• They do no distinguish links based on their current load.

Page 36: Computer networks    unit iii

Solution

• There are several methods evolved to calculate the metrics.

• But all we need is to test the various methods on a common flat form.

• One such flat form is known as ARPANET

• Further details about the ARPANET can be studied in the given link.

https://en.wikipedia.org/wiki/ARPANET

Page 37: Computer networks    unit iii

3 stages of ARPANET

• Original ARPANET

• New Routing Mechanism

• Revised ARPANET Routing Metric

• Each version uses different logics to compute the metric.

Page 38: Computer networks    unit iii

Original ARPANET

• In this method the metric is computed based on the “ Number of packets

queued for transmission on each link”

• Link with 10 packets queued for the transmission is assigned larger cost than

the link which has 5 packets queued for transmission.

Page 39: Computer networks    unit iii

New Routing Mechanism

• In this mechanism both latency and bandwidth is considered for calculation of metrics.

• The arrival time and depart time are captured from the time stamp added to the packet.

• Delay is computed as

• Delay = (depart time – arrival time) + Transmission time + latency.

• Based on this delay the cost will be assigned.

Page 40: Computer networks    unit iii

Revised ARPANET Routing Metric

• The major changes done in this versions are

• Compress the dynamic range of metric considerably

• Smoothen the variation of the metric with time

• Compression is achieved by taking the function of measured utilization , link type and link

speed.

• Smoothing can be achieved in 2 ways

• Averaging the delay instead of taking the trials

• Setting up a hard limit on how much the metric could change from one cycle to another cycle.

Page 41: Computer networks    unit iii

Switch Basics

• The conceptual structure of the switch is shown in the figure.

Page 42: Computer networks    unit iii

1. Control processor

• This block is responsible for moving the data from interface to memory

without the intervention of the CPU

Page 43: Computer networks    unit iii

2. Ports

• The ports communicates with the outside worlds

• It contains fiber optic receivers, buffers for holding the packets that are to be

transmitted.

• In case of virtual circuit, the port contains the virtual circuit identifier

• In case of ethernet, the port contains the forwarding table .

Page 44: Computer networks    unit iii

3. Fabrics• They are very Basic and important function of a switch.

• They are responsible for forwarding the packets from input port to output port with minimal delay and max throughput.

• Types of Fabrics:

• Shared Bus:

• They are found in conventional processors. The bus is shared because in the conventional system the bus bandwidth determines the throughput.

• Shared Memory:

• They are found in the modern switches. They have common memory for both input and output port. Here the memory decides the throughput.

• Cross Bar:

• They are the matrix of pathways that can be configured to connect any input port to any output port.

• Self Routing:

• Self routing fabrics relay on some information in a pack header to direct each packet to its correct destination.

Page 45: Computer networks    unit iii

Global Internet

Page 46: Computer networks    unit iii

Some Techniques to address the Problems

• Areas

• Border gateway Protocol

• IP Version 6

Page 47: Computer networks    unit iii

Areas

Page 48: Computer networks    unit iii

Back bone Area or Area 0

Page 49: Computer networks    unit iii

• Inter domain Routing

• Intra domain Routing

BGP

Page 50: Computer networks    unit iii

Inter domain routing

Page 51: Computer networks    unit iii

Types of autonomous systems

• There are 3 types

• Stub autonomous system

• This type of as carries only local traffic. Ex. Small corporation

• Multi homed autonomous system

• They carries traffic for more than 2 AS. Ex. Large Corporation

• Transit autonomous system

• They carry traffic for more than 1 AS. This carries both transit traffic and local traffic.. Ex. Back bone

Providers

Page 52: Computer networks    unit iii

Challenges in Intra domain routing

• It should focus on finding the non looping path

• Backbone router should be able to route the packet anywhere in the network

• Varying nature of the AS should be addressed

• Multiple ISP’s may create a problem of reliability coz, different ISP have Different

Policies.

Page 53: Computer networks    unit iii

Path Vector Routing

• 3 stages

• Initialization

• Sharing

• Updating

Page 54: Computer networks    unit iii

1.Initialization

Page 55: Computer networks    unit iii

2. Sharing

• A1 shares with B1 and C1

• B1 shares with A1 and C1

• C1 shares with A1, B1, and C1

• D1 shares with C1

Page 56: Computer networks    unit iii

3.Updating

Page 57: Computer networks    unit iii

Looping problem

Page 58: Computer networks    unit iii

Multicast Addresses

Page 59: Computer networks    unit iii

Multicast Protocols

Page 60: Computer networks    unit iii

DVMRP

• Distance Vector Multicast Routing Protocol.

• Sharing of routing tables with the neighboring routers are not possible here.

• Each router have to create routing table from the scratch. Based on the information of the uni cast

routing.

• This can be achieved in 4 methods:

• Flooding

• Reverse Path Forwarding (RPF)

• Reverse Path Broadcasting (RPB)

• Reverse Path Multicasting (RPM)

Page 61: Computer networks    unit iii

1. Flooding

• default flooding concept.

• Router floods the all the received packets to all the ports, except the incoming

port.

• Drawbacks:

• By this method only broad casting is achieved not the multicasting.

• A router may receive multiple packets.

Page 62: Computer networks    unit iii

Reverse path Forwarding (RPF)

• In this method the packets are sent only to the

shortest path.

• This shortest path information is obtained from the

unicast routing tables.

• The router will not forward the table if the source

address and destination address are same. (in case of

receiving multiple copies)

Page 63: Computer networks    unit iii
Page 64: Computer networks    unit iii

Multicast Addresses

Page 65: Computer networks    unit iii

Ipv6 header

Page 66: Computer networks    unit iii

Endof

Unit - 3