routing algorithms and ip addressing 94-10-02. routing algorithms must be ▪ correctness ▪...

21
Routing Algorithms and IP Addressing 94-10-02

Upload: pamela-ross

Post on 08-Jan-2018

228 views

Category:

Documents


0 download

DESCRIPTION

Shortest Path Routing ▪ What is the metric? ▪ Number of hops, geographic distance, delay (propagation,queue, processing), reliability? ▪ The idea is to reduce the metric (whatever is chosen) to get from one point to another ▪ Dijkstra's algorithm

TRANSCRIPT

Page 1: Routing Algorithms and IP Addressing 94-10-02. Routing Algorithms must be ▪ Correctness ▪ Simplicity ▪ Robustness ▪ Stability ▪ Fairness ▪ Optimality

Routing Algorithms and IP Addressing

94-10-02

Page 2: Routing Algorithms and IP Addressing 94-10-02. Routing Algorithms must be ▪ Correctness ▪ Simplicity ▪ Robustness ▪ Stability ▪ Fairness ▪ Optimality

Routing Algorithms must be

▪ Correctness▪ Simplicity▪ Robustness▪ Stability▪ Fairness▪ Optimality

Page 3: Routing Algorithms and IP Addressing 94-10-02. Routing Algorithms must be ▪ Correctness ▪ Simplicity ▪ Robustness ▪ Stability ▪ Fairness ▪ Optimality

Shortest Path Routing

▪ What is the metric?▪ Number of hops, geographic distance, delay

(propagation,queue, processing), reliability?▪ The idea is to reduce the metric (whatever is chosen)

to get from one point to another▪ Dijkstra's algorithm

Page 4: Routing Algorithms and IP Addressing 94-10-02. Routing Algorithms must be ▪ Correctness ▪ Simplicity ▪ Robustness ▪ Stability ▪ Fairness ▪ Optimality

Routing and Router

▪ The network layer is responsible for routing the packet from its source to the destination.

▪ This means that there is more than one route from the source to the destination. The network layer is responsible for finding the best one among these possible routes.

Page 5: Routing Algorithms and IP Addressing 94-10-02. Routing Algorithms must be ▪ Correctness ▪ Simplicity ▪ Robustness ▪ Stability ▪ Fairness ▪ Optimality

Dijkstra

Page 6: Routing Algorithms and IP Addressing 94-10-02. Routing Algorithms must be ▪ Correctness ▪ Simplicity ▪ Robustness ▪ Stability ▪ Fairness ▪ Optimality

Flooding Algorithm

▪ Every incoming packet is sent on every outgoing line (except the one it arrived on)

▪ Damping - stop flooding packets after a certain number of hops - hop counter decremented each time

Page 7: Routing Algorithms and IP Addressing 94-10-02. Routing Algorithms must be ▪ Correctness ▪ Simplicity ▪ Robustness ▪ Stability ▪ Fairness ▪ Optimality

Distance Vector

▪ First routing algorithm used in the Internet (then ARPANET) and also used in RIP in Internet.

▪ Each router has an entry for every router in the subnet. (its neighbors)

▪ Distance to all nodes in the subnet periodically conveyed to all neighbors.

Page 8: Routing Algorithms and IP Addressing 94-10-02. Routing Algorithms must be ▪ Correctness ▪ Simplicity ▪ Robustness ▪ Stability ▪ Fairness ▪ Optimality

Distance Vector

Page 9: Routing Algorithms and IP Addressing 94-10-02. Routing Algorithms must be ▪ Correctness ▪ Simplicity ▪ Robustness ▪ Stability ▪ Fairness ▪ Optimality

Link State Algorithm

▪ Discover neighbors▪ Measure delays or cost to reach each

neighbor▪ Construct a \link-state" packet▪ Inform all routers (send link-state packet

to all routers - flooding)▪ Compute shortest path to all routers.

Page 10: Routing Algorithms and IP Addressing 94-10-02. Routing Algorithms must be ▪ Correctness ▪ Simplicity ▪ Robustness ▪ Stability ▪ Fairness ▪ Optimality

DV vs LS▪ Both guarantee determination of best path; LS

determines entire topology; DV finds only the next hop in the best path to each destination (by comparing distance to the destination through all neighbors and choosing the best neighbor)

▪ In LS each router announces a small amount of information (link state) to all routers (by flooding)

▪ In DV each router announces a large amount of information (distance to every destination) to a small number of routers (only neighbors)

▪ DV susceptible to the count-to-infinity problem

