Wednesday, September 21, 2011

LAB: BGP Network statement

- Remove the next-hop-self statement used in the previous task to peer with BB1 and BB3
- Ensure full reachability from your internal network to all routes learned from AS 54 but do not advertise any prefixes into IGP.

BGP Network statement specifies the prefix in the IGP table (RIB) to be imported into BGP LocRIB. The LocRIB term stands for Local RIB and is another name for BGP table, which is separate from the routing table (RIB). In order for prefix to be imported, it must exactly match the specification – i.e. it should have the same subnet number and network mask.

example:
have interface Loopback0 with the IP address 150.1.1.1/24, then the command would be network 150.1.1.0 mask 255.255.255.0, not network 150.1.1.1 mask 255.255.255.0. The second statement will not match any route in the IGP and thus won’t import any prefix. Notice that you may omit the mask specification if it matches the subnet class (e.g. 255.255.255.0 for class C).

When originating prefixes into BGP, it is common to use summarization, in order to minimize the amount of information advertised. One of the ways to achieve this is by creating a special static route that points to Null0 interface and yet encompasses all subnets of the particular AS. The static route is then advertised
into BGP table using the network command.
For example:

ip route 150.0.0.0 255.252.0.0 Null0
!
router bgp 100
network 150.0.0.0 mask 255.252.0.0

One of the special uses for the network command is demonstrated in this task. When peering with another AS, the common question is how to deal with the external next-hop. Two known ways are using the next-hop-self parameter when peering via iBGP or advertising the external link subnet into IGP. The last option is advertising the link subnet into BGP and thus propagating it to all iBGP peers. All BGP routers will install it into their RIBs, and perform a recursive lookup to find the actual next hop for every BGP prefix learned from the external AS.

R4
router eigrp 100
 network 150.1.4.4 0.0.0.0
 network 155.1.0.0
 network 204.12.1.0
 no auto-summary
!
router bgp 100
 no synchronization
 bgp log-neighbor-changes
 network 150.1.4.0 mask 255.255.255.0
 network 204.12.1.0
 neighbor 150.1.1.1 remote-as 100
 neighbor 150.1.1.1 update-source Loopback0
 neighbor 204.12.1.254 remote-as 54
 no auto-summary

R6
router eigrp 100
 passive-interface Serial0/0
 network 54.0.0.0
 network 150.1.6.6 0.0.0.0
 network 155.1.0.0
 no auto-summary
!
router bgp 100
 no synchronization
 bgp log-neighbor-changes
 network 54.1.1.0 mask 255.255.255.0
 network 150.1.6.0 mask 255.255.255.0
 neighbor 54.1.1.254 remote-as 54
 neighbor 150.1.1.1 remote-as 100
 neighbor 150.1.1.1 update-source Loopback0
 neighbor 150.1.1.1 next-hop-self
 no auto-summary

verification


Rack1R1#show ip bgp
BGP table version is 50, local router ID is 150.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
* i28.119.16.0/24   54.1.1.254               0    100      0 54 i
*>i                 204.12.1.254             0    100      0 54 i
* i28.119.17.0/24   54.1.1.254               0    100      0 54 i
*>i                 204.12.1.254             0    100      0 54 i
r>i54.1.1.0/24      150.1.6.6                0    100      0 i
*>i112.0.0.0        204.12.1.254             0    100      0 54 50 60 i
* i                 54.1.1.254               0    100      0 54 50 60 i
*>i113.0.0.0        204.12.1.254             0    100      0 54 50 60 i
* i                 54.1.1.254               0    100      0 54 50 60 i
*>i114.0.0.0        204.12.1.254             0    100      0 54 i
* i                 54.1.1.254               0    100      0 54 i
*>i115.0.0.0        204.12.1.254             0    100      0 54 i
* i                 54.1.1.254               0    100      0 54 i
*>i116.0.0.0        204.12.1.254             0    100      0 54 i
* i                 54.1.1.254               0    100      0 54 i
*>i117.0.0.0        204.12.1.254             0    100      0 54 i
* i                 54.1.1.254               0    100      0 54 i
   Network          Next Hop            Metric LocPrf Weight Path
*>i118.0.0.0        204.12.1.254             0    100      0 54 i
* i                 54.1.1.254               0    100      0 54 i
*>i119.0.0.0        204.12.1.254             0    100      0 54 i
* i                 54.1.1.254               0    100      0 54 i
*> 150.1.1.0/24     0.0.0.0                  0         32768 i
r>i150.1.2.0/24     155.1.23.2               0    100      0 200 i
r>i150.1.3.0/24     150.1.3.3                0    100      0 i
r>i150.1.4.0/24     150.1.4.4                0    100      0 i
r>i150.1.5.0/24     150.1.5.5                0    100      0 i
r>i150.1.6.0/24     150.1.6.6                0    100      0 i
r>i204.12.1.0       150.1.4.4                0    100      0 i
*>i205.90.31.0      155.1.23.2               0    100      0 200 254 ?
*>i220.20.3.0       155.1.23.2               0    100      0 200 254 ?
*>i222.22.2.0       155.1.23.2               0    100      0 200 254 ?

No comments:

Post a Comment