In this topic we will configure OSPF, verify and troubleshoot using show commands and what kinds of problems we can expect and how we can resolve these.
I have made some changes to our switch diagrams and added a couple of routers and re-jigged things around:
To enable OSPF we first need to enable the routing protocol:
router ospf 1
The value 1 is the instance number, this can be anything between 1 and 65535. Next we need to let the routing process know which networks we want to advertise, for example:
network 192.168.0.1 0.0.0.255 area 0
OSPF uses inverse (wildcard) subnet mask. The 0’s mean we want this part of the IP to exactly match (192.168.0.) and the last octet 255 means it can be any value. Area 0 is the backbone area for OSPF. I have kept this simple.
We can stop OSPF hellos being sent out of an interface using the passive-interface command. This can be useful on FastEthernet links that are connected to a switch network that do not need to receive routing updates. Sending routing updates to unnecessarily links can waste bandwidth and CPU resources also enhances security.
OSPF by default uses the highest IP address for its routing process ID. The routing process ID is used to elect DR and BDR as well as advertise routes. For this reason, it may be a good idea to create a loopback interface to override this to ensure that becomes RID, Cisco even suggests using loopbacks.
Configuring a loopback is easy, lets do this on RouterC:
interface loopback 1
ip address 192.168.0.1 255.255.255.0
This doesn’t automatically make the RID become 192.168.0.1 we must either reload the router – Which could be inconvenient in a live environment or we can using the command router-id 192.168.0.1 to force the change.
We can advertise default routes via the default-information originate command under the OSPF configuration. We can also use default-information originate always (not supported in Packet Tracer) – This advertises a default route even if one doesn’t exist, it will generate one and advertise this. To create a default route:
ip route 0.0.0.0 0.0.0.0 s0/1
Lets first begin by checking the RID of RouterC – We can verify this by using the show ip ospf command on RouterC:
We can check OSPF routes via the show ip route command:
We can verify WAN connectivity by pinging each PC from each other. I’m going to demonstrate PC3 pinging PC1:
show ip osfneighbor will show information about all neighbors:
show ip ospf interface s0/0 will display information about the interface state whether it is up and OSPF information such as timers, what area the interface is in and network type.
Ensure you’re using a wildcard mask and not a subnet mask when configuring OSPF
Check IP addressing and subnet masks are correctly configured on WAN links
Serial interfaces with a DCE cable attached must be configured with the clock rate command
Routers running OSPF must have the same hello and dead timers to form a adjacency
If using OSPF authentication must be match on other routers
You may have accidentally configured passive-interface on a Serial interface running OSPF – this will stop advertisements
debug ip ospf adj – shows elections for DR and BDR
debug ip ospf packet – shows ospf hello packets being received by the router
debug ip ospf hello – shows more in depth information relating to hello packets including being sent and received by the router
First, from the computer ping the local loopback 127.0.0.1 this will ensure the NIC is functioning correctly.
Second, ping the Default Gateway for example 192.168.0.1 if this fails try and ping another PC on the same network.
To find the default gateway that is set (normally via DHCP) on a Windows machine Start > Run > Type cmd and enter – in the black box type “ipconfig /all” followed by enter. This will display information relating to IP, DNS, Default Gateway and Subnet mask.
If both pinging the default gateway and another PC fail and you have a working PC – verify the PC that isn’t working is in the same subnet by running an ipconfig /all and compare the IP, subnet mask and default gateway.
Tracert can be handy to see where the packets drop off and may help identify where the fault lies.
Try and ping (if have access) from router to router to test connectivity.
Most issues are configured with an incorrect IP, Subnet mask or default gateway. A good example of this is one I encountered recently. There was a PC that could talk to a printer offsite but not on site on inspecting further the printer had the wrong subnet mask, meaning when the PC was on site, the printer was in a totally different subnet to that of the PC – a quick amendment of the mask and boom it worked. Easily missed.
Always consult with network documentation to ensure IP addressing is correct with VLSM networks. As as last resort use a Subnet calculator such as Bitcricket beware you’re not allowed a calculator on the exam.
Ping another PC on same network to verify connectivity
Ping Default Gateway (cmd> ipconfig all)
Ping DNS servers
Ping router to router
Tracert to see where packets are dropped
Consult with network documentation, if unsure use a subnet calculator
IPv6 is the new IP addressing scheme that will be replacing IPv4. Why? We are running out of IPv4 addresses. As technology is growing (smartphones, tablets, fridges with internet) with more and more devices being attached to the Internet via 3G/4G/Broadband etc and consuming IPv4 addresses.
Requirements for running IPv6
Routers and Switches must support IPv6
Operating system and NICs must support IPv6 (recent one do, legacy ones maybe not)
Its possible to run IPv4 and IPv6 using Dual Stacking
Tunneling for IPv6 to communicate over an IPv6 network to reach another IPv6 network
Same features as the traditional RIP
Support for IPv6
Does not support authentication
UDP port now 521 instead of port 520
Run an instance of RIPng per interface
network command has been replaced by ipv6 rip 1 enable
Same features as the traditional EIGRP
Support for IPv6
network command replaced by ipv6 router eigrp 5
Must no shutdown the routing process
Same features as the traditional OSPF
Multicast FF02::5 for OSPF routers / FF02::6 for OSPF-designated routers
Allows IPv6 and IPv4 to run alongside each other
Encapsulates IPv6 packets within IPv4
Allows an IPv6 to communicate over an IPv4 network to reach another IPv6 network
Route summarization is summarising a range of subnets as one. Route summarization is commonly used in routing protocols to reduce how many entries are in a routing table and to reduce packet size. Having many routes can slow the routing process down so it is best practise to summarise where possible.
I have highlighted the common bits above. If we look at the last octet we’ll notice 0001 are common this equates to 4 bits if we convert these 4 bits to a subnet mask we’ll end up with 240 (128, 192, 224, 240). The summarization route will be 192.168.2.20 /28
Highlighted are the common bits, the second octet we have four common bits 0001 – if we convert these 4 bits to a subnet mask we’ll end up with 240.
The route summarization is 172.16.0.0 255.240.0.0 or /12
When configuring WAN links between routers it would be a waste to assign a /24 bit subnet mask. Lets think about this, how many IPs do we need between two routers? two. One for the each end of the WAN link.
If we only need two IP addresses, which subnet mask would be the most efficient one to use? Lets have a look at the following subnet masks and how many hosts we can get from each: