You are on page 1of 9

BGP Attributes

BGP Path Selection

IGPs, such as EIGRP or OSPF, choose routes based on lowest metric. They attempt to find the
shortest, fastest way to get traffic to its destination. BGP, however, has a different way of route
selection. It assigns various attributes to each path; these attributes can be administratively
manipulated to control the path that is selected. It then examines the value of these attributes in an
ordered fashion until it can narrow all the possible routes down to one path.

BGP Attributes

BGP chooses a route to a network based on the attributes of its path. Four categories of attributes exist
as follows:

 Well-known mandatory: Must be recognized by all BGP routers, present in all BGP


updates, and passed on to other BGP routers. For example, AS path, origin, and next hop.
 Well-known discretionary: Must be recognized by all BGP routers and passed on to other
BGP routers but need not be present in an update, for example, local preference.
 Optional transitive: Might or might not be recognized by a BGP router but is passed on to
other BGP routers. If not recognized, it is marked as partial, for example, aggregator,
community.
 Optional nontransitive: Might or might not be recognized by a BGP router and is not passed
on to other routers, for example, Multi-Exit Discriminator (MED), originator ID.

Table 6-2 lists common BGP attributes, their meanings, and their category.

Table 6-2. BGP Attributes

Attribute Meaning
AS path An ordered list of all the autonomous systems through which this update has
passed. Well-known, mandatory.
Origin How BGP learned of this network. i = by network command, e = from EGP, ? =
redistributed from other source. Well-known, mandatory.
Local Preference A value telling IBGP peers which path to select for traffic leaving the AS.
Default value is 100. Well-known, discretionary.
Multi-Exit Suggests to a neighboring autonomous system which of multiple paths to select
Discriminator for traffic bound into your autonomous system. Lowest MED is preferred.
(MED) Optional, non-transitive.
Weight Cisco proprietary, to tell a router which of multiple local paths to select for
traffic leaving the AS. Highest weight is preferred. Only has local significance.

BGP Path Selection Criteria

BGP tries to narrow its path selection down to one best path; it does not load balance by default. To
do so, it examines the path attributes of any loop-free, synchronized (if synchronization is enabled)
routes with a reachable next-hop in the following order:

1. Choose the route with the highest weight.


2. If weight is not set, choose the route with the highest local preference.
3. Choose routes that this router originated.
4. Choose the path with the shortest Autonomous System path.
5. Choose the path with the lowest origin code (i is lowest, e is next, ? is last).
6. Choose the route with the lowest MED, if the same Autonomous System advertises the
possible routes.
7. Choose an EBGP route over an IBGP route.
8. Choose the route through the nearest IGP neighbor as determined by the lowest IGP metric.
9. Choose the oldest route
10. Choose a path through the neighbor with the lowest router ID.
11. Choose a path through the neighbor with the lowest IP address.

To enable BGP to load balance over more than one path, you must enter the command maximum-
paths number-of-paths. BGP can load balance over a maximum of six paths.

Influencing BGP Path Selection

BGP was not created to be a fast protocol; it was created to enable as much administrative control
over route path selection as possible. Path selection is controlled by manipulating BGP attributes,
usually using route maps. You can set a default local preference by using the command bgp default
local-preference and a default MED for redistributed routes with the default-metric command under
the BGP routing process. But by using route maps, you can change attributes for certain neighbors
only or for certain routes only. The earlier section on route maps contains an example of using a route
map to set a local preference of 200 for specific redistributed routes. This is higher than the default
local preference of 120, so routers within the AS are more likely to prefer that path than others.

Route maps can also be applied to routes sent to or received from a neighbor. The following example
shows a simple route map that sets a MED value and adds two more copies of its AS number to the
AS path on all routes advertised out to an EBGP neighbor:

route-map MED permit 10


set metric 50
set as-path prepend 65001 65001
!
router bgp 65001
neighbor 10.1.1.1 route-map MED out

When attributes are changed, you must tell BGP to apply the changes. Either clear the BGP session
(clear ip bgp *) or do a soft reset (clear ip bgp * soft in | out). Routers using recent IOS versions do
a route refresh when the session in
Intermediate System (IS-IS)?

Topics

The IS-IS (Intermediate System - Intermediate System) protocol is one of a family of IP Routing
protocols, and is an Interior Gateway Protocol (IGP) for the Internet, used to distribute IP routing
information throughout a single Autonomous System (AS) in an IP network.

IS-IS is a link-state routing protocol, which means that the routers exchange topology information
with their nearest neighbors. The topology information is flooded throughout the AS, so that every
router within the AS has a complete picture of the topology of the AS. This picture is then used to
calculate end-to-end paths through the AS, normally using a variant of the Dijkstra algorithm.
Therefore, in a link-state routing protocol, the next hop address to which data is forwarded is
determined by choosing the best end-to-end path to the eventual destination.

