BGP : Blocking a route entry to the Aggregating Address

Posted in NETWORKING/IP ROUTING by edeguzman on October 8, 2007

Suppose that there’s a route entry that has a community attribute of no_export or should I say that there’s a route entry that you don’t want to be part of the aggregating address. There’s a lot of reason on why you might consider a route entry to be not a part of the aggregating address. One reason is a route entry can have a different attribute that you want to preserve, like in an instant a route entry can have a community attribute of no_export in which this attribute is essential because it tells the router that a route entry having no_export should not be advertise in different AS. That’s why its not a good idea having that route entry to be part of the aggregating address.

Below is the sample configuration during my laboratory. I also observed the packet in the wire.

router bgp 200

aggregate-address 192.168.192.0 255.255.248.0 as-set summary-only advertise-map AllowRoute

neighbor 192.168.1.10 remote-as 500

neighbor 192.168.1.230 remote-as 400

neighbor 192.168.1.250 remote-as 300

neighbor 192.168.1.254 remote-as 100

!

ip classless

no ip http server

!

access-list 1 deny 192.168.197.0

access-list 1 permit any

route-map AllowRoute permit 10

match ip address 1

!

Observe that in my configuration there is an access-list in which it denies the route entry of 192.168.197.0 and permit any route entry other than 192.168.197.0. Basically this is the route entry 192.168.197.0 is the one that I don’t want to be part of the aggregating address.

There is also a route-map in my configuration, because this route-map is being called in the BGP process, if you see the advertise-map AllowRoute that is the calling function for the route-map. Basically in the route-map it just matches the access-list for all the routes that is being advertised for the neighboring peer. Now if there’s a route entry for 192.168.197.0 this will be blocked in access-list and not be advertised. This is just a simple way of doing it. There is a lot of ways of doing it especially to a large scale network.

Advertisements

BGP feature’s configuration

Posted in NETWORKING/IP ROUTING by edeguzman on October 6, 2007

Neighbor description – can be entered under an interface configuration. This is helpful because when the BGP configuration is already elaborate, this will serve you a reminder of who and where each neighbor. Can obtain to 80 characters.

Sample config:
Neighbor 192.168.1.1 remote-as 500
Neighbor 192.168.1.1 description ———–T1 to mynetwork.

Neighbor Password – two peers can have an authentication with password. Cisco IOS uses MD5 authentication when a neighbor password is configured.

Sample config:
Neighbor 192.168.1.1 remote-as 500
Neighbor 192.168.1.1 password

Neighbor advertisement-interval – this will change the default BGP update interval to a specified between 0 and 600 seconds. But this is not advisable to change the default unless you know the consequences. This is useful when there is large updates receiving in the neighbor. Convergence time will greatly affect changing this time.

Sample config:
Neighbor 192.168.1.1 remote-as 500
Neighbor 192.168.1.1 advertisement-interval

Neighbor version – when a neighboring peer cannot support the BGP-4. This command will negotiate to have its version be lower to compensate the version of the other peer.

Sample config:
Neighbor 192.168.1.1 remote-as 500
Neighbor 192.168.1.1 version

Neighbor maximum-prefix – this will limit the number of prefixes that a router will receive fro the neighboring peer. If the limit is exceeded then router closes the BGP session and cannot re-established its peer.

Sample config:
Neighbor 192.168.1.1 remote-as 500
Neighbor 192.168.1.1 maximum-prefix

Another config:
Neighbor 192.168.1.1 remote-as 500
Neighbor 192.168.1.1 maximum-prefix 90 warning-only
This configuration will not close the BGP session but instead it will cause the router to generate log message. When the 90% of the maximum-prefix was reached it will then cause to log a message.

Neighbor shutdown – this will shutdown the neighbor connection in that sense there will be no TCP connection between the neighbor. This is useful when you only want to temporarily disconnect your peer.

Sample config:
Neighbor 192.168.1.1 remote-as 500
Neighbor 192.168.1.1 shutdown

Timers bgp – this command will change the default time for keepalive and holddown intervals. The default time interval for keepalive is 60 seconds and holddown interval is 180 seconds. This command is useful if you want a fast detection of the unreliable peer. This command is necessary configured to every peer in the AS. Because there is still negotiation occur on the process of building an established state of the peer.

Sample config:
Neighbor 192.168.1.1 remote-as 500
Timer bgp

When there is changes done to BGP process, a reset connection is must be done to be able have an update BGP route that is affected by the changes in the BGP process. Below are the useful commands for resetting the BGP connection.

Clear ip bgp * – this command is issue in the privileged mode. This command will reset all of the router’s BGP connections.

Clear ip bgp 192.168.1.253 – this command will reset connection to the neighbor 192.168.1.253.

Clear ip bgp mygroup – this command will reset the connection to all members of the peer group name mygroup.

Note:
Resetting a connection will cause a Cease notification be sent to the neighbor. In that sense the TCP connection is closed and BGP routes will be then a withdrawn routes. A new BGP connection will be then be established. Resetting the whole connection will cause a serious consequences to the network. Reset only the affected neighbor to avoid possible problems in the network.

Cisco provides another way in resetting the connections. This alternative way will not tear down the TCP and BGP connection. This command will only cause a trigger update for the affected changes. Triggered update for this command can happened for outbound, inbound or both. Outbound is the out going traffic while the inbound is the incoming traffic. Below is the sample config.

Clear ip bgp 192.168.2.253 soft out – if you done a changes in your BGP process and the neighbor 192.168.2.253 is affected to the changes you made, use this command to cause and trigger update for that neighbor. This is an outbound type.

The configuration for inbound is different thing, because you need to configured in the BGP process the command neighbor x.x.x.x soft-configuration inbound before inbound command is used. Take not inbound is used when you done changes to your BGP process that affects the incoming traffic. The command clear ip bgp soft in is then used for every neighbor that is affected in the changes. For both inbound and outbound the command clear ip bgp x.x.x.x soft.

Note:
There is a drawback for using the soft reconfiguration, it uses a router’s memory to stored its updates for the inbound.