Download presentation
Presentation is loading. Please wait.
Published byStephany Hawkins Modified over 9 years ago
1
ICS 156: Networking Lab Magda El Zarki Professor, ICS UC, Irvine
2
Course Outline n Ch 1: Introduction n Ch 2:Bridges n Ch 3:Routers n Ch 4: Transport Protocols
3
Ch. 3 Routers n The role of Routers n Routing n The Role of ICMP in Routing n RIP n OSPF
4
3.1 What are Routers n Routers are network devices that operate at layer 3. n They route (“forward”) IP datagrams hop- by-hop through a network from source to destination over different subnets and autonomous systems.
5
Router in Operation
6
3.2 Routers and Routing
7
3.2.1 Functions of Routers n Routers have an IP address per network connection n Routers are used to create subnets or interconnect two or more different networks n Subnet masks are used for routing purposes. A mask will indicate whether the host is on the same subnet or needs to be forwarded to another subnet.
8
3.2.2 Operation of Routers (1/2) n Each network connection has associated with it an ARP module if it is connected to a broadcast network such as Ethernet n ARP: Address Resolution Protocol. Used to find the physical address. Creates a cache in which it stores all its IP to physical address mappings. n IP routing tables identify what to do with each packet (i.e., what interface to use for transmitting the datagram).
9
3.2.2 Operation of Routers (2/2) n Routing mechanism: the action of looking an address up in a table and deciding what to do with the IP datagram -> Performed by IP n Routing policy: the actual algorithms that are use to make routing calculations and fill the routing table with forwarding entries -> Performed by a routing daemon
10
Ch 3. Routers n The role of Routers n Routing n The Role of ICMP in Routing n RIP n OSPF
11
3.3 IP Routing Mechanism n Search for a matching host address n Search for a matching network address n Search for a default entry (default is specified by a net_address of “0”)
12
3.4 A Routing Table For Host 62.100: DestinationMaskGatewayFlagsUseInterf ace 130.91.63.100255.255.255.255130.91.62.2UGH171eth0 130.91.61.0255.255.255.0130.91.62.1UG113eth0 130.91.64.0255.255.255.0130.91.62.2UG544eth0 130.91.62.0255.255.255.0*U913eth0 127.0.0.1255.0.0.0*UH95lo default0.0.0.0130.91.62.1UG786eth0
13
3.4.1 Flags n U: The route is up n G: The router is to a gateway (router). If this flag is not set the destination is directly connected n H: The route is to a host, that is the destination is a complete host address. If this flag is not set, the route is to a network, and the destination is a network address (net ID or net ID and subnet ID)
14
3.4.1 Flags contd. n D: The route was created by a redirect n M: The route was modified by a redirect.
15
Routers n The role of Routers n Routing n The Role of ICMP in Routing n RIP n OSPF
16
3.5 ICMP and Routing n ICMP is used to indicate an error condition related to routing. n If a solution is feasible, i.e., a route is available, then ICMP is used to indicate the new route to the source, redirect message. n If a solution is not feasible, i.e., a route is not available, then it is used to indicate that the destination host is unreachable.
17
3.5.1 ICMP Redirects n When a source sends a packet to a gateway for forwarding, and that gateway is not the default next hop, then the gateway will forward the packet to the appropriate gateway. It then uses ICMP to send a message to the source giving it the gateway IP address that should be used next time in conjunction with that destination. n If one examines the routing table after an ICMP redirect, we see that a new entry has been added and the flag “D” inserted to indicate its source.
18
3.5.2 ICMP Discovery Messages n To initialize a routing table, one can use manually entered routes or the host can use what is called a router solicitation message. n The locally connected routers will respond with a router advertisement message. n Usually routers periodically broadcast their router advertisements so that hosts can update their tables. n Each advertisement can carry several addresses and a lifetime that indicates how long an address will be valid for.
19
3. Routers n The role of routers n Routing n ICMP and Routing n Types of routers n RIP n OSPF
20
3.6 Types of Routers (1/5)
21
3.6 Types of Routers (2/5) n Customer, regional and backbone networks are all called autonomous systems (AS). n An AS consists of a collection of interconnected networks run by a single organization. n ASs are interconnected via gateways. n Several regional networks can exist in an area. n Several backbone networks make up the core backbone.
22
3.6 Types of Routers (3/5) n Gateways (routers) interconnect the different parts of the internet n Border gateways (BG) are used to connect to the backbone. n Interior gateways (IG) are used within a single AS.
23
3.6 Types of Routers (4/5) n Note that they are all routers, but, because they have different responsibilities, they are given different names. n BGs use the BG protocol (BGP) for routing. n IGs use IG protocol (IGP) for routing.
24
3.6 Types of Routers (5/5) n If two routers are attached over a point to point link, this is still considered as a network to the routers, it just does not have any other network devices on it except for the router at the other end. n Because of the way the internet has grown, most ASs don’t have a single network ID. They generally have several. This means that the gateways have to have many subnet masks, each one associated with every net ID in its AS. E.g., 158.32 & 131.90 are 2 class B addresses that maybe used by an AS.
25
3.7 RIP Protocol Stack
26
3.8 IGP n There are two routing protocols associated with IGP: –Routing information protocol (RIP): vector distance –Open shortest path first (OSPF): link state n RIP is the oldest and is still being used. OSPF was introduced later because it was felt that RIP would not able to handle the needs of the growing internet (not scalable).
27
3. Routers n The role of routers n Routing n ICMP and Routing n Types of routers n RIP n OSPF
28
3.9 RIP (1/4) n It uses distance vectors. The distance is measured in terms of hops, independent of link speed, or physical distance. Max. is 15 hops. n Each gateway sends its routing table to its neighbors every 30 secs. n Based on this local information it calculates routes. (Bellman-Ford Algorithm)
29
3.9 RIP (2/4) n Upon receipt of a neighbor’s routing table, the gateway checks to see if distances are shorter than what it has in its table. If a shorter distance is found, the entry is updated to reflect the new distance and corresponding gateway address. n Only one route to each destination. No alternate routes.
30
3.9 RIP (3/4) n The RIP protocol (routed daemon) is used to create/maintain the RIP routing table. n Then the IP routing table is constructed based upon the shortest hop path to each destination, i.e., the RIP routing tables. n The IP table entries consist of: Dest. IP address with appropriate mask (i.e net ID), Gateway IP address and interface identifier (i.e. which NIC).
31
3.9 RIP (4/4) n The IP routing table is used by the router when forwarding a packet. This constitutes the actual routing function within a router. n The IP address is then looked up in the NIC ARP table for the physical address.
32
3.9.1 Disadvantages of RIP (1/2) n Only one route - no load balancing n Only one measure for distance - hop count n Table changes only occur for major failures not net status n Formation of loops - slow convergence
33
3.9.1 Disadvantages of RIP (2/2) n Limited in its scope, cannot handle large internets (cannot take advantage of hierarchies) n No routing based on service type
34
3. Routers n The role of routers n Routing n ICMP and Routing n Types of routers n RIP n OSPF
35
3.10 OSPF (1/2) n This protocol solves many of the problems facing RIP, particularly scalability. It detects changes quicker and converges faster. n It is able to handle QoS: –Uses the service type field in IP packet to route different classes of traffic over different paths. n It was designed to allow for dynamic routing: –different types of metrics can be used to define the “shortest” path, e.g., delay, link utilization, physical distance, link bit rate, etc.
36
3.10 OSPF (2/2) n It allows for multiple routes per destination -> load balancing n Supports hierarchical structures n It was adopted as the IGP default routing protocol in 1990 and most routers now implement it. (RFC 1247)
37
3.10 Operation of OSPF (1/4) n Runs directly on top of IP. n Every AS has a backbone area “0.0.0.0” and is organized in a star fashion. n Any router connecting to two or more areas is called an area border router (ABR). n Routers that have an interface to the backbone are called backbone routers.
38
3.10 Operation of OSPF (2/4) n Routers within an area are called internal routers. n A router connected to the outside world, i.e., other AS, is called a boundary router. n Within an area, each router knows its route to every other router in the area including the backbone router(s) connecting the area to the backbone. All routers in an area have identical linkstate databases. n Routers connecting several areas must have the link status database of each area it is connected too.
39
3.10 Operation of OSPF (3/4) n As OSPF allows for type of service routing, each router maintains 3 link status databases: one for delay, one for throughput and one for reliability. n A packet may require an intraarea path, or an intraarea-interarea path or an intraarea-interarea- interAS path dpending on where the host is. n Routers in areas exchange link status packets (LSP) periodically. Each packet contains the following information: ID of node that created LSP, list of directly connected routers with the link cost, a sequence number and a time to live.
40
3.10 Operation of OSPF (4/4 n The routers use controlled flooding to reach every other router in the area. Note that only newer (higher sequence number) LSP are sent and they are not sent over the link that they were received from. n Given that each router has the LSP of all the other routers in the area, it can calculate independently what the shortest path to each router is. The LSP describe the network topology. (Dijkstra’s algorithm)
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.