two-isp.txt

download two-isp.txt

If you can't read please download the document

Transcript of two-isp.txt

Connecting to Two ISPs with Redundant RoutersConnecting to Two ISPs with Redundant RoutersProblemYou want to connect your network to two different ISPs using two routers to eliminate any single points of failure.SolutionIn this example, we have two routers in our AS, which has ASN 65500. The first router has a link to the first ISP, whose ASN is 65510:Router1#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Router1(config)#interface Serial0Router1(config-if)#description connection to ISP #1, ASN 65510Router1(config-if)#ip address 192.168.1.6 255.255.255.252Router1(config-if)#exitRouter1(config)#interface Ethernet0Router1(config-if)#description connection to internal network, ASN 65500Router1(config-if)#ip address 172.18.5.2 255.255.255.0Router1(config-if)#exitRouter1(config)#ip as-path access-list 15 permit ^$Router1(config)#router bgp 65500Router1(config-router)#network 172.18.5.0 mask 255.255.255.0Router1(config-router)#neighbor 172.18.5.3 remote-as 65500Router1(config-router)#neighbor 172.18.5.3 next-hop-selfRouter1(config-router)#neighbor 192.168.1.5 remote-as 65510Router1(config-router)#neighbor 192.168.1.5 filter-list 15 outRouter1(config-router)#no synchronizationRouter1(config-router)#exitRouter1(config)#endRouter1#Then the second router connects to the second ISP, which uses ASN 65520. And because these two routers are both members of the same AS, they also must have an iBGP connection:Router2#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Router2(config)#interface Serial1Router2(config-if)#description connection to ISP #2, ASN 65520Router2(config-if)#ip address 192.168.2.6 255.255.255.252Router2(config-if)#exitRouter2(config)#interface Ethernet0Router2(config-if)#description connection to internal network, ASN 65500Router2(config-if)#ip address 172.18.5.3 255.255.255.0Router2(config-if)#exitRouter2(config)#ip as-path access-list 15 permit ^$Router2(config)#router bgp 65500Router2(config-router)#network 172.18.5.0 mask 255.255.255.0Router2(config-router)#neighbor 192.168.2.5 remote-as 65520Router2(config-router)#neighbor 192.168.2.5 filter-list 15 outRouter2(config-router)#neighbor 172.18.5.2 remote-as 65500Router2(config-router)#neighbor 172.18.5.2 next-hop-selfRouter2(config-router)#no synchronizationRouter2(config-router)#exitRouter2(config)#endRouter2#DiscussionThis recipe is similar to Recipe 9.4, but here we have split the functions across two routers to ensure that you can sustain a link failure or a router failure without losing your Internet connection. Figure 9-2 shows the new network topology.Figure 9-2. Using two ISPsThe main difference is that we have had to configure an eBGP link from each router to its ISP, as well as an iBGP link between the two routers. Note that we have included the same AS Path filter on both routers to ensure that our network doesn't allow transit routing from one ISP to the other.However, just as in the single router example, you have to decide how you want to deal with the problem of the excessive number of routes that you will receive from both of these ISPs.Notice we have included the next-hop-self option for the iBGP peers on both routers:Router1(config)#router bgp 65500Router1(config-router)#neighbor 172.18.5.3 remote-as 65500Router1(config-router)#neighbor 172.18.5.3 next-hop-selfWithout this option, the next hop IP address for prefixes learned through Router1 will be the ISP connected to Router1. But even in this simple network, Router2 will not have a route to this next hop address. We could also get around this problem by including static routes on both routers. We discuss the next-hop-self option in more detail in Recipe 9.3.In this example, we only have two routers inside our AS. You could add more, using exactly the same configuration commands that we used here. However, you need to remember to create a full mesh of iBGP peer relationships between all of these routers. Every BGP router must have a neighbor statement connecting to every other BGP router in the same AS.