Posts tagged BGP
So I learned a new command today. As usual I want to share with everyone. Today’s command is “bgp bestpath as-path multipath-relax”, which is actually hidden in IOS.
To give some background, BGP will not load balance across multiple paths by default. We can configure it to do so with the “maximum-paths n” command, which is pretty well known. The criteria of this command is that all attributes must match (Weight, LP, AS Path, etc). This is acceptable if we are multihomed to a single AS, but what if we are multihomed to different ASes? In that case we are not able to load balance across theoretically equal paths. Enter the “bgp bestpath as-path multipath-relax” command…
Now the config:
R1(config)#router bgp 100 R1(config-router)#no synchronization R1(config-router)#neighbor 10.1.12.2 remote-as 200 R1(config-router)#neighbor 10.1.13.3 remote-as 200 R1(config-router)#no auto-summary
Here we see the basic BGP config on R1. We will only be configuring R1 in this post.
This is the first little challenge I’m posting on here. If you frequent the forums, you likely saw the one I had for OSPF. I thought of another challenge while talking to a buddy. Here’s the topology:
Make R1 prefer the path through R3 for the 192.168.1.0/24 network. The configuration must be on R1. Do not use Weight or Local Preference to accomplish this. Assume that all previous configuration is correct.
This one is a little different than the OSPF challenge in that there are many ways to accomplish it. I’ve thought of a few, I want to see what everyone else comes up with.
1. Configure the Oustside Border Router in AS 6500. Peer with ISP-1 and ISP-2. Ensure that the DMZ subnet is advertised to the internet.
2. Prevent AS 6500 from being used as a transit between ASes 1111 and 2222.
3. The link through ISP-1 is much faster than the link through ISP-2. Configure outgoing traffic to use ISP-1 as the primary, only use the link through ISP-2 if the primary link is down.
4. Configure incoming traffic to use the link through ISP-1 as the primary.
5. Ensure that NAT is setup to use both ISPs.
First lab with our new topology. I’m excited! This should be an easy one. When functioning correctly, Customer “a” connects to AS 6500 using MPLS VPNs and running OSPF with the provider between sites. Site 2 (CE2a) has internet access through a physical connection to AS 6500s global RIB, it also has a GRE tunnel to PE1 which connects to the MPLS VPN. Customer “b” has a similar configuration. Customer “b” is using EIGRP. Both customers have a single “internet” circuit which is reachable from only one site, all internet traffic from the other site will go over the WAN first.
The issue today is users in VLAN 40 are having issues accessing the internet (220.127.116.11), determine why.
This will be the first in a series of troubleshooting labs. I will post a topology and the issue I’m seeing. Hopefully you guys will attempt to solve it and post your ideas, questions and solutions in the comments.
We’ll start with a relatively easy one. Today we are having an issue with BGP neighbor relationships not forming.
Here’s R1′s config:
hostname R1 ! ip cef ! interface Loopback0 ip address 18.104.22.168 255.255.255.255 ! interface Serial0/0 description To R2 ip address 10.1.1.2 255.255.255.254 ! router bgp 5000 no synchronization bgp log-neighbor-changes neighbor 22.214.171.124 remote-as 6000 neighbor 126.96.36.199 ebgp-multihop 2 neighbor 188.8.131.52 update-source Loopback0 no auto-summary ! ip route 0.0.0.0 0.0.0.0 10.1.1.3
hostname R2 ! ip cef ! interface Loopback0 ip address 184.108.40.206 255.255.255.255 ! interface Serial0/0 description To R1 ip address 10.1.1.3 255.255.255.254 ! router bgp 6000 no synchronization bgp log-neighbor-changes neighbor 220.127.116.11 remote-as 5000 neighbor 18.104.22.168 ebgp-multihop 2 neighbor 22.214.171.124 update-source Loopback0 no auto-summary ! ip route 0.0.0.0 0.0.0.0 10.1.1.2
Now some show commands:
R2#sh ip bgp summ BGP router identifier 126.96.36.199, local AS number 6000 BGP table version is 1, main routing table version 1 Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 188.8.131.52 4 5000 0 0 0 0 0 never Active R1#sh ip bgp summ BGP router identifier 184.108.40.206, local AS number 5000 BGP table version is 1, main routing table version 1 Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 220.127.116.11 4 6000 0 0 0 0 0 never Active
We see that the relationship will not form. You guys tell me why.
I’m attaching the .net file, with it and the configs above you should be able to replicate this easily.
The Troubleshooting Lab #1 .net file
(Don’t forget to change your paths)