CCNA Interview Questions and Answers -8

 

1. What are different neighbour states in OSPF?

OSPF routers need to go through several state before establishing a neighbor relationship –

1. Down – No Hello packets have been received on the interface.

2. Attempt – In Attempt state neighbors must be configured manually. It applies only to nonbroadcast multi-access (NBMA) networks.

3. Init – Router has received a Hello message from the other OSFP router.

4. 2way – the neighbor has received the Hello message and replied with a Hello message of his own.
Bidirectional Communication has been established. In Broadcast network DR-BDR election can occur after this point.

5. Exstart – DR & BDR establish adjacencies with each router in the network. Master-slave election will takes place (Master will send its DBD first).

6. Exchange – Routing information is exchanged using DBD (Database Descriptor) packets, LinkState Request (LSR) and Link-State Update packets may also be sent.

7. Loading – LSRs (Link State Requests) are send to neighbors for every network it doesn’t know about. The Neighbor replies with the LSUs (Link State Updates) which contain information about requested networks. After all the requested information have been received, other neighbor goes through the same process.

8. Full – All neighbor routers have the synchronized database and adjacencies has been established.

2. What is an LSA? How does an LSA differ from an OSPF Update packet?

A router originates a link state advertisement to describe one or more destinations. An OSPF Update packet transports LSAs from one neighbor to another. Although LSAs are flooded throughout an area or OSPF domain, Update packets never leave a data link.

3. Explain different OSPF LSA Types?

1. Router LSA (Type1) – Each router geLSA Types? nerates a Type 1 LSA that lists its active interfaces, IP addresses, neighbors and the cost. LSA Type 1 is flooded only within an area.

2. Network LSA (Type2) – Type2 LSA is sent out by the designated router (DR) and lists all the routers on the segment it is adjacent to. Type 2 LSA are flooded only within an area.

3. Summary LSA (Type3) – Type 3 LSAs are generated by Area Border Routers (ABRs) to advertise networks from one area to the rest of the areas in Autonomous System.

4. Summary ASBR LSA (Type4) – Generated by the ABR. It contain routes to ASBRs.

5. External LSA (Type5) – External LSAs are generated by ASBRs and contain routes to networks that are external to the current Autonomous System.

6. Not-So-Stubby Area LSA (Type7) – Stub areas do not allow Type 5 LSAs. A Not So Stubby Area (NSSA) allows advertisement of Type 5 LSA as Type 7 LSAs. Type LSA is generated by an ASBR inside a Not So Stubby Area (NSSA) to describe routes redistributed into the NSSA.

4. Can I use the distribute-list in/out command with OSPF to filter routes?

The distribute-list commands are supported in OSPF but work differently than distance-vector routing protocols such as Routing Information Protocol (RIP) and Enhanced Interior Gateway Routing Protocol (EIGRP).

OSPF routes cannot be filtered from entering the OSPF database. The distribute-list in command only filters routes from entering the routing table; it does not prevent link-state packets from being propagated. Therefore, this command does not help conserve router memory, and it does not prohibit a router from propagating filtered routes to other routers.

Caution: Use of the distribute-list in command in OSPF may lead to routing loops in the network if not implemented carefully.

The command distribute-list out works only on the routes being redistributed by the Autonomous System Boundary Routers (ASBRs) into OSPF. It can be applied to external type 2 and external type 1 routes, but not to intra-area and inter-area routes. Refer to configuration example of distribute-list in OSPF

5. How can I give preference to OSPF inter-area routes over intra-area routes?

According to section 11 of RFC 2328 Description: learingcisco.com, the order of preference for OSPF routes is:

intra-area routes, O

interarea routes, O IA

external routes type 1, O E1

external routes type 2, O E2

This rule of preference cannot be changed. However, it applies only within a single OSPF process. If a router is running more than one OSPF process, route comparison occurs. With route comparison, the metrics and administrative distances (if they have been changed) of the OSPF processes are compared. Route types are disregarded when routes supplied by two different OSPF processes are compared.

