In the previous lecture we introduced OSPF and examined its design and basic operation/configuration. However, we intentionally avoided some of the more complex aspects of OSPF's operation...
As previously mentioned, OSPF distributes topology information via Link State Advertisements (LSAs). A number of different LSA types are required due to the fact that OSPF has multiple router types:
show ip ospf database router command can be
used to show all Router LSAs within the topology database.
show ip ospf database network command.
show ip ospf database summary command will
list all Network Summary LSAs that exist within the topology database.
show ip ospf database asbr-summary will
list all ASBR Summary LSAs within the topology database.
show ip ospf database external command.
There are four additional LSA types (Type 8 through Type 11) that outside of our interest.
OSPF is allows networks to be partitioned into multiple areas, in order to reduce traffic and increase performance by reducing the topology database size on reach router. This no only creates the need for multiple router types, but also for multiple area types.
It is also worth noting that the use of summary LSAs leads to routers that are again believing what another router tells it. This leads to distance vector like behaviour, specifically between ABRs. It is for this reason that all areas are required to connect directly to area 0. This enforces a hub-and-spoke or tree like topology that is guaranteed to be loop free.
OSPF packets are encapsulated directly within IP datagrams using a protocol type of 89 (0x59). Each OSPF packet starts with an OSPF header, which is followed by the OSPF packet data - the exact data depends on the OSPF message type, however it may, for example, contain multiple LSAs (each of which would consist of an LSA header and LSA data).
There are five OSPF packet types:
All OSPF message types share a common 24-byte OSPF header which contains the OSPF version number, message type, router ID, area ID and authentication data.
A small business wants to implement a small network consisting of:
The company has been allocated a block of 512 IP addresses in the 187.188.202.0/23 range (ie. extending from from 187.188.202.0 through to 187.188.203.255).
The proposed design will make use OSPF. Area 0 will not contain any computers - it will just connect the routers together. The other areas will contain head office and the various branches.
64 for each branch office: 187.188.202.0 to 187.188.202.63
187.188.202.64 to 187.188.202.127
187.188.202.128 to 187.188.202.191
128 for head office 187.188.202.192 to 187.188.203.63
Small Problem! The "head office" network can't be summarised too well.
10111011.10111100.11001010.11000000 10111011.10111100.11001011.00111111
Has to be handled as two ranges:
10111011.10111100.11001010.11000000 10111011.10111100.11001010.11111111 10111011.10111100.11001011.00000000 10111011.10111100.11001011.00111111
Or in other words:
187.188.202.192/26 187.188.203.0/26
128 for head office 187.188.202.0 to 187.188.202.127
64 for each branch office: 187.188.202.128 to 187.188.202.191
187.188.202.192 to 187.188.202.255
187.188.203.0 to 187.188.203.63
spare 187.188.203.64 to 187.188.203.127
spare 187.188.203.128 to 187.188.203.191
Possible backbone routers 187.188.203.192 to 187.188.203.255
Head office now occupies the address range:
10111011.10111100.11001010.00000000 10111011.10111100.11001010.01111111
Which can be summarised as:
187.188.202.0/25
And the others as:
187.188.202.128/26 187.188.202.192/26 187.188.203.0/26 187.188.203.64/26 187.188.203.128/26 187.188.203.192/26
Some simple rules to get this right:
R1(config)# R1(config)#interface Ethernet0/0 Connects to area 0 R1(config-if)#ip address 187.188.203.254 255.255.255.192 R1(config-if)#no shutdown R1(config-if)#bandwidth 10000 Bandwidth in kilobits R1(config-if)#! R1(config)#interface Ethernet1/0 Connects to area 1 R1(config-if)#ip address 187.188.202.126 255.255.255.128 R1(config-if)#no shutdown R1(config-if)#bandwidth 10000 Bandwidth in kilobits R1(config-if)#! R1(config)# R1(config)#ip routing R1(config)# R1(config)#router ospf 100 OSPF process ID (Random choice) R1(config-router)#network 187.188.203.192 0.0.0.63 area 0 R1(config-router)#network 187.188.202.0 0.0.0.127 area 1 R1(config-router)#exit R1(config)#