BGP e sebetsa joang

Kajeno re tla sheba protocol ea BGP. Re ke ke ra bua nako e telele mabapi le hore na ke hobane'ng le hore na ke hobane'ng ha e sebelisoa e le eona feela protocol. Ho na le tlhahisoleseding e ngata haholo tabeng ena, mohlala mona.

Joale BGP ke eng? BGP ke protocol e matla ea ho tsamaisa 'me ke eona feela protocol ea EGP (External Gateway Protocol). Protocol ena e sebelisoa ho theha routing inthaneteng. Ha re shebeng hore na tikoloho e hahiloe joang lipakeng tsa li-routers tse peli tsa BGP.

BGP e sebetsa joang
Nahana ka sebaka se pakeng tsa Router1 le Router3. Ha re li hlophise re sebelisa litaelo tse latelang:

router bgp 10
  network 192.168.12.0
  network 192.168.13.0
  neighbor 192.168.13.3 remote-as 10

router bgp 10
  network 192.168.13.0
  network 192.168.24.0
  neighbor 192.168.13.1 remote-as 10

Sebaka sa boahelani ka har'a tsamaiso e le 'ngoe e ikemetseng ke AS 10. Ka mor'a ho kenya tlhahisoleseding ho router, e kang Router1, router eo e leka ho theha kamano e haufi le Router3. Boemo ba pele ha ho se letho le etsahalang bo bitsoa E ne e sa sebetse. Hang ha bgp e hlophisitsoe ho Router1, e tla qala ho mamela TCP port 179 - e tla ea seterekeng. Connect, 'me ha e leka ho bula lenaneo le Router3, e tla kena mmuso Active.

Kamora hore seboka se thehoe lipakeng tsa Router1 le Router3, Melaetsa e butsoeng e ea fapanyetsanoa. Ha molaetsa ona o romelloa ke Router1, boemo bona bo tla bitsoa Open Sent. 'Me ha e amohela molaetsa oa Open ho tsoa ho Router3, e tla ea seterekeng Bula Netefatsa. Ha re shebisiseng molaetsa oa Open:

BGP e sebetsa joang
Molaetsa ona o fetisa tlhahisoleseling mabapi le protocol ea BGP ka boeona, eo router e e sebelisang. Ka ho fapanyetsana melaetsa ea Open, Router1 le Router3 li buisana ka tlhahisoleseling mabapi le litlhophiso tsa tsona. Ho fetisoa li-parameter tse latelang:

  • Version: sena se kenyelletsa mofuta oa BGP oo router e o sebelisang. Phetolelo ea hajoale ea BGP ke mofuta oa 4 o hlalosoang ho RFC 4271. Li-routers tse peli tsa BGP li tla leka ho buisana ka mofuta o lumellanang, ha ho e-na le ho se lumellane ho tla be ho se na seboka sa BGP.
  • AS ea ka: sena se kenyelletsa nomoro ea AS ea router ea BGP, li-routers li tla tlameha ho lumellana le nomoro ea AS hape e hlalosa hore na ba tla sebelisa iBGP kapa eBGP.
  • Tšoara Nako: Haeba BGP e sa fumane melaetsa ea ho boloka bophelo kapa ho ntlafatsa ho tloha ka lehlakoreng le leng bakeng sa nako ea nako ea nako e tla phatlalatsa lehlakore le leng 'le shoele' 'me e tla heletsa seboka sa BGP. Ka nako e ts'oanang, nako ea ho ts'oara e behiloe ho metsotsoana e 180 ho li-routers tsa Cisco IOS, molaetsa oa keepalive o romelloa metsotsoana e meng le e meng e 60. Li-routers ka bobeli li tlameha ho lumellana ka nako ea ho ts'oara kapa ho ke ke ha ba le seboka sa BGP.
  • Sekhetho sa BGP: ena ke ID ea router ea BGP ea lehae e khethiloeng joalo ka ha OSPF e etsa:
    • Sebelisa router-ID e hlophisitsoeng ka letsoho ka taelo ea bgp router-id.
    • Sebelisa aterese e phahameng ka ho fetisisa ea IP ho sehokelo sa loopback.
    • Sebelisa aterese e phahameng ka ho fetisisa ea IP ho sebopeho sa 'mele.
  • Li-parameter tsa boikhethelo: Mona u tla fumana bokhoni bo itseng ba boikhethelo ba router ea BGP. Sebaka sena se ekelitsoe e le hore likarolo tse ncha li ka ekeletsoa BGP ntle le ho etsa mofuta o mocha.Lintho tseo u ka li fumanang mona ke:
    • tšehetso bakeng sa MP-BGP (Multi Protocol BGP).
    • tšehetso bakeng sa Refresh Route.
    • tšehetso bakeng sa linomoro tsa 4-octet AS.

