Configuring bgp neighbors, Bgp path filtering by neighbor example, R to – Enterasys Networks Security Router X-PeditionTM User Manual

Page 171

Advertising
background image

Configuring BGP Route Maps

XSR User’s Guide 6-23

XSR(config-router)#neighbor 192.168.57.4 remote-as 200
XSR(config-router)#neighbor 192.168.57.4 route-map 77 out
XSR(config-router)#route-map 77 5 permit
XSR(config-route-map)#set as-path prepend 100
XSR(config-route-map)#match ip address 12

XSR(config-route-map)#route-map 77 15 permit
XSR(config-route-map)#match ip address 2
XSR(config-route-map)#access-list 2 permit any
XSR(config-route-map)#access-list 12 permit 230.57.10.0 0.255.255.255
XSR(config-route-map)#access-list 12 permit 231.57.10.0 0.255.255.255
XSR(config-route-map)#access-list 12 permit 0.0.0.0 255.255.255.255

Incoming route-maps can perform prefix-based matching and set various update values. Inbound
prefix matching is provided in addition to as-path and community-list matching. In the following
example, the set local preference command sets the local preference of the inbound prefix
230.57.5.0/16 to 95.

XSR(config)#router bgp 13
XSR(config-router)#network 192.168.0.0
XSR(config-router)#neighbor 192.168.1.1 remote-as 47
XSR(config-router)#neighbor 192.168.1.1 route-map 33 in !
XSR(config-router)#route-map 33 permit 5
XSR(config-route-map)#match ip address 2
XSR(config-route-map)#set local preference 95
XSR(config-route-map)#route-map 33 permit 9
XSR(config-route-map)#access-list 2 permit 230.57.5.0
XSR(config-route-map)#access-list 20.255.255.255 access-list 2 deny any

Configuring BGP Neighbors

This example configures a BGP router for AS 33 including two originating networks and three
remote XSR’s. The XSR at AS 33 will share data about networks 125.99.0.0 and 192.168.57.0 with its
neighbors. The first router listed exists in a different AS; the second is an internal neighbor (AS 33)
at address 125.99.28.2; and the third neighbor also exists on a different AS.

Note that the inside BGP neighbor is not directly linked to XSR A. External neighbors (in AS 22
and AS 44) must be linked directly to Router A.

XSR(config)#router bgp 33
XSR(router-config)#network 125.99.0.0
XSR(router-config)#network 192.168.57.0
XSR(router-config)#neighbor 125.99.27.1 remote-as 22
XSR(router-config)#neighbor 125.99.28.2 remote-as 33
XSR(router-config)#neighbor 212.106.53.9 remote-as 44

BGP Path Filtering by Neighbor Example

This example configures BGP path filtering by neighbor where only routes permitted by as-path
ACL 2 will be sent to 192.168.57.69. In the same fashion, only routes passing ACL 3 will be
permitted from 192.168.57.69.

XSR(config)#router bgp 7
XSR(config-router)#neighbor 192.168.57.69 remote-as 100

Advertising