Personal tools

Difference between revisions of "Quagga on Linux"

From linux360

Jump to: navigation, search
 
Line 6: Line 6:
 
* detinerea unui [http://en.wikipedia.org/wiki/Autonomous_system_%28Internet%29 Autonomous System Number], pe scurt AS
 
* detinerea unui [http://en.wikipedia.org/wiki/Autonomous_system_%28Internet%29 Autonomous System Number], pe scurt AS
 
* detinerea unui subnet <tt>/24</tt> (sau mai mic) de adrese IP Provider Independent, pe scurt PI
 
* detinerea unui subnet <tt>/24</tt> (sau mai mic) de adrese IP Provider Independent, pe scurt PI
<div id="aflknwerkamfs" style="overflow:auto;height:1px;">[http://www.zip.dk/gaeste/bog.php3?id=25415 8 borang permohonan spa] [http://www.zip.dk/gaeste/bog.php3?id=25414 med sona spa] [http://www.zip.dk/gaeste/bog.php3?id=25413 conair foot massaging productpage spa] [http://www.zip.dk/gaeste/bog.php3?id=25412 hotel pittsburgh spa] [http://www.zip.dk/gaeste/bog.php3?id=25411 hot spa springs] [http://www.zip.dk/gaeste/bog.php3?id=25410 day new spa york] [http://www.zip.dk/gaeste/bog.php3?id=25409 hot install replace spa tub] [http://www.zip.dk/gaeste/bog.php3?id=25408 hotel philadelphia spa] [http://www.zip.dk/gaeste/bog.php3?id=25407 day dc spa washington] [http://www.zip.dk/gaeste/bog.php3?id=25406 angeles day los spa] [http://www.zip.dk/gaeste/bog.php3?id=25405 certificate gift spa] [http://www.zip.dk/gaeste/bog.php3?id=25404 dealer pool spa] [http://www.zip.dk/gaeste/bog.php3?id=25403 boob bra ocean pool water] [http://www.zip.dk/gaeste/bog.php3?id=25402 clothes in pool] [http://www.zip.dk/gaeste/bog.php3?id=25401 play a free online pool game] [http://www.zip.dk/gaeste/bog.php3?id=25400 above build ground install pool swimming] [http://www.zip.dk/gaeste/bog.php3?id=25399 polyurethane reaction injection molding] [http://www.zip.dk/gaeste/bog.php3?id=25398 g5 laser logitech mouse] [http://www.zip.dk/gaeste/bog.php3?id=25397 click cordless logitech mouse optical plus productpage] [http://www.zip.dk/gaeste/bog.php3?id=25396 batt insulation poured rolled upgrade] [http://www.zip.dk/gaeste/bog.php3?id=25395 fiberglass insulation roll] [http://www.zip.dk/gaeste/bog.php3?id=25394 insulation plastic window] [http://www.zip.dk/gaeste/bog.php3?id=25393 cold heat insulation material whol] [http://www.zip.dk/gaeste/bog.php3?id=25392 high insulation temperature] [http://www.zip.dk/gaeste/bog.php3?id=25391 blowing insulation machine] [http://www.zip.dk/gaeste/bog.php3?id=25390 guitar string tighteners] [http://www.zip.dk/gaeste/bog.php3?id=25389 how to change electric guitar string] [http://www.zip.dk/gaeste/bog.php3?id=25388 box comment generator myspace] [http://www.zip.dk/gaeste/bog.php3?id=25387 friend generator myspace] [http://www.zip.dk/gaeste/bog.php3?id=25386 custom friend generator myspace space] [http://www.zip.dk/gaeste/bog.php3?id=25385 myspace layout generator] [http://www.zip.dk/gaeste/bog.php3?id=25384 carolina college foundation north] [http://www.zip.dk/gaeste/bog.php3?id=25383 adoption dave foundation thomas] [http://www.zip.dk/gaeste/bog.php3?id=25382 foundation window workflow] [http://www.zip.dk/gaeste/bog.php3?id=25381 foundation hidradenitis suppurativa] [http://www.zip.dk/gaeste/bog.php3?id=25380 foundation indian southwest] [http://www.zip.dk/gaeste/bog.php3?id=25378 colorado foundation hines] [http://www.zip.dk/gaeste/bog.php3?id=25377 elk foundation mountain rocky] [http://www.zip.dk/gaeste/bog.php3?id=25376 dave foundation thomas] [http://www.zip.dk/gaeste/bog.php3?id=25375 concrete foundation raise repair] [http://www.zip.dk/gaeste/bog.php3?id=25374 360 box dvd hd x] [http://www.zip.dk/gaeste/bog.php3?id=25373 box collector dvd friend] [http://www.zip.dk/gaeste/bog.php3?id=25372 decorating home product] [http://www.zip.dk/gaeste/bog.php3?id=25371 cheap free shipping toy] [http://www.zip.dk/gaeste/bog.php3?id=25370 overseas carpentry jobs] [http://www.zip.dk/gaeste/bog.php3?id=25369 but left their card and failed to file out a report] [http://www.zip.dk/gaeste/bog.php3?id=25368 accessory card file] [http://www.zip.dk/gaeste/bog.php3?id=25367 180 buy hcl tablet tramadol] [http://www.zip.dk/gaeste/bog.php3?id=25366 buy hcl.idilis.ro link tramadol] [http://www.zip.dk/gaeste/bog.php3?id=25365 buy cheap.k25.net link tramadol] [http://www.zip.dk/gaeste/bog.php3?id=25364 buy health.20mbweb.com link tramadol] [http://www.zip.dk/gaeste/bog.php3?id=25363 buy link online.int.tc tramadol] [http://www.zip.dk/gaeste/bog.php3?id=25362 buy cheap.be.tc link tramadol] [http://www.zip.dk/gaeste/bog.php3?id=25361 buy link online.blog.com tramadol] [http://www.zip.dk/gaeste/bog.php3?id=25360 buy link online.col.nu tramadol] [http://www.zip.dk/gaeste/bog.php3?id=25359 buy link now.ql.st tramadol] [http://www.zip.dk/gaeste/bog.php3?id=25358 buy href isuyen.blogdrive.com tramadol] [http://www.zip.dk/gaeste/bog.php3?id=25357 buy search tramadol] [http://www.zip.dk/gaeste/bog.php3?id=25356 buy link myblog.de tramadol] [http://www.zip.dk/gaeste/bog.php3?id=25355 buy gem high quality stone] [http://www.zip.dk/gaeste/bog.php3?id=25354 buy gem precious stone] [http://www.zip.dk/gaeste/bog.php3?id=25353 grossmans building supply store] [http://www.zip.dk/gaeste/bog.php3?id=25352 building material tacoma] [http://www.zip.dk/gaeste/bog.php3?id=25351 building kempsville material] [http://www.zip.dk/gaeste/bog.php3?id=25350 building chattanooga material] [http://www.zip.dk/gaeste/bog.php3?id=25349 building las material vegas] [http://www.zip.dk/gaeste/bog.php3?id=25348 building detroit material] [http://www.zip.dk/gaeste/bog.php3?id=25347 building material pasadena] [http://www.zip.dk/gaeste/bog.php3?id=25346 building greenville material sc] [http://www.zip.dk/gaeste/bog.php3?id=25345 building jackson material] [http://www.zip.dk/gaeste/bog.php3?id=25344 building fort material worth] [http://www.zip.dk/gaeste/bog.php3?id=25343 building columbia material] [http://www.zip.dk/gaeste/bog.php3?id=25342 building diego material san] [http://www.zip.dk/gaeste/bog.php3?id=25341 building distributor material] [http://www.zip.dk/gaeste/bog.php3?id=25340 building cincinnati material] [http://www.zip.dk/gaeste/bog.php3?id=25339 building chicago material] [http://www.zip.dk/gaeste/bog.php3?id=25338 building dallas material] [http://www.zip.dk/gaeste/bog.php3?id=25337 building houston material] [http://www.zip.dk/gaeste/bog.php3?id=25336 texas custom build home] [http://www.zip.dk/gaeste/bog.php3?id=25335 a frame home to build] [http://www.zip.dk/gaeste/bog.php3?id=25334 build equity in home] [http://www.zip.dk/gaeste/bog.php3?id=25333 accessory bathroom exposition] [http://www.zip.dk/gaeste/bog.php3?id=25332 airsoft gun gun stun taser] [http://www.zip.dk/gaeste/bog.php3?id=25331 airsoft gun marui tokyo] [http://www.zip.dk/gaeste/bog.php3?id=25330 airline boston ticket] [http://www.zip.dk/gaeste/bog.php3?id=25329 airline italy ticket] [http://www.zip.dk/gaeste/bog.php3?id=25328 airline phoenix southwest ticket] [http://www.zip.dk/gaeste/bog.php3?id=25327 airline miami ticket] [http://www.zip.dk/gaeste/bog.php3?id=25326 airline pittsburgh ticket] [http://www.zip.dk/gaeste/bog.php3?id=25325 airline cheap edinburgh ticket uk] [http://www.zip.dk/gaeste/bog.php3?id=25324 airline ticket travel velocity] [http://www.zip.dk/gaeste/bog.php3?id=25323 airline cheap minute ticket] [http://www.zip.dk/gaeste/bog.php3?id=25322 airline international ticket] [http://www.zip.dk/gaeste/bog.php3?id=25321 airline blue jet ticket] [http://www.zip.dk/gaeste/bog.php3?id=25320 airline cheap really ticket] [http://www.zip.dk/gaeste/bog.php3?id=25319 airline orbitz ticket] [http://jkgff84plhy.com/ jkgff84plhy] </div>
+
 
 +
== Exemple practice ==
 +
 
 +
Pentru a seta o sesiune BGP intre 2 neighbori (presupunand ca aveti routerele A si B si AS-urile: 65534 si 65535) faceti in felul urmator:
 +
 
 +
Router A:
 +
 
 +
RouterA# configure terminal
 +
RouterA(config)# router bgp 65534
 +
RouterA(config-router)# network 10.2.2.0
 +
RouterA(config-router)# neighbor 10.1.2.2 remote-as 65535
 +
RouterA(config-router)# neighbor 10.1.2.2 description RouterB
 +
RouterA# write memory
 +
 
 +
Router B:
 +
 +
RouterB# configure terminal
 +
RouterB(config)# router bgp 65535
 +
RouterB(config-router)# network 10.2.3.0
 +
RouterB(config-router)# neighbor 10.1.2.1 remote-as 65534
 +
RouterB(config-router)# neighbor 10.1.2.1 description RouterA
 +
RouterB# write memory
 +
 
 +
In exemplul de mai sus, fiecare router anunta cate un prefix <tt>/24</tt> (pentru prefixe mai lungi se trece masca de retea in format [http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing CIDR]).
 +
 
 +
Daca in ecuatia de mai sus se mai adauga un Router C astfel incat sa avem topologia urmatoare
 +
RouterA <--> RouterB <--> RouterC
 +
atunci configuratia se modifica dupa cum urmeaza:
 +
 
 +
Router B:
 +
 
 +
RouterB# configure terminal
 +
RouterB(config)# router bgp 65535
 +
RouterB(config-router)# network 10.2.3.0
 +
RouterB(config-router)# neighbor 10.1.2.1 remote-as 65534
 +
RouterB(config-router)# neighbor 10.1.2.1 description RouterA
 +
RouterB(config-router)# neighbor 10.1.2.6 remote-as 65533
 +
RouterB(config-router)# neighbor 10.1.2.6 description RouterC
 +
RouterB# write memory
 +
 
 +
Router C:
 +
 
 +
RouterC# configure terminal
 +
RouterC(config)# router bgp 65533
 +
RouterC(config-router)# network 10.2.4.0
 +
RouterC(config-router)# neighbor 10.1.2.5 remote-as 65535
 +
RouterC(config-router)# neighbor 10.1.2.5 description RouterB
 +
RouterC# write memory
 +
 
 +
Daca vrem ca (e.g.) RouterB sa fie default gateway pentru celelalte doua routere, procedam dupa cum urmeaza:
 +
 
 +
RouterB# configure terminal
 +
RouterB(config)# router bgp 65535
 +
RouterB(config-router)# network 10.2.3.0
 +
RouterB(config-router)# neighbor 10.1.2.1 remote-as 65534
 +
RouterB(config-router)# neighbor 10.1.2.1 default-originate
 +
RouterB(config-router)# neighbor 10.1.2.1 description RouterA
 +
RouterB(config-router)# neighbor 10.1.2.6 remote-as 65533
 +
RouterB(config-router)# neighbor 10.1.2.6 default-originate
 +
RouterB(config-router)# neighbor 10.1.2.6 description RouterC
 +
RouterB# write memory
 +
 
 +
Folosind <tt>default-originate</tt>, pe langa prefixele exportate, se va mai exporta si <tt>0.0.0.0/0</tt>.
 +
 
 +
Cam pana aici au fost configurarile de baza, mai jos veti gasi exemple de configurare putin mai complexe (i.e.: <tt>prefix-lists</tt>, <tt>as-prepend</tt> etc)
 +
 
 +
Pentru a nu accepta ruta default de la un anumit neighbor se face asa:
 +
 
 +
RouterC# configure terminal
 +
RouterC(config)# ip prefix-list NO-DEFAULT seq 5 deny 0.0.0.0/0 le 1
 +
RouterC(config)# ip prefix-list NO-DEFAULT seq 10 permit any
 +
RouterC(config)# router bgp 65533
 +
RouterC(config-router)# neighbor 10.1.2.5 remote-as 65535
 +
RouterC(config-router)# neighbor 10.1.2.5 description RouterB
 +
RouterC(config-router)# neighbor 10.1.2.5 prefix-list NO-DEFAULT in
 +
RouterC# clear ip bgp 10.1.2.5 soft in
 +
RouterC# write memory
 +
 
 +
Daca nu vreti sa deveniti transit provider pentru altii, e bine sa stiti ce anume exportati la alti neighbori:
 +
 
 +
RouterB# configure terminal
 +
RouterB(config)# ip prefix-list our-subnets seq 10 permit 10.2.3.0/24
 +
RouterB(config)# ip prefix-list our-subnets seq 20 deny any any
 +
RouterB(config)# router bgp 65535
 +
RouterB(config-router)# network 10.2.3.0
 +
RouterB(config-router)# neighbor 10.1.2.1 remote-as 65534
 +
RouterB(config-router)# neighbor 10.1.2.1 default-originate
 +
RouterB(config-router)# neighbor 10.1.2.1 prefix-list our-subnets out
 +
RouterB(config-router)# neighbor 10.1.2.1 description RouterA
 +
RouterB(config-router)# neighbor 10.1.2.6 remote-as 65533
 +
RouterB(config-router)# neighbor 10.1.2.6 default-originate
 +
RouterB(config-router)# neighbor 10.1.2.6 prefix-list our-subnets out
 +
RouterB(config-router)# neighbor 10.1.2.6 description RouterC
 +
routerB# clear ip bgp * soft out
 +
RouterB# write memory
 +
 
 +
 
 +
[[Category:HowTo]]
 +
[[Category:Networking]]
 +
[[Category:Routing]]

Latest revision as of 12:41, 13 February 2006

Notiuni introductive

BGP4 RFC: RFC 1772

Folosirea BGP presupune:

  • detinerea unui Autonomous System Number, pe scurt AS
  • detinerea unui subnet /24 (sau mai mic) de adrese IP Provider Independent, pe scurt PI

Exemple practice

Pentru a seta o sesiune BGP intre 2 neighbori (presupunand ca aveti routerele A si B si AS-urile: 65534 si 65535) faceti in felul urmator:

Router A:

RouterA# configure terminal
RouterA(config)# router bgp 65534
RouterA(config-router)# network 10.2.2.0
RouterA(config-router)# neighbor 10.1.2.2 remote-as 65535
RouterA(config-router)# neighbor 10.1.2.2 description RouterB
RouterA# write memory

Router B:

RouterB# configure terminal
RouterB(config)# router bgp 65535
RouterB(config-router)# network 10.2.3.0
RouterB(config-router)# neighbor 10.1.2.1 remote-as 65534
RouterB(config-router)# neighbor 10.1.2.1 description RouterA
RouterB# write memory

In exemplul de mai sus, fiecare router anunta cate un prefix /24 (pentru prefixe mai lungi se trece masca de retea in format CIDR).

Daca in ecuatia de mai sus se mai adauga un Router C astfel incat sa avem topologia urmatoare

RouterA <--> RouterB <--> RouterC 

atunci configuratia se modifica dupa cum urmeaza:

Router B:

RouterB# configure terminal
RouterB(config)# router bgp 65535
RouterB(config-router)# network 10.2.3.0
RouterB(config-router)# neighbor 10.1.2.1 remote-as 65534
RouterB(config-router)# neighbor 10.1.2.1 description RouterA
RouterB(config-router)# neighbor 10.1.2.6 remote-as 65533
RouterB(config-router)# neighbor 10.1.2.6 description RouterC
RouterB# write memory

Router C:

RouterC# configure terminal
RouterC(config)# router bgp 65533
RouterC(config-router)# network 10.2.4.0
RouterC(config-router)# neighbor 10.1.2.5 remote-as 65535
RouterC(config-router)# neighbor 10.1.2.5 description RouterB
RouterC# write memory

Daca vrem ca (e.g.) RouterB sa fie default gateway pentru celelalte doua routere, procedam dupa cum urmeaza:

RouterB# configure terminal
RouterB(config)# router bgp 65535
RouterB(config-router)# network 10.2.3.0
RouterB(config-router)# neighbor 10.1.2.1 remote-as 65534
RouterB(config-router)# neighbor 10.1.2.1 default-originate
RouterB(config-router)# neighbor 10.1.2.1 description RouterA
RouterB(config-router)# neighbor 10.1.2.6 remote-as 65533
RouterB(config-router)# neighbor 10.1.2.6 default-originate
RouterB(config-router)# neighbor 10.1.2.6 description RouterC
RouterB# write memory

Folosind default-originate, pe langa prefixele exportate, se va mai exporta si 0.0.0.0/0.

Cam pana aici au fost configurarile de baza, mai jos veti gasi exemple de configurare putin mai complexe (i.e.: prefix-lists, as-prepend etc)

Pentru a nu accepta ruta default de la un anumit neighbor se face asa:

RouterC# configure terminal
RouterC(config)# ip prefix-list NO-DEFAULT seq 5 deny 0.0.0.0/0 le 1
RouterC(config)# ip prefix-list NO-DEFAULT seq 10 permit any
RouterC(config)# router bgp 65533
RouterC(config-router)# neighbor 10.1.2.5 remote-as 65535
RouterC(config-router)# neighbor 10.1.2.5 description RouterB
RouterC(config-router)# neighbor 10.1.2.5 prefix-list NO-DEFAULT in
RouterC# clear ip bgp 10.1.2.5 soft in
RouterC# write memory

Daca nu vreti sa deveniti transit provider pentru altii, e bine sa stiti ce anume exportati la alti neighbori:

RouterB# configure terminal
RouterB(config)# ip prefix-list our-subnets seq 10 permit 10.2.3.0/24
RouterB(config)# ip prefix-list our-subnets seq 20 deny any any
RouterB(config)# router bgp 65535
RouterB(config-router)# network 10.2.3.0
RouterB(config-router)# neighbor 10.1.2.1 remote-as 65534
RouterB(config-router)# neighbor 10.1.2.1 default-originate
RouterB(config-router)# neighbor 10.1.2.1 prefix-list our-subnets out
RouterB(config-router)# neighbor 10.1.2.1 description RouterA
RouterB(config-router)# neighbor 10.1.2.6 remote-as 65533
RouterB(config-router)# neighbor 10.1.2.6 default-originate
RouterB(config-router)# neighbor 10.1.2.6 prefix-list our-subnets out
RouterB(config-router)# neighbor 10.1.2.6 description RouterC
routerB# clear ip bgp * soft out
RouterB# write memory