330 likes | 339 Views
Learn about basic networking tasks, including addressing, congestion, and routing protocols. Dive into soft state maintenance, LAN connectivity, and IP solutions to enhance your network management skills.
E N D
Computer Networks2002/2003 Routing Johan Lukkien Johan J. Lukkien, j.j.lukkien@tue.nl TU/e Computer Science, System Architecture and Networking
Layer tasks • Basic service • addressing, data format, fragmentation, congestion, error messages • Neighbor greeting • configuration: routers find out about their environment, (other routers, end-stations) • Routing • forwarding, route computation & selection • methods, protocols • dynamic, based on metrics (e.g., delay, bandwidth, link error rate) or static • Quality of the service • Requirements: • robustness, stability • preferable: automatic configuration (e.g. assigning addresses) • Slides following: assume connection-less service Johan J. Lukkien, j.j.lukkien@tue.nl TU/e Computer Science, System Architecture and Networking
Neighbor greeting • ....(Auto-)configuration • End nodes • find adjacent routers • see difference between locally accessible nodes and those accessible through a router • find link addresses of adjacent nodes • find out own network address • Routers, in addition • find network addresses of end nodes • Note • dependent on type of connection (point-to-point, LAN) Johan J. Lukkien, j.j.lukkien@tue.nl TU/e Computer Science, System Architecture and Networking
Soft state • Typically, state information that is only temporary valid • values of variables of other processes, machines • state of environment, connections • in principle, invalidation is interference • Note: making copies violates the principle: “never copy volatile information” • however, for scalability a replication strategy of shared objects is needed • Methods to maintain consistency • send updates & ‘keep-alive’ messages • depends on modification frequency & timers • only upon interaction, request ‘I’m alive’ message • e.g. refresh a router table entry only upon message sent Johan J. Lukkien, j.j.lukkien@tue.nl TU/e Computer Science, System Architecture and Networking
Finding things: service advertisement & discovery • Use a –local– database • e.g. look it up in a phone book • Use a special location to find that database • e.g. dial the telephone directory service • giving either the nearest or all service providers • Broadcast what you’re looking for • dial a number that rings all phones and tell what you ned • Broadcast the service that you provide • dial the same number and tell what you’ve got Johan J. Lukkien, j.j.lukkien@tue.nl TU/e Computer Science, System Architecture and Networking
Issues on a LAN • E? need their layer 3 addresses • R? need to know and announce enough info (e.g., layer 3 addresses) such that packets for E1,E2 will be forwarded to the LAN • R? need to know link addresses of adjacent nodes • E? need to know the data link address of an adjacent router • E1, E2 should be able to communicate directly • E? should be able to find the best router per partner • Nodes on the same LAN do not depend on routers to communicate Johan J. Lukkien, j.j.lukkien@tue.nl TU/e Computer Science, System Architecture and Networking
IP solutions • Routers know network number and mask of each of their outgoing links (2) • manually configured • On that link you find the link address of the next hop (endnode or router) through the Address Resolution Protocol (3,5,7) • A router can send an ICMP ‘redirect’ message: “for D, use this router IP, not me” (6) • why IP and not data link address? Johan J. Lukkien, j.j.lukkien@tue.nl TU/e Computer Science, System Architecture and Networking
ARP (RFC 826) • Message as payload of LAN message • next protocol is (R)ARP (e.g. 16#806 on ethernet) • cannot leave the LAN as such • protocol: where resolution is requested for • Broadcast request, unicast reply • test: use own IP address • Upon receipt of request or reply • add association to cache • answer request, if requested target Johan J. Lukkien, j.j.lukkien@tue.nl TU/e Computer Science, System Architecture and Networking
ARP– Example • Router F1, F3 can serve as ARP proxy • advantage/disadvantage • ...or source knows if destination is off the network Johan J. Lukkien, j.j.lukkien@tue.nl TU/e Computer Science, System Architecture and Networking
Reverse ARP (RFC 903), BOOTP (RFC 951) • Find IP address corresponding to given data link address (1) • basic auto-configuration • although it needs a server that is configured with this association • Extended into BOOTP (1,4) • message in IP packet • router (“relay agents”) can forward the message • how to deal with addressing? • can specify a host/bootfile combination • vendor specific options • rather than (type, length, value) encoded fields • repaired by the special vendor-specific field 63.82.53.63 (4 bytes, hex.) .... “magic cookie” Johan J. Lukkien, j.j.lukkien@tue.nl TU/e Computer Science, System Architecture and Networking
DHCP (1,4) • Extends BOOTP • packet includes magic cookie and option 16#53 • Extra’s • dynamic address assignment • using leases • re-use of addresses • no database needed • no addresses needed for powered-off nodes Johan J. Lukkien, j.j.lukkien@tue.nl TU/e Computer Science, System Architecture and Networking
DHCP • Fields • Seconds: either to obtain priority or specifying relay delay • flags<>0: reply to broadcast address • client IP=0: server fills in your id • relay IP<>0: server responds to that address • options: routers, subnet mask, DNS servers, time servers, lease time • reuse host-name and boot-file name space: option ‘overload’ to store options there as well • at most 256 options, half of which are free to use Johan J. Lukkien, j.j.lukkien@tue.nl TU/e Computer Science, System Architecture and Networking
DHCP example • Can have server on different net Johan J. Lukkien, j.j.lukkien@tue.nl TU/e Computer Science, System Architecture and Networking
ICMP Router Discovery (RFC 1256) (4) • Routers advertise every 7-10 minutes • valid for 30 min. default • to broadcast address or unicast to configured address • Clients send sollicitations • destination: see above Johan J. Lukkien, j.j.lukkien@tue.nl TU/e Computer Science, System Architecture and Networking
IPX solutions • Node number is link local address • Broadcast request for network number (1,3,5,7) • no reply: 0 • Broadcast request for best router to given destination network (4,6) • replying router is indeed alive Johan J. Lukkien, j.j.lukkien@tue.nl TU/e Computer Science, System Architecture and Networking
Routing protocols • Generally: robust, stable, simple, .... • Provide routers with information – issues: • convergence, settling time after change • “count-to-infinity” problem • lazy, reactive • existence of (temporary) loops • long- or short-lived • hierarchy • Calculate routes (routing algorithm) – issues: • optimality • delay per packet, network use • adaptive • deal with special conditions • congestion, mobility • support multiple paths Johan J. Lukkien, j.j.lukkien@tue.nl TU/e Computer Science, System Architecture and Networking
The Optimality Principle • A subnet. • A sink tree for router B. • Optimal paths to a certain point form a tree (or acyclic graph) • Each router B needs to be able to determine NextB(x): the next step on the path to from B to x Johan J. Lukkien, j.j.lukkien@tue.nl TU/e Computer Science, System Architecture and Networking
Determine the tables • Using a distributed algorithm • distributed shortest path • similar to distributed spanning tree but now for each node as root • basis for “Distance Vector Routing” • Using a local, sequential algorithm • based on information obtained directly from the point of change • e.g. locally, the shortest path algorithm of Dijkstra • basis for “Link State Routing” Johan J. Lukkien, j.j.lukkien@tue.nl TU/e Computer Science, System Architecture and Networking
Dijkstra’s algorithm – sketch • Note: the dot denotes infinity Johan J. Lukkien, j.j.lukkien@tue.nl TU/e Computer Science, System Architecture and Networking
Distance Vector Routing • A subnet • Input from A, I, H, K, and the new routing table for J Johan J. Lukkien, j.j.lukkien@tue.nl TU/e Computer Science, System Architecture and Networking
“Counting to infinity” • Good news spreads rapidly • Bad news spreads slowly • since the distance to a destination D through a neighbor cannot differ very much from your own Johan J. Lukkien, j.j.lukkien@tue.nl TU/e Computer Science, System Architecture and Networking
Link State Routing • Each router does the following (repeatedly): • discover neighbors, particularly, learn their network addresses • using one of the neighbor discovery methods discussed before • measure cost to each neighbor • e.g. by exchanging a series of packets • construct a packet containing this • send this packet to all other routers • using what route information? chicken / egg • what if re-ordered? or delayed? • compute locally the shortest path to every other router when this information is received Johan J. Lukkien, j.j.lukkien@tue.nl TU/e Computer Science, System Architecture and Networking
Distributing the Link State Packets • Typically, flooding • routers recognize packets passed earlier • sequence number • thus avoiding the exponential packet explosion • first receivers start changes already while changes are being reported • sequence numbers wrap around or might be corrupted • add an additional age field that is decremented once a second – packets won’t be too long in the system • but, need additional robustness in order to deal with effect of packet forgeing • acknowledgements Johan J. Lukkien, j.j.lukkien@tue.nl TU/e Computer Science, System Architecture and Networking
Building Link State Packets • A subnet • The link state packets for this subnet Johan J. Lukkien, j.j.lukkien@tue.nl TU/e Computer Science, System Architecture and Networking
Hierarchical Routing Johan J. Lukkien, j.j.lukkien@tue.nl TU/e Computer Science, System Architecture and Networking
Routing for Mobile Hosts Johan J. Lukkien, j.j.lukkien@tue.nl TU/e Computer Science, System Architecture and Networking
Routing for Mobile Hosts Johan J. Lukkien, j.j.lukkien@tue.nl TU/e Computer Science, System Architecture and Networking
The IP way • Internet is made up of autonomous systems (AS) • routing within an AS: interior gateway protocol • originally, RIP – routing information protocol • distance vector, derived from Bellman-Ford • first link state protocol was not robust enough • Open Shortest Path First: (OSPF) since ‘90 • routing between AS’s: exterior gateway protocol • Border Routing Protocol Johan J. Lukkien, j.j.lukkien@tue.nl TU/e Computer Science, System Architecture and Networking
OSPF • Resources assumed to be freely usable since within AS • Requirements • Open, known to everyone • Support several metrics • Dynamic adaptation • note: stability is important here • Use multiple paths – load balancing • Hierarchy • Safeguard against forged routing info • Tunneling support Johan J. Lukkien, j.j.lukkien@tue.nl TU/e Computer Science, System Architecture and Networking
Represent network as a graph • Essentially three types of connection • point-to-point • LAN (broadcast link) • multi-access without broadcast Johan J. Lukkien, j.j.lukkien@tue.nl TU/e Computer Science, System Architecture and Networking
AS’s, backbones, and areas • AS divided into numbered areas • One area(0) is called the backbone area • All areas connected to the backbone • inter-area routes go through backbone • Each router runs the link-state algorithm for each area it is part of • flooding between adjacent routers • on a LAN: designated router Johan J. Lukkien, j.j.lukkien@tue.nl TU/e Computer Science, System Architecture and Networking
Message • IP packets 5-66 Johan J. Lukkien, j.j.lukkien@tue.nl TU/e Computer Science, System Architecture and Networking
BGP • Between managerial (political?) domains • not my problem.... • rule-based • Distance vector • but keeps track of paths • which are matched against the rules • and solve the counting to infinity Johan J. Lukkien, j.j.lukkien@tue.nl TU/e Computer Science, System Architecture and Networking