Download Chapter 14

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Backpressure routing wikipedia , lookup

AppleTalk wikipedia , lookup

Deep packet inspection wikipedia , lookup

Zero-configuration networking wikipedia , lookup

IEEE 802.1aq wikipedia , lookup

IEEE 1355 wikipedia , lookup

Internet protocol suite wikipedia , lookup

Piggybacking (Internet access) wikipedia , lookup

Computer network wikipedia , lookup

Wake-on-LAN wikipedia , lookup

List of wireless community networks by region wikipedia , lookup

Airborne Networking wikipedia , lookup

Peering wikipedia , lookup

Cracking of wireless networks wikipedia , lookup

Multiprotocol Label Switching wikipedia , lookup

Recursive InterNetwork Architecture (RINA) wikipedia , lookup

Routing wikipedia , lookup

Routing in delay-tolerant networking wikipedia , lookup

Transcript
Chapter 14
ROUTERS: BASIC PRINCIPLES
ROUTING with Partial Information
Routers cooperate to deliver the datagrams to the destination.
CONSISTENT & COMPLETE ROUTING
•Routing Tables
•Routing Algorithm
•ICMP Redirect message
ARCHITECTURE OF INTERNET & ROUTING PROTOCOLS
Routing Tables:
 What values should Routing Tables contain?
 How can these values be obtained?
 initialization and UPDATING
•ARCHITECTURES
 INTERNETS structured around a backbone
 Routers owned by Independent Administrative Authorities
-- How to exchange information among such systems?
 How to exchange information within ONE such system?

Need for automatic route propagation
•Routers contain incomplete information about destinations on the Internet.
•Partial information allows autonomy to sites to make local changes.
•But it may introduce inconsistencies and may make some destinations unreachable from some sources.
CAUSES of INCONSISTENICIES among R-tables
 ERRORS in Algorithms used for computing routing tables
 Incorrect data supplied to the Algorithms
 Transmission Errors
ROUTING PROTOCOLS
Rules and procedures that routers use to keep one another informed of changes in the Internet.
–
Detect
–
Correct
–
Constrain the effect of ERRORS
A Little History of ARCHITECTURE
First Internet System: A backbone, some core routers & many non-core routers.
•CORE ROUTERS – managed by Internet Network Operations Center (INOC)
Plus a large number of Non-core Routers.
ROUTER ARCHITECTURE: HISTORICAL
ARPANET
R1
NET1
BACKBONE
R2
NET2
R3
NET3
The CORE ROUTERS:
•Every Core Router contains complete information about all possible destination
•Routing Table in a Core Router contains no default entry.
Outlying ROUTERS: with partial information
Each site, which was assigned an Internet address, was required to advertise the address to the core
system of routers.
•Problems:



Internet outgrew a centrally managed long-haul backbone.
Every site could not have a CORE ROUTER directly connected to the backbone.
The core architecture did not scale to a large size.
•SECOND Stage: PEER BACKBONES
H1
ARPANET BACKBONE
R1
H3
R2
NSF BACKBONE
Problem

.Optimal routing requires Host-specific routing.
Thus H3 would require separate Routers
for H1 and H2, though both are connected to the same backbone.
 Inconsistent tables among Routers may cause ROUTING LOOPS.
 CORE information can not be partitioned.
• Protocols for managing core routers became heavy.
H2
R3
H4
Partial
Core #1
Partial
Core #1
Illegal addresses cycle in the Loop till TTL = 0
ROUTERS : DISTANCE VECTOR ROUTING
BELLMAN-FORD or DISTANCE VECTOR ROUTING:
The ROUTING TABLE
DEST N/W
HOP COUNT
NEXT HOP¼¼OTHER¼¼
…
…
…
…
FOR EVERY DEST N/W:
 IF ROUTER CONNECTED DIRECTLY TO ROUTER,
HOP COUNT may be ZERO
DISTANCE VECTOR ROUTING :The ROUTING TABLE
If a N/W: REACHABLE THRO’ ONE OTHER ROUTER
HOP COUNT = 1
•HOP COUNT:
–ALONG A PATH
–FROM A SOURCE TO A DEST
–EQUALS THE NO. OF ROUTERS A DATAGRAM ENCOUNTERS
 NEXT HOP
One of the IP Addresses of the Router.

OTHERS
WHEN WAS THE ENTRY LAST UP-DATED
INTERFACE ……
METRIC: The cost assigned for passing through a network for the Quality of Service.
(RIP treats all networks as equals.
OSPF allows multiple Routing Tables for different QoS criteria.
BGP permits the administrator to set the value.)
PROCEDURE:
 EVERY ROUTER INFORMS
