Routing Switching Tigers

  • Home
  • Courses
    • IT and Networking
      • CCNA
        • CCNA R&S
        • CCNA Security
        • CCNA Collaboration
        • CCNA Service Provider
        • CCNA Data Center
        • CCNA Wireless
        • CCNA Cloud
        • CCNA Industrial
        • CCNA Cyber Operations
        • CCDA
      • CCNP
        • CCNP Collaboration
        • CCNP Data Center
        • CCNP R&S
        • CCNP Security
        • CCNP Service Provider
        • CCNP Wireless
        • CCNP Cloud
      • CCIE
        • CCIE R&S
        • CCIE Security
        • CCIE Collaboration
        • CCIE Data Center
        • CCIE Service Provider
        • CCIE Wireless
      • Juniper
        • JNCIA
        • JNCIS Enterprise R&S
        • JNCIS Service Provider
        • JNCIP Enterprise R&S
        • JNCIP Service Provider
        • JNCIE Enterprise R&S
        • JNCIE Service Provider
      • A+N+
      • ITIL
      • ASR 9000
      • Cisco Nexus
    • Software Defined Networking (SDN)
      • SDN
      • NFV
      • SDN Open Flow
      • VMware NSX
      • Cisco ACI
      • Cisco NP-DEV
      • Cisco SD-WAN
      • Cisco DNA
      • Cisco NSO
      • Cisco SDN
      • Cisco ESC
      • OpenStack
      • Cumulus Linux
    • Cloud
      • Amazon Web Services (AWS)
        • AWS Certified Solutions Architect
        • AWS Certified SysOps Administrator
        • AWS Certified Advanced Networking – Specialty
      • CCNA Cloud
      • CCNP Cloud
      • Microsoft Azure
      • MCSE Cloud
    • Data Center & Virtualization
      • VMWare VCP-DCV6
      • CCNA Data Center
      • CCNP Data Center
      • CCIE Data Center
      • SAN & DR
    • Security
      • CCNA Security
      • CCNP Security
      • CCIE Security
      • Ethical Hacking (CEH)
      • CCNA Cyber Operations
      • Advanced Penetration Testing
      • Forensic Investigator
      • CyberSec First Responder
      • Cyber Secure Coder
      • Check Point CCSA / CCSE
    • Software & Programmability
      • C & C++
      • Python
      • Ansible
      • Cisco NP-DEV
      • Cisco NP-DESI
      • Cisco Big Data Analytics
      • Bash Programming
    • Linux
      • RHEL
      • OpenStack
      • Cumulus Linux
      • Bash Programming
    • Microsoft
      • MCSE Cloud
      • MCSE Productivity
      • Microsoft Azure
    • IOT
      • CCNA Industrial
      • Certified IoT Practitioner
  • Schedules
    • Schedules — Mumbai
    • Schedules — Pune
    • Schedules — Ahmedabad
  • Knowledge Base
  • Online Training
  • Placements
  • Blog
  • About
    • Our Team
  • Contact Us
You are here: Home → White Papers → BGP AS-PATH Attributes
White Papers

BGP AS-PATH Attributes

Download PDF

White Papers

BGP AS-PATH Attributes

Download PDF

BGP AS-PATH Attributes

RST Forum White Paper

 

 

LAB2: BGP – IPv4

Disclaimer

This Configuration Guide is designed to assist members to enhance their skills in respective technology area. ​​ While every effort has been made to ensure​​ that all material is as complete and accurate as possible, the enclosed material is presented on an “as is” basis. ​​ Neither the authors nor Forum assume any liability or responsibility to any person or entity with respect to loss or damages incurred from the information contained in this guide. This Lab Guide was developed by RSTForum. ​​ Any similarities between material presented in this configuration guide and any other material is completely coincidental.​​ 

 

LAB 2: Diagram

Note: This Lab was developed on Cisco IOS Version15.2(4) M1 ADVENTERPRISEK9-M.​​ 

LAB 2: Configure BGP AS-PATH Attributes:

Task 1: Configure BGP AS-PATH Attributes for Autonomous

  • In the configuration mode of router configure BGP AS-PATH Attributes by following command:

 

R1:

interface​​ loopback 100 ​​ 

ip address 100.0.0.1 255.255.255.0

exit

router bgp 65100

address-family ipv4

network 100.0.0.0 mask 255.255.255.0

exit

 

R4:

interface loopback 100

ip address 100.0.0.4 255.255.255.0

exit

router bgp 65200

address-family ipv4

network 100.0.0.0​​ mask 255.255.255.0

exit

 

 

  • Verify IPv4 BGP routes by following command:

 

R2#show ip bgp

! (Shows router’s routing table and IPv4 routes entries)

 

BGP table version is 14, local router ID is 22.0.3.2

Status codes: s suppressed, d damped, h history, * valid,​​ > best, i - internal,

 ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,

 ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ x best-external, a additional-path, c RIB-compressed,

