Configuration procedure
Procedure
- Configure IP addresses for interfaces (omitted.)
- Configure eBGP.
- # Configure Switch A.
switch(config)# router bgp 10 switch(bgp)# bgp router-id 1.1.1.1 switch(bgp)# neighbor 200.1.2.2 remote-as 20 switch(bgp)# network 9.1.1.0/255.255.255.0/8 switch(bgp)# exit
- # Configure Switch B.
switch(config)# bgp 20 switch(bgp)# bgp router-id 2.2.2.2 switch(bgp)# neighbor 200.1.2.1 remote-as 10 switch(bgp)# neighbor 200.1.3.2 remote-as 30 switch(bgp)# exit
- # Configure Switch C.
switch(config)# bgp 30 switch(bgp)# bgp router-id 3.3.3.3 switch(bgp)# neighbor 200.1.3.1 remote-as 20 switch(bgp)# exit
- # Display the BGP routing table on Switch B.
switch(config)# show ip bgp 9.1.1.0 Local AS : 20 Local Router-id : 2.2.2.2 BGP Table Version : 3 Network : 9.1.1.0/24 Nexthop : 200.1.2.1 Peer : 200.1.2.1 Origin : igp Metric : 0 Local Pref : Weight : 0 Calc. Local Pref : 100 Valid : Yes Type : external Stale : No Best : Yes (Only Route Available) AS-Path : 100 Communities :
- Switch B advertised routes to Switch C in AS 30.
- # Display the routing table on Switch C.
switch(config)# show ip bgp Local AS : 30 Local Router-id : 3.3.3.3 BGP Table Version : 1 Status codes: * - valid, > - best, i - internal, e - external, s - stale Origin codes: i - IGP, e - EGP, ? - incomplete Network Nexthop Metric LocalPref Weight AsPath ------------------------------------------------------- *>i 9.1.1.0/24 200.1.3.1 0 100 10i
- Switch C learned route 9.1.1.0/24 from Switch B.
- Configure the BGP community.
- # Configure a routing policy.
route-map bgp-out permit seq 10 switch(route-map-bgp-out)# set community no-export switch(route-map-bgp-out)# exit
- # Apply the routing policy.
switch(config)# bgp 10 switch(bgp)# neighbor 200.1.2.2 route-map bgp-out out
- # Display the route on Switch B.
switch(config)# show ip bgp 9.1.1.0/24 Local AS : 20 Local Router-id : 2.2.2.2 BGP Table Version : 3 Network : 9.1.1.0/24 Nexthop : 200.1.2.1 Peer : 200.1.2.1 Origin : igp Metric : 0 Local Pref : Weight : 0 Calc. Local Pref : 100 Valid : Yes Type : external Stale : No Best : Yes (Only Route Available) AS-Path : 100 Communities: no-export # Display the routing table on Switch C. switch# show ip bgp 9.1.1.0/24
- The route 9.1.1.0/24 is not available in the routing table of Switch C.