bsd/ospf | bsd/ospf-n-bgp | bsd/bgp | cisco/ospf | cisco/ospf-n-bgp | cisco/bgp
assuming gns3 c3725 dynamips appliances
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
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
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
https://networklessons.com/ospf/basic-ospf-configuration
https://routeur.clemanet.com/routage-ospf-cisco.php
https://cisco.goffinet.org/ccna/ospf/lab-ospf-multi-area/
https://cisco.goffinet.org/ccna/ospf/lab-ospf-multi-area/
https://routeur.clemanet.com/routage-ospf-cisco.php