Users Guide

1404 BGP
console(config-router)#neighbor 129.168.0.254 remote-as 65001
console(config-router)#network 129.168.0.0 mask 255.255.0.0 route-
map Inject-MED
console(config0router)#redistribute connected
console(config-router)#exit
Configuring Communities in BGP
The following example configures an egress routing policy that sets the
community attribute for matching routes. In the example, VLAN 10 is
created, followed by an access list Comm-Hosts matching directly connected
source address 5.5.5.x for which the community attribute will be injected into
the advertised routes.
A route map “Subnet-5-5-5” is created. This route map sets the match criteria
as ACL Comm-Hosts and configures the community attribute 65001:300 for
the matching routes.
Interface Gi1/0/1 is configured as a member of VLAN 10, VLAN 10 is assigned
an IP address, IP routing is enabled, and BGP router 65001 is created with a
router ID of 129.168.1.254. An iBGP neighbor 129.168.0.254 with a remote
AS of 65001 is configured (this is an iBGP configuration). BGP is configured
to send the community attribute and to use the Subnet-5-5-5 match criteria
as an egress policy.
console#configure
console(config)#vlan 10
console(config-vlan)#exit
console(config)#ip prefix-list Comm-Hosts seq 10 permit 5.5.5.0
255.255.255.0
console(config)#ip bgp-community new-format
console(config)#route-map “Subnet-5-5-5” permit 100
console(route-map)#match ip address prefix-list Comm-Hosts
console(route-map)#set community 65001:300 additive
console(route-map)#exit
console(config)#interface gi1/0/1
console(config-if-Gi1/0/1)#switchport access vlan 10
console(config-if-Gi1/0/1)#exit
console(config)#interface vlan 10
console(config-if-vlan10)#ip address 129.168.10.2 /24
console(config-if-vlan10)#exit
console(config)#int loopback 0