These are notes I made while completing JITL‘s Megalab. You can follow along by watching this video and grabbing the PKA file in the description.
I certainly don’t own anything I’ve posted here, which are excerpts from JITL’s PKA file, and Wendell Odom’s books CCNA 200-301: Official Cert Guide, 1st edition vol 1 and vol 2.
Spoiler warning, these notes contain configs.
- Configure OSPF on R1 (LAN-facing interfaces) and all Core and Distribution switches (all Layer-3 interfaces).
- Use process ID 1 and Area 0.
- Manually configure each device’s RID to match the loopback interface IP.
- On switches, use the network command to match the exact IP address of each interface.
- On R1, enable OSPF in interface config mode.
- Make sure OSPF is enabled on all loopback interfaces, too. Loopback interfaces should be passive.
- Each Distribution switch’s SVIs (except the Management VLAN SVI) should be passive, too.
- Configure all physical connections between OSPF neighbors to use a network type that doesn’t elect a DR/BDR. NOTE: This doesn’t work on the Layer-3 PortChannel interfaces between CSW1/CSW2. Leave them as the default network type.
Let’s enable OSPF routing. The instructions want us to use PID 1 and to manually configure the router IDs to lo interfaces. I’ve already forgotten what I’ve set the Loopbacks to, how about you?
R1#show ip int br | inc Loop
Loopback0 10.0.0.76 YES manual up up
Now let’s config starting on R1. We start with creating the OSPF process before adding the LAN interfaces to area 0.
! R1
router ospf 1
router-id 10.0.0.76
passive-interface lo0
int lo0
ip ospf 1 area 0
int range g0/0-1
ip ospf 1 area 0
ip ospf network point-to-point
Good, now on to the core switches. These we’ll configure using the network command in OSPF config. Don’t forget that we’re using a wildcard mask, not a netmask, so to match a /32 you’ll use all 0’s.
! CSW1
router ospf 1
router-id 10.0.0.77
passive-interface lo0
network 10.0.0.34 0.0.0.0 area 0
network 10.0.0.41 0.0.0.0 area 0
network 10.0.0.45 0.0.0.0 area 0
network 10.0.0.49 0.0.0.0 area 0
network 10.0.0.53 0.0.0.0 area 0
network 10.0.0.57 0.0.0.0 area 0
network 10.0.0.77 0.0.0.0 area 0
! point to point
int range g1/0/1,g1/1/1-4
ip ospf network point-to-point
! CSW2
router ospf 1
router-id 10.0.0.78
network 10.0.0.42 0.0.0.0 area 0
network 10.0.0.38 0.0.0.0 area 0
network 10.0.0.61 0.0.0.0 area 0
network 10.0.0.65 0.0.0.0 area 0
network 10.0.0.69 0.0.0.0 area 0
network 10.0.0.73 0.0.0.0 area 0
network 10.0.0.78 0.0.0.0 area 0
! point to point
int range g1/0/1,g1/1/1-4
ip ospf network point-to-point
Distribution switches will be similar, but we’ll need to include routes for each switch’s Switched Virtual Interface (SVI), minus the management VLAN. Read the instructions carefully! SVIs should be passive interfaces except for 99!
! DSW-A1
router ospf 1
router-id 10.0.0.79
network 10.0.0.46 0.0.0.0 area 0
network 10.0.0.62 0.0.0.0 area 0
network 10.0.0.79 0.0.0.0 area 0
network 10.1.0.2 0.0.0.0 area 0
network 10.2.0.2 0.0.0.0 area 0
network 10.6.0.2 0.0.0.0 area 0
network 10.0.0.2 0.0.0.0 area 0
passive-interface lo0
passive-interface vlan10
passive-interface vlan20
passive-interface vlan40
int range g1/1/1-2
ip ospf network point-to-point
! DSW-A2
router ospf 1
router-id 10.0.0.80
network 10.0.0.50 0.0.0.0 area 0
network 10.0.0.66 0.0.0.0 area 0
network 10.0.0.80 0.0.0.0 area 0
network 10.1.0.3 0.0.0.0 area 0
network 10.2.0.3 0.0.0.0 area 0
network 10.6.0.3 0.0.0.0 area 0
network 10.0.0.3 0.0.0.0 area 0
passive-interface lo0
passive-interface vlan10
passive-interface vlan20
passive-interface vlan40
int range g1/1/1-2
ip ospf network point-to-point
! DSW-B1
router ospf 1
router-id 10.0.0.81
network 10.0.0.54 0.0.0.0 area 0
network 10.0.0.70 0.0.0.0 area 0
network 10.0.0.81 0.0.0.0 area 0
network 10.3.0.2 0.0.0.0 area 0
network 10.4.0.2 0.0.0.0 area 0
network 10.5.0.2 0.0.0.0 area 0
network 10.0.0.18 0.0.0.0 area 0
passive-interface lo0
passive-interface vlan10
passive-interface vlan20
passive-interface vlan30
int range g1/1/1-2
ip ospf network point-to-point
! DSW-B2
router ospf 1
router-id 10.0.0.82
network 10.0.0.58 0.0.0.0 area 0
network 10.0.0.74 0.0.0.0 area 0
network 10.0.0.82 0.0.0.0 area 0
network 10.3.0.3 0.0.0.0 area 0
network 10.4.0.3 0.0.0.0 area 0
network 10.5.0.3 0.0.0.0 area 0
network 10.0.0.19 0.0.0.0 area 0
passive-interface lo0
passive-interface vlan10
passive-interface vlan20
passive-interface vlan30
int range g1/1/1-2
ip ospf network point-to-point
- Configure one static default route for each of R1’s Internet connections. They should be recursive routes.
- Make the route via G0/1/0 a floating static route by configuring an AD value 1 greater than the default.
- R1 should function as an OSPF ASBR, advertising its default route to other routers in the OSPF domain.
Now that we’ve added all the routers into the same OSPF area, we can distribute a default route. We’ll do that with our gateway router R1. This one is NOT a wildcard so we’re back to 0.0.0.0 for /0 and 255.255.255.255 for /32. Try keeping that straight for the test 🙂
What networks should be our default routes?
R1#show ip int br
Interface IP-Address OK? Method Status Protocol
GigabitEthernet0/0 10.0.0.33 YES manual up up
GigabitEthernet0/1 10.0.0.37 YES manual up up
GigabitEthernet0/2 unassigned YES unset administratively down down
GigabitEthernet0/0/0 203.0.113.2 YES DHCP up up
GigabitEthernet0/1/0 203.0.113.6 YES DHCP up up
Loopback0 10.0.0.76 YES manual up up
Vlan1 unassigned YES unset administratively down down
Ints G0/0/0 and G0/1/0 look like they link to our ISP. Let’s get some more info.
R1#show ip int g0/0/0
GigabitEthernet0/0/0 is up, line protocol is up (connected)
Internet address is 203.0.113.2/30
Broadcast address is 255.255.255.255
Address determined by DHCP
...
R1#show ip int g0/1/0
GigabitEthernet0/1/0 is up, line protocol is up (connected)
Internet address is 203.0.113.6/30
Broadcast address is 255.255.255.255
Address determined by DHCP
...
/30 subnet. I’m willing to bet that the ISP routers are on 203.0.113.1 and 203.0.113.5 then. Let’s confirm with ping.
R1#ping 203.0.113.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 203.0.113.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 0/0/0 ms
R1#ping 203.0.113.5
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 203.0.113.5, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 0/0/0 ms
We have our next hops! Let’s make our static default route and static floating route (which is just a backup in case the default goes down). The default metric for static routes is 1, so for the floating route let’s use 2.
! R1
ip route 0.0.0.0 0.0.0.0 203.0.113.1
ip route 0.0.0.0 0.0.0.0 203.0.113.5 2
And now we’ve got to advertise that route throughout our OSPF area. We do that in the same OSPF process with this command.
! R1
router ospf 1
default-information originate
And that’s it for part 5! Remember to copy run start and see me for part 6.