6. Do I need to manually set up adjacencies for routers on the Switched Multimegabit Data Service (SMDS) cloud with the OSPF neighbor subcommand?

In Cisco IOS Software releases earlier than Cisco IOS Software Release 10.0, the neighbor command was required to establish adjacencies over nonbroadcast multiaccess (NBMA) networks (such as Frame Relay, X.25, and SMDS). With Cisco IOS Software Release 10.0 and later, you can use the ip ospf network broadcast command to define the network as a broadcast network, eliminating the need for the neighbor command. If you are not using a fully meshed SMDS cloud, you must use the ip ospf network point-to-multipoint command.

7. When routes are redistributed between OSPF processes, are all shortest path first algorithm (SPF) metrics preserved, or is the default metric value used?

The SPF metrics are preserved. The redistribution between them is like redistribution between any two IP routing processes.

8. How does Cisco accommodate OSPF routing on partial-mesh Frame Relay networks?

You can configure OSPF to understand whether it should attempt to use multicast facilities on a multi-access interface. Also, if multicast is available, OSPF uses it for its normal multicasts.

Cisco IOS Software Release 10.0 includes a feature called subinterfaces. You can use subinterfaces with Frame Relay to tie together a set of virtual circuits (VCs) to form a virtual interface, which acts as a single IP subnet. All systems within the subnet should be fully meshed. With Cisco IOS Software Releases 10.3, 11.0 and later, the ip ospf point-to-multipoint command is also available.

9. Which address-wild-mask pair should I use for assigning an unnumbered interface to an area?

When an unnumbered interface is configured, it references another interface on the router. When enabling OSPF on the unnumbered interface, use the address-wild-mask pair of interfaces to which the unnumbered interface is pointing.

10. Can I have one numbered side and leave the other side unnumbered in OSPF?

No, OSPF does not work if you have one side numbered and the other side unnumbered. This creates a discrepancy in the OSPF database that prevents routes from being installed in the routing table.

11. Why do I receive the “cannot allocate router id” error message when I configure Router OSPF One?

OSPF picks up the highest IP address as a router ID. If there are no interfaces in up/up mode with an IP address, it returns this error message. To correct the problem, configure a loopback interface.

12. Why do I receive the “unknown routing protocol” error message when I configure Router OSPF One?

Your software may not support OSPF. This error message occurs most frequently with the Cisco 1600 series routers. If you are using a 1600 router, you need a Plus image to run OSPF.

13. What do the states DR, BDR, and DROTHER mean in show ip ospf interface command output?

DR means designated router. BDR means backup designated router. DROTHER indicates a router that is neither the DR or the BDR. The DR generates a Network Link-State Advertisement, which lists all the routers on that network.

14. Why master slave needs to be elected between two neighbour interface?

Master sends its DBD (Database Description) First.

15. What is the requirement of doing summarization?

1. Reduces the amount of information stored in routing tables.
2. Allocates an existing pool of addresses more economically.
3. Lessens the load on router processor and memory resources.
4. Less number of update messages.
5. Less bandwidth.

16. How routes are selected in OSPF according to preference?

Intra-Area routes(0)> Inter-Area routes(0-IA)> External-Type-1(E1)> External-Type-2(E2)> NSSA1(N1)> NSSA-2(N2).

17. What is Route Redistribution?

Route redistribution is the process of taking routes learned via one routing protocol and injecting those routes into another routing protocol domain.
For example two companies might merge, one company is using Enhanced Interior Gateway Routing Protocol (EIGRP) and the other is using Open Shortest Path First (OSPF). Route redistribution allows exchanging of routes between the two routing domains with a minimal amount of configuration and with little disruption to the existing networks.

18. Why are loopbacks advertised as /32 host routes in OSPF?

