Multi-Area OSPF Configuration Example with Verification

Multi-Area OSPF Configuration Example with Verification

* Topology:

* Configuration:

    R1 configuration:

    interface Loopback0
    
    ip address 1.1.1.1 255.255.255.255
    
    !
    
    interface GigabitEthernet0/0/0
    
    ip address 10.1.1.1 255.255.255.0
    
    duplex auto
    
    speed auto
    
    !
    
    interface GigabitEthernet0/0/1
    
    no ip address
    
    duplex auto
    
    speed auto
    
    shutdown
    
    !
    
    interface Vlan1
    
    no ip address
    
    shutdown
    
    !
    
    router ospf 1
    
    log-adjacency-changes
    
    network 10.1.1.1 0.0.0.0 area 1
    
    network 1.1.1.1 0.0.0.0 area 1
    
    !
    
    ip classless

    R2 configuration:

    
    
    interface Loopback0
    
    ip address 2.2.2.2 255.255.255.255
    
    !
    
    interface GigabitEthernet0/0/0
    
    ip address 10.1.1.2 255.255.255.0
    
    duplex auto
    
    speed auto
    
    !
    
    interface GigabitEthernet0/0/1
    
    ip address 10.1.2.1 255.255.255.0
    
    duplex auto
    
    speed auto
    
    !
    
    interface Vlan1
    
    no ip address
    
    shutdown
    
    !
    
    router ospf 1
    
    log-adjacency-changes
    
    network 2.2.2.2 0.0.0.0 area 0
    
    network 10.1.2.0 0.0.0.255 area 0
    
    network 10.1.1.0 0.0.0.255 area 1


    R3 Configuration:

    
    interface Loopback0
    
    ip address 3.3.3.3 255.255.255.255
    
    ip ospf 1 area 0
    
    !
    
    interface GigabitEthernet0/0
    
    ip address 10.1.3.1 255.255.255.0
    
    ip ospf 1 area 2
    
    duplex auto
    
    speed auto
    
    !
    
    interface GigabitEthernet0/1
    
    ip address 10.1.2.2 255.255.255.0
    
    ip ospf 1 area 0
    
    duplex auto
    
    speed auto
    
    !
    
    interface Vlan1
    
    no ip address
    
    shutdown
    
    !
    
    router ospf 1
    
    log-adjacency-changes


    R4 Configuration:

    
    interface Loopback0
    
    ip address 4.4.4.4 255.255.255.255
    
    !
    
    interface GigabitEthernet0/0
    
    ip address 10.1.3.2 255.255.255.0
    
    duplex auto
    
    speed auto
    
    
    router ospf 1
    
    log-adjacency-changes
    
    network 0.0.0.0 255.255.255.255 area 2


    Verifications:

    R1#sh ip rou
    
    R1#sh ip route
    
    Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
    
    D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
    
    N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
    
    E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
    
    i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
    
    * - candidate default, U - per-user static route, o - ODR
    
    P - periodic downloaded static route
    
    Gateway of last resort is not set
    
    1.0.0.0/32 is subnetted, 1 subnets
    
    C 1.1.1.1/32 is directly connected, Loopback0
    
    2.0.0.0/32 is subnetted, 1 subnets
    
    O IA 2.2.2.2/32 [110/2] via 10.1.1.2, 00:23:39, GigabitEthernet0/0/0
    
    3.0.0.0/32 is subnetted, 1 subnets
    
    O IA 3.3.3.3/32 [110/3] via 10.1.1.2, 00:23:39, GigabitEthernet0/0/0
    
    4.0.0.0/32 is subnetted, 1 subnets
    
    O IA 4.4.4.4/32 [110/4] via 10.1.1.2, 00:23:39, GigabitEthernet0/0/0
    
    10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
    
    C 10.1.1.0/24 is directly connected, GigabitEthernet0/0/0
    
    L 10.1.1.1/32 is directly connected, GigabitEthernet0/0/0
    
    O IA 10.1.2.0/24 [110/2] via 10.1.1.2, 00:23:39, GigabitEthernet0/0/0
    
    O IA 10.1.3.0/24 [110/3] via 10.1.1.2, 00:23:39, GigabitEthernet0/0/0
    
    ---------------------------------------
    
    R2 ip route:
    
    R2#sh ip route
    
    Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
    
    D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
    
    N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
    
    E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
    
    i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
    
    * - candidate default, U - per-user static route, o - ODR
    
    P - periodic downloaded static route
    
    Gateway of last resort is not set
    
    1.0.0.0/32 is subnetted, 1 subnets
    
    O 1.1.1.1/32 [110/2] via 10.1.1.1, 00:31:51, GigabitEthernet0/0/0
    
    2.0.0.0/32 is subnetted, 1 subnets
    
    C 2.2.2.2/32 is directly connected, Loopback0
    
    3.0.0.0/32 is subnetted, 1 subnets
    
    O 3.3.3.3/32 [110/2] via 10.1.2.2, 00:31:46, GigabitEthernet0/0/1
    
    4.0.0.0/32 is subnetted, 1 subnets
    
    O IA 4.4.4.4/32 [110/3] via 10.1.2.2, 00:31:46, GigabitEthernet0/0/1
    
    10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
    
    C 10.1.1.0/24 is directly connected, GigabitEthernet0/0/0
    
    L 10.1.1.2/32 is directly connected, GigabitEthernet0/0/0
    
    C 10.1.2.0/24 is directly connected, GigabitEthernet0/0/1
    
    L 10.1.2.1/32 is directly connected, GigabitEthernet0/0/1
    
    O IA 10.1.3.0/24 [110/2] via 10.1.2.2, 00:31:46, GigabitEthernet0/0/1
    
    
    -------------------------------------
    
    R3 ip route:
    
    R3#sh ip route
    
    Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
    
    D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
    
    N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
    
    E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
    
    i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
    
    * - candidate default, U - per-user static route, o - ODR
    
    P - periodic downloaded static route
    
    Gateway of last resort is not set
    
    1.0.0.0/32 is subnetted, 1 subnets
    
    O IA 1.1.1.1/32 [110/3] via 10.1.2.1, 00:32:27, GigabitEthernet0/1
    
    2.0.0.0/32 is subnetted, 1 subnets
    
    O 2.2.2.2/32 [110/2] via 10.1.2.1, 00:32:27, GigabitEthernet0/1
    
    3.0.0.0/32 is subnetted, 1 subnets
    
    C 3.3.3.3/32 is directly connected, Loopback0
    
    4.0.0.0/32 is subnetted, 1 subnets
    
    O 4.4.4.4/32 [110/2] via 10.1.3.2, 00:32:32, GigabitEthernet0/0
    
    10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
    
    O IA 10.1.1.0/24 [110/2] via 10.1.2.1, 00:32:27, GigabitEthernet0/1
    
    C 10.1.2.0/24 is directly connected, GigabitEthernet0/1
    
    L 10.1.2.2/32 is directly connected, GigabitEthernet0/1
    
    C 10.1.3.0/24 is directly connected, GigabitEthernet0/0
    
    L 10.1.3.1/32 is directly connected, GigabitEthernet0/0
    
    -----------------------------------------------------
    
    R4 ip route:
    
    R4#sh ip route
    
    Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
    
    D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
    
    N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
    
    E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
    
    i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
    
    * - candidate default, U - per-user static route, o - ODR
    
    P - periodic downloaded static route
    
    Gateway of last resort is not set
    
    1.0.0.0/32 is subnetted, 1 subnets
    
    O IA 1.1.1.1/32 [110/4] via 10.1.3.1, 00:33:08, GigabitEthernet0/0
    
    2.0.0.0/32 is subnetted, 1 subnets
    
    O IA 2.2.2.2/32 [110/3] via 10.1.3.1, 00:33:08, GigabitEthernet0/0
    
    3.0.0.0/32 is subnetted, 1 subnets
    
    O IA 3.3.3.3/32 [110/2] via 10.1.3.1, 00:33:08, GigabitEthernet0/0
    
    4.0.0.0/32 is subnetted, 1 subnets
    
    C 4.4.4.4/32 is directly connected, Loopback0
    
    10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
    
    O IA 10.1.1.0/24 [110/3] via 10.1.3.1, 00:33:08, GigabitEthernet0/0
    
    O IA 10.1.2.0/24 [110/2] via 10.1.3.1, 00:33:08, GigabitEthernet0/0
    
    C 10.1.3.0/24 is directly connected, GigabitEthernet0/0
    
    L 10.1.3.2/32 is directly connected, GigabitEthernet0/0

    Bilel-A

    Enthusiastic Network Engineer specializing in Cisco ACI, passionate about solving challenges. A lifelong learner who loves gaining and sharing knowledge. Profile: https://www.linkedin.com/in/bilel-ameur-71116b2b5
    0 0 votes
    Article Rating
    Subscribe
    Notify of
    guest
    0 Comments
    Oldest
    Newest Most Voted
    Inline Feedbacks
    View all comments
    0
    Would love your thoughts, please comment.x
    ()
    x