Ho theha tikoloho, maemo a latelang a tlameha ho finyelloa:

  • Nomoro ea phetolelo. Mofuta oa hajoale ke 4.
  • Nomoro ea AS e tlameha ho lumellana le seo u se lokiselitseng moahelani 192.168.13.3 hōle-joaloka 10.
  • ID ea router e tlameha ho fapana le moahisani.

Haeba leha e le efe ea li-parameter e sa khotsofatse maemo ana, router e tla romela Tsebiso molaetsa o bontshang phoso. Ka mor'a ho romela le ho amohela melaetsa ea Open, likamano tsa boahelani li kena mmusong LIEKETSENG SEBELE. Kamora sena, li-routers li ka fapanyetsana tlhahisoleseling mabapi le litsela mme li etsa sena li sebelisa Update melaetsa. Ona ke molaetsa oa ntlafatso o rometsoeng ke Router1 ho Router3:

BGP e sebetsa joang

Mona u ka bona marang-rang a tlalehiloeng ke Router1 le Litšobotsi tsa Path, tse ts'oanang le metrics. Re tla bua ka litšobotsi tsa Path ka botlalo. Melaetsa ea Keepalive e boetse e romelloa ka har'a seboka sa TCP. Li fetisoa, ka mokhoa o ikhethileng, metsotsoana e meng le e meng e 60. Ena ke Keepalive Timer. Haeba molaetsa oa Keepalive o sa amoheloe nakong ea Hold Timer, sena se tla bolela tahlehelo ea puisano le moahelani. Ka kamehla, e lekana le metsotsoana e 180.

Letšoao le sebetsang:

BGP e sebetsa joang

Ho bonahala eka re fumane hore na li-routers li fetisetsana tlhahisoleseding joang ho e mong, joale a re lekeng ho utloisisa moelelo oa protocol ea BGP.

Ho phatlalatsa tsela e eang tafoleng ea BGP, joalo ka liprothokholo tsa IGP, taelo ea marang-rang e sebelisoa, empa mokhoa oa ho sebetsa o fapane. Haeba ho IGP, ka mor'a ho hlalosa tsela ka taelo ea marang-rang, IGP e sheba hore na ke li-interfaces life tsa subnet ena 'me e li kenyelletsa tafoleng ea eona, joale taelo ea marang-rang ho BGP e sheba tafoleng ea ho tsamaisa le ho batla. hantle feela e tsamaisana le tsela e ho taelo ea netweke. Haeba tse joalo li fumanoa, litsela tsena li tla hlaha tafoleng ea BGP.

Batla tsela tafoleng ea hona joale ea IP routing ea router e lumellanang hantle le litekanyetso tsa taelo ea marang-rang; haeba tsela ea IP e teng, beha NLRI e lekanang tafoleng ea sebakeng sa BGP.

