Ocenite etot tekst:



       OSPF  chasto  primenyaemyj  protokol  marshrutizacii vnutri
avtonomnoj sistemy.
     Router   hranit  topologicheskuyu  bazu  opisyvayushchuyu  polnuyu
strukturu seti. Po baze router vychislyaet shortest-path tree,  s
soboj  v  kachestve kornya. Obrashcheniem dereva vychislyaetsya tablica
marshrutizaci.   Pri   izmeneniii   sostoyaniya   linkov   routery
rassylaet   sosedyam   Link   State  Advertise(LSA)-soobshcheniya  s
informaciej o sostoyanii linkov. LSA tak zhe  rassylayutsya  kazhdye
30   minut.    Posle   polucheniya   LSA   router   perestraivaet
topologicheskuyu bazu.



     RIP  (routed)  -  ne podderzhivaet setevye maski, rassylaet
polnuyu tablicu routinga kazhdye 30 sek.   Schitaet  optimal'nost'
puti tol'ko po chislu hopov.

     IGRP  -  podderzhivaet  setevye maski, rabotaet po sobytiyu,
hranit  "vesa"  linkov,  ne  trebuet   bol'shih   resursov,   no
realizovan tol'ko na CISCO-routerah.



 
  • Link-state protokol.
  • VLSM - Variable Length Subnet Mask. Klassy - otmenyayutsya. Prostaya shema s setyami klassa A,B,C nedostatochno gibka, trebuetsya chtoby protokoly routinga umeli podderzhivat' VSML. OSPF eto delaet.
  • Raschitan dlya raboty v ierarhicheskih setyah.
  • Areas - gruppirovka podsetej v "areas" - neperesekayushchiesya zony.
  • Umeet summarizovat' routing s pogloshcheniem.
  • Podderzhivaetsya routerami bol'shinstva proizvoditelej.

      * Koncepcii OSPF *

  • OSPF router ID.
  • LSA - Link State Advertisment.
  • Hello protocol
  • Raspredelenie obyazannostej mezhdu routerami v multicast-seti
  • Types LSAs
  • Summarizaciya routinga
  • LSM
  • Dialekty raznyh proizvoditelej

      OSPF router ID

    Poryadkovyj nomer, pod kotorym router izvesten v OSPF. Ispol'zuetsya pri rabote protokola mezhdu routerami dlya koordinacii. Po umolchaniyu - starshij IP-adres na aktivnom interfejse.

      LSA - Link State Advertisment

    LSA - opoveshchayushchee soobshchenie, posylaetsya routerom na aktivnyj interfejs. Soderzhit vsyu informaciyu o vyzvannom izmenenii routinga. Esli LSA prines izmeneniya, to oni vnosyatsya v topologicheskuyu bazu, po SFP-algoritmu perestraivaetsya tablica routinga i LSA rassylaetsya dal'she. Inache LSA dal'she ne rassylaetsya. Poslannyj paket rasprostranyaetsya dalee vsemi routerami (esli v etom est' neobhodimost') Posylaetsya tol'ko pri izmenenii sostoyaniya linka A tak zhe posylaetsya kazhdye 30 minut. (Na vsyakij sluchaj) Primer: --------------------------------------------------------------- Router# show ip ospf database OSPF Router with id(192.168.239.66) (Autonomous system 300) Displaying Router Link States(Area 0.0.0.0) Link ID ADV Router Age Seq# Checksum Link count 172.18.21.6 172.18.21.6 1731 0x80002CFB 0x69BC 8 172.18.21.5 172.18.21.5 1112 0x800009D2 0xA2B8 5 172.18.1.2 172.18.1.2 1662 0x80000A98 0x4CB6 9 172.18.1.1 172.18.1.1 1115 0x800009B6 0x5F2C 1 172.18.1.5 172.18.1.5 1691 0x80002BC 0x2A1A 5 Displaying Net Link States(Area 0.0.0.0) Link ID ADV Router Age Seq# Checksum 172.18.1.3 192.20.239.66 1245 0x800000EC 0x82E Displaying Summary Net Link States(Area 0.0.0.0) Link ID ADV Router Age Seq# Checksum 172.18.240.0 172.18.241.5 1152 0x80000077 0x7A05 172.18.241.0 172.18.241.5 1152 0x80000070 0xAEB7 172.18.244.0 172.18.241.5 1152 0x80000071 0x95CB Vyvodit listing s vremenami poslednij obnovlenij LSA paketov s sosednih routerov. ---------------------------------------------------------------

      Tipy setej

    Point-to-Point - sosed opredelyaetsya odnoznachno - eto "tot-konec" Multiaccess - sosedi nahodyatsya po otkliku na Hello protocol (napr. ethernet, vydelyaetsya Designate Router (za glavnogo) FDDI) Nonbroadcast - sosedej pridetsya zadavat' yavno pri Multiaccess konfiguracii OSPF (napr. Frame relay, X.25)

      Vydelennye DR routery v Multiaccess-seti

    Rassylat' v multicast-seti LSA-soobshcheniya ot kazhdogo k kazhdomu - slishkom dorogoe udovol'stvie. "Sosedi" vse svoi LSA shlyut tol'ko vydelennomu Designed Router'u(DR). DR rassylaet akkumulirovannye LSA vsem "sosedyam". DR vybiraetsya po protokolu Hello. Hello ispol'zuet setevye multicast soobshcheniya po 224.0.0.5. Vybiraetsya tak zhe Backup Designate Routera (BDR) - zapasnoj. On avtomaticheski zamenit DR esli ot togo ne pridet ni odnogo LSA dol'she opredelennogo vremeni. Stav DR on proiniciiruet vybory novogo BDR. Vnov' vklyuchennyj router otdaet svoj LSA DR'u (tochnee DR+BDR) posylaya multicast po 224.0.0.6 DR rassylaet svoi LSA vsem "svoim" posylaya multicast po 224.0.0.5 Primer: --------------------------------------------------------------- Router# debug ip osfp events Router (config-if)# shutdown ! interfejs "upal" Listing etoj komandy pokazhet spisok rassylaemyh LSA Router (config-if)# no shutdown ! interfejs "ozhil" Listing etoj komandy pokazhet spisok rassylaemyh LSA ---------------------------------------------------------------

      Topologiya OSPF

    Prostranstvo adresov v OSPF organizuesya po ierarhicheskomu principu, raspadayas' na neperesekayushchiesya area (zony?)

      Klassifikaciya OSPF routerov

  • Area Border Router (ABR) - imeet interfejsy, podklyuchennye srazu k neskol'kim area. Dlya kazhdogo iz takih interfejsov vypolnyaet svoyu kopiyu algoritma routinga.
  • Internal router - vse interfejsy podklyucheny k setyam, raspolozhennym v odnoj i toj zhe area. Ispolnyaet odnu kopiyu algoritma routinga.
  • Backbone router - imeet interfejs k bekbonu
  • Autonomous System Boundary router - obmenivaetsya informaciej s routerami, prinadlezhashchimi raznym avtonomnym sistemam

      * Konfigurirovanie OSPF *

    Zapusk processa routinga OSPF --------------------------------------------------------------- Router# router ospf process-id --------------------------------------------------------------- process-id Vnutrennij nomer - unikal'noe znachenie dlya kazhdogo processa routinga. OSPF processy na "druzhestvennyh" routerah zapuskayutsya s odnim i tem zhe process-id Opredelit', kakie interfejsy ispolnyayut OSPF --------------------------------------------------------------- Router# network netaddress wildcard-mask area area-id --------------------------------------------------------------- netaddress Adres napryamuyu podklyuchennyh setej ili podsetej wildcard-mask Obrashchennaya maska dlya sravneniya zadannogo adresa s adresami interfejsov (chtob vyyasnit' - ispolnyat' li OSPF na dannom interfejse) area-id Zadaet, kakoj area prinyadlezhat adresa

      Primer 1

    --------------------------------------------------------------- router ospf 63 network 1.0.0.0 0.255.255.255 area 0 ---------------------------------------------------------------

      Primer 2. Vnutrennij router

    --------------------------------------------------------------- interface e 0 ip address 131.108.25.1 255.255.255.0 interface e 1 ip address 131.108.2.26 255.255.255.0 interface e 2 ip address 131.108.3.7 255.255.255.0 interface loopback 0 ip address 3.3.3.3 255.0.0.0 --------------------------------------------------------------- Variant 1 Razreshaem v OSPF tol'ko perechislennye interfejsy router ospf 63 network 131.108.25.1 0.0.0.0 area 0 network 131.108.3.7 0.0.0.0 area 0 network 131.108.2.26 0.0.0.0 area 0 Variant 2 Razreshaem v OSPF vse, chto popadet v masku router ospf 63 network 131.108.0.0 0.0.255.255 area 0 Variant 3 Razreshaem v OSPF vse, v t.ch. adresa na loopback-interfejse router ospf 63 network 0.0.0.0 255.255.255.255 area 0

      Primer 3. Konfigurirovanie Area Border Router

    --------------------------------------------------------------- network 131.108.25.1 0.0.0.255 area 0 network 131.108.0.0 0.0.255.255 area 34 --------------------------------------------------------------- V primere interfejsy (e0) i (e1 + e3) "smotryat" v raznye area. Hotya 131.108.25.1 popadaet vnutr' 131.108.0.0, no preimushchestvo imeet bolee tochnyj routing.

      Tipy Link State Andvertisement

    Router LSA Posylaetsya vnutri-area routerami Vyzyvayut pereraschet SPF dereva "O" (OSPF derived router) Summary LSA Posylaetsya Area Border routerom "IA" (Inter Area routes) --------------------------------------------------------------- Roter# show ip ospf Routing Process "ospf 201" with ID 192.168.110.200 Supports only single TOS(TOS0) route It is an area border and autonomous system boundary router Summary Link update interval is 0:30:00 and the update due in 0:16:26 External Link update interval is 0:30:00 and the update due in 0:16:27 Redistributing External Routes from, igrp 200 with metric mapped to 2, includes subnets in redistribution rip with metric mapped to 2 igrp 2 with metric mapped to 100 igrp 32 with metric mapped to 1 Number of areas in this access server is 3 Area 192.168.110.0 Number of interfaces in this area is 1 Area has simple password authentication SPF algorithm executed 6 times Area ranges are Link State Update Interval is 0:30:00 and due in 0:16:55 Link State Age Interval is 0:20:00 and due in 0:06:55 ---------------------------------------------------------------

      Tipy routinga

    "O" - OSPF derived router (Router LSA) "IA" - Inter Area routes (Summary LSA) "E1" - Type-1 External Routes "E2" - Type-2 External Routes Metrika tipa E1 sumiruet vnutrennie i vneshnie metriki Metrika tipa E2 sumiruet tol'ko vneshnie metriki (t.e. ne uchityvaet metriku pri prohozhdenii odnoj i toj zhe area

      Konfigurirovanie v nonbroadcast setyah

    Esli set' ne imeet broadcast'a (napr. frame-relay, X.25), "sosedej" po OSPF pridetsya zadavat' v yavnom vide Primer: --------------------------------------------------------------- router ospf neighbor 172.16.3.4 priority 1 poll-interval 180 ---------------------------------------------------------------

      * SUMMARIZACIYA ROUTINGA *

    Tablicy routinga dlya B --------------------------------------------------------------- 131.108.4.0 255.255.252.0 131.108.8.0 255.255.252.0 131.108.12.0 255.255.252.0 ~~~~~~~~~ 131.108.16.0 255.255.252.0 . . . 131.108.28.0 255.255.252.0 ~~~~~~~~~ || \/ 131.108.16.0 255.255.240.0 --------------------------------------------------------------- Summarizaciya routinga sokrashchaet kolichestvo strok v tablice routinga, pri etom rasshiryaetsya (virtual'naya) setevaya maska - vklyuchayushchaya v sebya nastoyashchie setevye maski. Summarizaciya routinga mozhet porozhdat' fantomnyj routing (nesushchestvuyushchih setej) ~~~~~~~~~ 131.108.12.0 255.255.252.0 ~~~~~~~~~ || \/ 131.108.12.0 255.255.240.0 Pri etom 131.108.8.0 255.255.252.0 vypadaet po takoj setevoj maske v 0-yu podsetku.

      Konfiguraciya summarizacii routinga

    --------------------------------------------------------------- Route# area area-id range address mask --------------------------------------------------------------- --------------------------------------------------------------- router ospf 63 network 1.0.0.0 0.255.255.255 area 0 network 2.0.0.0 0.255.255.255 area 2 area 0 range 1.0.0.0 255.0.0.0 area 2 range 2.0.0.0 255.0.0.0 router ospf 63 network 1.0.0.0 0.255.255.255 area 0 network 3.0.0.0 0.255.255.255 area 3 area 0 range 1.0.0.0 255.0.0.0 area 3 range 3.0.0.0 255.0.0.0 --------------------------------------------------------------- Dlya korrektnoj summarizacii routinga trebuetsya raspredelenie adresov nepreryvnymi kuskami

      Monitoring OSPF

    --------------------------------------------------------------- Route# show ip protocols . . . Routing Protocol is "ospf 109" Sending updates every ?? seconds, next due in ?? seconds Invalid after ??? seconds, hold down 280, flushed after 630 . . . ---------------------------------------------------------------

      Podderzhka variacij OSPF raznyh proizvoditelej

    CISCO-router ----- > non-CISCO-router --------------------------------------------------------------- Router (config-if)# ip ospf cost cost --------------------------------------------------------------- Pri vychislenii puti Cisco-routery dlya ocenki stoimosti interfejsa ispol'zuyut shirinu linka (bandwidth). Realizacii OSPF drugih proizvoditele mogut ispol'zovat' dlya opredeleniya ceny drugie algoritmy. Dlya soglasovaniya stoimost' linka v etom sluchae pridetsya zadavat' vruchnuyu komandoj ip osf cost

      * KRATKIJ SPISOK OSPF KOMAND *

    area authentication area virtual-link default-information originate (OSPF) default-metric (BGP, EGP, OSPF, and RIP) ip ospf authentication-key ip ospf cost ip ospf dead-interval ip ospf hello-interval ip ospf message-digest-key ip ospf network ip ospf priority ip ospf retransmit-interval ip ospf transmit-delay ip ospf-name-lookup match route-type network area neighbor (OSPF) ospf auto-cost-determination router ospf redistribute set metric-type show ip ospf show ip ospf border-routers show ip ospf database show ip ospf interface show ip ospf neighbor show ip ospf virtual-links

    Last-modified: Tue, 03 Mar 1998 21:31:29 GMT
    Ocenite etot tekst: