01-17-2008 07:45 AM - edited 03-03-2019 08:18 PM
Is there a way, other than prepending to the AS-PATH, to alter the AS-PATH? For example, if I was advertising an AS-PATH of 500 5 but I wanted to advertise it as 500 500, how can I do that?
01-18-2008 10:10 AM
Hello,
I am posting to correct something wrong I said in my first post. It is not particularly useful to solve this case, but wouldn't want to confuse anybody.
In a path written in the form 500 5, the originating AS is on the right (i.e. 5) and not on the left (i.e. 500).
It is hard to reproduce issues in a lab environment. Hope you manage to do it. If you have some time, please tell us if you managed to make this network setup simulation actually work.
Kind Regards,
M.
01-18-2008 10:45 AM
That's what I thought, but didn't want to argue about it in public. I knew what you were getting at, though.
I will definitely keep you posted. As I said, I'm working with a shared lab, and had to give it up for the duration of the weekend, but should be back at it either Monday or Tuesday.
Thanks Maria.
01-18-2008 12:38 PM
Hello,
I was pretty sure you spotted that, because it is obvious you know a lot of things. :-)
I do not feel very proud when I make mistakes either in public or in private, but I wouldn't be embarrassed if you had corrected me. Most people that usually answer questions in this forum keep posting because they learn things during the process. There is no guarantee for the correctness of the answers, but people try their best.
I will be away for the Networkers event the following week, but I will definitely come back to see what happened here.
Kind Regards,
M.
01-21-2008 12:18 PM
Okay, I did figure it out, but it required setting up a rudimentary MPLS configuration on the switch. The goal was to have a switch in one BGP AS (in this case 400), and the connected routers (in this case 3 of them) in a single but different BGP AS (in this case 65004), and to have all connected routers receive all routes in their AS with no other connections. The configuration on the routers was basic BGP:
R1
interface Loopback1
ip address 10.4.11.1 255.255.255.0
!
interface Loopback2
ip address 10.4.12.1 255.255.255.0
!
interface Ethernet0/0
ip address 192.168.41.2 255.255.255.0
half-duplex
.
.
.
router bgp 65004
no synchronization
bgp log-neighbor-changes
redistribute eigrp 10
neighbor 192.168.41.1 remote-as 400
no auto-summary
etc...
R2 and R3 are the same.
The configuration for the switch was a bit more complex, not just with the addition of MPLS, but also with what that added to the BGP configuration.
Sw1
.
.
.
ip vrf MPLS4
rd 400:4
route-target export 400:4
route-target import 400:4
.
.
.
interface FastEthernet0/1
no switchport
ip vrf forwarding MPLS4
ip address 192.168.41.1 255.255.255.0
!
interface FastEthernet0/2
no switchport
ip vrf forwarding MPLS4
ip address 192.168.42.1 255.255.255.0
.
.
.
interface FastEthernet0/5
no switchport
ip vrf forwarding MPLS4
ip address 192.168.45.1 255.255.255.0
.
.
.
router bgp 400
no synchronization
bgp router-id 192.168.41.1
bgp log-neighbor-changes
neighbor 192.168.41.2 remote-as 65004
neighbor 192.168.42.2 remote-as 65004
neighbor 192.168.45.2 remote-as 65004
no auto-summary
!
address-family ipv4 vrf MPLS4
neighbor 192.168.41.2 remote-as 65004
neighbor 192.168.41.2 activate
neighbor 192.168.41.2 next-hop-self
neighbor 192.168.41.2 as-override
neighbor 192.168.42.2 remote-as 65004
neighbor 192.168.42.2 activate
neighbor 192.168.42.2 next-hop-self
neighbor 192.168.42.2 as-override
neighbor 192.168.45.2 remote-as 65004
neighbor 192.168.45.2 activate
neighbor 192.168.45.2 next-hop-self
neighbor 192.168.45.2 as-override
no synchronization
network 192.168.41.0
network 192.168.42.0
network 192.168.45.0
exit-address-family
.
.
.
Yes, the neighbor statement has to be in their twice, not sure why, but I tried removing it in both places and it only seemed to work if it was in both. With the MPLS configured, the AS-OVERRIDE option then removes the local AS from the AS-PATH. This is not an available option without MPLS configured.
Thanks to everyone for all the help in getting to this point!
01-17-2008 06:37 PM
Hi,
I have a setup that able to advertise two AS in one router using route-map as below (I use your ASN as a sample and only show what could be useful for you).
!
router bgp 500
-output omitted-
network 192.168.160.0 mask 255.255.240.0
network 192.169.160.0 mask 255.255.240.0
neighbor upstream_ip_address route-map ADVERTISE-OUT out
!
access-list 1 permit 192.168.160.0 0.0.15.255
access-list 2 permit 192.169.160.0 0.0.15.255
!
route-map ADVERTISE-OUT permit 1
match ip address 1
!
route-map ADVERTISE-OUT permit 2
match ip address 2
set as-path prepend 5
!
end
With the above config, the upstream AS will see its neighbor as ASN500 (192.168.160.0/20) and behind ASN500 is ASN5 (192.169.160.0/20).
Now, to mimic the 500 500, I don't have the privilege to try this (as I don't have a lab) but see if it works if you replace the prepend in the route-map from 5 to 500? Therotically it may not work since the configured local AS is 500.
Regards,
Dandy
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