– EVERY NEIGHBOUR (ONLY)
– PERIODICALLY (~ 30 SECONDS)
Conveys all the INFORMATION ABOUT ROUTING IT HAS.
 INFORMATION SHARING BY A SET OF PAIRS:N,D
N: NETWORK ADDRESS OF DEST
D: DISTANCE IN NO. OF HOPS
INITIAL INFORMATION ON A NEW ROUTER: ONLY ABOUT ITS DIRECTLY CONNECTED
NETWORKS
THEN BY USING INFORMATION FROM NEIGHBOURS, INFORMATION IN EACH ROUTER’S
TABLE CAN BECOME COMPLETE & ‘SYNCHRONIZED’.
DISTANCE VECTOR ROUTING ALGORITHM
The updating message from a Router to a neighboring Router: (N, D)
where N is the destination net
D (distance) is the no. of hops from the sender
The PROTOCOL using DISTANCE VECTOR routing: Every Router sends out a periodic message to all
the Routers, that it can reach directly, giving a copy of its Routing Table. This is used for UPDATING the
tables of the neighboring Routers.
DISTANCE VECTOR ROUTING: An Example
N8
R3
N7
R4
r41
N1
N3
N6
N2
r31
R2
N9
R1
N4
r21
R6
r61
r51
N5
R5
DISTANCE VECTOR ROUTING Example (continued)
Routing table for R1
DES
N1
N2
N3
N4
N5
N6
N7
N8
N9
DISTANCE
0
0
0
0
0
1
1
1
2
ROUTE
Direct
Direct
Direct
Direct
Direct
r61
r41
r41
r41
Assume that the Routing table for R1 also contains an entry for N17 through r31 and an
entry for N18 through r31 as follows:
N17
N18
8
3
r31
r31
If R3 sends a message as follows:
Dest
N4
N5
N17
N18
N19
Distance
1
1
5
4
4
R1 modifies
N17
N18
6
5
r31(Add 1 to distance)
r31(Add 1 to distance)
IMPORTANT: It updates the hop-count value of N18, because the interface and the
router remain the same.
It adds
N19
5
r31(Add 1 to distance)

