Ospf Flashcards

1
Q

OSPF Characteristics

A

• OSPF is a Link State routing protocol
• It supports large networks
• It has very fast convergence time
• Messages are sent using multicast
• OSPF is an open standard protocol
• It uses Dijkstra’s Shortest Path First algorithm to determine the best path to learned networks

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

OSPF vs EIGRP VS RIP

A

• RIP has scalability limitations so it is not typically used in production networks
@ It is suitable for small networks or lab/test environments
• The choice for most companies for their IGP comes dowi?to EIGRP or
OSPF

OSPF is the most commonly used
• It supports large networks and has always been an open standard. It is supported on all vendors equipment
• EIGRP can be simpler to implement and troubleshoot
• It was historically a Cisco proprietary protocol
e It is now an open standard but there is still limited support on other
vendor’s equipment

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Link State Routing Protocols

A

• In Link State routing protocols, each router describes itself and its interfaces to its directly connected neighbours
• This information is passed unchanged from one router to another
• Every router learns the full picture of the network incluang every router, its interfaces and what they connect to
• OSPF routers use LSA Link State Advertisements to pass on routing updates

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

OSPF Operations

A
  1. Discover neighbours
  2. Form adjacencies
  3. Flood Link State Database (LSDB)
  4. Compute Shortest Path
  5. Install best routes in routing table
  6. Respond to network changes
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

OSPF Packet Types

A

• Hello: A router will send out and listen for Hello packets when OSPF is enabled on an interface, and form adjacencies with other OSPF routers on the link

• DBD DataBase Description: Adjacent routers will tell each other the networks they know about with the DBD packet
• LSR Link State Request: If a router is missing information about any of the networks in the received DBD, it will send the neighbour an LSR

• LSA Link State Advertisement: A routing update
• LSU Link State Update: Contains a list of LSA’s which should be updated, used during flooding
• LSAck: Receiving routers acknowledge LSAs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

OSPF Configuration - Process ID

A

R1 (config) #router ospf 1
@ Different interfaces on a router can run in different instances of OSPF.
• Different instances have different Link State Databases
• Only one instance is typically configured on OSPF routers - multiple
Process IDs are very rarely used
• The Process ID is locally significant. It does not have to match on the neighbour router to form an adjacency

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

OSPF Configuration - network

A

• The network command uses a wildcard mask which is the inverse of a subnet mask.
• Subtract each octet in the subnet mask from 255 to calculate the wildcard
mask
• A subnet mask of 255.255.0.0 equals a wildcara mask of 0.0.255.255
• A subnet mask of 255.255.255.252 equals a wildcard mask of 0.0.0.3
• The command does not default to using the classful boundary
• You must enter a wildcard mask

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

OSPF Configuration - network

A

R1 (config-router) # network 10.0.0.0 0.0.255.255 area 0
• The network command means:
• Look for interfaces with an IP address which falls within this range.
• Enable OSPF on those interfaces - send out and listen for
OSPF hello messages, and peer with adjacent OSPF routers.
• Advertise the network and mask which is configured on those interfaces.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

OSPF Verification

A

sh run | section ospf

-router ospf 1
-network 10.0.0.0 0.255.255.255 area 0

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

OSPF Operations

A
  1. Discover neighbours
  2. Form adjacencies
  3. Flood Link State Database (LSDB)
  4. Compute Shortest Path
  5. Install best routes in routing table
  6. Respond to network changes
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

OSPF Router ID

A

OSPF routers identify themselves using an OSPF Router ID which is in the form of an IP address.
• This will default to being the highest IP address of any loopback interfaces configured on the router, or the highest other IP address if a loopback does not exist.
• Loopback interfaces never go down so the Router ID will not change.
• You can also manually specify the Router ID.
• Best practice is to use a Loopback or manually set the Router ID.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Passive Interface Configuration

A

R1 (config) #router ospf 1
R1 (config-router) #passive-interface loopback 0
R1 (config-router) #passive-interface f2/0