Joale a re phahamisetseng BGP ho bohle ba setseng mme re bone hore na tsela e khethoa joang ka har'a AS e le 'ngoe. Kamora hore router ea BGP e fumane litsela ho tsoa ho moahelani oa eona, e qala ho khetha tsela e nepahetseng. Mona o hloka ho utloisisa hore na baahelani ba ka ba le mofuta ofe - ka hare le ka ntle. Na router e utloisisa ka tlhophiso hore na moahelani ea hlophisitsoeng ke ka hare kapa ka ntle? Haeba u le sehlopheng:

neighbor 192.168.13.3 remote-as 10 

remote-as parameter e hlalosa AS, e lokiselitsoeng ho router ka boeona ka taelo ea router bgp 10. Litsela tse tsoang ka hare ho AS li nkoa li le ka hare, 'me litsela tse tsoang ho AS ntle li nkoa e le tsa ka ntle. 'Me bakeng sa e' ngoe le e 'ngoe, mohopolo o fapaneng oa ho amohela le ho romella mesebetsi. Nahana ka topology ena:

BGP e sebetsa joang

Router e 'ngoe le e' ngoe e na le sebopeho sa loopback se hlophisitsoeng ka ip: xxxx 255.255.255.0 - moo x e leng nomoro ea router. Ho Router9 re na le sebopeho sa loopback le aterese - 9.9.9.9 255.255.255.0. Re tla e phatlalatsa ka BGP mme re bone hore na e ata joang. Tsela ena e tla fetisetsoa ho Router8 le Router12. Ho tloha ho Router8, tsela ena e tla ea ho Router6, empa ho Router5 e ke ke ea ba tafoleng ea ho tsamaisa. Hape ho Router12 tsela ena e tla hlaha tafoleng, empa ho Router11 le eona e ke ke ea ba teng. Ha re leke ho utloisisa taba ena. Ha re nahaneng hore na data le liparamente Router9 e fetisetsa ho baahisani ba eona joang, ho tlaleha tsela ena. Pakete e ka tlase e tla romelloa ho tloha Router9 ho ea ho Router8.

BGP e sebetsa joang
Lintlha tsa litsela li na le litšobotsi tsa Path.

Litšobotsi tsa tsela li arotsoe ka mekhahlelo e 4:

  1. E tsebahalang e tlamang - Li-routers tsohle tse tsamaisang BGP li tlameha ho lemoha litšobotsi tsena. E tlameha ho ba teng lintlafatsong tsohle.
  2. Tse tsebahalang discretionary - Li-routers tsohle tse tsamaisang BGP li tlameha ho lemoha litšobotsi tsena. Li ka 'na tsa e-ba teng lintlafatsong, empa boteng ba tsona ha bo hlokehe.
  3. Boikhethelo ba phetoho - e kanna ea se ke ea amoheloa ke lits'ebetso tsohle tsa BGP. Haeba router e sa hlokomele tšobotsi, e tšoaea ntlafatso e le karolo e itseng ebe e e fetisetsa ho baahelani ba eona, e boloka tšobotsi e sa tsejoeng.
  4. Boikhethelo bo sa fetoheng - e kanna ea se ke ea amoheloa ke lits'ebetso tsohle tsa BGP. Haeba router e sa hlokomele tšobotsi, joale tšobotsi eo e hlokomolohuoa le ho lahloa ha e fetisetsoa ho baahelani.

Mehlala ea litšobotsi tsa BGP:

  • E tsebahalang e tlamang:
    • Tsela ea tsamaiso ea Autonomous
    • E latelang-hop
    • Origin

  • Tse tsebahalang discretionary:
    • Khetho ea lehae
    • Atomic aggregate
  • Boikhethelo ba phetoho:
    • mokgoboketsi
    • Metseng
  • Boikhethelo bo sa fetoheng:
    • Multi-exit discriminator (MED)
    • ID ea Moqapi
    • Lenane la lihlopha

Tabeng ena, hajoale re tla thahasella Origin, Next-hop, AS Path. Kaha tsela e feta pakeng tsa Router8 le Router9, ke hore, ka hare ho AS e le 'ngoe, e nkoa e le ka hare' me re tla ela hloko Origin.