ADV--EASY to implement
Disadvantages of Distance-Vector protocols:
•SLOW propagation in a fast changing environment
•Do not scale well;
•Size of messages prop to total number of networks in Internet
•Since every router must participate in updation process, volume of information exchanged is large.
DISTANCE VECTOR ROUTING: GGP
An Example of DISTANCE
VECTOR ROUTING:
GATEWAY—TO—GATEWAY PROTOCOL
(NO LONGER AN IETF STANDARD)
GGP:
•Used by CORE ROUTERS for inter—communication
•A Router would use GGP to advertise the networks it can reach & its cost for reaching them.
•The cost is measured in terms of distance, i.e. Router Hops.
•Many Routers use high hop counts for routes across slow N/W’s.
•GGP messages travel in IP datagrams
Features:
•Distance Factoring: To reduce the size of the routing message
•Loss of routing messages is handled through
–Soft state
–ACK and Retransmission
GGP: The receiver can send a positive or a negative ACK.
•Sequence Number to handle out-of-order delivery
ROUTERS : Shortest Path First Protocol
SPF or Link-state or Link status Algorithm:
Every router contains complete information about the entire Internet by way of its complete graph or a
matrix of nodes (routers) and edges (An edge exists iff the corresponding routers can communicate directly.)
Dijkstra’s Algorithm used to calculate the shortest path between any two nodes.
ROUTERS : SPF Protocol: An Introduction
Messages:
•Short messages to neighbors to find whether they are alive •Periodic broadcast of the state of the links of
the router. On receipt of the message, the map of Internet is updated.
Advantages:
•Easy to debug problems, since update messages propagate unchanged and because paths are calculated
independently by every router • scales better than the distance-vector method, since every message carries
information about the links directly connected to the router only.
ROUTERS: General
For both of these methods:
•As Internet grew up,
IMPRACTICAL for all the Routers in the world-wide system to participate in a single routing update
protocol.
•Moreover the routers and networks are managed by different authorities, who may have different policies.
ROUTERS : Extra Hops problem
Extra Hops problem:
•If all the routers were not to participates in a single routing protocol, we get into the Extra Hops problem.
•Assume that all the routers in the Internet do not participate in the protocol to keep themselves updated
(called Participating Router-PR).
•Then non-participating Routers: with incomplete routing table.
ROUTERS : Extra Hops problem (continued)
•Let the non-participating routers select one PR as the default router.
PR
Local Net1
PR
Back Bone
R1
R3
R2
Local Net2
Non-participating Router
Local Net3
•Let R3 choose R1 as its default router.
•For every host in Local Net2, the message will have to go through an extra hop on the backbone. •So
non-participating Routers have to learn from participating routers so that they can choose optimal routers.
ROUTERS :
Hidden Networks
•Similarly, a PR may have a Group of non-participating routers and networks connected to it.
•If to a distant (hidden) part of this Group’s network, a new local network is added,
a technique for non-participating routers to inform the PRs about the hidden network is required.
L
o
c
a
l
ROUTERS : AUTONOMOUS SYSTEMS
•AUTONOMOUS
SYSTEM : A group of networks and routers under the authority of a single
N
administration.
e
•Typest of Routing:
3
–Interior
Routing: Routing inside an autonomous system.
Examples: RIP, OSPF
–Exterior Routing: Routing between autonomous systems.
Example: BGP
ROUTERS : RIP
Interior Routing Protocols
•RIP (Routing Information Protocol)– also called routed
uses Distance—Vector Routing method
•A Routing table may contain information about
– NET__DESTINATION
– HOP COUNT
–Interface of this router for the next hop
– NEXT HOP (IP Address of Router)
•Every Router in an Autonomous System
-- shares with its neighbours
-- the entire information
-- periodically
RIP Updating Algorithm: On receipt of an RIP message:
1.Add one hop count to the hop count for every advertised destination.
2. For each advertised destination, repeat:
If (destination NOT in Routing Table),
Add the advertised information to the table.
Else
If (Next Hop field is the SAME),
Replace entry in the Table with the advertised one.
Else
If ((advertised hop count)<(one in the Table))
Add it to the Routing Table,
Else
Do nothing.
Return.
RIP: Example
• Ex.
a
R1
b
d
N2
R2
e
N4
f
R3
c
N6
R6 n
N3
N7
g
m
N5
k
R5
j
N1
i
R4 h
RIP:
Example:
Initial Routing tables
R1
R2
R3
R4
N1
-
-
-
1 i 1 j -
N2
1a
1d
-
-
-
N3
1b
-
-
-
1K -
N4
-
1e
1f
-
-
-
N5
-
-
1g
1h
-
-
N6
1c
-
-
-
-
1m
N7
-
-
-
-
-
1n
R5
R6
-
RIP:
R1
N1 2 b
N2 1a
N3 1 b
N4 2a
N5 3 b
N6 1 c
N7 2 c
Example:
Final Routing tables
R2
R3
R4
R5
R6
3d
2g
1i
1j
3m
1d
2f
3h
2k
2m
2d
1e
2e
2d
3d
3f
1f
1g
3f
4f
2i 1k 2m
2 h 3j
3m
1 h 2j 4 m
3i 2k 1m
4i 3k 1n
•Encapsulated in UDP User Datagram (UDP port 520 for RIP)
•PROBLEMS:
–SLOW CONVERGENCE: Use a maximum span of 15.
A hop count of 16 is considered to be at an infinite distance.
–INSTABILITY
INSTABILITY
•Let N1 fail after some time.
•Assume that immediately after the failure, R1 receives an update message from R2.
This will lead to back and forth updating of
the routing tables of R1 and R2 for N1 till
N1
R1
N2
R2
N3
both the routers reach a cost of 16 and realize that there is no access to N1.
•To solve the problem of Instability, we use the following techniques:
–TRIGGERED UPDATE
–SPLIT HORIZON OR POISON REVERSE
TRIGGERED UPDATE
•When there are no changes in the network: Updates are sent every 30 seconds.
•However in case of change, the router ( which senses the change) sends out the update IMMEDIATELY.
•However this method does not solve the problem in case the instability arises due to failure of the router.
SPLIT HORIZON
•
•Update regarding N1 : initially received by
•R2 from the left interface.
• So R2 will not send, in its update message to R1, information about N1.
•Similarly R1’s update message to R2 does not contain any item regarding N3.
N1
R1
N2
R2
N3
POISON REVERSE
•In this case also, the messages for different interfaces are different– as in the SPLIT HORIZON method.
•In this case, information about N1 will be sent to R1 by R2. But in the update message from R2 to R1, for
N1, the metric will be always 16, so that R1 will never consider accessing N1 through R2. •Similarly R1’s
update message to R2 will give a metric of 16 for N3.
ROUTERS : LINK—STATE ROUTING SHORTEST PATH FIRST ROUTING
•Consider the Routers as Nodes in a graph. There is a LINK between two Nodes if the corresponding
routers can communicate directly.
•Two Routers are Neighbors only if they share a link.
•Two Basic Messages:
•(i) k of n tests for neighbors being alive & reachable.
•(ii)Periodic broadcast of the status of each of its links.
•Each Router computes routes to the destination independently using DIJKSTRA SPF Algorithm.
•OSPF (Open Shortest Path First) Protocol
Share knowledge about neighbours
Flooding process: each router sends, from all its interfaces, information about the state of
its neighborhood. Each router, which receives the packet, sends copies to all its neighbors.
Send only when there is a change
•ENCAPSULATION
–IN IP packets with PROTOCOL field value of 89 in IP header.
ROUTERS : Problems With Internet
1. Class B address exhaustion
2. Routing Table explosion.
3. Address Depletion.
–By 1999, 50% of address space was allocated.
–But only 3% of the allocated space was actually populated with hosts.
–The best usage was for Class C where it was estimated that 7% of the space was utilized.
–CIDR could help us achieve a higher utilization route.
•Hence the problems of Address Depletion and Class B address exhaustion could be sorted out by a
protocol which permitted the use of CIDR.
Exterior ROUTERS
•For exterior routing, Distance-Vector is not used because of the following problems:
–There are occasions when the route with the smallest hop-count may not be preferred.
–Unstable because it announces only the number of hop counts to the destination and not the path.
–Thus let a Router Rx have a hop count m to a Network Nm. Using this information, its neighbor Ry may
have an entry for Nm giving a hop count of m+1 (through Rx). If now the path from Rx to Nm changes to a
hop count greater than m+2, and if before Rx advertises this change to Ry, Ry advertises to Rx, Rx will be
fooled to misconnect its table in accordance with the entry advertised by Ry.
•Normally, Distance-Vector Routing is good for a system of about 15 routers---- as a thumb rule---- so that
Routing messages do not become very large.
•Link-State Routing is also not a good candidate---- for exterior routing---- because the Internet is too big
for this method.
–The data-base for the whole of the system will be large. Dijkstra algorithm will take a long time to
calculate.
–And in a large system , changes would be occurring and therefore recalculation would become necessary
fairly often.
•Recommended maximum size: 200 Routers for an OSPF system.
ROUTERS :
BGP
•BGP
1989
Now v4 1994
EXTERIOR ROUTING PROTOCOL
•conveys
REACHABILITY (NOT ROUTING)
•BGP uses the method of PATH VECTOR ROUTING:
•Example:
Network
Next Router
Path
N01
N02
R01
R05
AS14, AS23, AS67
AS22, AS67, AS89
•BGP Peers:
•Two Autonomous systems can exchange routing information by each one of them designating a Router to
represent the autonomous system.
•Such routers are called Border Routers. The two of them are called BGP peers.
•Procedure:
•On receipt of a BGP message, the Router:
–Verifies that the advertised path is in agreement with its policy;
–Checks to see its Autonomous Path number is not in the path list (to avoid looping).
•Then it updates its routing table. It modifies the message by adding its AS number to the path and by
replacing the next hop entry with its own identification. Then it sends the message to its neighbors.
•LOOP PREVENTION
If RECD MESSAGE contains its AS number—IGNORE the message.
•POLICY ROUTING
•ENCAPSULATION
in TCP with port number 179; So Reliable.
•INCREMENTAL UPDATES
•SUPPORT FOR CLASSLESS ADDRESSING
•AUTHENTICATION
DNS
RIP
FTP
SMTP
TELNET
BGP
OSPF
UDP
TCP
ICMP
IP
ARP
RARP
Data Link Layer
Physical Layer
•Ethernet Type
–ARP
–RARP
–IP
080616
803516
080016
•IP Protocol
–OSPF 89
–UDP 17
–TCP
6
–ICMP 1
••UDP
–RIP
–DNS
Ports
520
53
•TCP Ports
–BGP
179
–DNS
53
–SMTP
25
–TELNET 23
–FTP
21
–HTTP
80
–Lotus Notes 1352
–HTTP PROXY 8080
•There are many differences between the way UDP and TCP handle ports.
•Response to a message to an Unreachable Port:
–UDP:
•ICMP PORT UNREACHABLE is conveyed to the Sender.
–TCP:
•Sends a TCP segment with RST and ACK flags to the Sender.