JNCIA Routing Protocols 1 ā Questions and Answers
Question 1: What type of routing protocol is OSPF?
- Link-State Interior Gateway Protocol (Correct answer)
- Distance-Vector Interior Gateway Protocol
- Path-Vector Exterior Gateway Protocol
- Hybrid Exterior Gateway Protocol
Correct answer: Link-State Interior Gateway Protocol
OSPF (Open Shortest Path First) is a link-state IGP that builds a complete topology map of the network using LSAs and calculates the shortest path using Dijkstra's SPF algorithm.
OSPF is a link-state protocol defined in RFC 2328 (OSPFv2 for IPv4) and RFC 5340 (OSPFv3 for IPv6). Each OSPF router floods Link State Advertisements (LSAs) to describe its directly connected links. All routers build an identical LSDB and independently run Dijkstra's SPF algorithm to calculate the lowest-cost path to each destination. OSPF uses areas to scale the network, with Area 0 (backbone) as the mandatory core. Advantages: fast convergence, no hop-count limit, VLSM support.
Question 2: In Junos, what command enables OSPF on an interface?
- set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 (Correct answer)
- set ospf enable interface ge-0/0/0
- set interfaces ge-0/0/0 ospf area 0
- enable ospf interface ge-0/0/0.0 area 0
Correct answer: set protocols ospf area 0.0.0.0 interface ge-0/0/0.0
In Junos, OSPF interfaces are configured by adding them to an OSPF area under the protocols hierarchy: 'set protocols ospf area [area-id] interface [interface]'.
Junos OSPF configuration hierarchy: [edit protocols ospf area area-id interface interface-name]. The area-id can be in dotted-decimal (0.0.0.0 for area 0) or integer format. Interface-specific options include: 'passive' (advertises the subnet but doesn't form neighbors), 'interface-type p2p' (override broadcast to point-to-point), 'hello-interval', 'dead-interval', 'metric', 'authentication'. Adding 'lo0.0' to OSPF advertises the loopback, which is important for BGP next-hop reachability.
Question 3: What is the function of the OSPF Designated Router (DR) on a broadcast network?
- To reduce the number of OSPF adjacencies by acting as a central point for LSA flooding on the broadcast segment (Correct answer)
- To forward all data traffic on the segment
- To perform SPF calculations for all routers
- To assign IP addresses to OSPF neighbors
Correct answer: To reduce the number of OSPF adjacencies by acting as a central point for LSA flooding on the broadcast segment
On multi-access broadcast segments (Ethernet), OSPF elects a DR and BDR to minimize the number of full adjacencies. All routers form Full adjacencies only with the DR and BDR, reducing LSA flooding.
Without DR/BDR on a broadcast segment with N routers, there would be N*(N-1)/2 full adjacencies. The DR/BDR mechanism: all routers form Full adjacencies only with the DR and BDR; other routers (DROther) form 2-Way adjacencies with each other. LSAs are sent to DR/BDR (224.0.0.6), then DR floods to all routers (224.0.0.5). DR election uses the highest OSPF priority (default 128) then highest router-ID. In Junos, set priority with 'set protocols ospf area 0 interface ge-x/x/x priority N'.
Question 4: What is the BGP attribute 'LOCAL_PREF' used for?
- To influence outbound routing decisions within an AS by preferring routes with higher LOCAL_PREF values (Correct answer)
- To set the weight of a BGP route for inbound traffic
- To define the AS path length for external BGP routes
- To configure the BGP community for route filtering
Correct answer: To influence outbound routing decisions within an AS by preferring routes with higher LOCAL_PREF values
LOCAL_PREF is a BGP well-known discretionary attribute shared among iBGP peers within the same AS. Higher LOCAL_PREF values are preferred, influencing which exit point is used for outbound traffic.
LOCAL_PREF is an iBGP-only attribute (not passed to eBGP peers). Default value is 100 in Junos. BGP path selection considers LOCAL_PREF before AS path length (Weight ā LOCAL_PREF ā AS path length ā ORIGIN ā MED ā eBGP over iBGP ā IGP metric ā ...). Higher LOCAL_PREF wins. Example: set LOCAL_PREF 200 on routes from preferred upstream ā those routes are preferred for outbound traffic. In Junos, set with routing policy: 'then local-preference 200'.
Question 5: Which Junos command shows all routes redistributed from OSPF into the local routing table?
- show route protocol ospf (Correct answer)
- show ospf routes redistributed
- show route ospf-export
- show redistribution ospf
Correct answer: show route protocol ospf
'show route protocol ospf' in Junos operational mode filters the routing table to show only routes learned via OSPF, which includes redistributed routes if they are installed in the RIB.
'show route protocol ospf' filters inet.0 to show only OSPF-sourced routes. OSPF route types include: O (intra-area), O IA (inter-area), O E1 (external type 1), O E2 (external type 2). 'show ospf route' shows OSPF's internal routing table before policy. 'show ospf database' shows the LSDB. To see what Junos is redistributing into OSPF, 'show route advertising-protocol ospf [neighbor]' shows routes being exported. Redistribution policy is configured under [edit protocols ospf export policy-name].
Question 6: What is the purpose of BGP route reflectors?
- To eliminate the need for a full iBGP mesh by reflecting BGP routes between clients without requiring direct iBGP sessions between every router (Correct answer)
- To reflect routes from iBGP to eBGP automatically
- To mirror BGP routing tables for backup
- To load balance BGP traffic across multiple paths
Correct answer: To eliminate the need for a full iBGP mesh by reflecting BGP routes between clients without requiring direct iBGP sessions between every router
Route reflectors (RR) solve the iBGP full-mesh scalability problem. In a full mesh, N routers need N*(N-1)/2 iBGP sessions. With RRs, client routers only peer with the RR, which reflects routes to all clients.
iBGP requires full mesh (all iBGP routers must peer with all others) because iBGP doesn't advertise learned iBGP routes to other iBGP peers by default (split-horizon). Route reflectors (RFC 4456) are designated iBGP peers that break this rule: they reflect routes received from RR clients to all other clients. Configured in Junos with 'set protocols bgp group IBGP-CLIENTS cluster [cluster-id]' on the RR and add client peers with 'set protocols bgp group IBGP-CLIENTS neighbor [IP]'. BGP confederations are an alternative approach.
What type of routing protocol is OSPF?