Tšimoloho - e bonts'a hore na tsela ea ntlafatso e fumanoe joang. Maemo a ka bang teng:

  • 0 - IGP: NLRI e amohetse ka har'a tsamaiso ea pele ea boipuso;
  • 1 - EGP: NLRI e ithutoa ho sebelisoa Exterior Gateway Protocol (EGP). Pele ho BGP, ha e sebelisoe
  • 2 - Ha ea fella: NLRI e ithutile ka tsela e 'ngoe

Tabeng ea rona, joalokaha ho ka bonoa paketeng, e lekana le 0. Ha tsela ena e fetisetsoa ho Router12, khoutu ena e tla ba le khoutu ea 1.

E latelang, Next-hop. Next-hop tšobotsi

  • Ena ke aterese ea IP ea router ea eBGP eo tsela ea marang-rang e eang teng.
  • Sebopeho sea fetoha ha prefix e romelloa ho e 'ngoe AS.

Tabeng ea iBGP, ke hore, ka hare ho AS, Next-hop e tla bontšoa ke ea ithutileng kapa a bolelloa ka tsela ena. Tabeng ea rona, e tla ba 192.168.89.9. Empa ha tsela ena e fetisoa ho tloha Router8 ho ea ho Router6, Router8 e tla e fetola ebe e nkela ea eona sebaka. Next-hop e tla ba 192.168.68.8. Sena se re lebisa melaong e 'meli:

  1. Haeba router e fetisetsa tsela ho moahelani oa eona oa ka hare, ha e fetole parameter e latelang-hop.
  2. Haeba router e fetisetsa tsela ho moahelani oa eona oa ka ntle, e fetola Next-hop ho ip ea sebopeho seo router ena e fetisang ho sona.

Sena se re lebisa ho utloisisa bothata ba pele - Hobaneng ho ke ke ha ba le tsela tafoleng ea routing ho Router5 le Router11. A re hlahlobeng ka hloko. Kahoo, Router6 e fumane leseli mabapi le tsela ea 9.9.9.0/24 mme e e kenyellelitse tafoleng ea ho tsamaisa:

Router6#show ip route bgp
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, p - overrides from PfR

Gateway of last resort is not set

      9.0.0.0/24 is subnetted, 1 subnets
B        9.9.9.0 [20/0] via 192.168.68.8, 00:38:25<source>
Теперь Router6 передал маршрут Router5 и первому правилу Next-hop не изменил. То есть, Router5 должен добавить  <b>9.9.9.0 [20/0] via 192.168.68.8</b> , но у него нет маршрута до 192.168.68.8 и поэтому данный маршрут добавлен не будет, хотя информация о данном маршруте будет храниться в таблице BGP:

<source><b>Router5#show ip bgp
BGP table version is 1, local router ID is 5.5.5.5
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
              x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 * i 9.9.9.0/24       192.168.68.8             0    100      0 45 i</b>

Boemo bo tšoanang bo tla etsahala pakeng tsa Router11-Router12. Ho qoba boemo bona, o hloka ho lokisa Router6 kapa Router12, ha o fetisetsa tsela ho baahelani ba bona ba ka hare, ho kenya aterese ea bona ea IP e le Next-hop. Sena se etsoa ho sebelisa taelo:

neighbor 192.168.56.5 next-hop-self

Ka mor'a taelo ena, Router6 e tla romela molaetsa oa Update, moo ip ea interface Gi0/0 Router6 e tla hlalosoa e le Next-hop bakeng sa litsela - 192.168.56.6, ka mor'a moo tsela ena e tla be e se e kenyelelitsoe tafoleng ea ho tsamaisa.

