## **Objective** Implementation of **OSPF in site HQ1** on **IR1, CR1, CR2, DS1, and DS2** for **IPv4 (OSPFv2) and IPv6 (OSPFv3)**, including the **required route-maps**, so that: - a clean area structure (Area 0 / Area 10) is created - OSPF runs only on relevant interfaces - no DR/BDR election occurs - default routes are injected **in a controlled and conditional way** - routing remains clear, stable, and scoring-logically correct --- ## **1. OSPF Design (HQ1)** ### **1.1 IPv4 (OSPFv2)** - Process ID: 100 - Router-ID: Loopback1 - Area 0: - all /30 point-to-point links - Loopback1 - Area 10: - VLAN 100–103 (DS1 and DS2 only) - passive-interface default - enable only /30 P2P interfaces - point-to-point network type on /30 links (no DR/BDR) ### **1.2 IPv6 (OSPFv3)** - Process ID: 100 - Router-ID: Loopback1 - Same area design (Area 0 / Area 10) - Activate OSPFv3 only on required interfaces - No IPv6 default injection unless external IPv6 default exists --- ## **2. Core Routers (CR1 / CR2)** ### **2.1 OSPFv2 (IPv4)** ``` router ospf 100 router-id passive-interface default no passive-interface network 0.0.0.0 area 0 network area 0 ``` ### **2.2 OSPFv3 (IPv6)** ``` ipv6 router ospf 100 router-id passive-interface default no passive-interface ``` Enable per-interface: ``` interface ipv6 ospf 100 area 0 ipv6 ospf network point-to-point ``` Loopback: ``` interface Loopback1 ipv6 ospf 100 area 0 ``` --- ## **3. Edge Router IR1 (Default Injection)** ### **3.1 IPv4 Default Injection (OSPFv2)** Prefix-list: ``` ip prefix-list DEFAULT_ONLY permit 0.0.0.0/0 ``` Route-maps: ``` route-map INJECT_DEFAULT permit 10 match ip address prefix-list DEFAULT_ONLY route-map BGP2OSPF permit 10 match ip address prefix-list DEFAULT_ONLY ``` OSPFv2: ``` router ospf 100 router-id passive-interface default no passive-interface redistribute bgp metric 5000 subnets route-map BGP2OSPF default-information originate metric 5000 route-map INJECT_DEFAULT network 0.0.0.0 area 0 network area 0 ``` ### **3.2 IPv6 Default Injection (OSPFv3)** IPv6 prefix-list (default only): ``` ipv6 prefix-list DEFAULT6_ONLY seq 5 permit ::/0 ``` Route-maps for IPv6 redistribution (if needed): ``` route-map BGP2OSPF6 permit 10 match ipv6 address prefix-list DEFAULT6_ONLY route-map INJECT_DEFAULT6 permit 10 match ipv6 address prefix-list DEFAULT6_ONLY ``` OSPFv3 process: ``` ipv6 router ospf 100 router-id passive-interface default no passive-interface ``` Enable OSPFv3 per-interface: ``` interface ipv6 ospf 100 area 0 ipv6 ospf network point-to-point ``` Conditional default origination (OSPFv3): If you have an external IPv6 default (e.g., via BGP), inject it by redistribution using a route-map: ``` ipv6 router ospf 100 redistribute bgp metric 5000 route-map BGP2OSPF6 ``` If your platform supports default-information originate for OSPFv3: ``` ipv6 router ospf 100 default-information originate metric 5000 route-map INJECT_DEFAULT6 ``` Use whichever is supported in your IOS version; redistribution with a prefix-list is always safe. --- ## **4. Distribution Switches DS1 / DS2 (ABR)** ### **4.1 OSPFv2 (IPv4)** ``` router ospf 100 router-id passive-interface default no passive-interface network 0.0.0.0 area 0 network area 0 network 10.10.100.0 0.0.3.255 area 10 area 10 range 10.10.100.0 255.255.252.0 ``` ### **4.2 OSPFv3 (IPv6)** ``` ipv6 router ospf 100 router-id passive-interface default no passive-interface ``` Enable per-interface: P2P links (Area 0): ``` interface ipv6 ospf 100 area 0 ipv6 ospf network point-to-point ``` SVIs VLAN 100–103 (Area 10): ``` interface Vlan100 ipv6 ospf 100 area 10 interface Vlan101 ipv6 ospf 100 area 10 ``` IPv6 summarization from Area 10 toward Area 0 (if desired and supported): ``` ipv6 router ospf 100 area 10 range 2001:DB8:....::/XX ``` (Use the correct IPv6 aggregation prefix from your addressing plan.) --- ## **5. Verification** IPv4: ``` show ip ospf neighbor show ip ospf interface brief show ip route ospf show ip ospf database external ``` IPv6: ``` show ipv6 ospf neighbor show ipv6 ospf interface brief show ipv6 route ospf show ipv6 ospf database ``` Expected: - neighbors only on /30 P2P links - no DR/BDR election on P2P links - IPv4 default route as O E2 metric 5000 (only if externally present) - IPv6 default route only if externally present and injected - VLAN routes summarized (IPv4 /22, IPv6 aggregate if configured)