Latest

Part 3: 5 BGP commands rarely used

 Today we are going to talk about third part of the earlier articles of the BGP commands which actually very rare people know to use. 

In this article, we will talk about next 5 commands. The main purpose of these commands is to understand and learn so that we can know how to configure in the network when you enabled BGP. Check out the previous article as 

BGP PART 1 Commands
BGP Part 2 Commands

Fig 1.1- Basic BGP Setup

Command No1: "set ip next-hop"
This command is used to indicate where to output packets that pass a match clause of a route map for policy routing, use the set ip next-hop route map configuration command. To delete an entry, use the no form of this command.

When set ip next-hop is used with the peer-address keyword in an inbound route map of a BGP peer, the next hop of the received matching routes will be set to be the neighbor peering address, overriding any third-party next hops. This means that the same route map can be applied to multiple BGP peers to override third-party next hops.

When set ip next-hop is used with the peer-address keyword in an outbound route map of a BGP peer, the next hop of the advertised matching routes will be set to be the peering address of the local router, thus disabling the next hop calculation. This command has finer granularity than the per-neighbor neighbor next-hop-self command, since you can set the next hop for some routes, but not others. The neighbor next-hop-self sets the next hop for all routes sent to that neighbor

R1(config)#route-map NB
R1(config)#match length 3 50
R1(config)# set ip next-hop 16.90.2.3

R1(config)# interface fa0/1
R1(config)# ip policy route-map NB

Command No2:"set metric-type internal"
This command is used to set the MED value on prefixes advertised to EBGP neighbors to match the IGP metric of the next hop, use the set metric internal route-map configuration command. To return to the default, use the no form of this command.

Example configuration for the MED for all the advertised routes to neighbor 16.90.2.3 is set to the corresponding IGP metric of the next hop:

router bgp 100
network 16.90.0.0
neighbor 16.90.2.3 remote-as 200
neighbor 16.90.2.3 route-map NB out
!
route-map NB permit 10
match as-path 1
set metric-type internal
!
ip as-path access-list 1 permit .*

Command No3:"set origin"
This command is used to set the BGP origin code, use the set origin route-map configuration command. To delete an entry, use the no form of this command.

route-map NB_11
match as-path 10
set origin igp

Command No4: "show ip bgp cidr-only"
This command is used to display routes with non natural network masks (that is, classless interdomain routing, or CIDR),use the show ip bgp cidr-only privileged EXEC command.

Router# show ip bgp cidr-only
BGP table version is 220, local router ID is 198.92.73.131
Status codes: s suppressed, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path

*> 12.0.0.0/8 18.32.72.24 0 1978 ?
*> 18.12.0.0/16 38.12.92.30 0 158 ?

Command No5: "show ip bgp dampened-paths"
This command is used to display BGP dampened routes, use the show ip bgp dampened-paths EXEC command.

Router# show ip bgp dampened-paths
BGP table version is 10, local router ID is 171.69.232.182
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network From Reuse Path
*d 12.0.0.0 129.69.232.177 00:18:4 100 ?
*d 18.0.0.0 129.69.232.177 00:28:5 100 ?