Ha re fetele pele 'me re bone hore na tsela ena e hlaha ho Router7 le Router10. E ke ke ea ba tafoleng ea ho tsamaisa 'me re ka nahana hore bothata bo tšoana le ba pele ka parameter ea Next-hop, empa ha re sheba tlhahiso ea taelo ea ip bgp, re tla bona hore tsela ha ea ka ea amoheloa moo leha e le ka Next-hop e fosahetseng, ho bolelang hore tsela ha ea ka ea fetisoa. Mme sena se tla re lebisa boteng ba molao o mong:

Litsela tse tsoang ho baahisani ba ka hare ha li fetisetsoe ho baahisani ba bang ba ka hare.

Kaha Router5 e amohetse tsela e tsoang ho Router6, e ke ke ea fetisetsoa ho moahisani e mong oa ka hare. E le hore phetiso e etsahale, o hloka ho lokisa ts'ebetso Reflector ea Tsela, kapa lokisa likamano tsa boahelani tse hokahaneng ka botlalo (Full Mesh), ke hore, Router5-7 e mong le e mong e tla ba moahisani oa motho e mong le e mong. Tabeng ena, re tla sebelisa Route Reflector. Ho Router5 o hloka ho sebelisa taelo ena:

neighbor 192.168.57.7 route-reflector-client

Route-Reflector e fetola boits'oaro ba BGP ha e feta tsela e eang ho moahisani oa ka hare. Haeba moahelani oa ka hare o hlalosoa e le tsela-reflector-client, joale litsela tsa ka hare li tla phatlalatsoa ho bareki bana.

Tsela ha e ea hlaha ho Router7? U se ke ua lebala ka Next-hop hape. Ka mor'a mekhoa ena, tsela e boetse e lokela ho ea ho Router7, empa sena ha se etsahale. Sena se re tlisa molaong o mong:

Molao o latelang oa hop o sebetsa feela bakeng sa litsela tsa kantle. Bakeng sa litsela tsa ka hare, tšobotsi e latelang ea hop ha e nkeloe sebaka.

'Me re fumana boemo boo ho bona ho hlokahalang ho theha tikoloho ho sebelisa static routing kapa IGP protocols ho tsebisa li-routers ka litsela tsohle tse ka hare ho AS. Ha re ngolise litsela tse tsitsitseng ho Router6 le Router7 'me ka mor'a moo re tla fumana tsela eo re e batlang tafoleng ea router. Ho AS 678, re tla e etsa ka tsela e fapaneng - re tla ngolisa litsela tse tsitsitseng bakeng sa 192.168.112.0/24 ho Router10 le 192.168.110.0/24 ho Router12. Ka mor'a moo, re tla theha kamano ea boahelani pakeng tsa Router10 le Router12. Re tla boela re hlophise Router12 ho romella hop ea eona e latelang ho Router10:

neighbor 192.168.110.10 next-hop-self

Sephetho e tla ba hore Router10 e tla fumana tsela 9.9.9.0/24, e tla amoheloa ho tsoa ho Router7 le Router12. Ha re boneng hore na khetho ea Router10 e etsa eng:

Router10#show ip bgp
BGP table version is 3, local router ID is 6.6.6.6
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
              x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network              Next Hop            Metric LocPrf Weight Path
 *>i 9.9.9.0/24       192.168.112.12           0    100       0      45 i

                               192.168.107.7                                0     123 45 i  