Origin codes: i - IGP, e - EGP, ? - incomplete

RPKI validation codes: V valid, I invalid, N Not found

 

Network  ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ Next Hop  ​​ ​​ ​​ ​​ ​​ ​​​​ Metric  ​​​​ LocPrf  ​​ ​​​​ Weight  ​​ ​​ ​​ ​​​​ Path

​​ *> ​​ 11.0.1.0/24  ​​ ​​ ​​ ​​​​ 11.0.1.1 0  ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ 0  ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ 65100 i

​​ *> ​​ 11.0.2.0/24  ​​ ​​ ​​ ​​​​ 11.0.1.1 0  ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ 0  ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ 65100 i

​​ *>​​ ​​ 11.0.3.0/24  ​​ ​​ ​​ ​​​​ 11.0.1.1 0  ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ 0  ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ 65100 i

​​ *> ​​ 22.0.1.0/24  ​​ ​​ ​​ ​​​​ 0.0.0.0  ​​​​ 0  ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ 32768  ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ i

​​ *> ​​ 22.0.2.0/24  ​​ ​​ ​​ ​​​​ 0.0.0.0​​  ​​ 0  ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ 32768  ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ i

​​ *> ​​ 22.0.3.0/24  ​​ ​​​​  ​​​​ 0.0.0.0  ​​​​ 0  ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ 32768  ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ i

​​ *>i 33.0.1.0/24  ​​ ​​ ​​ ​​​​ 33.0.1.3 0  ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ 100  ​​ ​​ ​​ ​​ ​​​​ 0  ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ i

​​ *>i 33.0.2.0/24  ​​ ​​ ​​ ​​​​ 33.0.1.3 0  ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ 100  ​​ ​​ ​​ ​​ ​​​​ 0  ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ i

​​ *>i 33.0.3.0/24  ​​ ​​ ​​ ​​​​ 33.0.1.3 0​​  ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ 100  ​​ ​​ ​​ ​​ ​​​​ 0  ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ i

​​ *>i 44.0.1.0/24  ​​ ​​ ​​ ​​​​ 44.0.1.4 0  ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ 100  ​​ ​​ ​​ ​​ ​​​​ 0  ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ 65200i

​​ *>i 44.0.2.0/24  ​​ ​​ ​​ ​​​​ 44.0.1.4 0  ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ 100  ​​ ​​ ​​ ​​ ​​​​ 0  ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ 65200i

​​ *>i 44.0.3.0/24  ​​ ​​ ​​ ​​​​ 44.0.1.4 0  ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ 100  ​​ ​​ ​​ ​​ ​​​​ 0  ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ 65200i

​​ * i 100.0.0.0/24  ​​ ​​ ​​​​ 44.0.1.4 ​​ 0  ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ 100  ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ 0  ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ 65200i

​​ *>   ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ 11.0.1.1  ​​ ​​ ​​​​ 0  ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ 0  ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ 65100i

 

(R2 can reach 100 network via next hop​​ 11.0.1.1 through AS 65100 and via 44.0.1.4 through AS 65200. Best path for R2 to reach 100 network is via next hop 11.0.1.1 because 11.0.1.1 is EBGP neighbor with AD value 20 and 44.0.1.4 is received from IBGP neighbor with AD value 200.)

 

 

Task 2: Configure BGP AS-PATH Manipulation for Autonomous

 

  • Prepend AS for as-path manipulation

! (Router R2 wants to make via 44.0.1.4 as best path instead of 11.0.1.1)

 

R2:

router bgp 65000

address-family ipv4

neighbor 11.0.1.1 route-map abc in

exit

route-map abc permit 10

set as-path prepend 222 22

exit​​ 

 

(A policy is call on Router R2 that 100 network is prepended 222 22 via 11.0.1.1 through AS 65100 222 22 i.e. through 3 AS)

 

R1:

router bgp 65100

address-family ipv4

neighbor 22.0.1.2 route-map abc out

exit

route-map​​ abc permit 10

set as-path prepend 111 11

exit

 

(A policy is call on Router R1 that 100 network is prepended 111 11 via 11.0.1.1 through AS 111 11 65100 i.e. through 3 AS)

 

 

  • Verify IPv4 BGP routes by following command:

 

R2#show ip bgp

! (Shows router’s​​ routing table and IPv4 routes entries)

 

 

BGP table version is 21, local router ID is 22.0.3.2

Status codes: s suppressed, d damped, h history, * valid, >​​ best, i - internal,

 

 ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,

 ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ x best-external, a additional-path, c RIB-compressed,

Origin codes: i - IGP, e - EGP, ? - incomplete

RPKI validation codes: V valid, I invalid, N Not found

 

 ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ Network ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ Next Hop  ​​​​ Metric  ​​ ​​​​ LocPrf ​​ Weight ​​ Path

*> ​​ 11.0.1.0/24  ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ 11.0.1.1  ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ 0   ​​ ​​ ​​ ​​ ​​​​  ​​ ​​ ​​​​ 0  ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ 22 22 65100 i

