My setup is as follows:
Two 3550 switches, each connected to a different provider via BGP. I would like to have redundancy between the two switches/providers. Here's what I did:
1. Routing:
a) Each switch should have a route preference 190 towards the other switch. While BGP is up, we will have a default route [preference 20] towards the corresponding provider. If BGP is down, route will switch to the 190 preference route we just added. So we will go out via our second L3 switch.
b) Each router will be connected in both switches. I was thinking first to use bridge irb, but it looks more natural to use ospf. So I setup two IP ranges (172.16.1.0/24 [sw1] and 172.16.2.0/24 [sw2] ) to use with OSPF. Lets take for example one of the routers, a 2651XM. Fa0/0 is connected to port fa0/2 in SW1 and Fa0/1 is connected to port fa0/2 in SW2.
Below, an example config (we will discuss this below the sample config)
[sw1]
interface FastEthernet0/2
description to R01, fa0/0
switchport trunk encapsulation dot1q
switchport mode trunk
router ospf 1
network 172.16.1.0 0.0.0.255 area 0
network 172.16.2.0 0.0.0.255 area 0
network 129.x.x.0 0.0.0.255 area0
default-information originate always
interface vlan 100
ip address 129.x.x.11 netmask 255.255.255.0
standby 100 ip 129.x.x.1
standby 100 priority 255
standby 100 preempt
ip route 0.0.0.0 0.0.0.0 129.x.x.12 190
[sw2]
interface FastEthernet0/2
description to R01, fa0/1
switchport trunk encapsulation dot1q
switchport mode trunk
router ospf 1
network 172.16.1.0 0.0.0.255 area 0
network 172.16.2.0 0.0.0.255 area 0
network 129.x.x.0 0.0.0.255 area0
default-information originate always
interface vlan 100
ip address 129.x.x.12 netmask 255.255.255.0
standby 100 ip 129.x.x.1
standby 100 priority 101
standby 100 preempt
ip route 0.0.0.0 0.0.0.0 129.x.x.11 190
[r01]
interface FastEthernet0/0
description to SW1, fa0/2
no ip address
interface FastEthernet0/0.1
encapsulation dot1q 101
ip address 172.16.1.3 255.255.255.0
interface FastEthernet0/1
description to SW2, fa0/2
no ip address
interface FastEthernet0/1.1
encapsulation dot1q 102
ip address 172.16.2.3 255.255.255.0
interface Loopback0
ip address 129.x.x.54 255.255.255.255
ip ospf 1 area 0
router ospf 1
log-adjacency-changes
network 129.x.x.54 0.0.0.0 area 0
network 172.16.1.0 0.0.0.255 area 0
ip route 0.0.0.0 0.0.0.0 129.x.x.1
Now, how does this work?
- each router has a default route towards the other, preference 190 . As said above, when BGP fails on any of the switches, traffic goes out via the other switch.
- if both bgp sessions fail then.... well, thats just bad luck :)
How will my packets select a certain ISP?
- its gonna be due to HSRP protocol (hot standby router protocol). Notice on the second switch the 'standby 100 priority 101' statement. Default is 100, but I put it to 101 to make the config more self explanatory. The first switch has priority 255, which means in the HSRP group, the first switch will always be elected as default gateway.
What if HSRP fails?
- hsrp won't fail. If one of the switches fails, the switch still up will take the role as default gateway. (and use that switches bgp connection).
Other things: OSPF will always let know the switches on which interface they can find the 129.x.x.54 IP address. Check this out:
<------------------------------------------------------------>
sw2# sh ip route ospf
129.x.x.0/24 is variably subnetted, 11 subnets, 5 masks
O 129.x.x.54/32 [110/2] via 172.16.1.3, 3d01h, Vlan101
[110/2] via 172.16.2.3, 3d01h, Vlan102
<------------------------------------------------------------>
What else can I do?
- have each provider connect in each switch. In my config I could only afford provider A in switch 1 and provider B in switch 2. If you will be able to setup provider A & B in switch 1 and provider A & B in switch 2 as well, then this is going to be 100% redundant.
Any ideas, comments?
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment