02.10.2013 Views

FTOS Configuration Guide for the C-Series - Force10 Networks

FTOS Configuration Guide for the C-Series - Force10 Networks

FTOS Configuration Guide for the C-Series - Force10 Networks

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Filtering with Regular ExpressionFigure 356 applies access list Eagle to routes inbound from BGP peer<br />

10.5.5.2. Access list Eagle uses a regular expression to deny routes originating in AS 32.<br />

Figure 356 Filtering with Regular Expression<br />

<strong>Force10</strong>(config)#router bgp 99<br />

<strong>Force10</strong>(conf-router_bgp)#neigh AAA peer-group<br />

<strong>Force10</strong>(conf-router_bgp)#neigh AAA no shut<br />

<strong>Force10</strong>(conf-router_bgp)#show conf<br />

!<br />

router bgp 99<br />

neighbor AAA peer-group<br />

neighbor AAA no shutdown<br />

neighbor 10.155.15.2 remote-as 32<br />

neighbor 10.155.15.2 shutdown<br />

<strong>Force10</strong>(conf-router_bgp)#neigh 10.155.15.2 filter-list 1 in<br />

<strong>Force10</strong>(conf-router_bgp)#ex<br />

<strong>Force10</strong>(conf)#ip as-path access-list Eagle<br />

<strong>Force10</strong>(config-as-path)#deny 32$<br />

<strong>Force10</strong>(config-as-path)#ex<br />

<strong>Force10</strong>(conf)#router bgp 99<br />

<strong>Force10</strong>(conf-router_bgp)#neighbor AAA filter-list Eagle in<br />

<strong>Force10</strong>(conf-router_bgp)#show conf<br />

!<br />

router bgp 99<br />

neighbor AAA peer-group<br />

neighbor AAA filter-list Eaglein<br />

neighbor AAA no shutdown<br />

neighbor 10.155.15.2 remote-as 32<br />

neighbor 10.155.15.2 filter-list 1 in<br />

neighbor 10.155.15.2 shutdown<br />

<strong>Force10</strong>(conf-router_bgp)#ex<br />

<strong>Force10</strong>(conf)#ex<br />

<strong>Force10</strong>#show ip as-path-access-lists<br />

ip as-path access-list Eagle<br />

deny 32$<br />

<strong>Force10</strong>#<br />

Table 50 lists <strong>the</strong> Regular Expressions accepted in <strong>FTOS</strong>.<br />

Table 50 Regular Expressions<br />

Regular<br />

Expression Definition<br />

^ (carrot) Matches <strong>the</strong> beginning of <strong>the</strong> input string.<br />

Alternatively, when used as <strong>the</strong> first character within brackets [^ ] matches any number<br />

except <strong>the</strong> ones specified within <strong>the</strong> brackets.<br />

$ (dollar) Matches <strong>the</strong> end of <strong>the</strong> input string.<br />

. (period) Matches any single character, including white space.<br />

Create <strong>the</strong> Access List and Filter<br />

Regular Expression shown<br />

as part of Access List filter<br />

* (asterisk) Matches 0 or more sequences of <strong>the</strong> immediately previous character or pattern.<br />

494 Border Gateway Protocol (BGP)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!