HCIP-Datacom H12
Fundamental Concepts
Trap Messages
To generate trap notifications and store them in the local trap buffer, the first step is to enable the SNMP agent (snmp-agent). Without the SNMP agent enabled, the entire trap mechanism does not take effect, and the trap buffer will not collect any SNMP alarms.
IS-IS Protocol: Characteristics and Functions
Introduction
-
It is a link-state protocol that uses the SPF algorithm to calculate the shortest path. It operates at Layer 2 (the data link layer) and does not depend on IP.
-
Two-level hierarchical routing:
-
Level 1 (L1): intra-area routing. Traffic destined outside the area is, by default, forwarded to the nearest L1/L2 router, which can result in suboptimal paths.
-
Level 2 (L2): backbone routing, responsible for carrying inter-area routes.
-
L1/L2: maintains both an L1 and an L2 LSDB; typically serves as the area exit point.
-
-
Integrated IS-IS: native support for IPv4 and IPv6, strong extensibility, and widespread deployment by service providers.
-
Uses the NET (Network Entity Title) as the device identifier, not a Router ID.
Cost
-
By default, the IS-IS cost type is
narrow, in which the interface cost ranges from 1 to 63. -
The
cost-style widecommand must be configured manually to enterwidemode.widemode is mandatory in the following scenarios:-
When IS-IS TE (Traffic Engineering) is enabled →
wideis required. -
When an interface cost greater than 63 is needed.
-
SR / SRv6 scenarios: Huawei recommends configuring
wide. -
When carrying route tags, extended attributes, or IPv6 multi-topology,
widemode is also required.
-
Cost Types
| Mode | Received TLVs | Sent TLVs | Key Point |
|---|---|---|---|
| narrow | narrow | narrow | Default mode; maximum interface cost is 63 |
| narrow-compatible | narrow + wide | narrow only | Accepts both old and new formats, but sends narrow TLVs only |
| compatible | narrow + wide | narrow + wide | Full send/receive capability; used during mixed-network migration |
| wide-compatible | narrow + wide | wide only | Accepts both formats, but sends wide TLVs only |
| wide | wide | wide | Sends and receives wide TLVs only; max interface cost 1023; supports TE/SR |
Advanced Features
| Feature | Function |
|---|---|
| I-SPF (Incremental SPF) | When only part of the topology changes, only the changed portion is recalculated instead of rerunning SPF for the entire network → faster convergence |
| PRC (Partial Route Calculation) | When the topology is unchanged and only route prefixes are added or removed, SPF is not run; only routing entries are updated → faster convergence |
| IS-IS/BFD Interaction | BFD provides millisecond-level failure detection, rapidly senses link failures, and immediately triggers an IS-IS update → faster convergence |
| LSP Smart Timer | Controls the interval for LSP generation and flooding, suppresses frequent flapping, and accelerates updates |
| IS-IS FRR (Fast Reroute) | Precomputes a backup next hop; on failure, traffic switches to the backup path within milliseconds with no interruption → faster convergence |
| PIC (Prefix-Independent Convergence) | Convergence time is independent of the number of route prefixes, speeding up convergence in large backbone networks |
| Route Leak (route penetration) | An L1/L2 router injects L2 backbone routes into an L1 area, solving the suboptimal-path problem for L1 routers accessing other areas |
BGP
- BGP Route Reflectors (RRs): when multiple RRs reside in the same cluster, the Cluster-ID provides loop prevention. RRs in the same cluster exchange routes with each other; if a received
Cluster_Listcontains its own Cluster-ID, the RR discards the route. - The first rule of BGP path selection: locally generated routes take precedence over routes learned via IBGP.
- BGP routing table: multiple BGP routes may exist for a destination, but only one is selected as best (active/valid) and installed into the IP routing table.
- IS-IS route leaking (
import-route isis level-2 into level-1) is only background context in the question. It ensures IGP reachability and BGP next-hop reachability; it does not participate in BGP path selection.
Path Selection Rules
- PrefVal (protocol preferred value): higher is better (Huawei proprietary, effective only on the local device, default 0).
- Local_Pref (local preference): higher is better (propagated within the AS, default 100; controls how traffic exits the local AS).
- Locally originated routes are preferred. Priority order: manual aggregation > automatic aggregation > route redistribution via
network> route redistribution viaimport-route> routes learned from peers. - Shorter AS_Path is better (length of the AS path list).
- Origin attribute:
IGP (i)>EGP (e)>Incomplete (?). - Lower MED is better (by default, MED is compared only among routes from the same neighboring AS; routes from different ASs are not compared).
- Peer type: EBGP > confederation EBGP > confederation IBGP > IBGP.
- Lower IGP cost to the BGP next hop is better (IGP metric).
- Shorter
Cluster_Listis better (in RR scenarios). - Smallest
Originator_IDis preferred; if noOriginator_IDis present, compare Router IDs, and the smaller one wins. - Smallest BGP peer IP address is preferred.
If all 11 criteria are identical: prefer the route that was received first.
Loop Prevention Mechanisms
Built-in loop prevention:
- IBGP: split horizon (routes learned from an IBGP peer are not advertised to other IBGP peers).
- EBGP: AS_PATH — a route is rejected if the local AS number appears in its AS_PATH. This is BGP’s native loop prevention mechanism.
Hub-Spoke
- ERT = Export Route Target: when a PE advertises a VPN route, it tags the route with this RT.
- IRT = Import Route Target: when a PE receives a VPN route, it matches this RT; only routes that match are placed into the VPN instance.
Core Logic
Traffic must pass through the Hub; Spoke sites cannot communicate directly with each other.
Traffic path: Spoke → Hub → Spoke. Direct communication between Spoke sites is not allowed; all traffic is relayed through the Hub. Therefore, Hub-PE3 must have two VPN instances:
VPN_in: dedicated to receiving routes advertised by the Spoke sites.VPN_out: dedicated to advertising routes to the Spoke sites.
OSPF
Route Selection
- Route preference: select the route with the higher priority (preference value).
- If preference values are equal, compare the interface index and select the larger interface index.
- If both preference value and interface index are equal, compare the next-hop IP address and select the larger one.
OSPF LSA Types
| Field | Length | Meaning |
|---|---|---|
| Nt (NSSA translation) | 1 bit | Set to 1 if the router originating this LSA is an NSSA border router; otherwise set to 0. When this bit is 1, the router unconditionally translates NSSA LSAs into AS-external LSAs. |
| x | 1 bit | Obsolete bit. |
| V (Virtual Link) | 1 bit | Set to 1 if the router originating this LSA is an endpoint of a virtual link; otherwise set to 0. |
| E (External) | 1 bit | Set to 1 if the router originating this LSA is an ASBR; otherwise set to 0. |
| B (Border) | 1 bit | Set to 1 if the router originating this LSA is an ABR; otherwise set to 0. |
| Options | 24 bits | Optional capabilities supported by the router. |
| Type | 8 bits | Basic description of the connection: 1 = point-to-point link to another router; 2 = connection to a transit network; 3 = reserved; 4 = virtual link. |
| metric | 16 bits | Cost of the link. |
| Interface ID | 32 bits | ID assigned to the interface. |
| Neighbor Interface ID | 32 bits | Interface ID of the neighbor router. For transit links, this is the DR’s interface ID; for other link types, it is the neighbor’s interface ID. |
| Neighbor Router ID | 32 bits | Router ID of the neighbor router. For transit links, this is the DR’s Router ID; for other link types, it is the neighbor’s Router ID. |
OSPFv2
Type 5 LSA Forwarding Address (FA)
FA = 0.0.0.0: external traffic is forwarded directly to the ASBR that originated the Type 5 LSA.
FA ≠ 0.0.0.0: external traffic is forwarded directly to the IP address specified by the FA, bypassing the ASBR.
When Is the FA Non-Zero?
(All three conditions must be satisfied simultaneously.)
- The outbound interface through which the ASBR redistributes the external route lies inside the OSPF domain (OSPF is enabled on that interface).
- That outbound interface is not configured as a silent interface.
- The IP address of that interface belongs to a network segment advertised in OSPF.
Additional notes:
- The FA exists only in OSPFv2 Type 5 and Type 7 LSAs.
- Purpose: to tell routers inside the OSPF domain which router to send packets to when destined for an external network.
| Type | Name | Originator | Flooding Scope | Core Function |
|---|---|---|---|---|
| Type 1 | Router LSA | All routers | Local area | Describes the originating router’s directly connected links |
| Type 2 | Network LSA | DR | Local area | Describes broadcast / NBMA network segments |
| Type 3 | Network Summary LSA | ABR | All except totally stub areas | Inter-area network routes |
| Type 4 | ASBR Summary LSA | ABR | All except totally stub areas | Advertises the location of the ASBR |
| Type 5 | AS External LSA | ASBR | Entire AS | External routes, carrying a forwarding address (FA) |
| Type 7 | NSSA External LSA | ASBR within an NSSA | NSSA area | External routes in an NSSA; translated to Type 5 by the ABR when leaving the NSSA |
OSPFv3
| Type | Name | Flooding Scope | Core Function | Memory Aid |
|---|---|---|---|---|
| Type 1 | Router LSA | Within the local area | Describes the router’s directly connected links, link types, and neighbor Router IDs; does not carry IPv6 prefixes — topology only | The router describes the topology, no prefixes |
| Type 2 | Network LSA | Within the local area | Generated by the DR; describes broadcast / NBMA segments and lists all routers on the segment | The DR represents the segment; flooded locally |
| Type 3 | Inter-Area Prefix LSA | Within the local area | Generated by the ABR; carries inter-area IPv6 prefixes (equivalent to OSPFv2 Type 3) | Inter-area prefixes, sent by the ABR |
| Type 4 | Inter-Area Router LSA | Within the local area | Generated by the ABR; describes the location of the ASBR (equivalent to OSPFv2 Type 4) | Inter-area router: where to find the ASBR |
| Type 5 | AS External LSA | Entire AS, except stub/NSSA | Generated by the ASBR; imports external IPv6 routes | External routes, flooded throughout the AS |
| Type 7 | NSSA External LSA | Within the NSSA area | Generated by an NSSA ASBR; external routes for the NSSA; may be translated to Type 5 by the ABR for propagation out of the NSSA | NSSA-specific external LSA, flooded in-area only |
| Type 8 | Link LSA | Local link only (direct segment) | Generated independently by each router on each link; carries the local IPv6 link-local address and link prefix; sent only to neighbors on that link, never across links | Link-local information, confined to that link |
| Type 9 | Intra-Area Prefix LSA | Within the local area | Carries intra-area prefixes in two cases: (1) router prefixes (associated with Type 1) and (2) broadcast segment prefixes (associated with Type 2). OSPFv3 separates prefixes out of Type 1/2 into Type 9 | Intra-area prefixes supplementing Type 1/2 info |
MPLS VPN: OSPF Loop Prevention on the PE-CE Link
- Type 3 inter-area LSAs → DN Bit loop prevention.
- Type 5/Type 7 external LSAs → Domain Tag (route-tag) loop prevention.
| Loop Prevention Mechanism | Protected LSA Types | Core Rule | Applicable Scope |
|---|---|---|---|
| DN Bit (Down bit) | Type 3 inter-area LSA | When a PE receives an LSA with DN=1, it does not redistribute it into MP-BGP | Inter-area routes only; not supported by Type 5/7 |
| Domain Tag (route-tag) | Type 5 / Type 7 LSA | When a PE receives an external route whose tag matches the local tag, it does not redistribute it into MP-BGP | External routes only; replaces the missing DN bit for external LSAs |
Common Pitfalls
- The DN Bit applies only to Type 3; Type 5/7 LSAs have no DN bit, so external LSAs can rely only on the route tag.
- Both mechanisms are OSPF extensions for loop prevention in L3VPN scenarios, not native BGP loop prevention (native BGP uses AS_PATH and IBGP split horizon).
- Origin of the loop: a route travels from PE → CE and is then advertised by the CE back to another PE. If it is not blocked, it will be reinjected into the MP-BGP backbone, creating a loop.
BFD
OSPF, IS-IS, and BGP have built-in Hello-based failure detection, but Hello timers are too slow. BFD provides millisecond-level rapid failure detection and works in conjunction with routing protocols.
It does not carry routing information — it only checks whether the path is healthy and notifies upper-layer routing protocols when a failure occurs.
States: Down → Init → Up
Packet Encapsulation
- Single-hop BFD (directly connected neighbor): UDP destination port 3784.
- Multihop BFD (across multiple routers): UDP destination port 4784.
Detection Modes
- Asynchronous mode (default): both sides periodically send BFD control packets to each other; if no packet is received within the timeout, the link is declared Down.
- Demand (query) mode: one side stops sending packets and specifically queries whether the peer is still alive; the peer must reply.
If you enjoyed this, leave a comment~