Loopbacks are considered host routes in OSPF, and they are advertised as /32. For more information, refer to section 9.1 of RFC 2328 Description: leavingcisco.com. In Cisco IOS Software Releases 11.3T and 12.0, if the ip ospf network point-to-point command is configured under loopbacks, OSPF advertises the loopback subnet as the actual subnet configured on loopbacks. ISDN dialer interface advertises /32 subnet instead of its configured subnet mask. This is an expected behavior if ip ospf network point-to-multipoint is configured.

For example, consider two routers (R1 and R2) connected via FastEthernet interface. R1 has the loopback configured with the ip ospf network point-to-point command and advertises the loopback in OSPF.

interface Loopback0

ip address 1.1.1.1 255.255.255.0
ip ospf network point-to-point
When checked in router R2 with the show ip route ospf command, the route 1.1.1.1 is seen as:
!..output truncated
1.0.0.0/24 is subnetted, 1 subnets
O 1.1.1.0 [110/11] via 10.1.1.1, 00:00:02, FastEthernet0/0
However, when the ip ospf network point-to-point command is removed from R1 to 0 interface, the route 1.1.1.1 on R2 is seen as:
1.0.0.0/32 is subnetted, 1 subnets
O 1.1.1.1 [110/11] via 10.1.1.1, 00:00:01, FastEthernet0/0

19. What is the default redistribution OSPF cost?

Redistribution into OSPF uses the following defaults:-
1. When taking from BGP, use a default metric of 1.
2. When taking from another OSPF process, take the source route’s metric.
3. When taking from all other sources, use a default metric of 20.

20. What is the difference between Type-1 (E1) & Type-2 (E2) redistribution?

Type-2 is the default route type for routes learned via redistribution. The key with E2 routes is that the cost of these routes reflects only the redistributed cost. E2 = only redistributed cost. Type-1 redistributed routes reflects cost to reach ASBR + redistributed cost. E1 = cost to reach ASBR + redistributed cost.

21. Explain OSPF Virtual Link?

OSPF requires the use of a backbone area (area 0) with each area connecting to area 0 through an ABR. However in some cases, regular area might not have a convenient point of connection to the backbone area. In this case, OSPF uses virtual link to connect that regular area to backbone area virtually. An OSPF virtual link allows two ABRs that connect to the same non-backbone area to form a neighbor relationship through that non-backbone area, even when separated by many other routers and subnets. This virtual link acts like a virtual point-to-point connection between the two routers, with that link inside area 0. The routers form a neighbor relationship, inside area 0, and flood LSAs over that link.

22. Explain OSPF Stub Area and different types of Stub Areas?

Stub Area Sometimes we need to control the advertisement of external routes into an area. This area is called Stub area. Stub areas are not capable of importing routes external to ospf. Type 4 & Type 5 LSA are filtered from Stub areas and a default route is injected into that area by ABR in place of external routes.

To make area stub we have to give # area 1 stub command on all routers of that area.

Three restrictions apply to OSPF stub areas

1.No virtual links are allowed in stub area.
2.Stub area cannot be a backbone area.
3.No Autonomous System Boundary Routers are allowed.

Totally Stubby Area
Like stub areas, totally stubby areas do not receive type 4 or 5 LSAs from their ABRs. However, they also do not receive type 3 LSAs. It only allows advertisement of internal routes in that area. To make area totally stubby area we have to give # area 1 stub no-summary command on ABR.

Not-So-Stubby Areas
The motivation behind NSSA is to allow OSPF stub areas to carry external routes. External routes are imported into OSPF NSSA as Type 7 LSA by ASBR. Type 7 LSA cannot go into area 0 so it is converted back into Type 5 LSA by ABR and injected into area 0. To make area Not-So-Stubby Area we have to give # area 1 NSSA command on all routers of that area.

Totally NSSA
Along with Type 4 & Type 5 LSA, Type 3 LSA will also be filtered in Totally NSSA. To make area Totally Not-So-Stubby Area we have to give # area 1 nssa no-summary command on ABR of that area. Lsa information area vise

23. How do I change the reference bandwidth in OSPF?

