ospf.ppt

23
Interior Gateway Protocols (RIP, OSPF) continued… Sandeep Nijsure Madhuri Raju Chamarthi

Upload: techdude

Post on 14-Nov-2014

9.334 views

Category:

Documents


0 download

DESCRIPTION

 

TRANSCRIPT

Page 1: OSPF.ppt

Interior Gateway Protocols (RIP, OSPF)continued…

Sandeep Nijsure

Madhuri Raju Chamarthi

Page 2: OSPF.ppt

Open Shortest Path First (OSPF)

• Interior Gateway Protocol (IGP) for TCP/IP based internets, i.e. used within an Autonomous System (AS).

• Uses Link-state routing

• “Open” stands for publicly available specification.

Page 3: OSPF.ppt

A comparison of routing philosophies

Distance-vector routing Link-state routingEach router sends routing information to its neighbors.

The information sent is an estimate of its path cost to all networks

Information is sent on a regular periodic basis.

A router determines next-hop information by using the distributed Bellman-Ford algorithm on the received estimated path costs

Each router sends routing information to all other routers

The information sent is the exact value of its link cost to adjacent networks.

Information is sent when changes occur.

A router first builds up a description of the topology of the internet and then may use any routing algorithm to determine next-hop information (usually Dijkstra’s shortest path)

Page 4: OSPF.ppt
Page 5: OSPF.ppt

Mapping between AS configuration and resulting directed graph

• Two routers joined by a point-to-point link are represented in the graph as being directly connected by a pair of edges, one in each direction (e.g. routers 6 and 10)

• When multiple routers are attached to a network (such as a LAN or packet-switching network), the directed graph shows all routers bi-directionally connected to the network vertex (e.g. routers 1,2,3, and 4 all connect to network 3) Note that cost from network vertex to router is always zero.

• If a single router is attached to a network, the network will appear in the graph as a stub connection (e.g. network 7)

• An end system, called a host can be directly connected to a router (why should it be?), in which case it is depicted in the corresponding graph (e.g. host 1)

• If a router is connected to other autonomous systems, then the path cost to each network in the other system must be obtained by some exterior routing protocol (like BGP). Each such network is represented on the graph by a stub and an edge to the router with the known path cost (e.g. networks 12 through 15).

Page 6: OSPF.ppt
Page 7: OSPF.ppt

SPF tree for router RT6 (which is at the root)

Page 8: OSPF.ppt

Destination Next Hop Distance

N1 RT3 10

N2 RT3 10

N3 RT3 7

N4 RT3 8

Ib * 7

Ia RT10 12

N6 RT10 8

N7 RT10 12

N8 RT10 10

N9 RT10 11

N10 RT10 13

N11 RT10 14

H1 RT10 21

RT5 RT5 6

RT7 RT10 8

RT6’s routing table listing local destinations

Page 9: OSPF.ppt

Destination Next Hop Distance

N12 RT10 10

N13 RT5 14

N14 RT5 14

N15 RT10 17

RT6’s routing table listing external destinations

Page 10: OSPF.ppt

Concept of Designated Router (DR)

• A multi-access network is a network that supports the attachment of multiple (more than two) routers. Each pair of routers on such a network is assumed to be able to communicate directly. The network might be broadcast (e.g. Ethernet) or non-broadcast.

• In such a network, each router is connected to each other. Each will generate a reachability message for each reachable neighbor. Thus if K routers are up in a network, each will generate K-1 messages, thus a total of K(K-1). This is superfluous.

• Also, if each router exchanges topological databases with all others, it will create a high network traffic. This is superfluous, too.

• So OSPF allows such a network to have a designated router. It exchanges topological databases with all routers, so that it always has the full information. It also sends link state advertisements which describe all the routers attached to that network.

• Individual routers then do not have to indicate the reachability of each of their neighbors. • These routers are said to have an ‘adjacency’ with the DR. They only indicate that they

are connected to DR. All OSPF packets except ‘Hello’ are communicated only over such adjacencies. Adjacency is thus more important than neighborhood.

Page 11: OSPF.ppt

OSPF areas

Page 12: OSPF.ppt

OSPF areas

• Partitioning the networks and routers in an AS into subsets called areas. • Knowledge of an area’s topology remains hidden from other areas. The topological databases have to

be maintained only inside the area, so the link state advertisements are flooded only inside that area.• Less network traffic.• Less CPU power required in each router. • Thus, permits growth and makes the networks in an AS easier to manage.• The areas are connected by a backbone over which the area border routers communicate. • 2 types of routers

– Internal routers having interfaces only in one area (e.g. RT1, RT2) or only in backbone (RT6). – Area border routers which attach to multiple areas, including the backbone (RT3 and RT4).

Page 13: OSPF.ppt

What does a OSPF router do?

• It first initializes the routing protocol data structures• Waits for indication from the lower-level protocols that its interfaces are

functional.• Uses OSPF’s Hello protocol to acquire neighbors. Sends Hello packets to

its neighbors and in turn receives their Hello packets.• Attempts to form adjacencies with some of its newly acquired neighbors.

Topological databases are synchronized between pairs of adjacent routers.• Periodically advertises its link state. Also advertises when the link state

