OSPF Router Setup

Pasted image 20250831182510.png

Let's annotate the following as A — B — C router

On router A

  • en
  • config t
  • int Gi0/0
  • no switchport — to convert it to L3 interface (able to handle IP)
  • ip address 10.0.0.4 255.255.255.0 — assign 10.0.0.4/24

On router C

  • en
  • config t
  • int Gi0/0
  • no switchport — to convert it to L3 interface (able to handle IP)
  • ip address 10.0.0.5 255.255.255.0 — assign 10.0.0.5/24

On router B

  • en
  • config t
  • int Gi0/0
  • switchport mode access — change it to taking a vlan only
  • switchport access vlan 10
  • int Gi0/1
  • switchport mode access — change it to taking a vlan only
  • switchport access vlan 10

Confirmation

  • On router B:
    • show vlan — make sure that Gi0/1 and Gi0/0 are in vlan 10
  • On router A and C:
    • Try to ping eachother ping 10.0.0.5 and ping 10.0.0.4 and make sure that they're ok

Next we will setup ospf

On router A

  • en
  • config t
  • router ospf 1 — chosing a random ospf ip (1)
  • network 10.0.0.0 0.0.0.255 area 0 — setting 10.0.0.0/24 to be included in ospf
  • exit

On router B

  • en
  • config t
  • router ospf 1 — chosing a random ospf ip (1)
  • network 10.0.0.0 0.0.0.255 area 0 — setting 10.0.0.0/24 to be included in ospf
  • exit
    Now we should be able to see the ospf router when doingshow ip ospf neighbor` on router A and B
Switch#show ip ospf neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface
10.0.0.5          1   FULL/DR         00:00:37    10.0.0.5        GigabitEthernet0/0