RI (config) #router ospf 1
R1 (config-router) #passive-interface default
R1 (config-router) #no passive-interface f0/0
R1 (config-router) #no passive-interface f1/0
R1 (config-router) #no passive-interface f3/0

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Default Route Injection using ospf

A

R4 (config) #ip route 0.0.0.0 0.0.0.0 203.0.113.2
R4 (config) #router ospf 1
R4 (config-router) #default-information originate

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Default Route Injection Verification in ospf

A

Gateway of last resort is 10.0.0.2 to network 0.0.0.0
O*E20.0.0.0/0 [110/1] via 10.0.0.2, 00:00:01, FastEtherneto/0

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

OSPF Areas

A

• Every router learns the full picture of the network including every router, its interfaces and what they connect to @ This can cause issues in large networks:
• Too many routes can use up too much router memory
• Network changes cause all routers to reconverge which takes time and CPU resources
• OSPF supports a hierarchical design which segments large networks into smaller areas to solve this problem
• Each router maintains full information about its own area, but only summary information about other areas

A two level hierarchy is used:
• Transit area (backbone or area 0). Does not generally contain end users.
Regular areas (nonbackbone areas). Used to connect end users to the Transit area.
By default, all transit traffic goes through the Transit area.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

The interface speed and commands

A

• The rate that Ethernet interfaces physically transmit at is set by the
‘speed’ command
• GigabitEthernet interfaces transmit at 1000 Mbps by default
• FastEthernet interfaces transmit at 100 Mbps by default
• If you use the ‘speed 10’ command on a FastEthernet interface it will physically transmit at 10 Mbps

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

The clock rate command

A

• The rate that Serial interfaces physically transmit at is set by the ‘clock rate’ command
• Serial interfaces transmit at 1.544 Mbps by default
• If you use the ‘clock rate 64000’ command on a Serial interface it will physically transmit at 64 Kbps

18
Q

The bandwidth command

A

Interfaces also have a default bandwidth (eg 100 Mbps on FastEthernet interfaces, 1.544 Mbps on a serial interface)
• The bandwidth usually matches the physical transmission rate of the interface
• The ‘bandwidth’ setting on an interface does not affect the physical transmission rate - that is set by the ‘speed’ or ‘clock rate’
• If you set a bandwidth of 50 Mbps on a FastEthernet interface, it will still transmit at 100 Mbps
• The bandwidth command affects software policy on the router, such as which path will be selected by EIGRP or OSPF, or how much bandwidth will be guaranteed to a traffic type by QoS
• You can influence software policy by setting the bandwidth on an interface

19
Q

OSPF Metric Calculation

A

• As OSPF is a Link State routing protocol, the router will learn about all destinations in its area, the links and their cost
• The router will select routes based on its lowest cost to get to
the destination

20
Q

OSPF Link States

A

• An OSPF router knows about all links in its OSPF area, and each link’s cost
• In a multiple area OSPF network, ABRs know the information for each area they are connected to
• When multiple areas are in use, each router has individual routes for each IP subnet in its own area, and summary routes to other areas which go via an ABR

21
Q

OSPF Metric Calculation

A

• For destinations in its own area, a router looks at all available links to get there, and chooses the path with the lowest overall cost
• For destinations in another area, a router looks at all available links to get to the ABR and chooses the path with the lowest overall cost to the ABR. It’s then up to the ABR to choose the best path onwards from there

22
Q

SPF Shortest Path First Algorithm

A

• The SPF Shortest Path First algorithm calculates the overall cost for each available path to each destination network, and then selects the lowest cost path
• The overall cost = cumulative cost of all outgoing interfaces
• You should ensure the cost is set the same on the interfaces on both sides of a link or you can get asymmetric routing

23
Q

Reference Bandwidth

A

• The cost is automatically derived from the interface bandwidth
• Cost = Reference Bandwidth / Interface Bandwidth
• The default reference bandwidth is 100 Mbps
• FastEthernet link cost defaults to 1 (100 / 100)
• T1 link cost defaults to 64 (100 / 1.544)
• OSPF treats all interfaces of 100 Mbps or faster as equal
• FastEthernet, Gigabit Ethernet, 10 Gigabit Ethernet etc. all default to a cost of 1
• This can cause undesirable routing in modern networks

