Sample BGP regular expressions that can be used on Cisco router.
_100_ Going through AS 100
^100$ Directly connected to AS 100
_100$ Originated in AS 100
^100. Networks behind AS 100
^[0-9]+$ AS paths one AS long
^([0-9]+)(_\1)*$ Networks originating in neighboring AS
^$ Networks originated in local AS
.* Matches everything
Sample applications.
AS 10 have two upstream, AS 20 and AS 30. You want routing to AS 40 going through AS 20.
First step, create as-path filter list that match this criteria.
ip as-path access-list 1 permit _100$
Second, create route-map to set some attribute so the routing have more preference. Let's say we use weight.
route-map AS-10-OUT permit 10
match as-path 1
set weight 1000
router-map AS-10-OUT permit 15
Third, implemet route-map on BGP configuration
router bgp 10
neighbor 192.168.1.2 remote-as 20
neighbor 192.168.1.2 route-map AS-10-OUT in
[8:30 PM
|
0
comments
]
0 comments
Post a Comment