BGP Path Attributes
BGP (Border Gateway Protocol) is an exterior gateway protocol that is used to exchange routing information between different autonomous systems (AS). BGP has many path attributes that are used to select the best path among multiple paths to a destination network. These attributes are added to the BGP update message and sent to the neighbor routers.
Here are the BGP path attributes and their importance in BGP configuration:
- AS Path: The AS Path attribute contains the AS numbers through which the BGP update message has passed. It is used to prevent loops in the network and to provide a loop-free path to the destination network. AS Path is the most important attribute in BGP, as it is used to determine the shortest path to a destination network.
- Next Hop: The Next Hop attribute specifies the IP address of the next-hop router that should be used to reach the destination network. It is used to ensure that the packets are sent to the correct next-hop router.
- Local Preference: The Local Preference attribute is used to influence the path selection within a single AS. It is used to give preference to a particular path in the local AS.
- Multi-Exit Discriminator (MED): The MED attribute is used to influence the path selection in a multi-homed network. It is used to tell the neighbor routers which path should be preferred for incoming traffic.
- Weight: The Weight attribute is a Cisco-specific attribute that is used to influence the path selection within a single router. It is used to give preference to a particular path on a local router.
- Origin: The Origin attribute is used to indicate the source of the BGP route information. It can be IGP (Interior Gateway Protocol), EGP (Exterior Gateway Protocol), or incomplete.
- Community: The Community attribute is used to group BGP routes into communities based on some common properties. It is used to simplify the BGP configuration by applying policies to a group of BGP routes.
To set the BGP path attributes, you can use the following commands:
- AS Path: The AS Path attribute is automatically added by BGP and cannot be set manually.
- Next Hop: The next-hop attribute is set automatically by BGP based on the routing table.
- Local Preference: The local preference attribute can be set using the following command:
Router(config-router)# neighbor ip-address route-map map-name in - MED: The MED attribute can be set using the following command:
Router(config-router)# neighbor ip-address route-map map-name out - Weight: The weight attribute can be set using the following command:
Router(config-router)# neighbor ip-address weight weight-value - Origin: The Origin attribute is set automatically by BGP based on the routing table.
- Community: The community attribute can be set using the following command:
Router(config-router)# neighbor ip-address send-community

BGP Path Attribute CCNA Classes in Dubai – CCNAGuru (Cisco Expert Trainer)
Join CCNA classes in Dubai by CCNAGuru, led by a Cisco-certified expert. Available for in-person and online classes with real lab practice, exam-focused training, and career guidance.
ITN
Introduction to NetworksSRWE
Switching, Routing & WirelessENSA
Enterprise Networking & SecurityCCNA Training Across U.S. States
Explore CCNA Training Centers and Certification Courses across every U.S. state.
Alabama Alaska Arizona Arkansas California Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota Mississippi Missouri Montana Nebraska Nevada New Hampshire New Jersey New Mexico New York North Carolina North Dakota Ohio Oklahoma Oregon Pennsylvania Rhode Island South Carolina South Dakota Tennessee Texas Utah Vermont Virginia Washington West Virginia Wisconsin Wyoming District of Columbia Puerto RicoConnect with me: FB X IN YT TT WA
*All U.S. state pages are part of CCNAGuru.com's training network.