CCIE Learning Note 4---BGP prefix list; Aspath-list

Source: Internet
Author: User

CONFIG prefix-list

Router (config) #ip prefix-list list-name seq permit/deny network/len ge/le

Prefix-list was originally designed for BGP. The network address part and mask portion of the routing entry can be matched


IP prefix-list NAME Permit 172.16.0.0/22 ge le 24

/22: prefix 22bit the same

Ge24: Mask range min. 24 bits

Le24: Mask range Max 24 bits

When there is no GE, the mask range is the smallest and the prefix is the same

When there is GE, there is no Le, le=32

When there is no ge,le. GE and Le are the same prefix


IP prefix-list A Permit 0.0.0.0/0 GE 32//All host routes

IP prefix-list B Permit 128.0.0.0/2 GE16//All class B subnets

IP prefix-list C Permit 0.0.0.0/0 le 32//All routes

IP prefix-list D Permit 0.0.0.0/0//default route

IP prefix-list E Permit 0.0.0.0/1 no more than 24-bit subnets in the Le//a class


IP prefix-list A Permit 10.0.0.0/8 le32//a class private network address

IP prefix-list B Permit 172.16.0.0/12 le32//b class private network address

IP prefix-list C Permit 192.168.0.0/16 le32//c class private network address


###############################################################

Outbound route filtering ORF


Role:

-Used to reduce unnecessary BGP traffic and CPU usage

-Router bar into the direction of the filter configuration Exchange to the neighbor router in the out direction to do

-The ORF message is encapsulated in the route refresh, negotiated in the open message


When the AS1 has 100 routes, and AS2 only need 10, at this time, AS2 can be configured Orf,filter-list to AS1, AS1 only to AS2 required 10

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/7D/06/wKiom1bejf7BlCcdAAUQESFKqDA872.jpg "title=" 1466dcf65ff7170912d5dcad7d206eb6.jpg "width=" 636 "height=" 357 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" WIDTH:636PX; height:357px; "alt=" wkiom1bejf7blccdaauqesfkqda872.jpg "/>

Configuration: Nei x.x.x.x capability ORF prefix-list Send/receive/both

Router BGP 100

address-family IPv4 Unicast

Nei 172.16.1.2 Remot 200

Nei 172.16.1.2 ebgp-multihop

Nei 172.16.1.2 capability ORF prefix-list send

IP prefix-list FILTER seq Permit 192.168.1.10/24

Show Neighbor show ip bgp nei x.x.x.x//can see capabilities

Experiment

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/7D/07/wKiom1benE6gnRfUAAT-ImPZdgI963.jpg "title=" 246e04510e8173c7121c4d4bac34d142.jpg "width=" 636 "height=" 357 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" WIDTH:636PX; height:357px; "alt=" wkiom1bene6gnrfuaat-impzdgi963.jpg "/>

。  AS200 Configuration Federation, r2r3=as2000. r4=as300

R5 Open 3 loopback 5.1.1.1; 5.1.1.2; 5.1.1.1.3

Demand. AS100 only requires 5.1.1.1 routing.

R1:

IP prefix-list test deny 5.1.1.2/31 le32

IP prefix-list Test permit 0.0.0.0/0 GE 32

Router BGP 100

Nei 12.1.1.2 prefix-list Test in

Sho IP bgp//can only see 5.1.1.1 routes

R2:

Sho ip bgp neighbor 12.1.1.1 advertised-routes//view R2 pass to R1 route

You can see that 3 5.1.1.x routes have been sent

R1:

Router BGP 100

Nei 12.1.1.2 capability ORF Prefix-list both

R2:

Router BGP 2000

Nei 12.1.1.1 capability ORF Prefix-list both

Sho IP bgp nei 12.1.1.1 AD//Can see only one route to R1


The ORF type of Cisco only supports Prefix-list


###############################################################

Aspath-list Filtration


Local Configuration As-path access-list

Router (config) #

IP as-path access-list number permit/deny regexp

Neighbor Configuration Filter-list

Rotuer (Config-router) #

Neighbor Ip-address Filter-list As-path-filter in/out


Using regular expression matching

| : Represents or, | The two ends match any one

[]: denotes one within the range, [1234] [1-4]

. : Represents any one character [1-3]. [A]---213 and 3 spaces 3

^: Indicates the start of a string

$: Represents the end of a string

_: Represents any delimiter (cannot represent a number)

(): Represents a combination in which the result of the combination is then involved in a large expression

\: Is the caret character, that is, the original meaning of the special symbol in the following character is restored

*: 0 or more

? : 0 Live One

+: One live multiple

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/7D/06/wKioL1beqEKyF_q_AAGIuvA7hxQ786.png "title=" D5846d61-0aa9-4fc1-a194-34209852d279.png "width=" 648 "height=" 301 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width : 648px;height:301px; "alt=" Wkiol1beqekyf_q_aagiuva7hxq786.png "/>


































CCIE Learning Note 4---BGP prefix list; Aspath-list

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.