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 for the specified routing process.
|
Step 4 |
neighbor
{ip-address |
peer-group-name}
remote-as
autonomous-system-number
Example:
Device(config-router)# neighbor 192.168.3.2 remote-as 50000
|
Adds the IP address or peer group name of the neighbor to the specified autonomous system BGP neighbor table of the local router.
|
Step 5 |
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 6 |
neighbor
{ip-address |
peer-group-name}
route-map
route-map-name {in |
out}
Example:
Device(config-router-af)# neighbor 192.168.3.2 route-map 2000 in
|
Applies a route map to inbound or outbound routes.
|
Step 7 |
exit
Example:
Device(config-router-af)# exit
|
Exits address family configuration mode and enters router configuration mode.
|
Step 8 |
exit
Example:
Device(config-router)# exit
|
Exits router configuration mode and enters global configuration mode.
|
Step 9 |
route-map
map-name
[permit |
deny] [sequence-number]
Example:
Device(config)# route-map 2000 permit 10
|
Creates a route map and enters route map configuration mode.
|
Step 10 |
match
community
{standard-list-number |
expanded-list-number |
community-list-name [exact]}
Example:
Device(config-route-map)# match community 1
|
Matches on the communities in a BGP community list.
|
Step 11 |
set
weight
weight
Example:
Device(config-route-map)# set weight 30
|
Sets the weight of BGP routes that match the community list.
|
Step 12 |
exit
Example:
Device(config-route-map)# exit
|
Exits route map configuration mode and enters global configuration mode.
|
Step 13 |
route-map
map-name
[permit |
deny] [sequence-number]
Example:
Device(config)# route-map 3000 permit 10
|
Creates a route map and enters route map configuration mode.
|
Step 14 |
match
community
{standard-list-number |
expanded-list-number |
community-list-name [exact]}
Example:
Device(config-route-map)# match community 2
|
Matches on the communities in a BGP community list.
|
Step 15 |
set
community
community-number
Example:
Device(config-route-map)# set community 99
|
Sets the BGP communities attribute.
|
Step 16 |
exit
Example:
Device(config-route-map)# exit
|
Exits route map configuration mode and enters global configuration mode.
|
Step 17 |
ip
community-list
{standard-list-number |
standard
list-name {deny |
permit} [community-number] [AA:NN] [internet] [local-AS] [no-advertise] [no-export]} | {expanded-list-number |
expanded
list-name {deny |
permit}
regular-expression}
Example:
Device(config)# ip community-list 1 permit 100
Example:
Device(config)# ip community-list 2 permit internet
|
Creates a community list for BGP and controls access to it.
In the first example, community list 1 permits routes with a COMMUNITIES attribute of 100. Router E routes all have a COMMUNITIES attribute of 100, so their weight will be set to 30.
In the second example, community list 2 effectively permits all routes by specifying the
internet community. Any routes that did not match community list 1 are checked against community list 2. All routes are permitted, but no changes are made to the route attributes.
Note
| Two examples are shown here because the task example requires both of these statements to be configured.
|
|
Step 18 | Repeat Step 17 to create all the required community lists.
|
—
|
Step 19 |
exit
Example:
|
Exits global configuration mode and enters privileged EXEC mode.
|
Step 20 |
show
ip
community-list
[standard-list-number |
expanded-list-number |
community-list-name] [exact-match]
Example:
Device# show ip community-list 1
|
Displays configured BGP community list entries.
|