|
Home > Archive > CCNP > September 2001 > Ospf
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| hasanmuhammad 2001-09-13, 2:52 am |
| Hi friends ,
I pass CCNA last month . Now I prepare for Routing Exam , but OSPF seems difficult .
I need help . Can somebody tell me what the simplest and easiest way to understand OSPF .
I will be grateful .
Regards ,
Hasan | |
| Dillon 2001-09-13, 4:16 am |
| Hasan
The routing exam is arguably the most difficult of the CCNP exams & OSPF is a complex routing protocol. Read all the recommended reading on OSPF from study/exam guides, Cisco's website & elsewhere. If you still do not understand then read it again & again until it starts to make sense. If you have any specific questions then post them on this site.
If after this you are still stuggling with the material, then I suggest that you reassess you career path.
Hope this helps!
Dillon  | |
| hasanmuhammad 2001-09-13, 7:07 am |
| Hello Dilon ,
Thank you for your attention .
I will follow your suggestion .
Thanks again .
Regards ,
Hasan | |
| strikeattack 2001-09-16, 7:47 am |
| Here is a section from my notes from the BSCN exam that I took. It is a little long.
Two main points to remember: OSPF is the only link-state protocol that you need to remember for the BSCN exam, it is classless, and it uses bandwith as its metric. I would copy and paste the text into a word editor before trying to read it because this text window is rather narrow. Hope this helps.
OSPF:
OSPF (Open Shortest Path First) was developed in 1988 by IETF (Internet Engineering Task Force).
· The metric used by OSPF is cost which is 100,000,000 / bandwidth <bps, NOT Kbps>.
· Uses the Dijkstra algorithm; also called Shortest Path First or SPF.
· Uses Hello Packets; allows for authentication, and uses IP protocol 89.
· OSPF uses a multicast address to propagate LSAs.
· Typically Link State protocols only send updates when a change occurs, but OSPF will send an update every 30 minutes to ensure that all routers are synchronized.
· Because links can go up and down rapidly (link flap), each time an LSU is received, the router waits for a period of time (5 second by default) before recalculating its routing table. This is called a holddown timer.
· OSPF was designed to allow large XXX to be separated into smaller, more manageable areas that can still exchange routing information. This is referred to hierarchical routing.
· By default, OSPF treats frame-relay links as NBMA and does not transmit Hellos. You can either specify the NEIGHBOR command, or configure the IP OSPF NETWORK BROADCAST command. The NEIGHBOR command is considered a legacy command and should be avoided.
· When OSPF routers boot, they multicast out to 224.0.0.6 in search of the DR The DR will then respond on 224.0.0.5.
OSPF Design Guidelines:
· Routers in a domain: minimum of 20, mean of 510, maximum 1000
· Routers per Single Area: minimum of 20, mean 160, maximum 350
· Areas per domain: minimum 1, mean 23, maximum 60
· Routers located at convergence points within the network need sufficient memory to buffer a large number of packets.
· Routers need enough bandwidth to support both user-generated traffic and router- generated traffic.
OSPF start-up and exchanging procedures.
1. <ESTABLISHING NEIGHBORING ADJACENCIES>
2. DOWN STATE; both routers in “DOWN” state with no neighbors listed.
3. WAITING STATE; Router1 sends hello message including his (H)ello interval, (A)rea ID, (N)etmask, (D)ead Interval, and (S)tub Area Flag (mnemonic device: HANDS). It also sends its Router ID and neighbor database, which is empty.
4. INIT STATE; Router2 receives hello message and changes to “INIT” state, meaning that it has received a Hello, but bi-directional communication is not established. Router2 asks itself if its HANDS configurations are equal. These must be equal to establish neighboring adjacencies. If yes, it responds with a hello reply including its HANDS configuration, Router ID, and its neighbor database (includes Router1 as a neighbor).
5. TWO-WAY STATE; Router1 receives this message and goes into “TWO-WAY STATE”. This means, according to Router1, communication has been established. He asks himself if his HANDS configuration matches. If it does, he checks the table to see if he is listed as a neighbor (yes, he is). It then checks if Router2 is listed in its own table (its not). Router1 adds Router2 as a neighbor. Router1 sends a reply to Router2. It again checks to see if its HANDS configuration matches. If it does, Router2 goes into “TWO-WAY STATE”. If Router1 is not in the table (its not), it adds the router to the table.
6. The routers are now ready to begin the exchange process.
7. <EXCHANGE PROCESS>
8. EXSTART STATE; the router with the highest IP address becomes the master. After the master and slave are determined, the master sets the initial sequence number. The sequence number is the way a router determines the newness of the received link-state information. The routers are now ready to exchange database information.
9. EXCHANGE STATE; the master sends out a DBD (occurs before the LSA) packet, which is a summary of the link-state database. The slave acknowledges that it received the DBD packet from the master, and sends its own DBD packet. The master and slave routers exchange one of more Database Description Packets (DDPs or DBDs) and issue any LSRs needed, which request LSAs.
10. LOADING STATE; the slave router receives the DBD packet, acknowledges it’s receipt, and compares the information it received with the information it has by checking the LSA sequence number. If the information is not up-to-date, the router sends a LSR to the master router. It responds with the complete information about the requested entry in an LSU.
11. FULL STATE; all LSRs have been satisfied for a given router, and all routers are full adjacent and Link-State databases are identical. Once they are in the full state, they are ready to run the Dijkstra algorithm.
12. The routers run the algorithm, calculate the lowest cost for each network, and build the actual routing table. The Link-State database is used to build the routing table. After this short delay, the routers are ready to begin routing. The routers must stay synchronized. All routers in an area MUST HAVE identical routing tables.
Configuring OSPF in multiple areas:
An area is a collection of networks and routers that have the same area identification and same link state databases. All routers contain the SAME LINK STATE INFORMATION within their tables for that area. An autonomous system may include one or more areas; but it must always have an area 0.
Types of areas;
o Standard area; this area can accept inter-area link updates, inter-area route summaries, and external routes.
o Backbone area; when interconnecting multiple areas, the backbone area is the central entity to which all other areas connect. The backbone area is always labeled area 0. All other areas must connect to this area to exchange route information. All inter-area communication must traverse the backbone area. Area 0 CANNOT be configured as a stub area.
o Stub network; this is a network that has only one exit point. In other words, only traffic that is originating from it or destined to it. It is defined by physical topology, not by configuration.
o Stub area; DOES NOT ACCEPT ROUTES FROM OUTSIDE THE AUTONOMOUS SYSTEM (OSPF network). Stub Areas accept type 3, type 4, or default gateway updates. Area routers simply send packets to their ASBR because these areas do not know about external routes. The stub area reduces the size of the LSA database by not accepting routes external to the autonomous system. Usually used there is only one area exit point and under hub-and-spoke topologies, such as a branch office. In a hub and spoke topology, only one router has connectivity to all other routers on the network. Routes outside the area are not needed because they would all be forwarded to the same router anyway. All routers in the area must agree on the stub area or they won’t communicate. It is defined by configuration, not by physical topology. Configuration is very easy. To configure, use AREA <AREA NUMBER> STUB.
o Totally stubby area; DOES NOT ACCEPT ROUTES OUTSIDE THE AREA OR AUTONOMOUS SYSTEM. Totally stubby areas block external type 5 LSAs and summary LSAs. TOTALLY STUBBY AREAS ARE CISCO PROPRIETARY. To configure, use AREA <AREA NUMBER> STUB NO-SUMMARY.
o NSSA (Not So Stubby Area); similar to stub area, but it can be configured to accept external routes except they do not accept LSA type 3. It is an extension to stub areas, in which a certain amount of external routers are permitted in the area. They may be used to connect to external networks.
Packet forwarding in areas:
· If a packet is destined for a network within the same area, it is forwarded from the internal router, through the area to the destination internal router. It never leaves the originating area.
· If a packet is destined for a network outside the area, it must traverse the following path:
1. The packet goes from the source network to an ABR.
2. The ABR has an interface in the backbone area and sends the packet to the ABR of the destination network.
3. The destination ABR then forwards the packet through the area to the destination router, which places it in the destination network’s subnet.
External Routes:
1. External Type 1; calculated by the metric of the internal cost plus the external cost. These are always preferred over Type 2.
2. External Type 2; calculated by the metric as external cost only (this is the default).
Summarizing Routes:
1. Inter-Area route summarization; ABRs take multiple networks and combine them into a single advertisement. They are summarized as they go into area 0.
2. External Route summarization; only done on ASBRs. They summarize external routes as they advertise them into the backbone area.
Reasons for OSPF areas:
· Frequent calculation of the SPF algorithm; with such a large number of segments, network changes are inevitable. Because route information is kept within each area, it is not necessary to flood all link-state changes to every area.
· Smaller routing tables
· Topology is invisible to other areas
Rules for areas:
· Area 0 must always exist and all areas must have a connection (physically or logically) into area 0. Virtual-links can be created for ABRs that do not have a physical connection into the area 0.
· Areas do not talk directly to other areas; all inter-area data passes through Area 0.
· The backbone must be contiguous and be in the same subnet.
Virtual Link:
Virtual links create logical inter-area links between OSPF areas that do not have a physically connection to Area 0. You may also want to create a virtual link in case a backbone router fails, causing area 0 to become discontiguous.
To add a virtual link, use the command AREA <TRANSIT AREA ID> VIRTUAL-LINK <ROUTER ID> on the two ABRs; one of the ABRs must have a physical interface in area 0. Be careful: this command in the startup-config could cease to function if a new Router ID is chosen for the ABR.
You may need to setup virtual links if…
1. You have just merged two OSPF networks together.
2. Your backbone is discontiguous.
3. Your areas are not adjacent to the backbone.
OSPF Router Types:
A router can be more than one router type. For example, if a router connects to Area 0 and Area 1, as well as to a non-OSPF network, it would be considered an ABR, an ASBR, and a backbone router. A router has a separate link-state database for each area it is connected to. Link-state databases are synchronized between pairs of adjacent routers. This means that it is synchronized between a router and its DR and BDR.
· Autonomous System Boundary Router (ASBR); routers that connect an AS to another AS, such as a router with one EIGRP interface and one OSPF interface. These routers are sometimes referred to as “edge” routers.
· Backbone Router; a router who has AT LEAST ONE interface in area 0.
· Area Border Router (ABR); routers that have interfaces in multiple areas. These routers maintain separate link-state databases for each area to which they are connected, and route inter-area traffic. Traffic can only leave an area via an ABR. An area CAN have one or more ABRs. ABRs are commonly configured with multiple routing protocols (EX: RIP routes propagating into OSPF domains and vice versa).
· Internal Router; routers that have ALL INTERFACES IN THE SAME AREA, but not in area 0 (internal routers are opposite backbone routers). These routers all have identical link-state databases.
DR and BDR; the routers in a multi-access environment, such as an Ethernet segment, must elect a DR and a BDR to represent the network. The BDR ONLY performs DR tasks if the DR fails, otherwise IT DOES NOTHING. After the DR and BDR are elected, all routers will establish adjacencies only with the DR and the BDR, not each other. The router with the highest router priority (manually set and default of 1) becomes the DR and the router with the second highest priority becomes the BDR. DR and BDR relationships are created automatically on broadcast multi-access networks.
DR and BDR functions:
· DRs and BDRs reduce routing update traffic by acting as a central point of contact for link-state information exchange on a given multi-access network. Each router maintains an adjacency with the BR and BDR instead of everyone exchanging LSAs with everyone else. The DR sends the updates to all other routers in the multi-access network. This reduces network traffic. The DRs and BDRs manage link-state information for that area.
Definitions and Terminology:
· Administrative Distance is considered the “trustworthiness” of a route. IT IS ONLY IMPORTANT WHEN EQUAL ROUTING METRICS EXIST, A ROUTE IS LEARNED FROM MORE THAN ONE SOURCE, AND THERE ARE MULTIPLE ROUTER PROTOCOLS ACTIVE. It is an integer value used to determine route preference. Lower values are preferred over higher values. Static routes are preferred over dynamically learned entries, and routing protocols with more sophisticated metrics over simpler metrics. When using AD, the AD of a static route with the next-hop-address gets a 1. The AD of a static route with the interface specified is set to 0. You MUST use the next-hop address when using multi-access media for that interface (Ethernet, Frame Relay, X.25, ISDN). You MAY ONLY specify the interface if the adjacent router interface is part of a serial unnumbered link and therefore has no IP address.
o Administrative distance CAN BE MODIFIED via the DISTANCE <WEIGHT> command. For EIGRP and BGP, use the commands DISTANCE EIGRP <INTERNAL-DISTANCE> <EXTERNAL-DISTANCE> for EIGRP, or DISTANCE BGP <EXTERNAL-DISTANCE> <INTERNAL-DISTANCE> <LOCAL-DISTANCE> for BGP.
§ The following are the default administrative distances of sources of routes:
· Connected Interface 0
· Static route out interface 0
· Static route to a next hop 1
· EIGRP summary route 5
· External BGP 20
· Internal EIGRP Route 90
· IGRP 100
· OSPF 110
· IS-IS 115
· RIP (v1 and v2) 120
· EGP 140
· External EIGRP Route 170
· Internal BGP 200
· Unknown 255
· Autonomous System; a set of routers that share each other’s routing tables using a common routing protocol. All routers within an autonomous system must use the same number to communicate.
· Cost; arbitrary value usually based on bandwidth, which is typically assigned by the administrator. This is the metric used by OSPF.
· Delay; length of time required to move a packet from source to destination.
· Hello; an entire protocol used by routing protocols to establish and maintain neighbor relationships. Hello packets are small packets sent periodically out each interface to indicate the router is still alive. It ensures that bi-directional communication still exists with a neighbor- a router sees itself listed in the hello packets that it receives from a neighbor. Typically, if three consecutive packets are missed, the link is considered to be down and flash updates may be flooded throughout the network and the route may be poisoned.
o Area-ID; in order to communicate, two routers must share a common segment. Also, their interfaces must belong to the same subnet number and mask.
o Authentication password; if authentication is enabled, two routers must exchange the same password. Authentication does not have to be set, but if it is, all peer routers must have the same password. This is a form of router security.
o Dead Interval; the amount of time in seconds that a router waits to hear from a neighbor before declaring the link down (4 times the hello interval, by default). This is similar to the hold time.
o Hello Interval; the hello interval specifies the frequency in seconds that a router sends hellos (10 seconds is the default for multicast networks in OSPF).
o Neighbors; these are the neighbors with which a bi-directional communication has been established.
o Router ID; THIS IS NOT AN IP ADDRESS; HOWEVER, IT DOES LOOK LIKE ONE. This is a 32-bit number that uniquely identifies the router within an autonomous system. When OSPF is started, the first thing it does is chose a Router ID for itself. The highest IP address on an active interface for that router is chosen by default. If another IP address is added that is higher, the router will NOT choose a new router ID unless the OSPF process is stopped and restarted. Loop-back interfaces are typically configured with the highest IP address on the router because it will always be there and cannot go down.
o Router Priority; an 8-bit number that indicates the priority of this router when selecting a DR (highest) and a BDR (second highest). THIS MANUALLY SET. THIS DETERMINES THE DR AND BDR. If the Router Priority is not set, the router with the highest Router ID will become the DR, and the second highest the BDR. A router with a priority set to zero is ineligible to become a DR or a BDR; further, a router that is not the DR or the BDR is referred to as a “Drother”. No election will be declared if a new router with a higher router ID value joins the multi-access network.
o Stub Area Flag; a stub area is a special area in which two routers must agree on the stub area flag in the hello packets. STUBBY AREAS RECEIVE BOTH LSA 3 AND LSA 4 TYPES.
· Hop Count; number of routers or hops a packet must take.
· Load Balancing; if two or more paths have an equal lowest metric, then up to four paths will be equally shared via load balancing (enabled by default). Up to six routes for IP may be load balanced via the MAXIMUM-PATHS command.
· Load; amount of activity on a network resource (router or link).
· Metric; this is what routing protocols use to determine the best path to a destination. A smaller metric indicates a more preferred path. Routers advertise the path to a network in terms of a metric value. Examples: hop count (hops), cost (bandwidth), and composite (using several parameters). For IP, Cisco supports load balancing across four equal metric paths to a common destination network, by default.
· MTU (Maximum Transmission Unit) or (Maximum Transfer Unit); maximum packet length in octets of a L3PDU that is acceptable to all links on the path. If an inbound router interface receives a packet that is larger than the outbound router’s interface MTU, the router will fragment the packet into units allowed by the outbound router interface. If the DF (Don’t Fragment) bit is set, and the packet is too large for the destination network, the packet will be dropped. Bridges are not capable of frame fragmentation and reassembly. Therefore, frames that exceed the MTU of a given network must be dropped.
· Reliability; refers to bit-error rate of each network link.
· Ticks; delay on a data link using IBM PC clock ticks (55 milliseconds or 1/18 of a second). | |
| Silkysmoothe1 2001-09-20, 11:37 pm |
| Wholey Whipper snappers batman!
you weren't kidding,,, | |
| markuk 2001-09-21, 2:56 am |
| thanks for your notes i have passed bscn already but read up on things like this for revision purposes as awaiting to get a full time network position | |
|
| strikeattack,
thanks !
ea | |
| dmaftei 2001-09-21, 8:13 am |
| quote: Originally posted by strikeattack
It is a little long.
Hey Mike, you must have a very particular sense of humor, since you consider this "a little" long... [big grin]
I'll do some hair-splitting on your "a little" long post. 
quote: OSPF (Open Shortest Path First) was developed in 1988 by IETF (Internet Engineering Task Force).
· The metric used by OSPF is cost which is 100,000,000 / bandwidth <bps, NOT Kbps>.
That's for Cisco. rfc 2328 only says that a link has a cost; how that cost is determined is left to the implementation. (This is because you mentioned IETF before.)
quote: OSPF start-up and exchanging procedures.
...
6. The routers are now ready to begin the exchange process.
... if one of the routers is DR or BDR. If both routers are DROther, they remain in 2-way.
quote: All routers in an area MUST HAVE identical routing tables.
They must have identical link state databases, not routing tables.
quote:
· The backbone must be contiguous and be in the same subnet.
I'm not sure I understand what you mean by "the backbone must be ... in the same subnet".
quote:
· Internal Router; routers that have ALL INTERFACES IN THE SAME AREA, but not in area 0 (internal routers are opposite backbone routers).
It's perfectly leagal to have a router with all interfaces in the backbone. That's an internal router for the backbone.
quote:
· Autonomous System; a set of routers that share each other’s routing tables using a common routing protocol. All routers within an autonomous system must use the same number to communicate.
I believe the agreed upon definition for autonomous system is "a set of routers under a common administration". I think of a set of routers running a common routing protocol as a "routing domain" (RIP domain, OSPF domain, etc.) But this may be a matter of personal preference...
quote:
o Authentication password; if authentication is enabled, two routers must exchange the same password. Authentication does not have to be set, but if it is, all peer routers must have the same password. This is a form of router security.
This is really hair-splitting, but what the heck, since I started... rfc 2328 says that all OSPF packets are authenticated. However, in the particular case when a password is not used, they say "null authentication" is used. Go figure...
quote:
o Router ID;
...
The highest IP address on an active interface for that router is chosen by default.
...
Loop-back interfaces are typically configured with the highest IP address on the router because it will always be there and cannot go down.
If I remember well, if a loopback interface exists, its address is chosen for RouterID, even if there are active interfaces with higher addresses.
quote:
A smaller metric indicates a more preferred path.
It depends. "Better" metric doesn't necessarily mean "smaller" metric. The smaller a delay, the better. The bigger a bandwidth, the better.
Whew... Considering the length of your post, I didn't have too many mean remarks, did I?  | |
| strikeattack 2001-09-23, 7:35 pm |
| quote:
That's for Cisco. rfc 2328 only says that a link has a cost; how that cost is determined is left to the implementation. (This is because you mentioned IETF before.)
I simply thought the origins of OSPF might be relevant. Cisco has been known to ask questions such as this.
quote:
... if one of the routers is DR or BDR. If both routers are DROther, they remain in 2-way.
I didn't know that, but I confirmed it on Cisco's site. Thanks.
quote:
They must have identical link state databases, not routing tables.
Agreed.
quote:
I'm not sure I understand what you mean by "the backbone must be ... in the same subnet".
Agreed. Thats crazy talk. It was copied from another test question.
quote:
It's perfectly leagal to have a router with all interfaces in the backbone. That's an internal router for the backbone.
Agreed also. This would be an internal router, backbone router, and possible an ABR and/or ASBR.
quote:
Actually, if you want to GET REALLY TECHNICAL...
Per rfc 1771, “A set of routers under a single technical administration, using an interior gateway protocol and a common set of metrics to route packets within the autonomous system, and using an exterior gateway protocol to route packets to other XXX.”
[QUOTE]
This is really hair-splitting, but what the heck, since I started... rfc 2328 says that all OSPF packets are authenticated. However, in the particular case when a password is not used, they say "null authentication" is used. Go figure...
Yep. This is the 64-bit authentication field in the exchange update. The statement was from Building Scalable Cisco Network, Page 105, ISBN 1-57870-228-3. I am guessing that they wanted to keep the definition short and used just a high-level definition.
quote:
If I remember well, if a loopback interface exists, its address is chosen for RouterID, even if there are active interfaces with higher addresses.
[/QUOTE/
You are correct. Under OSPF, the router ID will choose a loopback interface, even if other interfaces have a higher value. However, this may not be the case if the router is running other routing protocols, and I typically set the loopback interface higher than the others anyway.
[QUOTE]
It depends. "Better" metric doesn't necessarily mean "smaller" metric. The smaller a delay, the better. The bigger a bandwidth, the better.
I agree with you here also. Since we are referring to OSPF, and the metric used is cost (bandwidth), one might even say that this is an incorrect statement because obviously higher bandwidth is preferred. The sentence should read, a smaller cost indicates a more preferred path.
I must admit, I did not expect anyone to NIT-PICK every last word of my post, but I am glad you did. I agree with your comments, and will be more careful next time, considering that we have you reading all of them!
Awesome detective work. I showed your post to my wife and she thought it was hilarious, although she has no idea what OSPF even is! | |
| muckfish 2001-09-23, 8:23 pm |
| hi guys,
great attention to detail! .... would like to add to the cost and bandwidth comment
y the smallest cost is the preferred path is due to the way cost is calculated in cisco's implementation of ospf. bandwidth is inversely proportional to cost.
cost = 10^8 / bandwidth (bps) | |
| dmaftei 2001-09-24, 9:41 am |
| quote: Originally posted by strikeattack
I must admit, I did not expect anyone to NIT-PICK every last word of my post, but I am glad you did. I agree with your comments, and will be more careful next time, considering that we have you reading all of them!
He he he... The thing is, when I see posts from people that proved they know their stuff (like yourself), I have a tendency to nit-pick. 
quote: I showed your post to my wife and she thought it was hilarious...
I'm wondering why... | |
| strikeattack 2001-09-24, 2:01 pm |
| quote:
He he he... The thing is, when I see posts from people that proved they know their stuff (like yourself), I have a tendency to nit-pick.
Thanks for the compliment, but even though I spend hours upon hours reading Cisco Press, I still need to look things up and I am wrong once in a while...
quote:
I showed your post to my wife and she thought it was hilarious...
She thought it was funny because of how I get into these intellectual arguments. She knows nothing of Cisco material (shes a massage therapist), but she simply found it funny that someone (you) would be so anal (I mean precise) to go through and nit-pick every last word of my post. I thought your response was great and I may even start reading other's posts more carefully from now on.
 |
|
|
|
|