Top Banner

of 48

MEN Part 1- Day4 -Ver1_NoRestriction

May 30, 2018

Download

Documents

h4harsh
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • 8/14/2019 MEN Part 1- Day4 -Ver1_NoRestriction

    1/48

    Network Learning CentreProprietary & Confidential

    11

    MEN Part 1

    50464928

  • 8/14/2019 MEN Part 1- Day4 -Ver1_NoRestriction

    2/48

    Network Learning CentreProprietary & Confidential

    22

    Agenda

    Day 4

    Module 5 OSPF

    Exercises

    OSPF - 5 labs

  • 8/14/2019 MEN Part 1- Day4 -Ver1_NoRestriction

    3/48

    Network Learning CentreProprietary & Confidential

    33

    Module 5Open Shortest Path First - OSPF

  • 8/14/2019 MEN Part 1- Day4 -Ver1_NoRestriction

    4/48

    Network Learning CentreProprietary & Confidential

    44

    Limitations of RIP

    Limit of 15 hops Slow convergence Metric Protocol for flat networks

    The rapid growth and expansion of today's networks has pushed RIP to its limits. RIPhas certain limitations that could cause problems in large networks:

    1. RIP has a limit of 15 hops. A RIP network that spans more than 15 hops (15 routers)is considered unreachable.

    2. RIP cannot handle Variable Length Subnet Masks (VLSM). Given the shortage of IPaddresses and the flexibility VLSM gives in the efficient assignment of IP addresses,this is considered a major flaw.

    3. Periodic broadcasts of the full routing table will consume a large amount of bandwidth. This is a major problem with large networks especially on slow links andWAN clouds.

    4. RIP converges slower than OSPF. In large networks convergence gets to be in theorder of minutes. RIP routers will go through a period of a hold-down and garbagecollection and will slowly time-out information that has not been received recently. Thisis inappropriate in large environments and could cause routing inconsistencies.

    5. RIP has no concept of network delays and link costs. Routing decisions are based onhop counts. The path with the lowest hop count to the destination is always preferredeven if the longer path has a better aggregate link bandwidth and slower delays.

    6. RIP networks are flat networks. There is no concept of areas or boundaries. With theintroduction of classless routing and the intelligent use of aggregation andsummarization, RIP networks seem to have fallen behind.

  • 8/14/2019 MEN Part 1- Day4 -Ver1_NoRestriction

    5/48

    Network Learning CentreProprietary & Confidential

    55

    OSPF Solutions

    No limitation on hop count Supports classless routing (route summarization) Routing updates sent only when there is a change Faster convergence then RIP Better load balancing Logical definition of areas Authentication and external routes tagging

    OSPF is classified as an Interior Gateway Protocol (IGP). This means that itdistributes

    routing information between routers belonging to a single Autonomous

    System. The OSPF protocol is based on link-state or SPF technology.

    OSPF (Open Shortest Path First) protocol was developed due to a need in theinternet community to introduce a high functionality non-proprietary InternalGateway Protocol (IGP) for the TCP/IP protocol family. The discussion of creatinga common interoperable IGP for the Internet started in 1988 and did not getformalized until 1991. At that time the OSPF Working Group requested that OSPF

    be considered for advancement to Draft Internet Standard.

  • 8/14/2019 MEN Part 1- Day4 -Ver1_NoRestriction

    6/48

    Network Learning CentreProprietary & Confidential

    66

    OSPF Concepts

  • 8/14/2019 MEN Part 1- Day4 -Ver1_NoRestriction

    7/48

    Network Learning CentreProprietary & Confidential

    77Page 7

    OSPF Overview

    OSPFOpen Shortest Path First OSPF is the most widely used IGP

    routing protocol OSPF is link state routing protocol OSPF is developed by IETF The latest RFC is RFC2328 and the

    version is version 2(For IPv4). The other RFC related to OSPF:

    rfc1583, rfc2178

    OSPF is the abbreviation of open shortest path first , it is described by RFC 2328,which is open to everyone, you can get this document freely from internet. OSPFis also an internal gateway protocol, which is running within an autonomoussystem .

    OSPF is a link state protocol. You can, for example, think of a link as being aninterface on the router. The state of the link is a description of that interface. Thisdescription would include its IP address, mask, and the type of network to which itis connected. OSPF using the SPF algorithm to calculate the best route, it is a loopfree routing protocol.

    Quiz

    Choose all the characteristics that OSPF applies ?( )

    A: open IGP routing protocol

    B: loop-free protocol

    C: support larger networks

    D: working between ASs

    What type of do you think of OSPF represents?

    A: distance vector

    B: Link state

    C: Balanced hybrid

  • 8/14/2019 MEN Part 1- Day4 -Ver1_NoRestriction

    8/48

    Network Learning CentreProprietary & Confidential

    88Page 8

    OSPF Features

    Loop-free Supporting large networks Fast route update and convergence Supporting ECMP( equal cost multi-path ) Dividing the whole routing domain into

    different areas Using multicast address Supporting VLSM Running on IP( the value of IP protocol field is

    89 ) Supporting authentication

    OSPF supports the large networks, for a good designed network, OSPF can support up to 1000 OSPF routers. OSPF supportsthe two levelOSPF is link-state routing protocol, so when a change occurs in the network topology, route update will be generate andflooding so all the OSPF routers will receive the update and then run the SPF algorithm quickly to build the new routingtable ,so it is fast convergence routing protocol.OSPF supports equal-cost multi-paths, allowing multiple next hops to be recorded for the same destination .OSPF supports the areas division to support the two-level hierarchy network, OSPF usually reduce the size of the SPFcalculation by partitioning the network into areas, the number of routers in an area and the number of link state informationthat flood only within the area are small ,which means that the link state database for an area is small , consequently ,the SPFcalculation is easier and takes less time ,so using the area divisions can reduce the protocol impact on CPU % memory .Using of reserved multicast addresses to reduce the impact on non-OSPF-speaking devices, OSPF using the 224.0.0.5 as thedestination IP address for the route update send out to all OSPF enable interface .OSPF supports the variable length subnet mask (VLSM) .OSPF is carried with IP packet, the value of protocol field in IP header is 89 . So OSPF only working the IP network,sometimes we call OSPF as IP routing protocol .

    Generally speaking ,Which IP address will OSPF use as the destination IP address when OSPF router sends the route updateout ?A : 224.0.0.5B ; 224.0.0.9C : 192.168.1.1D : any IP address depending on the network design

    Choose the correct answer which supports the VLSM ?A: OSPFB: RIP V1C: RIP V2

    What is the IP protocol number for OSPF packets?A: 89B: 86C: 179D: 520

  • 8/14/2019 MEN Part 1- Day4 -Ver1_NoRestriction

    9/48

    Network Learning CentreProprietary & Confidential

    99

    OSPF - Link State Protocol

    Link an interface on the router

    Link state description of the interface and the neighboring

    routers IP address, mask, type, routers connected to

    Link state database collection of link state advertisement for all routers

    and networks

  • 8/14/2019 MEN Part 1- Day4 -Ver1_NoRestriction

    10/48

    Network Learning CentreProprietary & Confidential

    1010Page 10

    OSPF Basic Concepts

    Router ID : A 32-bit number that uniquely identifies the router in the OSPF routing

    domain

    Router ID : A 32-bit number that uniquely identifies the router in the OSPF routing

    domain

    Cost : Cost is the OSPF metric. And is expressed as an unsigned 16-bit integer, from 1

    to 65535.

    Cost : Cost is the OSPF metric. And is expressed as an unsigned 16-bit integer, from 1

    to 65535.

    Router ID: The router ID is a 32 bit number assigned to each OSPF enabled router,which is used to uniquely identify the router within an autonomous system. Therouter ID calculated at boot time is the highest loopback address on the router; if noloopback interfaces are configured, the highest IP address on the router is used.Also you can manually configure the router id by yourself ,we recommendmanually configure the router id yourself . Certainly, the manually configured

    router id has the highest preference .

    Cost: Quidway router uses the formula 10 8/Bandwidth to calculate the cost for aninterface.

    Which of the following is the correct order for selecting the router id by the ospf router 1: manually configured router id2: highest physical IP address3: highest logical IP addressA: 1-2-3B: 1-3-2C: 3-2-1D: 2-3-1

  • 8/14/2019 MEN Part 1- Day4 -Ver1_NoRestriction

    11/48

  • 8/14/2019 MEN Part 1- Day4 -Ver1_NoRestriction

    12/48

    Network Learning CentreProprietary & Confidential

    1212Page 12

    Network Type (cont.)

    Point To Multi-Point Networks

    Non-Broadcast Multi-Access Network

    FR/ATM/X.25

    FR/ATM/X.25

    A point to multi-point environment is very similar to the point to point environment,no DR or BDR is chosen, all PVCs are treated as point to point links, the onlydifference is that all the PVCs go back to a single router.

    A point to multi-point network will send the hello packet every 30 seconds and theDead interval is four times the hello interval, 120 seconds . For all the ATM ,frame-relay and x.25 network ,the default network type is non-broadcast multi-access network, so there is no default network type for the point to multi-point, youshould manually configure the ATM , frame-relay ,x.25 network as a point tomulti-point network yourself .

    NBMA networks, such as X.25, Frame Relay, and ATM, are capable of connectingmore than two routers but have no broadcast capability. A packet sent by one of theattached routers would not be received by all other attached routers. As a result,extra configuration may be necessary for routers on these networks to acquire their neighbors. OSPF routers on NBMA networks elect a DR and BDR, and all OSPF

    packets are unicast.

    The difference between NBMA and point-to-multipoint:In OSPF protocol, NBMA and point-to-multipoint both mean Non-BroadcastMultipoint Access networks, but NBMA must meet the requirements of a fullmeshed network, namely, any two points can make access of the packets to theremote port possible without forwarding. Otherwise, we will call the network a

    point-to-multipoint network

    Quiz

    How many network type available in the OSPF network?

    A: 4

  • 8/14/2019 MEN Part 1- Day4 -Ver1_NoRestriction

    13/48

    Network Learning CentreProprietary & Confidential

    1313Page 13

    Designated Router AndBDR

    M= n(n-1)/2

    = 28

    M= (n-2) 2+1

    = 13

    DR

    BDR

    Multiaccess networks present two problems for OSPF, relating to theflooding of LSAs

    1. The formation of an adjacency between every attached router wouldcreate many unnecessary LSAs. If n is the number of routers on amultiaccess network, there would be n(n- 1)/2 adjacencies . Each router

    would flood n- 1 LSAs for its adjacent neighbors, plus one LSA for thenetwork, resulting in n 2 LSAs originating from the network.

    2. Flooding on the network itself would be chaotic. A router would flood anLSA to all its adjacent neighbors, which in turn would flood it to all their adjacent neighbors, creating many copies of the same LSA on the samenetwork.

    to solve this problem, OSPF designates a router, Designated Router, DR inshort, to be responsible for packet flooding. All the routers transmit their information through the routes to the DR only, then the DR transmits theroute information to other routers in this stub network. Two routers other than DR (DROther) no longer establish an adjacency relationship and nolonger exchange any route information. In this way, only adjacencyrelations of N in number will be needed to be established among therouters in the same stub network, and the route change every time will beforwarded for N times.

    BDR stands for the backup designated Router .

    Once the DR and BDR are selected, any router to the network establishedadjacencies with the DR and BDR only

    Each OSPF interface (multi-access network only) possesses a configurable

  • 8/14/2019 MEN Part 1- Day4 -Ver1_NoRestriction

    14/48

    Network Learning CentreProprietary & Confidential

    1414

    Network Types

    Point-to-point networks

    Point-to-multipoint networks Collection of point-to-point links Packets are multicast

    Broadcast networks (eg: Ethernet) Elect a DR and a BDR Packets are multicast

    Non-broadcast Multi-access (NBMA) networks (eg: X.25, Framerelay, ATM) Elect a DR and a BDR Packets are unicast

    Virtual links Packets are unicast

  • 8/14/2019 MEN Part 1- Day4 -Ver1_NoRestriction

    15/48

    Network Learning CentreProprietary & Confidential

    1515Page 15

    OSPF Area

    Area 0

    Area 1Area 2

    IR

    ABR

    BR

    ASBR

    To another AS

    As shown in the figure , a OSPF routing domain is divided into three OSPF areas.

    Area 0, also known as the backbone area ,if there is more than one area in theOSPF routing domain, backbone area must exist.

    OSPF using the area ID to identify the different areas, the value of area ID is from

    0 to 232 .

    After the area division in the OSPF routing domain, there are some roles for different OSPF routers.

    Internal Routers are routers which all interfaces belonged to the same area.

    Area Border Routers (ABRs) connect one or more areas to the backbone and actas a gateway for inter-area traffic.

    Backbone Routers are routers which at least one interface attached to the backbone.

  • 8/14/2019 MEN Part 1- Day4 -Ver1_NoRestriction

    16/48

  • 8/14/2019 MEN Part 1- Day4 -Ver1_NoRestriction

    17/48

    Network Learning CentreProprietary & Confidential

    1717Page 17

    OSPF Basic Concepts

    LSA: Link-State advertisement (LSA) is an OSPF data packet containing link-state and

    routing information that is shared among OSPF network

    LSA: Link-State advertisement (LSA) is an OSPF data packet containing link-state and

    routing information that is shared among OSPF network

    Link-State Database: Link-State Database (LSDB) is the collection of LSAs ,LSDB is

    used in calculating the best paths through the network .

    Link-State Database: Link-State Database (LSDB) is the collection of LSAs ,LSDB is

    used in calculating the best paths through the network .

    Link-State Advertisement : OSPF is a link state routing protocol ,so the routinginformation exchanged between the OSPF routers is called the link stateadvertisement. The state of the link is a description of that interface, and thedescription includes the IP address, mask, and the type of network to which it isconnected ,and all the link state advertisements are stored in a database ,which iscalled link state database ,or topology table .OSPF router periodically floods each

    LSA every 30 minutes by default.

    Because the LSA describe the OSPF router and the network it attached, so theLSDB is the topology of OSPF network, OSPF using all the LSA which stored inthe LSDB to calculate the best route to the destination network .

    QuizWhich of the following packet are used by OSPF router to exchange the routinginformation ?A: link state advertisement (LSA)B: link state packet (LSP)C: link information packetD: routing table

  • 8/14/2019 MEN Part 1- Day4 -Ver1_NoRestriction

    18/48

    Network Learning CentreProprietary & Confidential

    1818Page 18

    OSPF LSA

    Type LSA

    1 Router-LSA

    2 Network-LSA

    3 Summary-LSA

    4 ASBR-summary-LSA

    5 AS-external-LSA

    7 NSSA external-LSA

    Router LSAs( Type 1) are produced by each router. These LSAs lists all of arouter's links, or interfaces, the state and cost of each link, and neighbors on thelink. And these LSAs are flooded only within the area in which they are originated.

    Network LSAs( Type 2) are produced by the DR on every multi-access network( NBMA or Broadcast ). The Network LSA lists all attached routers, including theDR itself. and Network LSAs are flooded only within the originating area.

    Network Summary LSAs( Type 3) are generated by ABRs. They are sent into anarea to advertise destinations outside that area. An ABR also advertises thedestinations within its attached areas into the backbone with Network SummaryLSAs. Default routes external to the area, but internal to the OSPF routing domain,are also advertised by this LSA type.

    ASBR Summary LSAs( Type 4) are also originated by ABRs. ASBR SummaryLSAs are the same as Network Summary LSAs except that the destination theyadvertise is an ASBR, not a network. It tells other routers how to get to ASBR.

    Autonomous System External LSAs( Type 5), or External LSAs, are generated byASBRs. They advertise either a destination or a default route external to the OSPFrouting domain. Destination IP address, mask and cost are included in this LSAtype. They are flooded with the whole OSPF routing domain.

    NSSA External LSAs( Type 7) are generated by ASBRs within not-so-stubby areas(NSSAs). An NSSA External LSA is almost identical to an AS External LSA.Unlike AS External LSAs, which are flooded throughout the whole OSPF routingdomain, NSSA External LSAs are flooded only within the not-so-stubby area inwhich it was originated.

  • 8/14/2019 MEN Part 1- Day4 -Ver1_NoRestriction

    19/48

    Network Learning CentreProprietary & Confidential

    1919Page 19

    OSPF Packets

    Hello PacketHello Packet

    Database Description PacketDatabase Description Packet

    Link State Request PacketLink State Request Packet

    Link State Update PacketLink State Update Packet

    Link State Acknowledgment PacketLink State Acknowledgment Packet

    There are five type of OSPF packets which are used by OSPF routers to exchange the information.

    Hello packets are OSPF packet type 1. These packets are sent periodically on all interfaces inorder to establish and maintain neighbor relationships. In addition, Hello Packets are multicast onthose physical networks having a multicast or broadcast capability, enabling dynamic discovery of neighboring routers.

    Database Description packets are OSPF packet type 2. These packets are exchanged when anadjacency is being initialized. They describe the contents of the link-state database.

    Link State Request packets are OSPF packet type 3. After exchanging Database Description packetswith a neighboring router, a router may find that parts of its link-state database are out-of-date. TheLink State Request packet is used to request the pieces of the neighbor's database that are more up-to-date. Multiple Link State Request packets may need to be used.

    Link State Update packets are OSPF packet type 4. These packets implement the flooding of LSAs.Each Link State Update packet carries a collection of LSAs one hop further from their origin.Several LSAs may be included in a single packet.

    Link State Acknowledgment Packets are OSPF packet type 5. To make the looding of LSAsreliable, flooded LSAs are explicitly acknowledged. This acknowledgment isaccomplished through the sending and receiving of Link State Acknowledgment packets. MultipleLSAs can be acknowledged in a single Link State Acknowledgment packet

  • 8/14/2019 MEN Part 1- Day4 -Ver1_NoRestriction

    20/48

    Network Learning CentreProprietary & Confidential

    2020Page 20

    The Position of OSPF Packets

    Link Layer

    HeaderIP Packet Header

    OSPF Protocol

    Packet

    Frame

    Checksum

    Protocol Number: 89

    OSPF Protocol Header OSPF Packet Data

  • 8/14/2019 MEN Part 1- Day4 -Ver1_NoRestriction

    21/48

    Network Learning CentreProprietary & Confidential

    2121Page 21

    OSPF Packet Header

    Version Type Packet Length

    Router ID

    Area ID

    Checksum AuType

    Authentication

    Authentication

    Packet Data

    Header

    As we know that for most protocol ,it will cover the protocol header and the protocol body, it is the same to OSPF protocol .before we begin discuss the detailinformation inside the OSPF packet , we should have a basic understanding of theOSPF header:

    OSPF header contain the following information :Version : The OSPF version number. In todays network, all the OSPF router willrunning the OSPF version 2 or above ,but now we just talking about the OSPFversion 2.Type: The OSPF packet types are as follows

    Type Description ________________________________ 1 Hello2 Database Description3 Link State Request4 Link State Update5 Link State Acknowledgment

    Packet lengthThe length of the OSPF protocol packet in bytes. This

    length includes the standard OSPF header.Router ID

    The Router ID of the packet's source.Area ID

    A 32 bit number identifying the area that this packet belongs to. All OSPF packets are associated with a single area. Mosttravela single hop only. Packets travelling over a virtual link are labelled with the

    backbone Area ID of 0.0.0.0.

  • 8/14/2019 MEN Part 1- Day4 -Ver1_NoRestriction

    22/48

    Network Learning CentreProprietary & Confidential

    2222

    Hello Packet

    Content of Hello Packet

    Router id Area id of originating interface Address mask of originating interface Authentication of originating interface Hello Interval of originating interface Router Dead Interval of originating interface Priority DR/BDR Neighbors

    Hello Interval Lan 10s P-P 30s

    Hold down timer (Router Dead Interval) Lan 40s P-P 120s

  • 8/14/2019 MEN Part 1- Day4 -Ver1_NoRestriction

    23/48

    Network Learning CentreProprietary & Confidential

    2323

    OSPF Principle Intra area

  • 8/14/2019 MEN Part 1- Day4 -Ver1_NoRestriction

    24/48

    Network Learning CentreProprietary & Confidential

    2424

    How OSPF Works?

    Each router generates link-state advertisementsfor its links

    When no OSPF areas are configured, link-stateadvertisements are flooded to all routers

    It is crucial that all routers have identical link statedatabase

    Shortest path tree is calculated by all routers androuting tables are derived

    OSPF addresses most of the issues not included in RIP:

    1. With OSPF, there is no limitation on the hop count.

    2. The intelligent use of VLSM is very useful in IP address allocation.

    3. OSPF uses IP multicast to send link-state updates. This ensures less processing on routers

    that are not listening to OSPF packets. Also, updates are only sent in case routing changesoccur instead of periodically. This ensures a better use of bandwidth.

    4. OSPF has better convergence than RIP. This is because routing changes are propagatedinstantaneously and not periodically.

  • 8/14/2019 MEN Part 1- Day4 -Ver1_NoRestriction

    25/48

    Network Learning CentreProprietary & Confidential

    2525

    Link State Advertisement

    Generated in response to any change Contains:

    source identification sequence number link state age list of neighbors

    Used to securely deliver LSAs

    Every node sends the LSA on every link except the one from where itreceived itVery fast and very reliable, but wastes bandwidth

    Messages sent only when there is a change or every 30 minutesEach node compares the newly received LSA with the entry in the data

    base. If it is newer the database is updated

  • 8/14/2019 MEN Part 1- Day4 -Ver1_NoRestriction

    26/48

    Network Learning CentreProprietary & Confidential

    2626Page 26

    OSPF Operation

    OSPF operation can be divided into three categories

    Neighbor and Adjacency initializationNeighbor and Adjacency initialization

    LSA floodingLSA flooding

    SPF calculationSPF calculation

    OSPF operation can be divided into three categories1. Neighbor and Adjacency initialization2. LSA flooding3. SPF calculation OSPF routers send hello packets out all interface participating in the OSPF

    process. If the router and the router on the other sides of the connection agreeon the parameters set forth in the hello packet, the routers will form neighbor relationships .

    Some of the neighbors will adjacencies, Forming adjacencies is dependentupon the type of network the hello packet is being sent across and the type of routers exchanging the hello packets.

    The routers will send link state advertisement (LSAs) , which containdescription of the routers links and the state of each link to the adjacent router .

    The routers receive the LSAs will then record the information into their link state database and forward the LSAs on to their respective neighbors . Thisallows all routers participating in the OSPF process to have the same view of the network, although from their own perspective .

    After learning all LSAs, each router will run the SPF algorithm to learn theshortest path to all the known destination , each router uses this information tocreate its SPF tree. The information contained in the SPF tree is then used to

    populate the routing table .

  • 8/14/2019 MEN Part 1- Day4 -Ver1_NoRestriction

    27/48

    Network Learning CentreProprietary & Confidential

    2727Page 27

    Neighbors And Adjacencies

    Neighbors

    If two routers sharing a common data link agree on certain parameters

    specified in their respective hello packets, they will become neighbors.

    If two routers sharing a common data link agree on certain parameters

    specified in their respective hello packets, they will become neighbors.

    Adjacencies may be thought of as virtual point-to-point links between

    neighbors. Whether the neighbors will become adjacencies depends on the

    type of network they are attached to.

    Adjacencies may be thought of as virtual point-to-point links between

    neighbors. Whether the neighbors will become adjacencies depends on the

    type of network they are attached to.

    Adjacencies

    A neighbor refers to a connected router that is running an OSPF process with the adjoininginterface assigned to the same area. Neighbors are found via hello packets( hello packet isdiscuss in the subsequence slides), no routing information is exchanged with neighborsunless adjacencies are formed!

    An adjacency refers to the logical connection between a router and its correspondingdesignated routers and backup designated router or its point to point neighbor. Theformation of this type of relationship depends heavily on the type of the network thatconnect the OSPF routers, on point to point connection , the two routers will form adjacencywith each other without require a designated router, not all neighbors become adjacent.

  • 8/14/2019 MEN Part 1- Day4 -Ver1_NoRestriction

    28/48

  • 8/14/2019 MEN Part 1- Day4 -Ver1_NoRestriction

    29/48

  • 8/14/2019 MEN Part 1- Day4 -Ver1_NoRestriction

    30/48

    Network Learning CentreProprietary & Confidential

    3030Page 30

    OSPF Operation

    LSA Flooding

    LSDB

    RTA s LSA

    RTB s LSA

    RTC s LSA

    RTD s LSA

    RTA RTB

    RTC

    RTD SPF Algorithm

    Route Calculating

    Shortest Path Tree

    D/M NH Cost.........................

    ....................

    .....

    ............

    ...IP Routing Table

  • 8/14/2019 MEN Part 1- Day4 -Ver1_NoRestriction

    31/48

    Network Learning CentreProprietary & Confidential

    3131Page 31

    LSAs Used in Intra-area RouteCalculating

    DR

    Router-LSA Network-LSA

    Area 1

    Every router will generate Router-LSA. Only DR will generate Network-LSA.

  • 8/14/2019 MEN Part 1- Day4 -Ver1_NoRestriction

    32/48

    Network Learning CentreProprietary & Confidential

    3232

    OSPF Principle Inter area andexternal routes

  • 8/14/2019 MEN Part 1- Day4 -Ver1_NoRestriction

    33/48

    Network Learning CentreProprietary & Confidential

    3333Page 33

    Problems When Network Grows

    Maintain a big link-state database in the router SPF calculation become more complex Route flapping impact the network stability The route entry size is too big for a router Management and troubleshooting become more

    difficulty

    How to solve the problems when OSPF network grows?

    The answer is divide the OSPF routing domain into several logical router groups.This logical group is called OSPF area. OSPF uses areas to reduce theseadverse effects

    Routers within an area will have no detailed knowledge of the topology outside of their area. Because of this condition:

    1. A router must share an identical link state database only with the other routersin its area, not with the entire internetwork. The reduced size of the databasereduces the impact on a router's memory.

    2. The smaller link state databases mean fewer LSAs to process and therefore lessimpact on the CPU.

    3. Because the link state database must be maintained only within an area, mostflooding is also limited to the area.

    So there are some benefit with the OSPF area division :

    Reduce the requirement of router memory and CPU power

    SPF calculation become easy to implementation

    Reduce the impact of flapping route with the route summary

    Reduce the route entry in routing table with route summary Easy to manage the OSPF router in a area

  • 8/14/2019 MEN Part 1- Day4 -Ver1_NoRestriction

    34/48

    Network Learning CentreProprietary & Confidential

    3434Page 34

    Network Summary LSA (Type 3 LSA)Flooding

    RTA

    RTBRouter Id:2.2.2.2

    RTC100.1.1.0/24 150.1.10.0/24

    area 1 Area 0

    Type : SumNetLs id : 100.1.1.0Adv rtr : 2.2.2.2Net mask : 255.255.255.0Metric : 1563

    Type : SumNetLs id : 100.1.1.0Adv rtr : 2.2.2.2Net mask : 255.255.255.0Metric : 1563

    Type : SumNetLs id : 150.1.1.0Adv rtr : 2.2.2.2Net mask : 255.255.255.0Metric : 2

    Type : SumNetLs id : 150.1.1.0Adv rtr : 2.2.2.2Net mask : 255.255.255.0Metric : 2

    Before discuss the new type LSA ,one router role in the OSPF network we shouldunderstand is the ABR : area border router .an ABR is a router that has multiplearea assignments .an interface may belong to only one area, if a router has multipleinterfaces and if any of these interfaces belong to different areas ,this router isconsidered an ABR.

    After the division of the autonomous system into different area by OSPF, manychanges have also taken place in the route-calculating algorithm:

    LSDB synchronization is ensured only between routers belonging to the samearea, and the change in network topological structure will be updated first withinthe area.

    Network Summary LSAs are originated by ABRs. They are sent into a single areato advertise destinations outside that area . In effect, these LSAs are the means bywhich an ABR tells the Internal Routers of an attached area what destinations theABR can reach. An ABR also advertises the destinations within its attached areasinto the backbone with Network Summary LSAs. Default routes external to thearea but internal to the OSPF autonomous system are also advertised by this LSAtype

    Simple explanation for the network summary LSA

    SumNet : indicate a network summary LSA

    LS id : indicate the destination network ,it is always work with the net mask

    Adv rtt : indicate the ABR who generate the LSA

    Net mask : net mask for the destination network.

  • 8/14/2019 MEN Part 1- Day4 -Ver1_NoRestriction

    35/48

    Network Learning CentreProprietary & Confidential

    3535Page 35

    Inter-area Route Calculation

    OSPF using the router LSA & network LSA tocalculate the best route within a area

    Each network summary LSA is treat as aStubNet directly attached to the ABR

    Router installed the destination networkadvertised by ABR, and the total cost is the sumof the cost of the router to the ABR and the costadvertise by the network summary LSA. This

    behavior is distance vector behavior

    When an ABR originates a Network Summary LSA, it includes the cost from itself to the destination the LSA is advertising. The ABR will originate only a single

    Network Summary LSA for each destination even if it knows of multiple routes tothe destination. Therefore, if an ABR knows of multiple routes to a destinationwithin its own attached area, it originates a single Network Summary LSA into the

    backbone with the lowest cost of the multiple routes. Likewise, if an ABR receivesmultiple Network Summary LSAs from other ABRs across the backbone, theoriginal ABR will choose the lowest cost advertised in the LSAs and advertise thatone cost into its attached non-backbone areas.

    When another router receives a Network Summary LSA from an ABR, it does notrun the SPF algorithm. Rather, it simply adds the cost of the route to the ABR andthe cost included in the LSA. A route to the advertised destination, via the ABR, isentered into the route table along with the calculated cost. This behavior depending on an intermediate router instead of determining the full route to the

    destinationis distance vector behavior. So, while OSPF is a link state protocolwithin an area, it uses a distance vector algorithm to find inter-area routes

  • 8/14/2019 MEN Part 1- Day4 -Ver1_NoRestriction

    36/48

    Network Learning CentreProprietary & Confidential

    3636Page 36

    AS External LSA / ASBR SummaryLSA

    ASBRRouter ID:1.1.1.1

    RTBRotuer id 2.2.2.2

    RTC

    area 1

    200.1.1.0/24

    RIP

    Type : ASELs id : 200.1.1.0Adv rtr : 1.1.1.1Net mask : 255.255.255.0Metric : 30E type : 1

    Type : ASELs id : 200.1.1.0Adv rtr : 1.1.1.1Net mask : 255.255.255.0Metric : 30E type : 1

    Type : SumASBLs id : 1.1.1.1Adv rtr : 2.2.2.2metric: 1562

    Type : SumASBLs id : 1.1.1.1Adv rtr : 2.2.2.2metric: 1562

    display ospf routingDestination Cost Type Tag NextHop AdvRouter200.1.1.0/24 1593 1 1 20.1.1.1 1.1.1.1

    display ospf routingDestination Cost Type Tag NextHop AdvRouter200.1.1.0/24 1593 1 1 20.1.1.1 1.1.1.1

    ASBR : an autonomous system boundary routter ,is a router with an interfaceconnected to an external network or to a different AS .an external network or autonomous system refers to an interface belonging to a different routing protocolsuch as RIP, an ASBR is reponsible for injecting route information learned byother routing protocols into OSPF .ASBR Summary LSAs are also originated by ABRs. ASBR Summary LSAs areidentical to Network Summary LSAs except that the destination they advertise isan ASBR , not a network. The command show ip ospf database asbr-summary isused to display ASBR Summary LSAs , Note in the illustration that the destinationis a host address, and the mask is zero; the destination advertised by an ASBR Summary LSA will always be a host address because it is a route to a router.

    Autonomous System External LSAs, or External LSAs, are originated by ASBRsand advertise either a destination external to the OSPF autonomous system , ASExternal LSAs are the only LSA types in the database that are not associated with a

    particular area; external LSAs are flooded throughout the autonomous system .Simple explanation for the AS external LSAASE : indicate the as external LSALS id : the AS external network that ASBR can reachedAdv rtr : ASBR router ID

    Net mask the network mask for the destination network Metric : the cost for the ASBR to the AS external destination network.E type :1 indicate that this is a AS external path type 1Simple explanation for the ASBR summary LSAsumASB : indicate that this is a ASBR summary LSALS id : ABR router idAdv rtr : the ASBR router id

  • 8/14/2019 MEN Part 1- Day4 -Ver1_NoRestriction

    37/48

    Network Learning CentreProprietary & Confidential

    3737Page 37

    AS External LSA / ASBR SummaryLSA (Cont .)

    ASBRRouter ID:1.1.1.1

    RTB

    RTC

    area 1

    200.1.1.0/24

    RIP

    Type : ASELs id : 200.1.1.0Adv rtr : 1.1.1.1Net mask : 255.255.255.0Metric : 30E type : 2

    Type : ASELs id : 200.1.1.0Adv rtr : 1.1.1.1Net mask : 255.255.255.0Metric : 30E type : 2

    Type : SumASBLs id : 1.1.1.1Adv rtr : 2.2.2.2metric: 1562

    Type : SumASBLs id : 1.1.1.1Adv rtr : 2.2.2.2metric: 1562

    display ospf routing

    Destination Cost Type Tag NextHop AdvRouter200.1.1.0/24 30 2 1 20.1.1.1 1.1.1.1

    display ospf routing

    Destination Cost Type Tag NextHop AdvRouter200.1.1.0/24 30 2 1 20.1.1.1 1.1.1.1

    Type 2 external paths (E2) are also to destinations outside the OSPF autonomoussystem, but do not take into account the cost of the path to the ASBR. E2 routes

    provide the network administrator with the option of telling OSPF to consider onlythe external cost of an external route, disregarding the internal cost of reaching theASBR. OSPF external routes are, by default, E2 paths.

    Till now ,we should know that in the OSPF network, there are four type of routeavailable for us: intra-area route ,inter-area route ,type 1 external paths (routes),type 2 external paths (routes) .

    How may type of OSPF route type available in a OSPF network ?

    A: 1

    B: 2

    C: 3

    D: 4

    What are the OPSF network route type available in the OSPF network ?

    A: intra-area route ,inter-area route ,type 1 external paths (routes), type2 external paths (routes)

    B: point to point network ,point to multi-point network ,NBMAnetwork and the broadcast network

  • 8/14/2019 MEN Part 1- Day4 -Ver1_NoRestriction

    38/48

    Network Learning CentreProprietary & Confidential

    3838Page 38

    Comparisons of Different LSAs

    Type Description Originator Flooding Area Main Functions

    1 Router LSA EachRouter

    OriginatingArea

    Lists all links, or interfaces,addresses and mask, cost, etc.

    2 Network LSA DR OriginatingArea

    Lists all the attached routers

    3 NetworkSummary LSA

    ABR Area Oppositeto Destination

    Tells the Internal Routers whatdestinations the ABR can reach

    4 ASBR SummaryLSA

    ABR Area Oppositeto ASBR

    Tells the Internal Routers howto get to ASBR in another area

    5 AS ExternalLSA

    ASBR OSPFDomain

    Advertise destination externalto the OSPF Domain

    7 NSSA ExternalLSA

    ASBR inNSSA

    OriginatingNSSA

    Advertise destination externalto the OSPF Domain withinNSSA

  • 8/14/2019 MEN Part 1- Day4 -Ver1_NoRestriction

    39/48

    Network Learning CentreProprietary & Confidential

    3939

    OSPF Advance Topic

  • 8/14/2019 MEN Part 1- Day4 -Ver1_NoRestriction

    40/48

    Network Learning CentreProprietary & Confidential

    4040Page 40

    Route Summary On ABR

    20.1.0.0/2420.1.1.0/2420.1.2.0/2420.1.15.0/24

    area 1

    ABR

    area 0

    20.1.0.0/20

    ABR can perform the address summarization from one area to anotherarea, and this can reduce the network summary LSA flooding and improvethe network performances

    ABR can perform the address summarization from one area to anotherarea, and this can reduce the network summary LSA flooding and improvethe network performances

    OSPF can perform two types of address summarization: inter-area summarizationand external route summarization. Inter-area summarization is, as the nameimplies, the summarization of addresses between areas; this type of summarizationis always configured on ABRs..

    In this figure, area 1 contains sixteen subnets: 20.1.0.0/24 through 20.1.15.0/24,and all these addresses can be represented with the single summary address20.1.0.0/20 .

  • 8/14/2019 MEN Part 1- Day4 -Ver1_NoRestriction

    41/48

  • 8/14/2019 MEN Part 1- Day4 -Ver1_NoRestriction

    42/48

    Network Learning CentreProprietary & Confidential

    4242Page 42

    Stub Area

    area 0 area 1Stub areaType 3 LSA

    Type 3 LSA (default route)

    Type 4 LSA

    Type 5 LSA

    ABR router will stop the type 5 LSA to enter the stub area, all the traffic forward outsidethe OSPF routing domain will be using the default route generated by the ABR .ABR router will stop the type 5 LSA to enter the stub area, all the traffic forward outsidethe OSPF routing domain will be using the default route generated by the ABR .

    In some Autonomous Systems, the majority of the link-state database may consistof AS-external-LSAs. An OSPF AS-external-LSA is usually flooded throughoutthe entire AS. However, OSPF allows certain areas to be configured as "stubareas". AS-external-LSAs are not flooded into/throughout stub areas; routing toAS external destinations in these areas is based on a (per-area) default only. This

    reduces the link-state database size, and therefore the memory requirements, for astub area's internal routers.

    In order to take advantage of the OSPF stub area support, default routing must beused in the stub area. This is accomplished as follows. One or more of the stubarea's area border routers must advertise a default route into the stub area viasummary-LSAs. These summary defaults are flooded throughout the stub area, butno further. (For this reason these defaults pertain only to the particular stub area).These summary default routes will be used for any destination that is not explicitlyreachable by an intra-area or inter-area path (i.e., AS external destinations).

  • 8/14/2019 MEN Part 1- Day4 -Ver1_NoRestriction

    43/48

  • 8/14/2019 MEN Part 1- Day4 -Ver1_NoRestriction

    44/48

    Network Learning CentreProprietary & Confidential

    4444Page 44

    Not-So-Stubby Area (NSSA)

    RIP

    ASBR

    Type 7 LSA T y p e 5 L

    SA

    area 0 NSSA area

    NSSA area can import the Non-OSPF route into the OSPF routing domain usingthe type 7 LSA, type 7 LSA will only be flooded in the NSSA area and translatedinto type 5 LSA by the ABR.

    NSSA area can import the Non-OSPF route into the OSPF routing domain usingthe type 7 LSA, type 7 LSA will only be flooded in the NSSA area and translatedinto type 5 LSA by the ABR.

    NSSA External LSAs are originated by ASBRs within not-so-stubby areas(NSSAs). NSSAs are described in the following section. An NSSA External LSA(type 7 LSA )is almost identical to an AS External LSA, as the section on OSPF

    packet formats shows. Unlike AS External LSAs, which are flooded throughout anOSPF autonomous system, NSSA external LSAs are flooded only within the not-

    so-stubby area in which it was originated. At NSSA area border routers willtranslate selected type 7 LSA from the NSA into type 5 LSA,these type 5 lsa wil beflooded to all type 5 capable areas .

  • 8/14/2019 MEN Part 1- Day4 -Ver1_NoRestriction

    45/48

    Network Learning CentreProprietary & Confidential

    4545

    NSSA- Totally Stub

    Prevents LSA Type 5 & Type 3 from leakingin the area

    In the previous network diagram, we configured area 2 as NSSA totally stub byentering the area 2 nssa no-summary command on the NSSA ABR. This keepsany Type 5 AS-external or Type 3 summary routes from leaking in area 2.

  • 8/14/2019 MEN Part 1- Day4 -Ver1_NoRestriction

    46/48

    Network Learning CentreProprietary & Confidential

    4646Page 46

    Virtual Link

    V ir t u a l Lin ksarea 0

    area 1area 2

    OSPF requires all non backbone areas must connect to the backbone directlyor logically. If an area does not connect to the backbone area, the virtual linkshould be configured between two ABR routers in the non backbone area .

    OSPF requires all non backbone areas must connect to the backbone directlyor logically. If an area does not connect to the backbone area, the virtual linkshould be configured between two ABR routers in the non backbone area .

    The OSPF backbone is the special OSPF Area 0 ,The OSPF backbone alwayscontains all area border routers. The backbone is responsible for distributingrouting information between non-backbone areas. The backbone must becontiguous. However, it need not be physically contiguous; backboneconnectivity can be established/maintained through the configuration of virtual

    links.Virtual links can be configured between any two backbone routers that have

    an interface to a common non-backbone area. Virtual links belong to the backbone. The protocol treats two routers joined by a virtual link as if they wereconnected by an unnumbered point-to-point backbone network. On the graph of the backbone, two such routers are joined by arcs whose costs are the intra-areadistances between the two routers. The routing protocol traffic that flows alongthe virtual link uses intra-area routing only.

  • 8/14/2019 MEN Part 1- Day4 -Ver1_NoRestriction

    47/48

    Network Learning CentreProprietary & Confidential

    4747

    Area Types LSA Types

    Area Restriction

    Normal None

    Stub No Type 5 AS-external LSA allowed

    Totally Stub No Type 3, 4 or 5 LSAs allowed except the defaultsummary route

    NSSANo Type 5 AS-external LSAs allowed, but Type 7LSAs that convert to Type 5 at the NSSA ABR cantraverse

    NSSA Totally

    Stub

    No Type 3, 4 or 5 LSAs except the default summaryroute, but Type 7 LSAs that convert to Type 5 at theNSSA ABR are allowed

    External Routes

    One router to external world

    only advertise default route

    Several routers to outside world pick one that is closest

    pick one that carry data more efficiently

    Two types of metrics can be used

    type1 - the same as internal metrics

    type 2 - keeps the external costs (default)

    External routes are added to the database as gateway link state records

  • 8/14/2019 MEN Part 1- Day4 -Ver1_NoRestriction

    48/48

    Network Learning CentreProprietary & Confidential

    4848

    ThankYou