Monday, August 6, 2012

HOW TO DESIGN/BUILD A NETWORK

Ever wonder what is the best way of designing/building a network? Considering different layers, sizing, configuration, redundancy,management etc to build a solid scalable enterprise network. The following link from Cisco describe the best practice design while building a network along with sample configuration.

Small Enterprise Design Guide

Wednesday, August 1, 2012

COMMON BGP CONFIGURATION IN ISP ENVIRONMENT (MULTI HOMING)

In this post i will explain the most common BGP configuration done in multi-homing environment. The main criteria for multi-homing configuration is that you should own an AS number and a public network range from RIPE or any other organisation responsible for public ip range assignment for your region.

In multi-homing, you will probably have two or more connection from different ISP from redundancy and load balancing. The connectivity would look like the following:-



Considering the above setup, the configuration on customer side would look like as follows.

interface FastEthernet0/0
description "Wan Interface toward ISP 1"
 ip address 1.1.1.1 255.255.255.252  (Point to Point IP between ISP1 and Customer)
exit

interface FastEthernet0/1
description "Wan Interface toward ISP 2"
 ip address 2.2.2.1 255.255.255.252  (Point to Point IP between ISP2 and Customer)
exit

interface FastEthernet1/0
description "LAN Interface"
 ip address X.X.X.X 255.255.255.0  (Customer owned public ip address range)
exit 



router bgp 100   (Customer AS number) 
no synchronization
 bgp log-neighbor-changes
network X.X.X.X mask 255.255.255.0
neighbor 1.1.1.2 remote-as 200  (EBGP Peering with ISP1)
neighbor 2.2.2.2 remote-as 300 ( EBGP Peering with ISP2) 
no auto-summary
exit

If the bandwidth taken from both the ISPs are not the same, then you would like to prefer one ISP over another for incoming traffic. In most case, customer take the second link just for backup in case the first ISP link goes down.

In this case, you can prefer ISP1 by doing AS-Path prepending on the outgoing routes to ISP2. "AS-Path" attribute will be used since both the ISP will be advertising the same network to upstream and AS-Path will be used to decide the preferred path.

route-map as-path-prepend permit 10
match ip address prefix-list customer-routes
set as-path prepend 100 100 100
exit 

router bgp 100   (Customer AS number) 
neighbor 2.2.2.2 route-map as-path-prepend out

If the customer have two different public ip address range, then you can prefer ISP1 for one network and ISP2 for second network using the same AS-Path Prepending technique.