Step 1 |
enable
Example:
|
Enables privileged EXEC mode.
|
Step 2 |
configure
terminal
Example:
Device# configure terminal
|
Enters global configuration mode.
|
Step 3 |
router
bgp
autonomous-system-number
Example:
Device(config)# router bgp 45000
|
Enters router configuration mode and creates a BGP routing process.
|
Step 4 |
address-family
ipv4
[unicast |
multicast|
vrf
vrf-name]
Example:
Device(config-router)# address-family ipv4 unicast
|
Specifies the IPv4 address family and enters address family configuration mode.
The
unicast keyword specifies the IPv4 unicast address family. By default, the router is placed in address family configuration mode for the IPv4 unicast address family if the
unicast keyword is not specified with the
address-family
ipv4 command.
The
multicast keyword specifies IPv4 multicast address prefixes.
The
vrf keyword and
vrf-name argument specify the name of the VRF instance to associate with subsequent IPv4 address family configuration mode commands.
|
Step 5 |
bgp
nexthop
route-map
map-name
Example:
Device(config-router-af)# bgp nexthop route-map CHECK-NEXTHOP
|
Permits a route map to selectively define routes to help resolve the BGP next hop.
|
Step 6 |
exit
Example:
Device(config-router-af)# exit
|
Exits address family configuration mode and enters router configuration mode.
|
Step 7 |
exit
Example:
Device(config-router)# exit
|
Exits router configuration mode and enters global configuration mode.
|
Step 8 |
ip
prefix-list
list-name
[seq
seq-value] {deny
network
/
length |
permit
network/length} [ge
ge-value] [le
le-value]
Example:
Device(config)# ip prefix-list FILTER25 seq 5 permit 0.0.0.0/0 le 25
|
Creates a prefix list for BGP next-hop route filtering.
Selective next-hop route filtering supports prefix length matching or source protocol matching on a per address-family basis.
The example creates a prefix list named FILTER25 that permits routes only if the mask length is more than 25; this will avoid aggregate routes being considered as the next-hop route.
|
Step 9 |
route-map
map-name
[permit |
deny] [sequence-number]
Example:
Device(config)# route-map CHECK-NEXTHOP deny 10
|
Configures a route map and enters route map configuration mode.
|
Step 10 |
match
ip
address
prefix-list
prefix-list-name
[prefix-list-name...]
Example:
Device(config-route-map)# match ip address prefix-list FILTER25
|
Matches the IP addresses in the specified prefix list.
Note
| Only the syntax applicable to this task is used in this example. For more details, see the
Cisco IOS IP Routing: BGP Command Reference.
|
|
Step 11 |
exit
Example:
Device(config-route-map)# exit
|
Exits route map configuration mode and enters global configuration mode.
|
Step 12 |
route-map
map-name
[permit |
deny] [sequence-number]
Example:
Device(config)# route-map CHECK-NEXTHOP permit 20
|
Configures a route map and enters route map configuration mode.
|
Step 13 |
end
Example:
Device(config-route-map)# end
|
Exits route map configuration mode and enters privileged EXEC mode.
|
Step 14 |
show
ip
bgp
[network] [network-mask]
Example:
|
Displays the entries in the BGP routing table.
Note
| Only the syntax applicable to this task is used in this example. For more details, see the
Cisco IOS IP Routing: BGP Command Reference.
|
|