Hotel case study - OSPF

From csn
Jump to navigation Jump to search

Explanation
For a router to be able to forward a packet to a destination network, it must know where that network is. When you configure an IP on an Interface, the router knows that it is connected to that network and that packets destined for the network and be sent out of that interface. That's why we can ping directly connected neighbours even without a routing protocol.

To learn about networks that a router is not connected to, a router can either be told by the administrator (static routes) or it can learn about distant networks via messages from its neighbour routers (dynamic routing protocol such as OSPF).

A key part of the configuration of any routing protocol is the "network" staement. In OSPF the network statement tells OSPF which router interfaces represent networks that should be included in OSPF exchanges. An end-to-end ping from a PC in Perth to a PC sydney, requires that every router (includes the distribution layer) have knowledge of both the source and destination network (ping sends packets to and from a destination).

The format of the network command is as follows:

network <address> <wild card mask> area <area id>

Wherever the address and wildcard mask (like an ACL) match a local router ip interface address, that interface will be included in OSPF. There are many ways to use this:

network 192.168.1.0 0.0.0.255 area 0    If 192.168.1.0 is a /24 then any router interface 
                                        with any OP address on that subnet will be included
                                        in OSPF and assigned to area 0.
network 192.168.1.1 0.0.0.0 area 1      The router interface with the specific IP address
                                        192.168.1.1 will be included in OSPF and no others.
network 0.0.0.0 255.255.255.255 area 3  The wildcard mask matches any address so every interface
                                        on the router will participate in OSPF in area 3.
                                        Take with approach as it can't be used on an area-border
                                        router (interface in area 0 and another area).

As the scenario requires Perth internal links to be in area 1, Sydney in area 2, and the core-to-core links to be in area 0, you will need to take care with your OSPF network statements.

Study the areas in the following diagram and notice that the areas are defined on an interface level not a router level. Often there is confusion in that Area 0 is seen as being the core routers rather than network between the core routers.

ICT535-casestudy-ospf-areas.png


What you need to do?

  • Configure OSPF on each of your routers.
  • Include network statements to put the interfaces in the correct OSPF area.
  • The VLAN interfaces for the distribution layer devices are a crucial inclusion in OSPF. The represent the source/destination network for your PCs. So you need to include network statements to include them in OSPF.


How you will know it is configured correctly?

  • The show ip route command is your friend.
    • You should see O Routes indicating routes the local router learned via OSPF.
    • You should see IA Routes indicating the routes came from another area.
    • You should see every IP network in the routing table of every router.

Here is an example:

PerDl1#show ip route 
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override 

Gateway of last resort is not set    

      10.0.0.0/8 is variably subnetted, 15 subnets, 3 masks
O IA     10.0.0.0/30 [110/65] via 10.1.255.2, 00:01:19, GigabitEthernet0/0
C        10.1.1.0/24 is directly connected, Vlan101
L        10.1.1.2/32 is directly connected, Vlan101
C        10.1.2.0/24 is directly connected, Vlan102
L        10.1.2.2/32 is directly connected, Vlan102
C        10.1.128.0/24 is directly connected, Vlan10
L        10.1.128.2/32 is directly connected, Vlan10
C        10.1.255.0/30 is directly connected, GigabitEthernet0/0
L        10.1.255.1/32 is directly connected, GigabitEthernet0/0
O        10.1.255.4/30 [110/2] via 10.1.128.3, 00:04:26, Vlan10
                       [110/2] via 10.1.2.3, 00:04:36, Vlan102
                       [110/2] via 10.1.1.3, 00:04:36, Vlan101
O IA     10.2.1.0/24 [110/76] via 10.1.255.2, 00:00:11, GigabitEthernet0/0
O IA     10.2.2.0/24 [110/76] via 10.1.255.2, 00:00:11, GigabitEthernet0/0
O IA     10.2.128.0/24 [110/76] via 10.1.255.2, 00:00:11, GigabitEthernet0/0
O IA     10.2.255.0/30 [110/75] via 10.1.255.2, 00:00:20, GigabitEthernet0/0
O IA     10.2.255.4/30 [110/75] via 10.1.255.2, 00:00:11, GigabitEthernet0/0 
  • As you have routing configured, you should now be able to ping between any of the PC's. If you can't ping then it is almost certainly that somewhere in the chain of routers between the source and destination, at least one of them is missing the source or destination route. It could be an OSPF issue but OSPF relies on connectivity between the routers. So anything that breaks communication between routers will prevent end-to-end communications.

Omissions: At this stage, we have not performed any summarisation or dealt with default routes and internet access.


What questions could I see on the practical exam?

  • OSPF not configured.
  • Incorrect or missing network statement.
    • Bad address/wildcard mask.
    • Wrong area.