Joalokaha re bona, litsela tse peli le motsu (>) li bolela hore tsela ka 192.168.112.12 e khethiloe.
Ha re boneng hore na khetho ea litsela e sebetsa joang:

  1. Mohato oa pele ha u fumana tsela ke ho hlahloba boteng ba Next-hop ea eona. Ke ka lebaka leo, ha re amohela tsela ho Router5 ntle le ho ipehela Next-hop-self, tsela ena ha ea ka ea sebetsoa hape.
  2. Ebe ho latela Weight parameter. Paramethara ena ha se Path Attribute (PA) mme ha e romelloe ka melaetsa ea BGP. E hlophisitsoe sebakeng sa heno ho router e 'ngoe le e' ngoe 'me e sebelisoa feela ho laola khetho ea litsela ho router ka boeona. A re hlahlobeng mohlala. Ka holimo feela u ka bona hore Router10 e khethile tsela ea 9.9.9.0/24 ka Router12 (192.168.112.12). Ho fetola paramente ea Wieght, o ka sebelisa 'mapa oa litsela ho beha litsela tse itseng, kapa ho abela moahelani oa hae boima u sebelisa taelo:
     neighbor 192.168.107.7 weight 200       

    Hona joale litsela tsohle tse tsoang ho moahelani enoa li tla ba le boima bona. Ha re boneng hore na khetho ea tsela e fetoha joang kamora ho qhekella hona:

    Router10#show bgp
    *Mar  2 11:58:13.956: %SYS-5-CONFIG_I: Configured from console by console
    BGP table version is 2, local router ID is 6.6.6.6
    Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
                  r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
                  x best-external, a additional-path, c RIB-compressed,
    Origin codes: i - IGP, e - EGP, ? - incomplete
    RPKI validation codes: V valid, I invalid, N Not found
    
         Network          Next Hop            Metric LocPrf Weight      Path
     *>  9.9.9.0/24       192.168.107.7                        200      123 45 i
     * i                          192.168.112.12           0          100      0 45 i

    Joalokaha u bona, tsela e fetang Router7 e se e khethiloe, empa sena se ke ke sa ba le phello ho li-routers tse ling.

  3. Boemong ba boraro re na le Khetho ea Sebaka. Paramethara ena ke tšobotsi e tsebahalang ea discretionary, e bolelang hore boteng ba eona ke boikhethelo. Paramethara ena e sebetsa feela ka har'a AS e le 'ngoe mme e ama khetho ea tsela bakeng sa baahelani ba ka hare feela. Ke ka lebaka leo e fetisoang feela ho Update melaetsa e reretsoeng moahisani oa ka hare. Ha e teng ho Update melaetsa bakeng sa baahelani ba kantle. Ka hona, e ile ea hlalosoa e le e tsebahalang ea discretionary. Ha re leke ho e sebelisa ho Router5. Ho Router5 re lokela ho ba le litsela tse peli bakeng sa 9.9.9.0/24 - e 'ngoe ho ea ho Router6 le ea bobeli ka Router7.

    Re sheba:

    Router5#show bgp
    BGP table version is 2, local router ID is 5.5.5.5
    Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
                  r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
                  x best-external, a additional-path, c RIB-compressed,
    Origin codes: i - IGP, e - EGP, ? - incomplete
    RPKI validation codes: V valid, I invalid, N Not found
    
         Network          Next Hop            Metric LocPrf Weight Path
     *>i 9.9.9.0/24       192.168.56.6             0    100      0 45 i

    Empa ha re ntse re bona tsela e le 'ngoe ka Router6. Tsela ea Router7 e hokae? Mohlomong Router7 le eona ha e na eona? Ha re shebeng:

    Router#show bgp
    BGP table version is 10, local router ID is 7.7.7.7
    Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
                  r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
                  x best-external, a additional-path, c RIB-compressed,
    Origin codes: i - IGP, e - EGP, ? - incomplete
    RPKI validation codes: V valid, I invalid, N Not found
    
         Network                Next Hop            Metric LocPrf  Weight    Path
     *>i 9.9.9.0/24       192.168.56.6             0     100           0      45 i
    
                                  192.168.107.10                                  0     678 45 i 

    Hoa makatsa, ntho e 'ngoe le e 'ngoe e bonahala e lokile. Hobaneng e sa fetisetsoe ho Router5? Taba ke hore BGP e na le molao:

    Router e fetisetsa feela litsela tseo e li sebelisang.

    Router7 e sebelisa tsela e fetang Router5, kahoo tsela e fetang Router10 e ke ke ea fetisoa. Ha re khutlele ho Khetho ea Sebaka. Ha re hlophiseng khetho ea lehae ho Router7 'me re bone hore na Router5 e sebetsana joang le sena:

    route-map BGP permit 10
     match ip address 10
     set local-preference 250
    access-list 10 permit any
    router bgp 123
     neighbor 192.168.107.10 route-map BGP in</b>

    Kahoo, re thehile 'mapa oa litsela o nang le litsela tsohle mme ra bolella Router7 hore e fetole parameter ea Local Preference ho 250 ha e amoheloa, ea kamehla ke 100. Ha re bone se etsahetseng ho Router5:

    Router5#show bgp
    BGP table version is 8, local router ID is 5.5.5.5
    Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
                  r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
                  x best-external, a additional-path, c RIB-compressed,
    Origin codes: i - IGP, e - EGP, ? - incomplete
    RPKI validation codes: V valid, I invalid, N Not found
    
         Network          Next Hop            Metric LocPrf Weight        Path
     *>i 9.9.9.0/24       192.168.57.7             0          250      0 678 45 i

    Joalokaha re bona hona joale Router5 e khetha tsela e fetang Router7. Setšoantšo se tšoanang se tla ba ho Router6, leha ho le molemo ho eena ho khetha tsela ea Router8. Re boetse re eketsa hore ho fetola paramente ena ho hloka ho qala bocha ha tikoloho hore phetoho e sebetse. Bala mona. Re hlophisitse khetho ea Sebaka. Ha re feteleng ho parameter e latelang.

  4. Khetha tsela e nang le paramethara e latelang-hop 0.0.0.0, ke hore, litsela tsa lehae kapa tse kopaneng. Litsela tsena li abeloa ka boiketsetso parameter ea Boima bo lekanang le boholo-32678-kamora ho kenya taelo ea marang-rang:
    Router#show bgp
    BGP table version is 2, local router ID is 9.9.9.9
    Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
                  r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
                  x best-external, a additional-path, c RIB-compressed,
    Origin codes: i - IGP, e - EGP, ? - incomplete
    RPKI validation codes: V valid, I invalid, N Not found
    
         Network          Next Hop            Metric LocPrf Weight    Path
     *>  9.9.9.0/24       0.0.0.0                  0            32768    i
  5. Tsela e khuts'oane ka ho fetesisa ea AS. Ho khethiloe paramethara e khuts'oane ea AS_Path. Ha tsela e tsamaea ka li-AS tse fokolang, ho ba betere. Nahana ka tsela e lebang 9.9.9.0/24 ho Router10:
    Router10#show bgp
    BGP table version is 2, local router ID is 6.6.6.6
    Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
                  r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
                  x best-external, a additional-path, c RIB-compressed,
    Origin codes: i - IGP, e - EGP, ? - incomplete
    RPKI validation codes: V valid, I invalid, N Not found
    
         Network          Next Hop            Metric LocPrf Weight Path
     *   9.9.9.0/24     192.168.107.7                           0           123 45 i
     *>i                     192.168.112.12           0    100       0       45 i

    Joalokaha u ka bona, Router10 e khethile tsela ka 192.168.112.12 hobane bakeng sa tsela ena parameter ea AS_Path e na le 45 feela, 'me tabeng e' ngoe 123 le 45. Intuitively clear.

  6. Paramethara e latelang ke Origin. IGP (tsela e fumanoeng ka BGP) e molemo ho feta EGP (tsela e fumanoeng ho sebelisoa pele ho BGP, ha e sa sebelisoa), 'me EGP e molemo ho feta e sa Feleng? (e fumanwe ke mokgwa o mong, mohlala ka kabo botjha).
  7. Paramethara e latelang ke MED. Re ne re e-na le Wiegh e neng e sebetsa sebakeng sa heno feela ho router. Ho ne ho e-na le Local Preference, e neng e sebetsa feela ka har'a tsamaiso e le 'ngoe e ikemetseng. Joalokaha u ka nahana, MED ke parameter e tla fetisoa lipakeng tsa litsamaiso tse ikemetseng. Hantle haholo sehlooho mabapi le parameter ena.

