BGP学習ノート(一)


BGP aggregate-address
1.    
aggregate-address address mask
1)    BGP     aggregate-address 172.16.0.0 255.255.252.0172/22 BGP      show ip bgp 
rtrB#show ip bgp 
BGP table version is 20, local router ID is 172.17.1.1
   
   Network          Next Hop            Metric LocPrf Weight Path
   
*> 172.16.0.0/24    10.1.1.2                 0             0 2 i
   
*> 172.16.0.0/22    10.1.1.2                               0 2 i
   
*> 172.16.1.0/24    10.1.1.2                 0             0 2 i
   
*> 172.16.2.0/24    10.1.1.2                 0             0 2 i
   
*> 172.16.3.0/24    10.1.1.2                 0             0 2 i
   
2BGP    BGPnetworkredistribute   BGP  ,  ,    BGP 
Redistribute connected metric 20 
aggregate-address 172.16.0.0 255.255.252.0 
   show ip bgp    R1 BGP ,      (original   “?”        BGP 
3BGP  RB BGP   R  C      4RA---RB---RC     EBGPRB,RA       RC BGP   4RB   4RA,  ,RA BGP            BGPAS-PATH        “   ” RA AS 
RBaggregate-address 172.16.0.0 255.255.252.0 
   RA 
rtrC#show ip bgp
   
BGP table version is 32, local router ID is 172.17.1.2
   
s codes: s suppressed, d damped, h history, * valid, > best, i - internal
   
Origin codes: i - IGP, e - EGP, ? - incomplete
   
   Network          Next Hop            Metric LocPrf Weight Path
   
*> 172.16.0.0/24    172.17.1.1                             0 1 2 i
   
*> 172.16.0.0/22    172.17.1.1                             0 1   i
   
*> 172.16.1.0/24    172.17.1.1                             0 1 2 i
   
*> 172.16.2.0/24    172.17.1.1                             0 1 2 i
   
*> 172.16.3.0/24    172.17.1.1                             0 1 2 i
   

   
     
   
4BGPNULL0        IGPBGPBGP 
ip route 172.16.0.0 255.255.252.0 Null0 
redistribute static 
RA                origin   ?,         incomplete 
2.aggregate-address address mask as-set 
 AS-PATHASAS#AS-SETAS-PATHAS-pathRas-setASAS  ,           。(   as-setAS-path        AS AS 
  as-set *> 172.16.0.0/22    10.1.1.1                               0 1 i 
aggregate-address 172.16.0.0 255.255.252.0 as-set 
      BGP 
*> 172.16.0.0/22    0.0.0.0                            32768 {65530,2} i
   
       AS