Problem:
Two or more separate connections to the internet from different providers provides network redundancy. Adding BGP routing with an AS (Autonomous System) number will provide network failover without IP migration. The default BGP configuration provides a single path selection. This tutorial will provide you the information to load balance or share your outbound network connections evenly.
Tools:
Monitoring tool of bandwidth (I like MRTG)AS number from Arin.net
Class C network address or /24 Most ISP’s will not announce routes less than a /24
Default routing from your providers at a minimum. This will work with partial routes and default routes.
Network Diagram:
BGP ins – outs:
BGP will only select one path (the best) to install in the routing table. BGP has a command maximum-paths. The maximum-paths command will load share between equal costs routes. The problem is the AS paths are different because you have internet connections to separate providers.
BGP will only select one path (the best) to install in the routing table. BGP has a command maximum-paths. The maximum-paths command will load share between equal costs routes. The problem is the AS paths are different because you have internet connections to separate providers.
Solution:
The solution is very simple we will add our AS path to the incoming routes from each ISP. The router will think the routes are from the SAME AS and will install both into routing table. We will need to install the maximum-paths 2 in the bgp configuration because bgp does not load share by default.
I am using fast Ethernet connection because I do not have enough serial connections
I am using fast Ethernet connection because I do not have enough serial connections
ISP A Router Configuration:
Ethernet Interface
interface FastEthernet0/0
ip address 10.1.1.1 255.255.255.252
no ip directed-broadcast
duplex auto
speed auto
interface FastEthernet0/0
ip address 10.1.1.1 255.255.255.252
no ip directed-broadcast
duplex auto
speed auto
BGP Configuration to send default routing
router bgp 65535
neighbor 10.1.1.2 remote-as 27006
neighbor 10.1.1.2 default-originate
neighbor 10.1.1.2 soft-reconfiguration inbound
neighbor 10.1.1.2 remote-as 27006
neighbor 10.1.1.2 default-originate
neighbor 10.1.1.2 soft-reconfiguration inbound
interface FastEthernet0/0
ip address 10.0.0.1 255.255.255.252
no ip directed-broadcast
duplex auto
speed auto
ip address 10.0.0.1 255.255.255.252
no ip directed-broadcast
duplex auto
speed auto
BGP Configuration to send default routing to the customer
router bgp 6500
neighbor 10.0.0.2 remote-as 27006
neighbor 10.0.0.2 default-originate
neighbor 10.0.0.2 soft-reconfiguration inbound
neighbor 10.0.0.2 remote-as 27006
neighbor 10.0.0.2 default-originate
neighbor 10.0.0.2 soft-reconfiguration inbound
CPE Router Configuration
Fast Ethernet Interfaces
interface FastEthernet0/0
description to_ISP_A
ip address 10.1.1.2 255.255.255.252
duplex auto
speed auto
interface FastEthernet0/1
description to_ISP_B
ip address 10.0.0.2 255.255.255.252
duplex auto
speed auto
description to_ISP_A
ip address 10.1.1.2 255.255.255.252
duplex auto
speed auto
interface FastEthernet0/1
description to_ISP_B
ip address 10.0.0.2 255.255.255.252
duplex auto
speed auto
BGP Configuration
router bgp 27006
bgp log-neighbor-changes
neighbor 10.0.0.1 remote-as 6500
neighbor 10.0.0.1 route-map prepend-as in
neighbor 10.1.1.1 remote-as 65535
neighbor 10.1.1.1 soft-reconfiguration inbound
neighbor 10.1.1.1 route-map prepend-as in
maximum-paths 2
bgp log-neighbor-changes
neighbor 10.0.0.1 remote-as 6500
neighbor 10.0.0.1 route-map prepend-as in
neighbor 10.1.1.1 remote-as 65535
neighbor 10.1.1.1 soft-reconfiguration inbound
neighbor 10.1.1.1 route-map prepend-as in
maximum-paths 2
Route Map for Prepending AS
route-map prepend-as permit 10
set as-path prepend 27006
set as-path prepend 27006
Check you work with show commands from the CPE
Make sure you both bgp peers are connected and sharing information
Show ip bgp summary
BGP router identifier 10.1.1.2, local AS number 27006
BGP table version is 2, main routing table version 2
1 network entries using 97 bytes of memory
3 path entries using 108 bytes of memory
1 multipath network entries and 2 multipath paths
4 BGP path attribute entries using 240 bytes of memory
4 BGP AS-PATH entries using 96 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 541 total bytes of memory
1 received paths for inbound soft reconfiguration
BGP activity 2/1 prefixes, 5/2 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
10.0.0.1 4 6500 21 23 2 0 0 00:03:30 1
10.1.1.1 4 65535 22 23 2 0 0 00:03:29 1
BGP table version is 2, main routing table version 2
1 network entries using 97 bytes of memory
3 path entries using 108 bytes of memory
1 multipath network entries and 2 multipath paths
4 BGP path attribute entries using 240 bytes of memory
4 BGP AS-PATH entries using 96 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 541 total bytes of memory
1 received paths for inbound soft reconfiguration
BGP activity 2/1 prefixes, 5/2 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
10.0.0.1 4 6500 21 23 2 0 0 00:03:30 1
10.1.1.1 4 65535 22 23 2 0 0 00:03:29 1
Check to see if each peer is sending you a default route
Check the bgp table to see the routes Notice you will see you AS number prepeneded to your ISP's AS number. This is normal and needed for the configuration to work.
Check the bgp table to see the routes Notice you will see you AS number prepeneded to your ISP's AS number. This is normal and needed for the configuration to work.
cpe#show ip bgp
BGP table version is 2, local router ID is 10.1.1.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 0.0.0.0 10.1.1.1 0 27006 65535 i
* 10.0.0.1 0 27006 6500 i
cpe#show ip bgp neighbors 10.0.0.1 received-routes BGP table version is 2, local router ID is 10.1.1.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 0.0.0.0 10.1.1.1 0 27006 65535 i
* 10.0.0.1 0 27006 6500 i
BGP table version is 4, local router ID is 10.1.1.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
* 0.0.0.0 10.0.0.1 0 6500 i
cpe#show ip bgp neighbors 10.1.1.1 received-routes
BGP table version is 2, local router ID is 10.1.1.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
* 0.0.0.0 10.1.1.1 0 65535 i
BGP table version is 2, local router ID is 10.1.1.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
* 0.0.0.0 10.1.1.1 0 65535 i
Check to see if both routes have been installed in the routing table.
Show ip route
cpe#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is 10.1.1.1 to network 0.0.0.0
10.0.0.0/30 is subnetted, 2 subnets
C 10.0.0.0 is directly connected, FastEthernet0/1
C 10.1.1.0 is directly connected, FastEthernet0/0
B* 0.0.0.0/0 [20/0] via 10.1.1.1, 00:06:18
[20/0] via 10.0.0.1, 00:06:18
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is 10.1.1.1 to network 0.0.0.0
10.0.0.0/30 is subnetted, 2 subnets
C 10.0.0.0 is directly connected, FastEthernet0/1
C 10.1.1.0 is directly connected, FastEthernet0/0
B* 0.0.0.0/0 [20/0] via 10.1.1.1, 00:06:18
[20/0] via 10.0.0.1, 00:06:18
Everything looks great. Now configure your monitoring tools to monitor your outbound traffic, you should experience almost evenly distributed traffic.
No comments:
Post a Comment