Ha ho sa tla sebelisoa litšoaneleho, empa haeba litsela tse peli li na le litšobotsi tse tšoanang, ho tla sebelisoa melao e latelang:

  1. Khetha tsela e fetang moahelani ea haufi oa IGP.
  2. Khetha tsela ea khale ka ho fetisisa bakeng sa tsela ea eBGP.
  3. Khetha tsela e fetang moahelani ea nang le ID e nyane ka ho fetisisa ea router ea BGP.
  4. Khetha tsela e fetang moahelani ea nang le aterese e tlase ea IP.

Joale ha re shebeng taba ea BGP convergence.

Ha re boneng hore na ho etsahalang haeba Router6 e lahleheloa ke tsela 9.9.9.0/24 ka Router9. Ha re tima sebopeho sa Gi0/1 sa Router6, se tla utloisisa hang-hang hore seboka sa BGP le Router8 se felisitsoe mme moahelani o nyametse, ho bolelang hore tsela e fumanoeng ho eona ha e sebetse. Router6 hang-hang e romela melaetsa ea Update, moo e bontšang marang-rang 9.9.9.0/24 tšimong ea Melaetsa e Khutlisitsoeng. Hang ha Router5 e fumana molaetsa o joalo, e tla o romela ho Router7. Empa kaha Router7 e na le tsela e fetang Router10, e tla arabela hang-hang ka Nchafatso ka tsela e ncha. Haeba ho ke ke ha khoneha ho lemoha ho oa ha moahelani ho itšetlehile ka boemo ba sebopeho, joale u tla tlameha ho emela hore Hold Timer e chese.