We can change the reference bandwidth using the ospf auto-cost reference-bandwidth command under router ospf. By default, reference bandwidth is 100 Mbps.

24. How does OSPF calculate its metric or cost?

OSPF uses Cost as its metric. The formula to calculate the OSPF cost is reference bandwidth divided by interface bandwidth. For example, in the case of Ethernet, it is 100 Mbps / 10 Mbps = 10. If # ip ospf cost _ command is used on the interface, it overrides this formulated cost.

25. What algorithm is used by OSPF if equal cost routes exist?

If equal cost routes exist, OSPF uses CEF load balancing. For more information, refer to Troubleshooting Load Balancing Over Parallel Links Using Cisco Express Forwarding.

26. Explain OSPF Authentication?

These are the three different types of authentication supported by OSPF to secure routing updates.

1.Null Authentication – also called Type 0. It means no authentication information is included in
the packet header. It is the default.

2.Plain Text Authentication – also called Type 1. It uses simple clear-text passwords.

3.MD5 Authentication – also called Type 2. It uses MD5 cryptographic passwords.

Plain Text Authentication

Step1 – To configure plain text authentication, first we have to enable authentication.
Authentication can be enabled either under area or for specific interface.
To enable authentication for area
Router(config)# router ospf 100
Router(config-router)# network 192.168.1.0 0.0.0.255 area 0
Router(config-router)# area 0 authentication
This will enable authentication for all the interfaces of the router in area 0.

OR
If we dont want to enable authentication for an area, we can enable it for the specific interface. This
is useful if different interfaces that belong to the same area need to use different authentication
methods..
Router(config)# interface fa0/1
Router(config-if)# ip ospf authentication

Step2 – Next, We have to configure authentication key on the interface
Router(config)# interface fa0/1
Router(config-if)# ip ospf authentication-key Cisco123
Here Cisco123 is the password value.

MD5 Authentication
Step1 – To configure MD5 authentication, first we have to enable authentication.
Router(config)# router ospf 1
Router(config-router)# network 192.168.1.0 0.0.0.255 area 0
Router(config-router)# area 0 authentication message-digest
OR
Router(config)# interface fa0/1
Router(config-router)# ip ospf authentication message-digest
Step2 – Next, We have to configure authentication key on the interface
Router(config)# interface fa0/1
Router(config-router)# ip ospf message-digest-key 10 md5 Cisco123
Here Cisco123 is the password value and 10 is the Key ID (number). It doesn’t matter which key ID you choose but it has to be the same on both ends.
Authentication passwords do not have to be the same throughout an area. However, they must be same between neighbors.

27. How do I change the reference bandwidth in OSPF?

You can change the reference bandwidth in Cisco IOS Software Release 11.2 and later using the ospf auto-cost reference-bandwidth command under router ospf. By default, reference bandwidth is 100 Mbps. The ospf link-cost is a 16-bit number. Therefore, the maximum value supported is 65,535.

28. How does OSPF calculate its metric or cost?

OSPF uses a reference bandwidth of 100 Mbps for cost calculation. The formula to calculate the cost is reference bandwidth divided by interface bandwidth. For example, in the case of Ethernet, it is 100 Mbps / 10 Mbps = 10.

Note: If ip ospf cost cost is used on the interface, it overrides this formulated cost. For more
information, refer to OSPF Cost.

Which command enables OSPF for IPv6 on a router?
# ipv6 router ospf process-id

29. What is the link-state retransmit interval, and what is the command to set it?

OSPF must send acknowledgment of each newly received link-state advertisement (LSA). LSAs are retransmitted until they are acknowledged. The link-state retransmit interval defines the time between retransmissions. We can use the command ip ospf retransmit-interval to set the retransmit interval. The default value is 5 seconds.

30. When routes are redistributed between OSPF processes, are all shortest path first algorithm (SPF) metrics preserved or is the default metric value used?

The SPF metrics are preserved. The redistribution between them is like redistribution between any two IP routing processes.