Multi-area OSPF with Cisco IOS

bsd/ospf | bsd/ospf-n-bgp | bsd/bgp | cisco/ospf | cisco/ospf-n-bgp | cisco/bgp

assuming gns3 c3725 dynamips appliances

IMAGE HERE

Note there is no order nor differentiation between internal and external interface here, as we usually do for ipsec or NAT — we just setup a chain of nodes for an easy recurrent setup.

Also note that R1 uses DHCP on its first interface hence also obtains a default route.

interface fa0/0
    ip address dhcp
    ip ospf 1 area 1
    no shutdown

interface fa0/1
    ip address 10.1.1.254 255.255.255.0
    ip ospf 1 area 1
    no shutdown

router ospf 1
    !network 192.168.122.0 0.0.0.255 area 1
    !network 10.1.1.0 0.0.0.255 area 1
    redistribute connected
    !redistribute static
    !default-information originate
    !default-information originate always

R2

interface fa0/0
    ip address 10.1.1.1 255.255.255.0
    ip ospf 1 area 1
    no shutdown

interface fa0/1
    ip address 10.2.2.254 255.255.255.0
    ip ospf 1 area 0
    no shutdown

router ospf 1
    !network 10.1.1.0 0.0.0.255 area 1
    !network 10.2.2.0 0.0.0.255 area 0
    redistribute connected

R3

interface fa0/0
    ip address 10.2.2.1 255.255.255.0
    ip ospf 1 area 0
    no shutdown

interface fa0/1
    ip address 10.3.3.254 255.255.255.0
    ip ospf 1 area 2
    no shutdown

router ospf 1
    !network 10.2.2.0 0.0.0.255 area 0
    !network 10.3.3.0 0.0.0.255 area 2
    redistribute connected

R4

interface fa0/0
    ip address 10.3.3.1 255.255.255.0
    ip ospf 1 area 2
    no shutdown

interface fa0/1
    ip address 10.4.4.254 255.255.255.0
    ip ospf 1 area 2
    no shutdown

router ospf 1
    !network 10.3.3.0 0.0.0.255 area 2
    !network 10.4.4.0 0.0.0.255 area 2
    redistribute connected

PC1

ip 10.4.4.1/24 10.4.4.254
save

NAT1 / host

route add -net 10.1.1.0/24 gw 192.168.122.196
route add -net 10.2.2.0/24 gw 192.168.122.196
route add -net 10.3.3.0/24 gw 192.168.122.196
route add -net 10.4.4.0/24 gw 192.168.122.196
netstat -rn --inet

Maintenance

    show ip route | begin Gateway
    show ip route ospf
    show ip protocols | begin ospf

    show ip ospf
    show ip ospf border-routers
    show ip ospf neighbor 
    show ip ospf rib
    show ip ospf database database-summary | begin Process 1
    show ip ospf interface fa0/0
    show ip ospf interface fa0/1

Network acceptance

from the host system (NAT1)

ping 192.168.122.196 -c1
ping 10.1.1.254 -c1
ping 10.1.1.1 -c1
ping 10.2.2.254 -c1
ping 10.2.2.1 -c1
ping 10.3.3.254 -c1
ping 10.3.3.1 -c1
ping 10.4.4.254 -c1
ping 10.4.4.1 -c1

Resources

https://networklessons.com/ospf/basic-ospf-configuration

https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/iproute_ospf/configuration/xe-16/iro-xe-16-book/iro-cfg.html

https://routeur.clemanet.com/routage-ospf-cisco.php

https://cisco.goffinet.org/ccna/ospf/lab-ospf-multi-area/

https://www.cisco.com/c/m/en_us/techdoc/dc/reference/cli/n5k/commands/default-information-originate-ospf.html

https://cisco.goffinet.org/ccna/ospf/lab-ospf-multi-area/

https://routeur.clemanet.com/routage-ospf-cisco.php


HOME | GUIDES | LECTURES | LAB | SMTP HEALTH | HTML5 | CONTACT
Copyright © 2024 Pierre-Philipp Braun