Académique Documents
Professionnel Documents
Culture Documents
If you have multiple routers and not all of them are Cisco then you can’t use EIGRP so your
remaining options are RIP and OSPF.
Open Shortest Path First (OSPF) is an Interior Gateway routing Protocol used to determine the
correct route for packets within IP networks. It was designed by the Internet Engineering Task
Force to replace RIP.
Advantages of OSPF
Disadvantages of OSPF
Unlike the RIP in which the entire routing table is sent, the host using OSPF sends only the part
that has changed.
With RIP, the routing table is sent to a neighbor host every 30 seconds. OSPF multicasts the
updated information only when a change has taken place.
Rather than simply counting the number of hops, OSPF bases its path descriptions on "link
states" that take into account additional network information. OSPF also lets the user assign cost
metrics to a given host router so that some paths are given preference.
OSPF is uses a hierarchical design this means separating the larger internetwork into smaller
networks called areas in order to
Question
Which of the following is a link-state protocol that uses a complex database to choose the best
route for each network?
A. RIP
B. OSPF
C. IGRP
D. BGP
Answer B
Open Shortest Path First (OSPF) is a link-state routing protocol that contains the entire topology
of the network in a database. Because the routers know the entire network topology, they can
choose the shortest path to a route's destination.
A is incorrect, as RIP is a distance-vector routing protocol that contains only a routing table of
routes learned by rumour through directly connected neighbors.
C is incorrect, as IGRP is also a distance-vector routing protocol.
D is incorrect, as BGP is a path-vector routing protocol used between autonomous systems on
WANs and the Internet.
Notice how each area connects to the backbone called area 0, or the backbone area. OSPF must
have an area 0 and all other areas should connect to this area.
Routers that connect other areas to the backbone area within an AS are called Area Border
Routers (ABRs). Still at least one interface of the ABR must be in area 0.
OSPF runs inside an autonomous system, but it can also connect multiple autonomous systems
together.
The router that connects these external ASes is called an Autonomous System Border Router
(ASBR).
Classification of Routers
The OSPF routers fall into four types according to the position in the AS
Internal Router
Routers with all their interfaces within the same area.
Backbone Router
Routers with at least one interface in area 0 attached to the backbone area. Therefore, all ABRs
and internal routers in area 0 are backbone routers.
Question
A single router interconnects Area 0, Area 10, and a non-OSPF external network. How can the
router be described in pure OSPF terms? (Choose all that apply.)
A. ABR
B. ASBR
C. Backbone router
D. Internal router
E. External router
Answer B
ASBR
OSPF Terminology
Router ID The Router ID (RID) is an IP address used to identify the router. Cisco chooses the DR
by using the highest IP address of all configured loopback interfaces. If no loop-back interfaces
are configured with addresses, OSPF will choose the highest IP address of all active physical
interfaces.
Adjacency An adjacency is a relationship between two OSPF routers that permits the direct
exchange of route updates. OSPF is really picky about sharing routing information – unlike
EIGRP which directly shares route with all its neighbours. Instead OSPF directly shares routes
only with neighbors that have also established adjacencies not all neighbors will become adjacent
this depends upon both the type of network and the configuration of the routers.
Hello protocol The OSPF Hello protocol provides dynamic neighbor discovery and maintains
neighbour relationships. Hello packets and Link State Advertisements (LSAs) build and maintain
the topological database. Hello packets are addressed to 224.0.0.5
OSPF routers will only become Neighbors if their interfaces share a network that’s configured to
belong to the same area number which can be a number in the range 1 – 4294967295 or a dotted
decimal e.g. 0.0.0.0 is a legitimate area.
Adjacencies are created when neighboring routers exchange link state routing information
(LSAs).
To minimize update information on a segment, OSPF creates a designated router (DR) as well as
a backup designated router to act as the central point for routing table updates. All routers in a
segment keep up-to-date tables but exchange routing information with only the designated
routers.
Adjacent routers free up network resources by centralizing the routing table update process,
limiting the update information traffic between neighbors.
Topological database All the Link State Advertisements packets that have been received for an
area. The router uses the information from the topological database input into the Dijkstra
algorithm.
Link State Advertisement An OSPF data packet containing link-state and routing information.
An OSPF router will exchange LSA packets only with routers with established adjacencies.
The Designated Router is elected by the Hello Protocol. A router's Hello Packet contains its
Router Priority, which is configurable on a per-interface basis. The election is won by the router
with the highest priority if this doesn’t differentiate then the Router ID is taken into account.
Note: After election of DR and BDR, adding a new router with higher priority will not replace them.
The first two routers immediately become DR and BDR. The only way to control the election is to
set the priority for all other routers "DROTHER" to zero so they cannot become DR or BDR.
If there is no DR, the link state communication at a certain network segment would be like a full
mesh.
Question
Which one of the following privileged EXEC mode show commands will display the state of the
OSPF DR/BDR election process?
Answer A
This command will display the router ID of both the DR and the BDR on the network segment the
interface is connected to.
Non-broadcast multi-access NBMA networks are types such as Frame Relay, X.25 and ATM.
These networks allow for multi-access but have no broadcast ability like Ethernet. So NBMA
require special OSPF configuration.
Point-to-point Network topology consisting of a direct connection between two routers, this can
be physical through a serial cable or logical with routers thousands of miles away. This eliminates
the need for DRs/BDRs
Question
On point-to-point networks, OSPF hello packets are addressed to which address?
A. 127.0.0.1
B. 172.16.0.1
C. 192.168.0.5
D. 223.0.0.1
E. 224.0.0.5
F. 254.255.255.255
Answer E
In point-to-point network, OSPF does not choose DR / BDR, all the HELLO packets send to
224.0.0.5
Question
On which types of network will OSPF elect a backup designated router?
Answer E
Question
In which types of networks are OSPF DR elections necessary? (Choose two.)
A. point-to-point
B. point-to-multipoint
C. broadcast multiaccess
D. nonbroadcast multiaccess
Answer C & D
broadcast multiaccess
nonbroadcast multiaccess
For OSPF configuration in a NBMA mode, the commands used are
interface serial number.subinterface-number multipoint and
router ospf process-id followed by the
network address wildcard-mask area area-id command.
In a NBMA mode, OSPF operates very much like it does in a broadcast network where the
routers exchange update traffic to identify their neighbors and elect a DR and BDR.
Configuration of neighbors is required however with the neighbor ip-address command, and
neighbors must belong to the same subnet. Once configured, the OSPF operation can be verified
with the commands
Neighbour States
OSPF routers that are directly connected should exchange Hellos and form neighbour
relationships. On a point to point link, every neighbour relationship should also result in an
adjacency being formed, but that’s not necessarily true where say several routers are connected
to the same LAN segment—in this case they will only form an adjacency with the Designated
Router and BDR.
When an OSPF adjacency is formed between neighbours, a router goes through several state
changes before it becomes fully adjacent with its neighbor. Until all required adjacencies have
been formed, your network will not operate correctly.
Whenever a router sees itself in a neighbor hello packet, it confirms bidirectional communication
and transitions the neighbor state to two-way. At this point, the routers perform DR and BDR
election. Once DR and BDR are elected, a router attempts to form a full adjacency with a
neighbor if one of the two routers is the DR or BDR. OSPF routers become fully adjacent with
routers with which they have successfully completed the database synchronization process. This
is the process by which OSPF routers exchange link-state information to populate their databases
with the same information. Again, this database synchronization process is only executed
between two routers if one of the two routers is the DR or BDR.
The 2WAY state means that there is bi-directional communication between them, which is normal
on a broadcast medium. If this was a point to point link, it would indicate a problem, since 2WAY
should change to FULL.
Neighbor ID
The Neighbor ID is the router ID of the neighbor router. The router ID is the highest IP address or
the highest ip address among loopback addresses (if one is configured) on the Cisco router or
can be configured manually by "router-id x.x.x.x". Once the router ID is chosen, it will not be
changed unless the ospf process is reset (clear ip ospf process xx) or the router is reloaded. And
IP address of router ID doesn't need to be reachable.
Priority
The Pri field indicates the priority of the neighbor router. The router with the highest priority
becomes the designated router (DR). If the priorities are the same, then the router with the
highest router ID becomes the DR. By default, priorities are set to 1. A router with a priority of 0
never becomes a DR or a backup designated router (BDR); it is always a DROTHER, meaning a
router that isn’t the DR or the BDR.
State
The State field indicates the functional state of the neighbor router. Refer to OSPF Neighbor
States. FULL means the router is fully adjacent with its neighbor.
Attempt This state is only valid for manually configured neighbors in an NBMA environment. In
Attempt state, the router sends unicast hello packets every poll interval to the neighbor, from
which hellos have not been received within the dead interval.
Init This state specifies that the router has received a hello packet from its neighbor, but the
receiving router's ID was not included in the hello packet. When a router receives a hello packet
from a neighbor, it should list the sender's router ID in its hello packet as an acknowledgment that
it received a valid hello packet.
2-Way This state designates that bi-directional communication has been established between two
routers. Bi-directional means that each router has seen the other's hello packet. This state is
attained when the router receiving the hello packet sees its own Router ID within the received
hello packet's neighbor field. At this state, a router decides whether to become adjacent with this
neighbor. On broadcast media and non-broadcast multiaccess networks, a router becomes full
only with the designated router (DR) and the backup designated router (BDR); it stays in the 2-
way state with all other neighbors. On Point-to-point and Point-to-multipoint networks, a router
becomes full with all connected routers.
Full In this state, routers are fully adjacent with each other. All the router and network LSAs are
exchanged and the routers' databases are fully synchronized.
Full is the normal state for an OSPF router. If a router is stuck in another state, it's an indication
that there are problems in forming adjacencies. The only exception to this is the 2-way state,
which is normal in a broadcast network. Routers achieve the full state with their DR and BDR
only. Neighbors always see each other as 2-way.
Dead Time
The Dead Time field indicates the amount of time remaining that the router waits to receive an
OSPF hello packet from the neighbor before declaring the neighbor down. On broadcast and
point-to-point media, the default dead interval is 40 seconds. On non-broadcast and point-to-
multipoint links, the default dead interval is 120 seconds.
Address
The Address field indicates the IP address of the interface to which this neighbor is directly
connected. In the case of unnumbered links, this field shows the IP address of the interface to
which the neighbor is unnumbered. When OSPF packets are transferred to the neighbor, this
address will be the destination address.
Interface
The Interface field indicates the interface on which the OSPF neighbor has formed adjacency.
Neighbor Discovery
Route Discovery
Stuck at EXSTART/EXCHANGE
Things have started out okay there’s a relationship formed but the two routers have a problem
often caused by vendor interoperability issues, typically MTU mismatches.
The moment you start suspecting that something might be wrong with the OSPF adjacencies and
use debug ip ospf adj command, the problem becomes obvious: the Database Description
packet contains an Interface MTU field and if the value received from the neighbor is higher than
the ip MTU configured on the inbound interface, the DBD packet is rejected. The router with the
lower MTU complains that “Nbr x.x.x.x has larger interface MTU”
A maximum transmission unit (MTU) is the largest size packet or frame, specified in octets, that
can be sent in a packet- or frame-based network such as the Internet. The Internet's TCP uses
the MTU to determine the maximum size of each packet in any transmission. Too large an MTU
size may mean retransmissions if the packet encounters a router that can't handle that large a
packet.
The "Internet Cell size" is effectively 1500 bytes - the Maximum Transmission Unit (MTU) for
Ethernet.
Question
Which of the following should be considered when troubleshooting a problem with the
establishment of neighbor relationships between OSPF routers? (Choose three.)
Answer A, C, F
If you’re adding a router, remember that you must use the same authentication type within the
whole area - any area border routers will need authentication configured for each. It’s always
possible that you could have mistyped an authentication key, but debugging the OSPF process
should tell you that authentication is failing if this is the case
Designated Router (DR)
Do not confuse the DR with an OSPF router type. A given physical router can have some
interfaces that are designated (DR), others that are backup designated (BDR), and others that
are non-designated.
This leads to a problem, the update information in the network will be copied many times and will
take up much valuable network resources. If there is only one leader as DR and a BDR, then the
issue will be resolved: all non-DR and non-BDR routers who get update information will only tell it
to DR and BDR, and then the updated information will be transmitted to other routers by DR.
The DR has a heavy load so choose a router with excellent processing capabilities.
1. The router with the highest Priority becomes the DR the next highest becomes the BDR.
The priority values range between 0 - 254, with a higher value increasing its chances of becoming
DR or BDR.
2. If two or more routers tie with the highest priority setting, the router sending the Hello with the
highest RID (Router ID) wins. Note, a RID is the highest logical (loopback) IP address configured
on a router.
3. If no logical/loopback IP address is set then the Router uses the highest IP address configured
on its active interfaces. (e.g. 192.168.0.1 would be higher than 10.1.1.2).
In the election routers compare Router ID and priority level, OSPF default priority is 1 if this hasn’t
been altered, routers only need to compare Router ID. However, manual changes to the priority
can control the election.
A router with the highest OSPF priority will win the election for DR.
For example, we need to change R3 to DR, R1 as the BDR and the rest as Drother.
R3#config t
R3(config)#interface f0/0
R3(config-if)#ip ospf priority 100
R1#config t
R1(config)#interface f0/0
R1(config-if)#ip ospf priority 80
Highest priority wins so R3 will be the DR, next highest is R1 the BDR
Note we have to reload or shutdown the routers for election to take place and priority take effect.
Priority areas are 0 to 255, when the priority of a router is 0, the router will not participate in
the election.
Then check whether the configuration will be into force by the command of
“show ip OSPF neighbor”.
The show ip ospf neighbor command summarises the OSPF information regarding
priority, neighbours and adjacency state and id and if DR or BDR exits.
Question
The routers in the diagram are configured as shown. The loopback interface on router R1 is
labelled as lo0. All OSPF priorities are set to the default except for Ethernet0 of router R2, which
has an OSPF priority of 2. What will be the result of the OSPF DR/BDR elections on the 192.1.1.0
network? (Choose two.)
A. R1 will be the DR
B. R1 will be the BDR
C. R2 will be the DR
D. R2 will be the BDR
E. R3 will be the DR
F. R3 will be the BDR
Answer B, C
Explanation
OSPF default priority is 1. The highest priority router is R2 with a priority of 2 it is the DR.
The BDR logically should be the loopback interface on R1
A loopback interface is virtual in nature, and thus will never go down as long as the router is
powered on. It doesn't rely on any physical network or cable to be plugged in.
Typically, the router chooses its highest IP address of all physical interfaces. However, if there's a
loopback interface (seen as a manual intervention), the OSPF process will always use the
loopback address as its RID value. However here the loopback interface isn’t connected so R3
the highest ip address is chosen as the BDR.
Transition of Priority and DR/BDR
Even if routers with a higher priority are added later, The DR/BDR doesn’t change!
Question
A network administrator is troubleshooting the OSPF configuration of routers R1 and R2. The
routers cannot establish an adjacency relationship on their common Ethernet link. The graphic
shows the output of the show ip ospf interface e0 command for routers R1 and R2. Based on the
information, what is the cause of this problem?
Answer D
Explanation
Certain parameters within the OSPF hellos must match in order for two routers to become
neighbors. They include.
1 Hello/dead timers
2 Area ID
3 Authentication type and password
4 Stub area flag
Question
The OSPF Hello protocol performs which of the following tasks? (Choose two.)
Answer A, C
SPF Tree
Within an area each router calculates the best/shortest path to every network in that same area. If
a router has interfaces in multiple areas, then separate trees will be constructed for each area.
One of the key criteria of SPF route selection is the metric or cost of a path. Cisco uses a
10^8/bandwith.
An interface with a bandwith of 64000 would have a default cost of 1563.
Question
Which router is the root of an SPF tree?
A. border router
B. nearest neighboring router
C. local router
D. trunk router, as determined by the SPF algorithm
Answer C
local router
Question
You have configured an OSPF interface with the bandwidth 128 command. What is the calculated
OSPF cost of this link?
A. 1
B. 781
C. 1562
D. 64000
E. 128000
Answer B
The formula that OSPF uses to figure the cost of a path is 108/bandwidth (bps). In this case,
10^8/128000 = 781.25.
A is incorrect, as that is the cost of a 100Mbps link.
C is incorrect, as that is the cost of a 64K link. D and E are invalid costs.
Question
What does OSPF use to calculate the cost to a destination network?
A. bandwidth
B. bandwidth and hop count
C. bandwidth and reliability
D. bandwidth, load, and reliability
Answer A
Bandwidth
Enabling OSPF
CCNA covers only single area OSPF with each router running a single OSPF process.
OSPF Process ID
To activate the OSPF routing process:
A value in the range 1-65535 identifies the OSPF Process ID. It’s a unique number on this router
that groups a series of OSPF commands under a specific running process. Different OSPF’s
don’t have to use the same Process ID in order to communicate its purely a local value that has
little meaning. It can be the same on every router on the network or it can be different it doesn’t
matter. It’s locally significant and just enables the OSPF routing on the router.
After the OSPF process we need to identify the interfaces and area on which you want to activate
OSPF.
RouterA#config t
RouterA(config)#router ospf 1
RouterA(config-router)#network 10.0.0.0 0.255.255.255 area 0
In multi-area OSPF networks all areas are required to connect to area 0 the backbone area.
The arguments of the network command are the network number (10.0.0.0) and the wildcard
mask (0.255.255.255)
The combination of these 2 numbers identifies the interfaces that OSPF will operate on and is
included in OSPF Link State Advertisements (LSA’s).
OSPF will use this command to find any interface on the router that’s configured in the 10.0.0.0
network and it will place that interface into area 0.
If you have more than one network statement, the order becomes important. In the following
example, the last line matches all IP addresses and assigns them to Area 0. But, because this
line comes last, it only picks up any addresses that are not captured by either of the lines above
it. However, if we had written this line first, then all of the interfaces would wind up in Area 0.
Router1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router1(config)#router ospf 55
Router1(config-router)#network 10.0.0.0 0.255.255.255 area 2
Router1(config-router)#network 172.20.0.0 0.0.255.255 area 100
Router1(config-router)#network 0.0.0.0 255.255.255.255 area 0
Router1(config-router)#end
Router1#
Question
Which command sequence will enable OSPF in the backbone area for the two Ethernet links on
RouterA?
Answer B
Answer C & E
Explanation
OSPF uses areas in a hierarchical fashion and the backbone area is always area 0. All other
areas have at least one connection to area 0.
Incorrect Answers
A. Loopback interfaces are often used in OSPF networks so that the router ID can be configured.
However this is not a requirement.
B. The area-id can be an integer between 0 and 4294967295, 65535 relates to OSPF process ID
D. Mentions Hierarchical areas which require multiple areas
F. Single area OSPF networks do not have to be configured with the backbone area 0
Although area 1 can indeed be used it is not required that area 1 is used.
Question
On the topic of OSPF routing which of the following are the traits of an OSPF area?
Select three
Answer C, D, E
Explanation
D. OSPF networks do not require multiple areas as all routers can be contained within a
single area. If an OSPF network is configured as a single area then area 0 does not need
to be used. No mention of “Hierarchical therefore D is correct!
A 0 octet in the wildcard mask indicates that the corresponding octet in the network must match
exactly. On the other hand a 255 indicates that we don’t care what the corresponding octet is in
the network number.
A network and wildcard mask combination of 1.1.1.1 0.0.0.0 would match 1.1.1.1 only and
nothing else.
This is useful to activate OSPF on a specific network to match a range of networks the network
and wildcard mask combo of 1.1.0.0 0.0.255.255 would match anything in the range 1.1.0.0 -
1.1.255.255
The final argument is the area number. It indicates the area to which the interfaces identified in
the network and wildcard mask belong. OSPF routers become neighbours only if their interfaces
share a network that configured to the same area number.
Wildcard Example
Test#config t
Test(config)#router ospf 1
Test(config-router)#network 192.168.10.0 0.0.0.255 area 0
But to cover CCNA objectives lets use separate subnets and wildcards
Test#config t
Test(config)#router ospf 1
Test(config-router)#network 192.168.10.64 0.0.0.15 area 0
Test(config-router)#network 192.168.10.80 0.0.0.15 area 0
Test(config-router)#network 192.168.10.96 0.0.0.15 area 0
Test(config-router)#network 192.168.10.8 0.0.0.3 area 0
Remember when configuring wildcards they’re always one less than the block size.
A /28 is a block size of 16
The /28 means that the first 28 bits of the subnet mask are set to binary 1
11111111.11111111.11111111.11110000
255.255.255.240
256 – 240 = 16 block size
so we will have the subnet number then a wildcard of 15 in the interesting octet.
Example
Another Example
The RouterA router has two directly connected subnets 192.168.10.64/29 and 10.255.255.80/30
RouterA#config t
RouterA(config)#router ospf 1
RouterA(config-router)#network 192.168.10.64 0.0.0.7 area 0
RouterA(config-router)#network 10.255.255.80 0.0.0.3 area 0
RouterA#config t
RouterA(config)#router ospf 1
RouterA(config-router)#network 192.168.10.48 0.0.0.7 area 0
RouterA(config-router)#network 10.255.255.80 0.0.0.3 area 0
RouterA(config-router)#network 10.255.255.8 0.0.0.3 area 0
RouterA#config t
RouterA(config)#router ospf 1
RouterA(config-router)#network 192.168.10.16 0.0.0.7 area 0
RouterA(config-router)#network 10.255.255.8 0.0.0.3 area 0
OK let’s configure OSPF using just area 0. Before we do that lets remove IGRP EIGRP because
OSPF has an administrative distance of 110 (IGRP 100, EIGRP 90) and why not remove RIP as
well.
There are different ways to configure OSPF the simplest is using the wildcard mask of 0.0.0.0
however OSPF is more fun and hence easier to mess up so we see how to configure each router
differently.
RouterA#config t
RouterA(config)#no router eigrp 10
RouterA(config)#no router igrp 10
RouterA(config)#no router rip
RouterA(config)#router ospf 132
RouterA(config-router)#network 192.168.10.1 0.0.0.0 area 0
RouterA(config-router)#network 192.168.20.1 0.0.0.0 area 0
RouterA(config-router)# ˆZ
RouterA#
Here we removed eigrp, igrp and rip why did we use OSPF 132 no reason the number isn’t
relevant, here we used the IP address of each interface and the wildcard mask of 0.0.0.0 which
makes things match each octet exactly for simplicity.
RouterB is directly connected to networks 20, 30, 40. Instead of typing in each interface I can use
one network interface and still make it work.
RouterB#config t
RouterB(config)#no router eigrp 10
RouterB(config)#no router igrp 10
RouterB(config)#no router rip
RouterB(config)#router ospf 1
RouterB(config-router)#network 192.168.0.0 0.0.255.255 area0
/\
Invalid input detected at /\ marker
RouterB(config-router)#network 192.168.0.0 0.0.255.255 area 0
RouterB(config-router)# ˆZ
RouterB#
OK we had a little typo where we forgot to place a space between the area command and the
area number other than that this is an efficient configuration. Here we turned on routing process 1
and added the network command 192.168.0.0 with a wildcard of 0.0.255.255
This says find any interface that starts with 192.168 and place those interfaces into area 0.
RouterC Configuration
RouterC#config t
RouterC(config)#no router eigrp 10
RouterC(config)#no router igrp
% incomplete command
RouterC(config)#no router igrp 10
RouterC(config)#no router rip
RouterC(config)#router ospf 64999
RouterC(config-router)#network 192.168.0.0 0.0.255.255 area 0
RouterC(config-router)#network 192.168.0.0 0.0.255.255 area 0
RouterC(config-router)# ˆZ
RouterC#
We used 64999 for the process ID, we can use any number as long as its between 1 - 65535.
Question
You would like to ensure that the Serial interface 0/0 with an IP address of 10.30.12.1/16
participates in OSPF advertisements and is a member of area 1. What network statement should
you use?
Answer B
If the area address ranges are nicely assigned (which also helps immensely when you have to
start summarizing), you can use a single network statement to cover the whole area. If, for
example, area 3 has address range 10.1.16.0/20,
use network 10.1.16.0 0.0.15.255 area 3
If the router has all interfaces in a single area, I would always use
network 0.0.0.0 255.255.255.255 area area-id
(unless there is an extremely good reason that some interfaces should not be seen by the OSPF)
Using the Cisco Router and Security Device Manager (SDM).
Turn off RIP and EIGRP, although RIP wont bother OSPF since OSPF has a lower AD.
Next the EIGRP being disabled just click the Delete button.
After clicking on the OSPF tab, I clicked Add Network and added my OSPF information.
OSPF uses the largest IP address configured on the interfaces as its router ID.
If the interface with this IP address goes down or is removed the OSPF process must recalculate
a new router ID and resend all its routing information out its interfaces.
If a loopback interface is configured with an IP address, Cisco IOS will use this IP address as its
router ID, even if other interfaces have larger IP addresses. Since loopback interfaces are logical
software virtual interfaces that never go down giving greater stability in the routing table.
OSPF automatically prefers a loopback interface over any other kind and it chooses the highest
IP address among all loopback interfaces. If no loopback interfaces are present the highest IP
address in the router is chosen.
To configure an IP address on a loopback interface, perform the following in global config mode.
To ensure OSPF stability there should be an active interface for the OSPF process at all times.
A Loopback interface is a logical interface if we haven’t used loopback interfaces and the router
ID, a serial interface with the highest IP address goes down then a re-election must occur on the
network in order to determine who is going to be the DR and BDR on the network, not a problem
for OSPF unless this is a flapping link (going up/down).
Loopback interfaces solve this problem as they never go down and so the RID of the router never
changes.
There are several ways to set the OSPF RID. The easiest is to create and configure a loopback
interface
Router5#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router5(config)#interface Loopback0
Router5(config-if)#ip address 172.25.25.6 255.255.255.255
Router5(config-if)#end
Router5#
If you don't want to use a Loopback interface, you can still force the router ID to use a particular
IP address with the router-id configuration command
Router5#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router5(config)#router ospf 87
Router5(config-router)#router-id 172.25.1.7
Router5(config-router)#end
Router5#
You can see what the RID for your router is with the following command:
Router5#show ip ospf
Routing Process "ospf 87" with ID 172.25.1.7
Supports only single TOS(TOS0) routes
SPF schedule delay 5 secs, Hold time between two SPFs 10 secs
Minimum LSA interval 5 secs. Minimum LSA arrival 1 secs
Number of external LSA 5. Checksum Sum 0x28868
Number of DCbitless external LSA 0
Number of DoNotAge external LSA 0
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
Area BACKBONE(0)
Number of interfaces in this area is 2
Area has no authentication
OSPF DR setup
Router#config terminal
Router(config)#hostname Man
Man(config)#interface fa0/0
Man(config-if)#ip address 192.168.1.1 255.255.255.0
Man(config-if)#no shutdown
Man(config-if)#interface loopback 0
Man(config-if)#ip address 192.168.31.11 255.255.255.255
Note: the no shutdown command. An interface may be correctly configured and physically
connected, yet be "administratively down." In this state it will not function.
Man(config)#router ospf 1
Man(config-router)#network 192.168.1.0 0.0.0.255 area 0
1 is the ospf process ID which is locally significant.
Another Example
Lets see the RID on the Corp router with show ip ospf
We can see that the RID is 10.1.5.1
Lets configure a loopback interface using an ip address of 172.16.10.1
The IP scheme really doesn’t matter here but each router has to be in a separate subnet by using
the /32 mask we can use any IP address we want as long as the address are different on each
router.
The /32 mask 255.255.255.255 is a host mask and allows us to save subnets
Now check we actually changed the RID of our router by setting the loopback interface
Logical interfaces don’t automatically become the RID of the router we need to reboot or delete
OSPF
You can see what the RID for your router is with the following command.
Router5#show ip ospf
Routing Process "ospf 87" with ID 172.25.1.7
Supports only single TOS(TOS0) routes
SPF schedule delay 5 secs, Hold time between two SPFs 10 secs
Minimum LSA interval 5 secs. Minimum LSA arrival 1 secs
Number of external LSA 5. Checksum Sum 0x28868
Number of DCbitless external LSA 0
Number of DoNotAge external LSA 0
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
Area BACKBONE(0)
Number of interfaces in this area is 2
Area has no authentication
The router will continue to use the same RID address, even if you subsequently add a router-id
command or a loopback interface. To force OSPF to update the RID, you can either reload the
router or restart the OSPF process using the clear ip ospf process command.
RouterA, RouterB, and RouterC in the diagram are running OSPF on their Ethernet interfaces.
Loopback interfaces (Lo 0) are configured as shown. What happens when RouterD is added to
the network?
Answer F
There is no change in the DR or BDR until either current DR or BDR goes down.
Explanation
DR / BDR elections are "sticky"
so once you have a DR, it doesnt change unless the current DR goes away, in
which case OSPF promotes the current BDR if there is one.
The RID is the value by which other OSPF routers will identify a given OSPF router. There are
some interesting defaults for this value, and you should know to hardcode the RID. You had also
better know what has to happen for this command to take effect, so let's take a more detailed look
at the OSPF RID.
In this example, R1 has an adjacency with R2 and R3 over the 172.12.123.0/24 frame network.
R1 is the hub, with R2 and R3 as the spokes. No other interfaces are OSPF-enabled on any of
the routers. Running show ip ospf neighbor on R2, we see some unusual values under
"Neighbor ID", which is another name for the OSPF RID.
Notice that R1's RID is 11.11.11.11, which is one of the loopbacks on that router. No interface
other than the serial interface is OSPF-enabled on R1. How can 11.11.11.11 be the OSPF RID if
these loopbacks are not OSPF-enabled?
When determining the Router ID (RID) of an OSPF-enabled router, OSPF will always use the
numerically highest IP address on the router’s loopback interfaces, regardless of whether that
loopback is OSPF-enabled.
What if there is no loopback? OSPF will then use the numerically highest IP address of the
physical interfaces, regardless of whether that interface is OSPF-enabled.
BOTTOM LINE: An interface does not have to be running OSPF to have its IP address used
as the OSPF RID.
The OSPF RID can be changed, but it requires a restart or to reinitialize the OSPF routing
process. Use the router-id command to change the default RID of each router as shown, and
clear the OSPF process to have the change take effect.
After entering the router-id command, the router console informed you that you have to reload
the router or reset the OSPF processes for this to take effect. You enter the clear ip ospf
process command to do this. Notice that when you’re asked if you really want to do this, the
prompt is “no”? That’s because all the OSPF adjacencies on this router will be lost and will have
to begin the process again. That’s OK on a practice rack, not good in a production network. Don’t
use that one at work.
The OSPF RID is not a complicated concept, but the fact that an interface doesn't have to be
OSPF-enabled in order to have its IP address act as the RID takes some getting used to.
Question
You need to verify the router ID assigned to one of your OSPF speaking routers. What command
accomplishes this?
Answer C
This is a typical OSPF hub-and-spoke network. R1 is serving as the hub, with R2 and R3 as the
spokes. R2 and R3 can communicate, but any traffic going from one spoke to another must go
through the hub. Since R1 will not forward broadcasts or multicasts between the spokes -
including OSPF Hellos - there are some special considerations to take into account when
configuring this OSPF network type.
Make sure the hub is the designated router and that there are no backup designated routers. This
is done by setting the OSPF interface priority to zero on the spoke routers.
R2(config)#int s0
R2(config-if)#ip ospf priority 0
This not only ensures that the hub wins the DR election with its default OSPF interface priority of
1, but it prevents the spokes from ever having a chance to become the DR or BDR.
Configure neighbor statements on the hub. Since we're dealing with an NBMA network, the hub
cannot dynamically discover its neighbors. Neighbor statements are not needed on the spokes.
(They don't hurt anything, but they don't do anything, either.)
R1(config)#router ospf 1
R1(config-router)#neighbor 172.12.123.2
R1(config-router)#neighbor 172.12.123.3
Finally, if your OSPF adjacencies do not form as expected, make sure to use your OSI model
knowledge. The issue may actually be at Layer Two, with your Frame Relay configuration. If you
don't use the broadcast option on your frame relay statements, OSPF hellos will not be
transmitted successfully between potential neighbors. OSPF hellos are multicast, but the
broadcast option for Frame Relay includes multicasts.
R1(config)#interface serial0
R1(config-if)#frame map ip 172.12.123.2 122 broadcast
R1(config-if)#frame map ip 172.12.123.3 123 broadcast
The commands
show ip ospf
show ip ospf database
show ip ospf interface
show ip ospf neighbor
show ip route
This router output shows routes connected with O which is OSPF also there are dual routes to
networks 10.1.6.0 and 10.1.7.0. Note OSPF only uses bandwidth to determine best path also
OSPF can load balance only across links of equal costs. It cant load balance across unequal cost
links as EIGRP can.
Show ip ospf
The show ip ospf is used to display OSPF process information running on the router and
shows router ID, area information, SPF statistics and LSA timer information.
Notice the Router ID (RID) of 192.168.0.3 which is the highest IP address in the router.
Lets configure a loopback interface using a completely different IP addressing scheme.
RouterA#config t
RouterA(config)#int loopback 0
RouterA(config-if)#ip address 172.16.10.1 255.255.255.0
RouterA(config-if)# ˆZ
RouterA#
The IP scheme really doesn’t matter here, but each router has to be in a separate subnet. Lets
configure RouterB now?
RouterB#config t
RouterB(config)#int lo0
RouterB(config-if)#ip address 172.16.20.1 255.255.255.0
RouterB(config-if)# no shut
RouterB(config-if)# ˆZ
RouterB#
RouterC#config t
RouterC(config)#int lo0
RouterC(config-if)#ip address 172.16.30.1 255.255.255.0
RouterC(config-if)# no shut
RouterC(config-if)# ˆZ
RouterC#
The only question left to answer is if you want to advertise the loopback interfaces under
OSPF. There are pro’s and cons to using an address that wont be advertised vs one that is.
Using an unadvertised address saves on real IP address space, but the address wont appear in
the OSPF table, so you cant’ ping it. So there is a trade off between the ease of debugging the
network and conservation of address space. The best strategy is to use private IP address
scheme.
To verify the loopback address use the show running-config command
RouterC#show running-config
!
hostname RouterC
!
interface Loopback0
ip address 172.16.30.1 255.255.255.0
!
The show ip ospf command shows the RID in the 1st line.
RouterC#show ip ospf
Routing Process “ospf 64999” with ID 172.16.30.1 and Domain ID
0.0.253.231
Note the new RIDs don’t show up after the loopback interface is setup until after they are
rebooted!!!
Question
You work as network administrator your trainee is configuring a router with both physical and
logical interfaces. He asks you what factor determines the OSPF router ID.
What should you tell him?
Answer E
Explanation
The OSPF topology database includes information about routers and the subnets, or links, to
which they are attached. To identify the routers in the neighbor table’s topology database, OSPF
uses a router ID (RID) for each router. A router’s OSPF RID is that router’s highest IP address on
a physical interface when OSPF starts running.
Note: The OSPF router ID is a 32-bit IP address selected at the beginning of the OSPF process.
The highest IP address configured on the router is the router ID. If a loopback address is
configured, then it is the router ID. In case of multiple loopback addresses, the highest loopback
address is the router ID. Once the router ID is elected it doesn't change unless the IP address is
removed or OSPF restarts.
The show ip database command indicates the number of routers in the internetwork (AS) and the
neighboring router’s ID (this is the topology database) unlike the show ip eigrp topology command
OSPF routers are shown not each and every link in the AS as EIGRP does.
The show ip ospf database shows the RID in the first line of output. 172.16.30.1
The router output shows the link ID (remember that an interface is also a link) and the RID of the
router on that link under the ADV router (advertising router)
Link-State: The status of a link between two routers also a router interface and its relationship to
its neighboring routers.
Question
What information can be obtained from the output of the show ip ospf interface command?
(Choose three.)
Answer B, C E
Question
Which router command will display the interface priority value and other key information for the
OSPF configuration of the serial 0 interface?
A. router# show ospf serial 0
B. router# show interface serial 0 OSPF
C. router# show ip interface serial 0
D. router# show ip ospf interface serial 0
Answer D
Hello and Dead timers are not the same router B has the default timers for OSPF 10 and 40.
So use the show ospf neighbor command to see who won DR election
Here 871W became the designated router, Corp is configured with point-to-point links and doesn’t
enter DR or BDR election.
RouterA#sh ip protocols
Routing Protocol is “ospf 132”
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Router ID 192.168.20.1
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
Maximum path:4
Routing for Networks
192.168.10.1 0.0.0.0 area 0
192.168.20.1 0.0.0.0 area 0
Routing Information Sources
Gateway Distance Last Update
192.168.40.1 110 00:05:56
192.168.40.2 110 00:05:56
192.168.20.1 110 00:05:56
RouterA#
Debugging OSPF
Shows router is sending and receiving hello packets
Question
All parameters are set to default which path will RouterA use to reach RouterD?
Answer
Since IGRP has an AD of 100 and OSPF has an AD of 110 Router A will send packets to
RouterD through RouterC.
Question
On an OSPF router, you use the following command in Router Configuration mode for OSPF
network 0.0.0.0 255.255.255.255 area 0
Answer C
This answer identifies all interfaces on a router with the 0.0.0.0 255.255.255.255 (All addresses)
identifier.
A is incorrect, as even though you are identifying all interfaces with Area 0, this command does
not send out an LSA to the Area.
B is incorrect, as the router id command configures a router with a specific router ID.
D is incorrect, as this is an invalid command.
Question
You are working on the network shown. You need to configure all interfaces on the Cedar router
for OSPF in Area 0. Which of the following syntax examples would accomplish this task and
ensure that OSPF runs on only the interfaces depicted below?
A. Cedar(config)#router ospf 1
Cedar(config-router)#network 192.168.2.0 0.0.0.255 area 0
Cedar(config-router)#network 10.0.0.0 0.255.255.255 area 0
B. Cedar(config)#router ospf 1
Cedar(config-router)#network 192.168.2.0 255.255.255.0 area 0
Cedar(config-router)#network 10.1.2.0 255.255.255.0 area 0
Cedar(config-router)#network 10.1.10.0 255.255.255.0 area 0
Cedar(config-router)#network 10.1.8.0 255.255.255.0 area 0
C. Cedar(config)#router ospf 1
Cedar(config-router)#network 192.168.2.0 255.255.255.0 area 0
Cedar(config-router)#network 10.0.0.0 255.0.0.0 area 0
D. Cedar(config)#router ospf 1
Cedar(config-router)#network 192.168.2.1 0.0.0.0 area 0
Cedar(config-router)#network 10.1.2.1 0.0.0.0 area 0
Cedar(config-router)#network 10.1.10.1 0.0.0.0 area 0
Cedar(config-router)#network 10.1.8.1 0.0.0.0 area 0
Answer D
Answer D is the most precise method to add interfaces to the OSPF routing process. A wildcard
mask of 0.0.0.0 tells OSPF to run on the interface that has exactly the IP address that you have
typed in before the wildcard mask. In this case, all the IP addresses were typed in exactly as
defined on the interfaces with the wildcard mask of 0.0.0.0. This ensures OSPF does not run on
any interfaces that are either not shown in the figure or that may be added in the future.
Answer A accomplishes part of the objective because OSPF runs on any interface starting with
192.168.2 or 10 (because of the wildcard mask applied); however, in the future, if any interface is
added to the router that has an IP address beginning with the number 10, it will automatically
begin running OSPF.
Answers B and C are incorrect because OSPF network statements require you to enter the
wildcard mask rather than the subnet mask.
Question
Your new network engineer is curious as to why you are using OSPF in your network versus
EIGRP. Which of the following is a valid explanation?
Answer D
EIGRP is a proprietary Cisco routing protocol that does not function on other vendors' routers.
OSPF, however, is an industry standard. A is incorrect, as EIGRP is actually a bit faster than
OSPF in converging. B is incorrect, as EIGRP, although not technically a link-state protocol, uses
link-state behavior. C is incorrect, as EIGRP's DUAL algorithm is equally capable of route
calculation as OSPF's Dijkstra's algorithm.
Question
Which of the following OSPF commands, when used together, will put the network
192.168.10.0/24 into OSPF area 0? (Select all valid responses)
Answer B, E
Explanation
B. The network command specifies the IP address (192.168.10.0) followed by the wildcard mask
(not the subnet mask), and the area that is to be associated with the OSPF address range (in this
case, area 0). The wildcard mask indicates in binary how much of the IP address much be
matched with 0s indicating that the bits must match and 1 indicating that they may vary. Thus
0.0.0.255 or 00000000.00000000.00000000.11111111 indicates that any bit in the last octet can
vary while all bits in the first 3 octets must match the network address (in other words,
192.168.10.xx)
E. The router ospf command enables OSPF routing and enters router configuration mode. This
command takes a <process-id> argument which identifies the OSPF process.
Incorrect Answers
A. This command is correct, except for the fact that the keyword "area" is missing and needs to
be inserted. C. For OSPF, the inverse mask must be used, not the regular subnet mask.
D. OSPF can not use process ID 0, and the goal of this question is to put a specific network in
area 0, not the entire routing process.
Question
A network associate has configured OSPF with the following command: City(config-router)#
network 192.168.12.64 0.0.0.63 area 0. After completing the configuration, the associate
discovers that not all the interfaces are participating in OSPF. Which three of the interfaces
shown below will participate in OSPF according to this configuration statement? (Choose three)
A. Serial0/1.102
B. Serial0/1.104
C. Serial0/1.103
D. FastEthernet0 /1
E. Serial0/0
F. FastEthernet0 /0
Answer A, D, E
Explanation: OSPF uses the concept of wildcard masks much like access list filters. OSPF
network matches are done using the network number and wildcard bits. The network number is
the network portion of the IP address, with the host bits all set to zero. The wildcard bits
determine which portion of the address the access list will act on. Only bits set to zero are acted
upon (bits set to one are ignored.) This is the exact opposite of a netmask. Remember that this
number is in bits, and you will always have all zeros to the left of the first one, and all ones to the
right of the last zero. The table below shows some examples of netmasks and wildcard bits.
In this example, the 192.168.12.64 0.0.0.63 will comprise of all interfaces with an IP address in
the 192.168.12.64-127 range.
Question
The network associate is configuring OSPF on the Core router shown below. All the connections
to the branches should be participating in OSPF. The link to the ISP should NOT participate in
OSPF and should only be advertised as the default route. What set of commands will properly
configure the Core router?
Explanation: There are two ways to inject a default route into a normal area.
1. If the ASBR already has the default route in its routing table, you can advertise the existing
0.0.0.0/0 into the OSPF domain with the default-information originate router configuration
command.
2. If the ASBR doesn't have a default route, you can add the keyword always to the default-
information originate command (default-information originate always). This command will
advertise a default route into the OSPF domain, regardless of whether it has a route to 0.0.0.0.
Another benefit of adding always keyword is that it can add stability to the internetwork. For
example, if the ASBR is learning a default route from another routing domain such as RIP and
this route is flapping, then without the always keyword, each time the route flaps, the ASBR will
send a new Type 5 LSA into the OSPF domain causing some instability inside the OSPF domain.
With the always keyword, the ASBR will advertise the default inside the OSPF domain always,
and thus the flapping of the default route from the RIP domain will not cause any instability inside
the OSPF domain.
Here, only choice D is correct as the wildcard mask correctly specifies the 10.10.2.16 0.0.0.15
networks, which include all IP addresses in the 10.10.2.16-10.10.2.31 range.
Question
On your OSPF network, routers R1 and R2 belong to the same Ethernet network. However, they
are unable to establish an adjacency over this link. While troubleshooting this problem, you issue
the "show ip ospf interface Ethernet 0" command on each router. The output from these
commands is displayed below:
Answer D
Explanation: OSPF routers must have the same hello intervals and the same dead intervals to
exchange information. By default, the dead interval is four times the value of the hello interval.
This means that a router has four chances to send a hello packet before being declared dead. On
broadcast OSPF networks, the default hello interval is 10 seconds and the default dead interval is
40 seconds. On nonbroadcast networks, the default hello interval is 30 seconds and the default
dead interval is 120 seconds. These default values result in efficient OSPF operation and seldom
need to be modified. As shown in the output, the hello timer on router R1 was changed to 5
seconds, with the dead timer being set to 20 seconds.
Incorrect Answers
A. Both routers are configured to be in area 0.
B. In this example the adjacency should come up regardless of which one was the DR/BRD.
Therefore, setting the priority on one router will not solve this problem.
C. This will not solve the adjacency issue.
E. Only the DR is absolutely required on the Ethernet subnet, not the BDR.
F. Unlike other protocols, the routing process ID's do not necessarily need to match in OSPF for
routing to work.
Question
A new router, named R1, is being installed. You wish to add this router to your existing OSPF
network. In doing so, you configure the following
R1(config)# router ospf 1
R1(config-router)# network 10.10.10.0 255.255.255.0 area 0
After making this change, you notice that the networks attached to R1 are not being learned by
the other OSPF routers. What could be the cause of this?
Answer C
Explanation: The network command specifies the IP address (10.10.10.0) followed by the
wildcard mask (not the subnet mask) and the area that is to be associated with the OSPF
address range (in this case, area 0).
The wildcard mask indicates in binary how much of the IP address much be matched with 0s
indicating that the bits must match and 1 indicating that they may vary.
Thus 0.0.0.255 or 00000000.00000000.00000000.11111111 indicates that any bit in the last octet
can vary while all bits in the first 3 octets must match the network address (in other words,
10.10.10.xx)
Question
Which commands are required to properly configure a router to run OSPF and to add network
192.168.16.0/24 to OSPF area 0? (Select two)
Answer B, E
Explanation: The valid OSPF process ID can be a value from 1-65535 (0 is not valid). The
following is the correct syntax:
router# router ospf 1
(router)# network 192.168.16.0 0.0.0.255
This will configure OSPF with process ID 1, and adds the 192.168.16/24 network to be advertised
as belonging to area 0.
Question
Where does OSPF contain the "map" of all the routes it knows about?
A. Neighbor table
B. Topology table
C. Routing table
D. CAM table
Answer B
An OSPF router contains all known routes in its Topology table. It then runs the SPF algorithm for
all the routes to decide the best path based on cost. A is incorrect, as the Neighbor table is
merely the list of routers with which the OSPF router has a neighbor relationship. C is incorrect,
as the Routing table merely contains the best routes calculated from the Topology table. D is
incorrect, as the Content Addressable Memory Table is also known as the MAC address table.
The CAM table is located on Catalyst switches.
Question
Which statements are true regarding the command sequence shown here? (Choose three.)
RouterA(config)# interface loopback 0
RouterA(config-if)# ip address 192.168.31.33 255.255.255.255
Answers A, B, and D.
The command creates a virtual loopback interface with a particular IP address using the
255.255.255.255 subnet mask. When an OSPF router sends a routing update, it includes the
router ID to identify itself. In OSPF, the router ID is the highest IP address of a loopback interface.
C is incorrect, as a router that is not powered up does not have any active interfaces.
E is incorrect, as 255.255.255.255 is typically called a host mask.
F is incorrect, as this command sets up a virtual interface, not a physical Ethernet interface.
Question
What is the maximum number of hops OSPF allows before it deems a network unreachable?
A. 15
B. 16
C. 99
D. 255
E. Unlimited
Answer E
Explanation: OSPF is a link state protocol. Link state protocols do not use hops to mark networks
as unreachable. Instead OSPF implements a steady state operation to its adjacent neighbors by
sending and receiving small Hello packets periodically. When an OSPF router does not receive a
Hello packet for a specified time period, it assumes that the neighbor is down. The router then
runs the SPF algorithm to calculate new routes. Hops counts are not used.
Question
On the topic of the OSPF hello protocol; which of the statements below are true? (Select two)
Answer A, C
Explanation: OSPF contains a protocol (the Hello protocol) that is used to establish and maintain
relationships between neighboring nodes. These relationships are called adjacencies.
Adjacencies are the basis for the exchange of routing data in OSPF. It is through the use of this
protocol, and packet type, that an OSPF node discovers the other OSPF nodes in its area. Its
name is intentionally significant; the Hello protocol establishes communications between potential
neighboring routers. The Hello protocol uses a special subpacket structure that is appended to
the standard 24-octet OSPF header. Together, these structures form a hello packet. All routers in
an OSPF network must adhere to certain conventions that must be uniform throughout the
network. These conventions include the following:
Question
You are an administrator and you've just configured OSPF on a router with both physical and
logical interfaces. Which of the following factors determine the router ID?
Answer C
Explanation: When the OSPF process starts, the Cisco IOS uses the highest local active IP
address as its OSPF router ID. If there is no active interface, the OSPF process will not start. If
the active interface goes down, the OSPF process has no router ID and therefore ceases to
function until the interface comes up again.
To ensure OSPF stability there should be an active interface for the OSPF process at all times. A
loopback interface, which is a logical interface, can be configured for this purpose. When a
loopback interface is configured, OSPF uses this address as the router ID, regardless of the
value. On a router that has more than one loopback interface, OSPF takes the highest loopback
IP address as its router ID. To create and assign an IP address to a loopback interface use the
following commands:
Router(config)#interface loopback number (no can be range from 0 -255)
Router(config-if)#ip address ip-address subnet-mask i.e.
Router(config)#interface loopback 0
Router(config-if)#ip address 192.168.31.33 255.255.255.255
Router(config-if)#exit It is considered good practice to use loopback interfaces for all routers
running OSPF. This loopback interface should be configured with an address using a 32-bit
subnet mask of 255.255.255.255. A 32-bit subnet mask is called a host mask because the subnet
mask specifies a network of one host. When OSPF is requested to advertise a loopback network,
OSPF always advertises the loopback as a host route with a 32-bit mask. Summary loopback
address (logical address) is use when active interfaces (physical addresses) is down in order to
make OSPF stable or reliable.
Question
Under which circumstance, i.e. network type, would an OSPF router establish a neighbor
adjacency, even though the DR/BDR election process was not performed?
A. Point-to-point
B. Broadcast multicast
C. Nonbroadcast multicast
D. Backbone area 0
E. Virtual Link
Answer A
Explanation: If there's a point to point connection, there's no need for a designated router or a
backup designated router election. By definition, only two routers exist on a point to point
connection.
Incorrect Answers
B, C. In these network types, the potential for more than two routers on the segment exist, so the
Designated Router and Backup Designated Routers are elected.
D. This is not a network type. Area 0 is the backbone of any OSPF network.
E. Virtual Links are used in OSPF to link an area to area 0. Every area must be directly
connected to area 0 at some point, and virtual links are used for areas that do not meet this
requirement.
Question
On the assumption that every OSPF router in a particular area is configured with the same priority
value; which secondary value would be used as a router ID when there is no loopback interface
set?
Answer C
Explanation: Ordinarily the loopback interface would be selected as the router ID. In the event
that no loopback interface is configured, the router ID will be the first active interface that comes
up on the router. If that particular interface has more then one IP address, then the highest
address will be selected as the Router ID.
Incorrect Answers
B. Putting an IP address on the management console is a concept that is configured on a
Catalyst switch, not a router.
Question
On the topic of OSPF routing; which of the following are the traits of an OSPF area? (Select all
that apply)
Answer C, E
Explanation: OPSF uses areas in a hierarchical fashion, and the backbone area is always area 0.
All other areas have at least one connection to area 0.
Incorrect Answers
A. Loopback interfaces are often used in OSPF networks, so that the router ID can be configured.
However, this is not a requirement.
B. The area-id can be an integer between 0 and 4294967295.
F. Single area OSPF networks do not have to be configured with the backbone area 0. Although
area 1 can indeed be used, it is not required that area 1 is used. Single area OSPF networks can
be any integer from 0-4294967295.
Question
If the bandwidth of an OSPF interface is configured with the "bandwidth 64" command, what
would be the calculated cost of the link?
A. 1
B. 64
C. 1562
D. 64000
E. 1500
Answer C
Explanation: The question states that OSPF interface has been configured with the bandwidth
64command. Cisco IOS always interprets the values for the bandwidth command as being in
kbps, so the bandwidth is configured as 64 kbps. The metric for any OSPF defaults to
100,000,000/bandwidth. So, in this example: 100,000,000 / 64000 = 1562.5
Question
Which two are NOT characteristics of the OSPF routing protocol? (Select all that apply)
Answer B, D
Explanation: Through the use of areas, routing information and instability's are reduced to specific
areas. This will reduce the routing overhead on a network, not increase it. OSPF is not used to
provide routing information between different systems. BGP is predominately used for this
purpose.
Incorrect Answers: A, C, E. These are all true statements that describe the features and
functionality of OSPF.
Question
On what kinds of networks does OSPF elect a backup designated router?
A. Point-to-point
B. Point to multipoint
C. Broadcast
D. Non-broadcast multi-access
Answer C, D
Explanation: The DR and BDR election process is performed on broadcast and non-broadcast
multi-access networks. Incorrect Answers: A, B: There is no DR or BDR on point to point and
point to multipoint links. On a point to point link, only two routers exist so there is no need for a
DR or BDR.
Question
Three routers are configured for OSPF area 0 as shown in the diagram
You wish to ensure that router CK2 will be preferred as the designated router (DR) for the
172.16.1.0 /24 LAN segment. What configuration tasks could be used to establish this
preference? (Choose all that apply)
A. Configure the priority value of the Fa0/0 interface of RouterCK2 to a higher value than any
other interface on the Ethernet network.
B. Change the router id for Router CK2 by assigning the IP address 172.16.1.130/24 to the Fa0/0
interface of RouterTK2.
C. Configure a loopback interface on RouterCK2 with an IP address higher than any IP address
on the other routers.
D. Change the priority value of the Fa0/0 interface of Router CK2 to zero.
E. Change the priority values of the Fa0/0 interfaces of RouterCK1 and RouterCK3 to zero.
F. No further configuration is necessary.
G. All of the above will make CK2 the DR
Answer A, C, E
Explanation: In order to ensure that a router will become the OSPF DR for any given segment,
there are 3 options.
1.is to manually configure the interface priority as described in option A above using the "ip ospf
priority" interface configuration command.
2. is described in option C. OSPF routers will always use the loopback interface IP address as the
router ID, when configured, and the router with the highest IP address will be chosen as the DR
when the priorities are the same.
Important Note: The OSPF DR/BDR election process is not pre-emptive, so any changes to the
network regarding the DR/BDR election process will only occur when the routers are restarted.
Incorrect Answers
B. This method will not work as the router ID is taken by using the highest IP address of all
interfaces in the router, or from the loopback interface if it is configured. Although choosing this
option will give router CK2 the highest IP address on the LAN segment, the router ID will be taken
from the highest IP address in the router, which as shown will be 192.168.0.101. D. This will
make CK2 ineligible to become either the DR or the BDR.
Question
You are setting up OSPF on your network and your junior administrator asks you about the router
ID. She wants to know what sets the router ID for OSPF on your router. Your network is made up
of ten 2611 routers with two serial, two Ethernet, and two loopback interfaces. What do you tell
her?
Answer C
OSPF uses the highest IP address assigned to a loopback address, which is a logical interface
created on a Cisco router.
A is incorrect because Router ID is always the highest IP address.
B is incorrect, as you have logical loopback interfaces on these routers. Logical interfaces
override physical interfaces. If there were no loopback interfaces, the highest IP address on a
physical interface would be the router ID.
D is incorrect, as the router ID is always the highest IP address on a logical interface.
E is incorrect, as the router ID is always the highest IP address on the either the logical or
physical interface.
Question
You want to filter inbound routes from an OSPF neighbor. Which command do you use?
a. Distribute-list
b. Route-list
c. Prefix-list
d. Filter-list
Answer A
Distribute-list
Question
Refer to the graphic. The network administrator has determined that RTRA needs to be the DR
because it is the more powerful router. Which of the following commands would be used to
control the election process?
Answer B
RTRA(config)# interface fastethernet 0/0
RTRA(config-if)# ip ospf priority 255
Question
On which types of network will OSPF elect a backup designated router?
Answer E
nonbroadcast and broadcast multi-access networks will allow OSPF to elect a backup designated
router
Explanation
A designated router (DR) is the router interface elected above other routers on a particular
multiaccess network segment, generally assumed to be broadcast multiaccess. DRs and BDRs
are always setup/elected on Broadcast networks (Ethernet). DR's can also be elected on NBMA
(Non-Broadcast Multi-Access) networks such as Frame Relay or ATM. DRs or BDRs are not
elected on point-to-point links (such as a point-to-point WAN connection) because the two routers
on either sides of the link must become fully adjacent and the bandwidth between them cannot be
further optimized.