home       basis       advanced       routing       switching       testen       overig      

dynamic routing: OSPF

  1. dynamisch en redundant
     
    We kunnen de oefening, static routing 2, redundant maken zoals we dit al deden in static routing 3.
    Maar dit heeft een kostprijs:
    per extra router komen er een factor statische routes bij. Bij volledige redundancy is dit aantal routes evenredig met de faculteit van het aantal routers:
     
    4 routers geeft 4! = 1 x 2 x 3 x 4 = 24 statische routes
    5 routers geeft 5! = 1 x 2 x 3 x 4 x 5 = 120 statische routes
     
    Dit probleem oplossen kan mits gebruik van dynamische routing protocollen, zoals RIP (Routing Information Protocol), OSPF (Open Shortest-Path First) en EIGRP (Enhanced Interior Gateway Routing Protocol.
    In deze oefening kijken we naar een OSPF-oplossing ...
     
    We gebruiken opnieuw de physische configuratie van de vorige 2 oefeningen (static route 2 en 3)

    static-routing-3

    Klik hiernaast op de PT-link om het sjabloon te downloaden: 4routers-addressing-ok

  2. configuratie
     
    Om OSPF te gebruiken moeten we in cisco routers de volgende commando's intikken:
    !! R1
    en
    conf t
    R1(config)# router ospf 1

    Vervolgens moeten we alle netwerken die op router R1 zijn aangesloten intikken met een wildcard netmask:

    !! R1
    network 10.255.255.0 0.0.0.3 area 0
    network 10.255.255.4 0.0.0.3 area 0
    network 192.168.1.0 0.0.0.255 area 0
    end
    copy run start

     
    We herhalen deze reeks op alle routers ... als volgt:
     
    op router R2:

    !! R2
    en
    conf t
    router ospf 1
    network 10.255.255.0 0.0.0.3 area 0
    network 10.255.255.12 0.0.0.3 area 0
    network 192.168.2.0 0.0.0.255 area 0
    end
    copy run start

     
    op router R3:

    !! R3
    en
    conf t
    router ospf 1
    network 10.255.255.4 0.0.0.3 area 0
    network 10.255.255.8 0.0.0.3 area 0
    network 192.168.3.0 0.0.0.255 area 0
    end
    copy run start

     
    en op router R4:

    !! R4
    en
    conf t
    router ospf 1
    network 10.255.255.12 0.0.0.3 area 0
    network 10.255.255.8 0.0.0.3 area 0
    network 192.168.4.0 0.0.0.255 area 0
    end
    copy run start

    Vergeet niet telkens je nieuwe configuratie op te slaan.
     

  3. LOADING TO FULL
     
    Zodra je twee naburige routers in OSPF plaatst krijg je een dergelijke melding:
    00:01:20: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.2.254 on Serial0/0/1 from LOADING to FULL, Loading Done
    00:01:40: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.3.254 on Serial0/0/0 from LOADING to FULL, Loading Done

     

  4. testen
      
    • Test op PC-1 of je alle andere PC's kan pingen
       
    • Monitor (je ping blijft pingen in je command prompt) tijdens de volgende test vanaf PC-1 naar PC-2
      met ping -t <ip-address>
      Verwijder nu in je netwerk, de seriële verbinding tussen R1 en R2,
      en kijk op je ping-monitor wat er gebeurt.
      Wacht tot de ping terug werkt.
      Verwijder vervolgens de lijn tussen R1 en R3, en herverbindt daarna
      de lijn tussen R1 en R2.
      Kijk op je monitor-scherm om te zien wat er gebeurt.
       
  5. routing table
     
    Op de routers kun je de routing table zichtbaar maken als volgt:
     
    R1# show ip route
     
    routes die beginnen met O zijn toegevoegd door OSPF
    routes die beginnen met C zijn rechtstreeks verbonden, connected, via een netwerkkaart van de router:
    Codes: C - connected, S - static, I - IGRP, 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, E - EGP
       i - IS-IS, 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
     
    Gateway of last resort is not set
     
     10.0.0.0/30 is subnetted, 4 subnets
    C       10.255.255.0 is directly connected, Serial0/0/1
    C       10.255.255.4 is directly connected, Serial0/0/0
    O       10.255.255.8 [110/128] via 10.255.255.5, 00:00:28, Serial0/0/0
    O       10.255.255.12 [110/128] via 10.255.255.1, 00:00:48, Serial0/0/1
    C    192.168.1.0/24 is directly connected, FastEthernet0/0
    O    192.168.2.0/24 [110/65] via 10.255.255.1, 00:00:48, Serial0/0/1
    O    192.168.3.0/24 [110/65] via 10.255.255.5, 00:00:28, Serial0/0/0
    O    192.168.4.0/24 [110/129] via 10.255.255.1, 00:00:03, Serial0/0/1
                    [110/129] via 10.255.255.5, 00:00:03, Serial0/0/0

     
    hieronder vind je alle ospf configs van alle 4 de routers:

    !! R1
    en
    conf t
    router ospf 1
    network 10.255.255.0 0.0.0.3 area 0
    network 10.255.255.4 0.0.0.3 area 0
    network 192.168.1.0 0.0.0.255 area 0
    end
    copy run start

     

    !! R2
    en
    conf t
    router ospf 1
    network 10.255.255.0 0.0.0.3 area 0
    network 10.255.255.12 0.0.0.3 area 0
    network 192.168.2.0 0.0.0.255 area 0
    end
    copy run start

     

    !! R3
    en
    conf t
    router ospf 1
    network 10.255.255.4 0.0.0.3 area 0
    network 10.255.255.8 0.0.0.3 area 0
    network 192.168.3.0 0.0.0.255 area 0
    end
    copy run start

     

    !! R4
    en
    conf t
    router ospf 1
    network 10.255.255.12 0.0.0.3 area 0
    network 10.255.255.8 0.0.0.3 area 0
    network 192.168.4.0 0.0.0.255 area 0
    end
    copy run start