Page 11: Routing Algorithms and IP Addressing 94-10-02. Routing Algorithms must be ▪ Correctness ▪ Simplicity ▪ Robustness ▪ Stability ▪ Fairness ▪ Optimality

Routing Protocols in Actions▪ Routing protocols can be exterior or interior▪ Exterior protocols for routing between autonomous

systems (AS) Interior for routing within an AS▪ Every AS has to follow the same exterior routing

protocol▪ RIP was the first exterior routing protocol. RIP was

based on DV▪ Currently BGP is the exterior protocol▪ BGP is a Path vector protocol (has some similarities

with DV)▪ OSPF is the most common interior routing protocol.

Page 12: Routing Algorithms and IP Addressing 94-10-02. Routing Algorithms must be ▪ Correctness ▪ Simplicity ▪ Robustness ▪ Stability ▪ Fairness ▪ Optimality

IP Header

Page 13: Routing Algorithms and IP Addressing 94-10-02. Routing Algorithms must be ▪ Correctness ▪ Simplicity ▪ Robustness ▪ Stability ▪ Fairness ▪ Optimality

IP - Classful

Page 14: Routing Algorithms and IP Addressing 94-10-02. Routing Algorithms must be ▪ Correctness ▪ Simplicity ▪ Robustness ▪ Stability ▪ Fairness ▪ Optimality

What is Subnet Mask

▪ A subnet mask is a 32-bit binary number that indicates which bits of an IP address identify the network and which bits identify the host.

Page 15: Routing Algorithms and IP Addressing 94-10-02. Routing Algorithms must be ▪ Correctness ▪ Simplicity ▪ Robustness ▪ Stability ▪ Fairness ▪ Optimality

Special IP Addresses

Page 16: Routing Algorithms and IP Addressing 94-10-02. Routing Algorithms must be ▪ Correctness ▪ Simplicity ▪ Robustness ▪ Stability ▪ Fairness ▪ Optimality

What is wrong with Classful IP

▪Address space is wasted for Class A,B▪Class B sparsely populated.▪Large forwarding tables for Class C.

Solution: Subnetting and Supernetting

Page 17: Routing Algorithms and IP Addressing 94-10-02. Routing Algorithms must be ▪ Correctness ▪ Simplicity ▪ Robustness ▪ Stability ▪ Fairness ▪ Optimality

What is Subnetting?

▪ Add another layer to hierarchy makes subnet masks variable in size

Page 18: Routing Algorithms and IP Addressing 94-10-02. Routing Algorithms must be ▪ Correctness ▪ Simplicity ▪ Robustness ▪ Stability ▪ Fairness ▪ Optimality

Pros for Subnetting

▪ Hierarchical addressing critical for scalable system

▪ Sub-netting simplifies network management. It breaks up network into chunks

▪ It saves a vast number of IPs in Class A and B.

Page 19: Routing Algorithms and IP Addressing 94-10-02. Routing Algorithms must be ▪ Correctness ▪ Simplicity ▪ Robustness ▪ Stability ▪ Fairness ▪ Optimality

IP Prefix for Subnetting▪ Example: 130.58.126.0 / 30 represents a chunk of 2^2= 4

addresses (b = 32 - 30)▪ All addresses for which the first 30 bits are the same as

the starting address 130.58.126.0

▪ the last two bits can be 00 or 01 or 10 or 11 - giving four different addresses (130.58.126.0 - 130.58.126.3)

▪ 130.58.126.0 / 28 represents a chunk of 2^4 (32-28) addresses (the last 4 bits are free to change (130.58.126.0-130.58.126.15)

Page 20: Routing Algorithms and IP Addressing 94-10-02. Routing Algorithms must be ▪ Correctness ▪ Simplicity ▪ Robustness ▪ Stability ▪ Fairness ▪ Optimality

ARP and RARP

▪ Address Resolution Protocol (ARP): Mapping IP to MAC▪ Reverse Address Resolution Protocol (RARP): is vise

versa – MAC to IP▪ Both are below the Network Layer and used by IP▪ Procedure for ARP:▪ Broadcast a query (I'm 10.2.3.1, my MAC address is

X, what is MAC address of 10.2.3.4?) - 10.2.3.4 responds with its MAC address

▪ RARP requests are not forwarded outside the LAN

Page 21: Routing Algorithms and IP Addressing 94-10-02. Routing Algorithms must be ▪ Correctness ▪ Simplicity ▪ Robustness ▪ Stability ▪ Fairness ▪ Optimality

ICMP - Internet Control Message Protocol