Kopano.

Haeba u hopola, re buile ka taba ea hore hangata u tlameha ho sebelisa topology e hokahaneng ka botlalo. Ka palo e kholo ea li-routers ho e le 'ngoe JOALOKAHA sena se ka baka mathata a maholo, ho qoba sena o hloka ho sebelisa li-confederations. E 'ngoe ea AS e arotsoe ka likarolo tse' maloa tsa AS, e ba lumellang ho sebetsa ntle le tlhokahalo ea topology e hokahaneng ka botlalo.

BGP e sebetsa joang

Sehokelo sa sena ke sena labule mona tlhophiso bakeng sa GNS3.

Mohlala, ka topology ena re tla tlameha ho hokela li-routers tsohle ho AS 2345 ho e mong, empa re sebelisa Confederation, re ka theha likamano tse haufi lipakeng tsa li-routers tse hokahaneng ka kotloloho. A re ke re bue ka taba ena ka botlalo. Haeba re ne re e-na le AS 2345 feela, joale laForge ba amohetse mohoanto ho tloha Picard e ne e tla bolella li-routers Lintlha и Worf, empa ba ne ba ke ke ba bolella router ka eona bee . Hape litsela tse ajoang ke router ka boeona laForge, e ka be e sa fetisoa bee le hona Worf- oh, che Lintlha.

U tla tlameha ho lokisa Route-Reflector kapa kamano ea boahelani e hokahaneng ka botlalo. Ka ho arola AS 2345 e le 'ngoe ho 4 sub-AS (2,3,4,5) bakeng sa router e' ngoe le e 'ngoe, re qetella re e-na le mokhoa o fapaneng oa ho sebetsa. Ntho e nngwe le e nngwe e hlalositswe ka ho phethahala mona.

Lisebelisoa:

  1. CCIE Routing and Switching v5.0 Official Cert Guide, Volume 2, Fifth Edition, Narbik Kocharians, Terry Vinson.
  2. websaeteng xgu.ru
  3. websaeteng GNS3Vault.

Source: www.habr.com

Eketsa ka tlhaloso