changes. The link state reflects its interfaces to networks, adjacencies to other routers connected by point-to-point network, and adjacencies to Designated router in multi-access networks .

• Sends link state advertisements received from other routers over its adjacencies.

Page 14: OSPF.ppt

What does a OSPF router do? (contd..)

• If it is an AS boundary router :– Originates AS external link advertisements for each known AS

external destination.

• If it is an Area Border Router– Originates a summary links advertisement describing each known

inter-area destination for routers inside the area.– Originates a summary links advertisement describing each of the

networks inside the area, for use of other area border routers

• If it is a Designated router for a multi-access network:– Originates a network link advertisement giving the network no. of

the multi-access network, and the router IDs of the routers attached to it.

Page 15: OSPF.ppt

The OSPF packet header

• Type : The OSPF packet types are as follows. The format of each of these packet types is described in a succeeding section.

– Type Description

• 1 Hello

• 2 Database Description

• 3 Link State Request

• 4 Link State Update

• 5 Link State Acknowledgment

• Packet length The length of the protocol packet in bytes. This length includes the standard OSPF header.

• Router ID The Router ID of the packet’s source. In OSPF, the source and destination of a routing protocol packet are the two ends of an (potential) adjacency.

• Area ID A 32 bit number identifying the area that this packet belongs to. All OSPF packets are associated with a single area. Most travel a single hop only.

• Autype It can be no authentication or a simple password

Page 16: OSPF.ppt

Hello Message

• Network mask The network mask associated with this interface. • HelloInt The number of seconds between this router’s Hello packets.• Rtr Pri This router’s Router Priority. Used in (Backup) Designated Router election. If

set to 0, the router will be ineligible to become (Backup) Designated Router.• Deadint The number of seconds before declaring a silent router down.• Neighbor The Router IDs of each router from whom valid Hello packets have been seen

recently on the network. Recently means in the last DeadInt seconds. (This is to ensure bi-directional communication.)

Page 17: OSPF.ppt

Database Description Message

•Options – The optional capabilities supported by the router•I-bit – The init bit. When 1, this packet is the first one in the sequence of Database description packets•M-bit – The more bit. When 1, it indicates that more Database description packets to follow•MS-bit The Master/Slave bit. When set to 1, it indicates that the router is the master during the database exchange process. Otherwise, the router is the slave.•Note that only the header of the link state is sent, and not the entire link info.

Page 18: OSPF.ppt

Link State Request Message

• Link State type– 1 : Router link

– 2 : Network link

– 3 : Summary link (link to IP network)

Inside ABR’s area or outside.

– 4 : Summary link (link to AS border router)

– 5 : External link (link to network in another AS)

Page 19: OSPF.ppt

Link State Update Message

• Routers send the status of links with a link status update message. These are flooded.• Link state update message is also sent in response to a link state request message after the database exchange

process. • Each link state update message has to be acknowledged, using Link state acknowledgement packet, which is very

similar to the above format.

Page 20: OSPF.ppt

Link State Advertisement Header

• There are 5 distinct types of link state advertisements (described before), which have the 20 byte header in common. The part after the header is different for each. The most important data in that part is cost of the link.

• LS age The time in seconds since the Link State advertisement was originated.• Link State ID The contents of this field depend on the advertisement’s LS

type. For example, in network links advertisements the Link State ID is set to the IP interface address of the network’s Designated Router (from which the network’s IP address can be derived). In a summary links adv., this field is set to the network no. of the IP network being described.

• LS sequence number Detects old or duplicate link state advertisements. Successive instances of a link state advertisement are given successive LS sequence numbers.

• Advertising Router The Router ID of the router that originated the link state advertisement.

Page 21: OSPF.ppt

Some facilities provided by OSPF

• Type of service routing. Instead of providing the link cost in terms of just one metric like hop count, different costs can be specified for different types of service, e.g. a satellite link will have a low cost for the bandwidth metric, but a high cost for delay metric. Routers may keep different routing tables for different types of service, and choose the route depending on type of service field in IP header.

• OSPF has provision for authentication scheme like a simple password for an area. This guards against routers inadvertently coming up in the area. They must first be configured with their attached networks’ passwords before they can join the routing domain. This also guards against imposters. Different areas can use different authentication schemes.

Page 22: OSPF.ppt

Advantages of OSPF over RIP

• Network bandwidth is saved because routing information is not sent frequently as in RIP.

• Suitable for autonomous systems of length more than 15.

• OSPF converges much faster than RIP. It also avoids routing loops

• Though slow convergence problem is solved by use of triggered updates, but still the update avalanche problem does not arise.

• Even though RIP operates over UDP, it does not check whether neighbors have received the updates sent, so RIP packets may get lost and timeouts may occur. OSPF checks this through the use of acknowledgements between neighbors.

Page 23: OSPF.ppt

Drawbacks of OSPF

• Link state advertisements which are flooded through the autonomous system take up considerable amount of bandwidth, which is directly proportional to the connectivity of the network.

• Complex to implement than RIP.

• Since the shortest path calculations for the entire AS take place inside a router, they require more CPU power than RIP routers. Since the entire topological database is to be stored, they need more router memory.(This drawback can be reduced when areas are used)