24
Q

Reference Bandwidth commmnds

A

R1 (config) #router ospf 1
R1 (config-router) #auto-cost reference-bandwidth 100000
•The reference bandwidth should be changed on all routers

25
Manipulating the OSPF Metric
OSPF takes the bandwidth of an interface into account when calculating the metric, so paths along higher bandwidth links will be preferred • The most desirable path will typically be automatically selected • If you want to use a different path, you can manipulate this by manually changing the bandwidth or OSPF cost on interfaces • It is recommended to use cost because the bandwidth setting can affect many features other than OSPF (such as QoS)
26
OSPF Metric - Bandwidth command
R1#show interface serial1/0 Serial1/0 is administratively down, line protocol is down Hardware is M4T MTU 1500 bytes, BW 1544 Kbit/sec, DLY 20000 usec, reliability 255/255, txload 1/255, xload 1/255 R1 (config)#interface serial1/0 R1 (config-if)#bandwidth 768 R1#show interface serial1/0 Serial1/0 is administratively down, line protocol is down Hardware is M4T MTU 1500 bytes, BW 768 Kbit/sec, DLY 20000 usec, reliability 255/255, txload 1/255, rxload 1/255
27
OSPF Metric - Cost command
• A manually configured OSPF cost overrides the value automatically derived from the bandwidth R1 (config) #interface FastEthernet 0/0 R1 (config-if) #ip ospf cost 50 R1#show ip ospf interface FastEthernet 0/0 FastEthernet0/0 is up, line protocol is up Internet Address 10.0.0.1/24, Area 0, Attached via Network Statement Process ID 1, Router ID 192.168.0.1, Network Type BROADCAST, Cost: 1 Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5 oob-resync timeout 40 Hello due in 00:00:02 Neighbor Count is 1, Adjacent neighbor count is 1 Adjacent with neighbor 10.1.0.2 (Designated Router) ! truncated
28
OSPF Packet Types
• Hello: A router will send out and listen for Hello packets when OSPF is enabled on an interface, and form adjacencies with other OSPF routers on the link • DBD DataBase Description: Adjacent routers will tell each other the networks they know about with the DBD packet • LSR Link State Request: If a router is missing information about any of the networks in the received DBD, it will send the neighbour an LSR • LSA Link State Advertisement: A routing update. (These are not an OSPF packet type, they are the info contained inside LSUs) • LSU Link State Update: Contains a list of LSA's whish should be updated. used during flooding • LSAck: Receiving routers acknowledge LSAs
29
OSPF Packet
Version Number -Type- PacketLength -Router ID -Area ID -Checksum -Authentication Type -Authentication -Data • Version: OSPFv2 or OSPFv3 • Type: 1- Hello, 2- DBD Database Descriptor, 3- LSR Link State Request, 4- LSU Link State Update, 5- Link State Acknowledgment (LSA Link State Advertisements are inside LSUs) • Router ID, and Area ID: Of the advertising router, and interface • Authentication Type: 0- No Password, 1- Plain-text password, 2- MD5 authentication
30
OSPF Hello Packets
• OSPF routers discover each other and form adjacencies via Hello packets • They send Hello packets out each interface vihere OSPF is enabled (except passive interfaces) • Multicast to 224.0.0.5 ('all OSPF routers') • Sent every 10 seconds by default
31
OSPF Hello Packet Contents
• Router ID: 32 bit number that uniquely identifies each OSPF router • Hello Interval: How often router sends Hello packets. Default 10 secs. • Dead Interval: How long a router waits to hear from a neighbor before declaring it out of service. Default 4x Hello Interval. • Neighbors: A list of adjacent OSPF routers that this router has received a Hello packet from. Area ID: The area configured for that interface • Router Priority: An 8 bit number used to select DR and BDR. • DR and BDR IPv4 Address: If known. • Authentication Flag: Authentication details if configured. • Stub Area Flag: If the area is a stub area. Stub areas have a default route to their ABR rather than learning routes outside the area.
32
OSPF Hello Packet Contents
These settings must match for a pair of OSPF routers to form an adjacency with each other: • Must be in each other's Neighbor list • Hello and Dead Intervals • Area ID • IP subnet • Authentication Flag • Stub Area Flag
33
MTU Mismatches
• If there is an MTU (Maximum Transmission Unit) setting mismatch then OSPF routers can become neighbors but they will not exchange routes with each other • MTU is configured at the interface level (default 1500 bytes) • You can set interface MTU (affects all packets) and/or interface P MTU (affects only IP packets)
34
MTU Mismatches
• If there is an MTU (Maximum Transmission Unit) setting mismatch then OSPF routers can become neighbors but they will not exchange routes with each other • MTU is configured at the interface level (default 1500 bytes) • You can set interface MTU (affects all packets) and/or interface IP MTU (affects only IP packets) Router (config) #interface GigabitEthernet 0/0 Router (config-if) #mtu 1480 Router (config-if) #ip mtu 1460 Router #show interface GigabitEthernet 0/0 GigabitEthernet0/0 is up, line protocol is up MTU 1480 bytes, BW 1000000 Kbit/sec, DLY 10 musec, reliability 255/255, txload 1/255, xload 1/255 Router #show ip interface GigabitEthernet 0/0 GigabitEthernet0/0 is up, line protocol is up MTU is 1460 bytes
35
OSPF forming adj
Hallo: I am Router ID 172.16.1.1 and I have no neighbors (to 224.0.0.5) Down Hello : I am Router ID 172.16.2.1 and I see 172.16.1.1 (to 10.0.0.1) Hello :I am Router ID 172.16.1.1 and I see 172.16.2.1 (to 10.0.0.2) 2way DBD : I will start Exchange with my Router ID 172.16.1.1 DBD :No I will start Exchange because I have higher Router ID 172.16.2.1 DBD :LSDB Summary LSAck :Acknowledged DBD : LSDB Summary LSAck :Acknowledged Loading LSR : I need full info on 172.16.1.0/24 LSU :Here's the info LSR :I need full info on 172.16.2.0/24 LSU :Here's the info Loading LSAck :Acknowledged LSAck :Acknowledged Full
36
Neighbor State Summary
1. Down: No active neighbor detected 2. INIT: Hello packet is received from the neighbor 3. 2-WAY: Own router ID in received hello 4. Exstart: Primary and secondary roles determined 5. Exchange: Database description packets sent 6. Loading: Exchange of LSRs and LSUs 7. Full: Neighbors fully adjacent
37
OSPF on Multiaccess Segments
• On point to point links, OSPF router pairs form a FULL adjacency • On multiaccess segments (such as Ethernet) where there can be multiple routers, it is inefficient for all routers to form a FULL OSPF adjacency with each other
38
DR and BDR
• A DR Designated Router and BDR Backup Designated Router are elected • The router with the highest priority becomes DR, and the router with the 2nd highest priority becomes BDR • Default priority is 1, the higher the better (0 - 255) • Highest Router ID is used in case of a tie Neighbor States - 2-Way • On multiaccess segments such as Ethernet, the routers elect the DR and BDR at the 2-Way stage • There is no election on point to point links
39
Setting OSPF Priority
R1 (config)#interface FastEthernet 0/0 R1 (config-if) #ip ospf priority 100 R4 (config)#interface FastEthernet 0/0 R4 (config-if)#ip ospf priority o Restart OSPF on interface to take effect
40
Multiaccess Segment Neighbor States
• The DR and BDR establish FULL neighbor state with all routers on the network segment • The neighbor state of other neighbors remains in 2-Way and they do not directly exchange routes with each other
41
Multiaccess Segment LSA Updates
• When a link state changes on a router connected to a multiaccess segment, it sends a multicast LSU packet to 224.0.0.6 ('all designated routers') • The DR multicasts the update to 224.0.0.5 ('all OSPF routers')