The main advantage of a link state routing protocol is that the complete knowledge of topology allows
routers to calculate routes that satisfy particular criteria. This can be useful for traffic engineering
purposes, where routes can be constrained to meet particular quality of service requirements. The
main disadvantage of a link state routing protocol is that it does not scale well as more routers are
added to the routing domain. Increasing the number of routers increases the size and frequency of the
topology updates, and also the length of time it takes to calculate end-to-end routes. This lack of
scalability means that a link state routing protocol is unsuitable for routing across the Internet at large,
which is the reason why IGPs only route traffic within a single AS.

IS-IS was originally devised as a routing protocol for CLNP, but has been extended to include IP
routing; the extended version is sometimes referred to as Integrated IS-IS.

Each IS-IS router distributes information about its local state (usable interfaces and reachable
neighbors, and the cost of using each interface) to other routers using a Link State PDU (LSP)
message. Each router uses the received messages to build up an identical database that describes the
topology of the AS.

From this database, each router calculates its own routing table using a Shortest Path First (SPF) or
Dijkstra algorithm. This routing table contains all the destinations the routing protocol knows about,
associated with a next hop IP address and outgoing interface.

 The protocol recalculates routes when network topology changes, using the Dijkstra
algorithm, and minimises the routing protocol traffic that it generates.
 It provides support for multiple paths of equal cost.
 It provides a multi-level hierarchy (two-level for IS-IS) called "area routing," so that
information about the topology within a defined area of the AS is hidden from routers outside
this area. This enables an additional level of routing protection and a reduction in routing
protocol traffic.
 All protocol exchanges can be authenticated so that only trusted routers can join in the routing
exchanges for the AS.

VTP PRUNING
WRITTEN BY ADMINISTRATOR. POSTED IN VIRTUAL TRUNK PROTOCOL (CISCO VTP)
 
INTRODUCTION

As you would be aware a switched network creates one broadcast domain, similar to that of a VLAN
powered network where all nodes belonging to the same VLAN are part of the same broadcast
domain, receiving all broadcasts sent on their network.

THE BROADCAST AND UNICAST PROBLEM IN VLAN NETWORKS

What we are about to see is how these broadcasts can actually create problems by flooding the VLAN
network with unnecessary traffic, and depending on your network setup, this can prove to be a huge
problem. The reason for this is because the trunk links interconecting your network switches will
carry these broadcasts to every switch in the network, regardless of which VLAN the broadcast is
intended for.

As shown and described, a host connected to a port configured for VLAN 2 on Switch 1 (first switch
on the left), generates a network broadcast. Naturally, the switch will forward the broadcast out all
ports assigned to the same VLAN it was received from, that is, VLAN 2.

In addition, the Catalyst switch will forward the broadcast out its trunk link, so it may reach all ports
in the network assigned to VLAN 2. The Root switch receives the broadcast through one of it's trunks
and immediately forwards it out the other two - towards Switch 2 & 3.

Switch 2 is delighted to receive the broadcast as it does in fact have one port assigned to VLAN 2.
Switch 3 however, is a different case - it has no ports assigned to VLAN 2 and therefore will drop the
broadcast packet it receives.

In this example, the bandwidth usage was ineffecient because one broadcast packet was sent over all
possible trunk links, and was then dropped by Switch 3.

You might ask yourself 'So what's the big deal?'.

The problem here is small and can easily be ignored... but consider a network of fifteen or more 12
port switches (this translates to at least 210 nodes) and you can start to appreciate how serious the
problem can get. To make things worse (and more realistic), consider you're using 24 port switches,
then you're all of a sudden talking about more than 300 nodes!

To further help understand how serious the problem gets, let's take a look at our example network
below:

Here we have a medium sized network powered by Cisco Catalyst switches. The two main switches
up the top are the VTP servers and also perform 3rd layer switching by routing packets between the
VLANs we've created.

Right below them you'll find our 2950's Catalyst switches which are connected to the core switches
via redundant fiber trunk links. Directly below our 2950's are our 2948 Catalyst switches that connect
all workstations to the network.

A workstation connected to a port assigned to VLAN 2 decided to send a network broadcast looking
for a specific network resource. While the workstation is totally unaware of our network design and
complexity, its broadcast is the reason all our trunks will flood with unwanted traffic, consuming
valuable bandwidth!

Let's take a look at what happens:


We don't think describing the above is actually required as the diagram shows all the information we
need and we're confident you will agree that we dealing with a big problem:)

So how do we fix this mess ?

Keep reading on as you're about to learn........

THE SOLUTION: ENABLING VTP PRUNING

VTP Pruning as you might have already guessed solves the above problem by reducing the
unnecessary flooded traffic described previously. This is done by forwarding broadcasts and unknown
unicast frames on a VLAN over trunk links only if the receiving end of the trunk has ports in that
VLAN.

Looking at the above diagram you will notice that the Root Catalyst 3550 Switch receives a broadcast
from Switch 1, but only forwards it out one of it's trunks. The Root Switch knows that the broadcast
belongs to VLAN 2 and furthermore it's aware no port is assigned to VLAN 2 on Switch 3, therefore
it won't forward it out the trunk that leads to that switch.

SUPPORT FOR VTP PRUNING

The VTP Pruning service is supported by both VTP 1 and VTP 2 versions of the VTP protocol. With
VTP 1, VTP pruning is possible with the use of additional VTP message types.

When a Cisco Catalyst switch has ports associated with a VLAN, it will send an advertisement to its
neighboring switches informing them about the ports it has active on that VLAN. This information is
then stored by the neighbors and used to decide if flooded traffic from a VLAN should be forwarded
to the switch via the trunk port or not.

Note: VTP Pruning is disabled by default on all Cisco Catalyst switches and can be
enabled by issuing the "set vtp pruning enable" command.

If this command is issued on the VTP Server(s) of your network, then pruning is
enabled for the entire management domain.
LLDP is vendor neutral, and is commonly
LLDP used as a component in network
(Link layer discovery management and network monitoring
protocol) applications.
CDP (Cisco CDP is a Cisco proprietary protocol that
Discovery Protocol) support the IEEE 802.1ab version of
LLDP, and is primarily used to share
information between directly connected
Cisco devices.
IP route This command contains information from
the IP routing table that can be used to
forward a packet through the best path
towards its destination.
FDB (Forwarding FDB stores MAC addresses of the
database) discovered devices and their respective
ports. This protocol is preferred for
discovering switches.
ARP (Address ARP maps dynamic IP (Layer 3) with
Resolution Protocol) MAC addresses (Layer 2). ARP translates
32-bit addresses to 48-bit and vice versa,
and is preferred by IPv4 devices.
Multi-link trunking MLT provides high-speed, fault tolerant
Protocol (MLT) connection between servers, switches and
routers by grouping all ethernet links into
a single logical ethernet link.
CAN (Controller area CAN facilitates communication between
network) the applications of microcontrollers and
their devices without relying on a host
computer.
PPP (Point-to-Point PPP allows you to establish
Protocol) communication between two routers
without the help of a host.
VTP Pruning configuration and commands are covered in section 11.4 as outlined in the VLAN
Introduction page, however, we should inform you that you can actually enable pruning for specific
VLANs in your network.

When you enable VTP Pruning on your network, all VLANs become eligible for pruning on all trunk
links. This default list of pruning eligibility can thankfully be modified to suite your needs but you
must first clear all VLANs from the list using the "clear vtp prune-eligible vlan-range" command and
then set the VLAN range you wish to add in the prune eligible list by issuing the following command:
"set vtp prune-eligible vlan-range" where the 'vlan-range' is the actual inclusive range of VLANs e.g
'2-20'.

By default, VLANs 2–1000 are eligible for pruning. VLAN 1 has a special meaning because it is
normally used as a management VLAN and is never eligible for pruning, while VLANs 1001–1005
are also never eligible for pruning. If the VLANs are configured as pruning-ineligible, the flooding
continues as illustrated in our examples.
 

SUMMARY

VTP Pruning can in fact be an administrator's best friend in any Cisco powered network, increasing
available bandwidth by restricting flooded traffic to those trunk links that the traffic must use to reach
the destination devices.

At this point, we have also come to the end of the first part of our VLAN presentation. As we are still
working on the second and final part of the VLAN topic, we hope these pages will keep you going
until it is complete.

Network Layer 2 protocols

Depending upon their requirements, certain protocols are chosen over others. Example: Cisco
switches prefer its own communication protocol. Here is a list of commonly used Layer 2 protocols:

Some of the other data link layer 2 protocols are as follows:

 ARCnet
 Asynchronous Transfer Mode (ATM)
 Econet
 Ethernet
 Ethernet Automatic Protection Switching (EAPS)
 Fiber Distributed Data Interface (FDDI)
 Frame relay
 High-Level Data Link Control (HDLC)
 IEEE 802.2 (provides LLC functions to IEEE 802 MAC layers)
 IEEE 802.11 wireless LAN
 LattisNet
 Link Access Procedures, D channel (LAPD)
 LocalTalk
 Multiprotocol Label Switching (MPLS)
 Nortel Discovery Protocol (NDP)
 Serial Line Internet Protocol (SLIP) (obsolete)
 Spanning tree protocol
 StarLan
 Token ring
 Unidirectional Link Detection (UDLD)

You might also like