​​ *> ​​ 11.0.2.0/24  ​​ ​​ ​​ ​​ ​​ ​​​​ 11.0.1.1  ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ ​​ 0   ​​ ​​ ​​ ​​​​  ​​ ​​ ​​ ​​​​ 0  ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ 222 22 65100 i

​​ *> ​​ 11.0.3.0/24  ​​ ​​ ​​ ​​ ​​ ​​​​ 11.0.1.1  ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ ​​ 0   ​​ ​​ ​​ ​​​​  ​​ ​​ ​​ ​​​​ 0  ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ 222 22 65100 i

​​ *> ​​ 22.0.1.0/24  ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ 0.0.0.0   ​​ ​​ ​​ ​​​​ ​​ 0   ​​ ​​ ​​​​  ​​ ​​ ​​ ​​​​ 32768  ​​ ​​ ​​ ​​ ​​​​ i

​​ *> ​​ 22.0.2.0/24  ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ 0.0.0.0   ​​ ​​ ​​ ​​​​ ​​ 0   ​​ ​​ ​​​​  ​​ ​​ ​​ ​​​​ 32768  ​​ ​​ ​​ ​​ ​​​​ i

​​ *> ​​ 22.0.3.0/24  ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ 0.0.0.0   ​​ ​​ ​​ ​​​​ ​​ 0   ​​ ​​ ​​​​  ​​ ​​ ​​ ​​​​ 32768  ​​ ​​ ​​ ​​ ​​​​ i

​​ *>i 33.0.1.0/24  ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ 33.0.1.3  ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ 0 100  ​​ ​​ ​​​​ ​​ 0   ​​ ​​​​  ​​ ​​ ​​ ​​​​ i

​​ *>i 33.0.2.0/24  ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ 33.0.1.3  ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ 0 100  ​​​​ 0   ​​ ​​ ​​​​  ​​ ​​ ​​​​ i

​​ *>i 33.0.3.0/24  ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ 33.0.1.3  ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ 0 100  ​​​​ 0   ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ i

​​ *>i 44.0.1.0/24  ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ 44.0.1.4  ​​ ​​ ​​ ​​ ​​ ​​​​ ​​ 0 ​​ 100  ​​ ​​ ​​​​ 0  ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ 65200i

​​ *>i 44.0.2.0/24  ​​ ​​ ​​ ​​ ​​ ​​​​ ​​ 44.0.1.4  ​​ ​​ ​​ ​​ ​​ ​​​​ ​​ 0  ​​​​ 100  ​​ ​​ ​​​​ 0  ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ 65200i

​​ *>i 44.0.3.0/24  ​​ ​​ ​​ ​​ ​​ ​​​​ ​​ 44.0.1.4  ​​ ​​ ​​ ​​ ​​ ​​​​ ​​ 0  ​​​​ 100  ​​ ​​ ​​​​ 0  ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ 65200i

​​ *>i 100.0.0.0/24  ​​ ​​ ​​​​  ​​​​ 44.0.1.4  ​​ ​​ ​​ ​​ ​​​​  ​​​​ 0  ​​​​ 100  ​​ ​​ ​​​​ 0  ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ 65200i

​​ *  ​​ ​​ ​​ ​​​​  ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​   ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ ​​ 11.0.1.1  ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ 0   ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ 0 222 22 65100 i

 

 

​​ (Router R2 now selects 44.0.1.4 as best​​ path because it can reach 100 network through As 65200, where as to reach 100 network via 11.0.1.1 through AS 222 22 ​​ 65100 ​​ 111 11;Hence AS-PATH is manipulated.)

 

 

 

 

 

 

 

 

 

 

RST Forum Logo

© 2019 Routing Switching Tigers Pvt. Ltd.

Blog

Disclaimer:
All logos used throughout the website are for representational purposes only. They belong to their respective organizations.

Locations

Mumbai
First floor
Bhanu Jyoti Building
L. N. Road
Opp. Matunga Central Railway Station
Above Chheda Store, Mumbai – 400019
Maharashtra, India.

Tel: 022-2410 5262 / 022-2411 5262
Help desk: 022-2418 5262
Mob: +91 91672 24466

Pune
Office No. – 29A,30A,36A, 1st Floor
Shreenath Plaza
Dyaneshwar Paduka Chowk
Fergusson College Road, Shivajinagar
Pune – 411005
Maharashtra, India.

Tel: (020) 4120 0959
Mob: +91 922 553 5899

Ahmedabad
210, Siddhi Vinayak Complex
2nd floor, Shivranjani Cross Road
Ahmedabad-380015
Gujurat, India.

Tel: (079) 48900951
Mob: +91 07506224466

Contact Details

Mumbai
Tel: 022-2410 5262 / 022-2411 5262
Help desk: 022-2418 5262
Mob: +91 91672 24466

Pune
Tel: (020) 4120 0959
Mob: +91 848 481 5899

Ahmedabad
Tel: (079) 48900951
Mob: +91 07506224466

Quicklinks
  • CCNA
  • CCNP
  • CCIE
  • RedHat
  • Microsoft

sidebar

sidebar-alt