Difference between revisions of "Prefix-list Cisco IOS"

From Teknologisk videncenter
Jump to: navigation, search
m (New page: =Example= Prefix-lists are numbered. In this example "secret net" are not announced. *'''Note:''' As with access-lists there are an implicit ''deny'' in the end...)
 
m (Example)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
 
=Example=
 
=Example=
 
Prefix-lists are numbered. In this example "secret net" are not announced.  
 
Prefix-lists are numbered. In this example "secret net" are not announced.  
 
*'''Note:''' As with [[Access-list Cisco IOS|access-lists]] there are an implicit ''deny'' in the end.
 
*'''Note:''' As with [[Access-list Cisco IOS|access-lists]] there are an implicit ''deny'' in the end.
<source lang=text>
+
<source lang=cli>
 
ip prefix-list SECRET-NET seq 10 deny 172.16.0.0/16
 
ip prefix-list SECRET-NET seq 10 deny 172.16.0.0/16
 
ip prefix-list SECRET-NET seq 20 deny 192.168.22.0/24
 
ip prefix-list SECRET-NET seq 20 deny 192.168.22.0/24
ip prefix-list SECRET-NET seq 30 permit 0.0.0.0/0 le 32
+
ip prefix-list SECRET-NET seq 30 permit 0.0.0.0/0 le 32 !Permit all other nets
 
!
 
!
 
router bgp 100
 
router bgp 100
Line 12: Line 11:
 
   neighbor 10.1.2.3 prefix-list SECRET-NET out
 
   neighbor 10.1.2.3 prefix-list SECRET-NET out
 
</source>
 
</source>
 +
{{Source cli}}
 +
[[category:Cisco]][[category:CCNP3]][[Category:CCNP1]]

Latest revision as of 17:18, 18 June 2010

Example

Prefix-lists are numbered. In this example "secret net" are not announced.

  • Note: As with access-lists there are an implicit deny in the end.
ip prefix-list SECRET-NET seq 10 deny 172.16.0.0/16
ip prefix-list SECRET-NET seq 20 deny 192.168.22.0/24
ip prefix-list SECRET-NET seq 30 permit 0.0.0.0/0 le 32 !Permit all other nets
!
router bgp 100
  neighbor 10.1.2.3 remote-as 200
  neighbor 10.1.2.3 prefix-list SECRET-NET out