07-18-2014 08:15 AM - edited 03-04-2019 11:22 PM
Below is the config I have setup in my lab and it works great with allowing me to influence which path inbound traffic takes to my network. The only question I have is this.....
I am prepending the AS with "1 1 1" which are just random numbers i chose. Do I have to use legitimate AS numbers when prepending or can I just pick random numbers? Also, would i have to discuss this with my ISP?
Config Below:
interface FastEthernet0/0
ip address 1.1.1.1 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 67.67.25.10 255.255.255.0
duplex auto
speed auto
standby 1 ip 67.67.25.1
standby 1 priority 99
!
router bgp 5500
no synchronization
bgp log-neighbor-changes
network 1.1.1.0 mask 255.255.255.0
network 67.67.25.0 mask 255.255.255.0
neighbor 1.1.1.2 remote-as 3000
neighbor 1.1.1.2 route-map PREPEND out
neighbor 67.67.65.11 remote-as 5500
no auto-summary
!
i
! !
route-map PREPEND permit 10
set as-path prepend 1 1 1
07-18-2014 11:58 AM
You always need to prepend with your own AS multiple times. No you cannot use random AS numbers, as this could really confuse the world wide routing table. Also those 'random' AS numbers might be valid AS that belong to someone else.
Its always best that you discuss with your ISP. Some AS have other mechanism more advanced like Level3 and Localpref, via communities.
07-19-2014 07:55 AM
Okay so what I am hearing you say is that if my assigned AS is 5500, then my config should look like this:
router bgp 5500
no synchronization
bgp log-neighbor-changes
network 1.1.1.0 mask 255.255.255.0
network 67.67.25.0 mask 255.255.255.0
neighbor 1.1.1.2 remote-as 3000
neighbor 1.1.1.2 route-map PREPEND out
neighbor 67.67.65.11 remote-as 5500
no auto-summary
!
i
! !
route-map PREPEND permit 10
set as-path prepend 5500 5500 5500
Correct?
07-21-2014 06:11 AM
Hello Joshua,
this last configuration of AS path prepending using your own AS number is correct for the reasons explained by Rothomas2.
eBGP has a loop avoidance rule that says look into AS path and if you find your own AS number reject the advertisement.
If you would use 1 in prepending instead of your AS you could make your networks unreachable by AS 1 as a minimum, and probably filtered by your ISP not expecting that AS number on the path.
Hope to help
Giuseppe
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide