---
title: Understanding BGP and the IP as-path Access-List Command on Cisco
description: In this technical blog, we'll delve into BGP and explore the significance of the ip as-path access-list command on Cisco devices.
---

[![looking-point_LogoWhite _ Presidio-1](https://www.lookingpoint.com/hubfs/looking-point_LogoWhite%20_%20Presidio-1.svg) ![LOOKINGPOINT](https://www.lookingpoint.com/hs-fs/hubfs/Theme%20Oct%202019/images/logo@mobile.png?width=444&height=86&name=logo@mobile.png) ](https://www-lookingpoint-com.sandbox.hs-sites.com/-temporary-slug-c10ae2f5-f23e-43f2-8214-f73884fb09ae)

- [Solutions](https://www.lookingpoint.com) 
    - [Collaboration](https://www.lookingpoint.com/it-solutions-collaboration)
    - [Security ](https://www.lookingpoint.com/it-solutions-security)
    - [Networking ](https://www.lookingpoint.com/it-solutions-networking)
    - [Data Center ](https://www.lookingpoint.com/data-center)
    - [Cloud](https://www.lookingpoint.com/cloud)
    - [Managed Services](https://www.lookingpoint.com/it-support-services)
    - [Lifecycle Management](https://www.lookingpoint.com/lifecycle-management-acela)
- [Services](https://www.lookingpoint.com/en/solutions-services) 
    - [Assess and Design ](https://www.lookingpoint.com/assess-and-design-it-solutions)
    - [Deployment](https://www.lookingpoint.com/deployment-it-services-solutions)
    - [Support](https://www.lookingpoint.com/it-support-services)
    - [Wireless Surveys Assessments](https://www.lookingpoint.com/en-us/wireless-surveys-assessments)
    - [Project Management ](https://www.lookingpoint.com/project-management)
    - [Integration Center](https://www.lookingpoint.com/integration-services)
    - [Lifecycle Support](https://www.lookingpoint.com/it-lifecycle-support)
    - [Locations Serviced](https://www.lookingpoint.com/it-consulting-san-francisco-bay-area)
    - [Customer Success](https://www.lookingpoint.com/services-customer-success)
- [Partners](https://www.lookingpoint.com/partner)
- [Blog](https://www.lookingpoint.com/blog)

- [Solutions](https://www.lookingpoint.com) 
    - [Collaboration](https://www.lookingpoint.com/it-solutions-collaboration)
    - [Security ](https://www.lookingpoint.com/it-solutions-security)
    - [Networking ](https://www.lookingpoint.com/it-solutions-networking)
    - [Data Center ](https://www.lookingpoint.com/data-center)
    - [Cloud](https://www.lookingpoint.com/cloud)
    - [Managed Services](https://www.lookingpoint.com/it-support-services)
- [Services](https://www.lookingpoint.com/en/solutions-services) 
    - [Assess and Design](https://www.lookingpoint.com/assess-and-design-it-solutions)
    - [Deployment](https://www.lookingpoint.com/deployment-it-services-solutions)
    - [Support](https://www.lookingpoint.com/it-support-services)
    - [Wireless Survey Assessment](https://www.lookingpoint.com/en-us/wireless-surveys-assessments)
    - [Project Management ](https://www.lookingpoint.com/project-management)
    - [Lifecycle Management](https://www.lookingpoint.com/lifecycle-management-acela)
    - [Integration Center](https://www.lookingpoint.com/integration-services)
    - [Locations Serviced](https://www.lookingpoint.com/it-consulting-san-francisco-bay-area)
    - [Customer Success](https://www.lookingpoint.com/services-customer-success)
- [Partners](https://www.lookingpoint.com/partner)
- [Blog](https://www.lookingpoint.com/blog)
- [+1 925-566-3480](tel:+1%20925-566-3480)
- [DO NOT SHARE OR SELL MY PERSONAL INFORMATION](https://na1.hs-data-privacy.com/request/TrvvEe3VpnlESmYolHn3xw)

- [![phone@2x](https://www.lookingpoint.com/hubfs/Theme%20Oct%202019/fonts/phone@2x.png) +1 925-566-3480 ](tel:+19255663480)
- [![user@2x](https://www.lookingpoint.com/hubfs/Theme%20Oct%202019/fonts/user@2x.png) Acela Portal ](https://my.lookingpoint.com/)
- [Free Consultation](https://www.lookingpoint.com/blog/understanding-bgp-and-the-ip-as-path-access-list-command-on-cisco#get-free-popup)

 Let’s Connect

[Home](https://www.lookingpoint.com/) [Blog](https://www.lookingpoint.com/blog) Understanding BGP and the IP as-path Access-List Command on Cisco

# Blog

 Jul  3

Understanding BGP and the IP as-path Access-List Command on Cisco

 Posted by [Pablo Mirsoian](https://www.lookingpoint.com/blog/author/pablo-mirsoian)

[**0](https://www.lookingpoint.com/blog/understanding-bgp-and-the-ip-as-path-access-list-command-on-cisco#comments-listing)

** Share

- [**](https://www.facebook.com/sharer/sharer.php?u=https://www.lookingpoint.com/blog/understanding-bgp-and-the-ip-as-path-access-list-command-on-cisco&title=Understanding%20BGP%20and%20the%20IP%20as-path%20Access-List%20Command%20on%20Cisco&picture=&description=In%20this%20technical%20blog,%20we'll%20delve%20into%20BGP%20and%20explore%20the%20significance%20of%20the%20ip%20as-path%20access-list%20command%20on%20Cisco%20devices.)
- [**](https://twitter.com/intent/tweet?source=https://www.lookingpoint.com/blog/understanding-bgp-and-the-ip-as-path-access-list-command-on-cisco&text=Understanding%20BGP%20and%20the%20IP%20as-path%20Access-List%20Command%20on%20Cisco)
- [**](https://plus.google.com/share?url=https://www.lookingpoint.com/blog/understanding-bgp-and-the-ip-as-path-access-list-command-on-cisco)
- [**](http://www.linkedin.com/shareArticle?mini=true&url=https://www.lookingpoint.com/blog/understanding-bgp-and-the-ip-as-path-access-list-command-on-cisco&title=Understanding%20BGP%20and%20the%20IP%20as-path%20Access-List%20Command%20on%20Cisco&summary=In%20this%20technical%20blog,%20we'll%20delve%20into%20BGP%20and%20explore%20the%20significance%20of%20the%20ip%20as-path%20access-list%20command%20on%20Cisco%20devices.)
- [**](mailto:?subject=Understanding%20BGP%20and%20the%20IP%20as-path%20Access-List%20Command%20on%20Cisco&body=Understanding%20BGP%20and%20the%20IP%20as-path%20Access-List%20Command%20on%20Cisco%20https://www.lookingpoint.com/blog/understanding-bgp-and-the-ip-as-path-access-list-command-on-cisco)

[cisco](https://www.lookingpoint.com/blog/topic/cisco) [Border Gateway Protocol](https://www.lookingpoint.com/blog/topic/border-gateway-protocol) [BGP](https://www.lookingpoint.com/blog/topic/bgp) [autonomous systems](https://www.lookingpoint.com/blog/topic/autonomous-systems) [AS](https://www.lookingpoint.com/blog/topic/as) [ip as-path access-list](https://www.lookingpoint.com/blog/topic/ip-as-path-access-list) [TCP connections](https://www.lookingpoint.com/blog/topic/tcp-connections) [Cisco routers](https://www.lookingpoint.com/blog/topic/cisco-routers) [network policies](https://www.lookingpoint.com/blog/topic/network-policies) [routing efficiency](https://www.lookingpoint.com/blog/topic/routing-efficiency)

 

 

Border Gateway Protocol (BGP) stands as a foundational protocol in the realm of internet routing, facilitating the exchange of routing information between different autonomous systems (AS). In this technical blog, we'll delve into BGP and explore the significance of the ip as-path access-list command on Cisco devices.

**What is BGP?**

BGP, a standardized exterior gateway protocol, enables routers within separate autonomous systems to communicate and exchange routing information. Unlike interior gateway protocols (IGPs) such as OSPF or EIGRP, which operate within a single autonomous system, BGP operates across multiple autonomous systems.

**How Does BGP Work?**

BGP utilizes a path vector algorithm to make routing decisions. It considers various attributes, including the AS path, next hop, and network policies, to determine the best path for data packets to reach their destinations. BGP peers exchange routing information through TCP connections established on port 179.

**Understanding AS Paths**

The AS path is a fundamental attribute in BGP that represents the sequence of autonomous systems through which a route advertisement has passed. AS path information is crucial for preventing routing loops and implementing routing policies.

**IP as-path Access-List Command**

The ip as-path access-list command on Cisco routers allows network administrators to filter BGP route advertisements based on the AS path attribute. By specifying criteria within an access list, administrators can control which routes are accepted or rejected by a BGP router.

**Example Usage:**

Let's consider an example where we want to filter out routes originating from AS 65001:

Router(config)# ip as-path access-list 1 deny _65001$

 

In this command:

- ip as-path access-list 1 creates a new access list numbered 1 for filtering based on AS path.
- deny _65001$ denies any AS path ending with 65001.

 

 

BGP route advertisements:

Suppose we want to allow routes only from AS 65002 and AS 65003 while denying all others:

Router(config)# ip as-path access-list 2 permit _65002_

Router(config)# ip as-path access-list 2 permit _65003_

Router(config)# ip as-path access-list 2 deny .*

 

In this example:

- ip as-path access-list 2 creates a new access list numbered 2 for filtering based on AS path.
- permit _65002_ allows any AS path containing only AS 65002.
- permit _65003_ allows any AS path containing only AS 65003.
- deny .* denies any other AS paths not explicitly permitted.

This configuration ensures that only routes originating from AS 65002 or AS 65003 are accepted, while all other routes are rejected.

 

In conclusion, BGP plays a vital role in internet routing by facilitating communication between autonomous systems. The ip as-path access-list command on Cisco routers offers granular control over BGP route advertisements based on the AS path attribute. Understanding and effectively utilizing these concepts empowers network administrators to optimize routing efficiency and enforce network policies.

As always if you have any questions on getting the most out of your IT solutions for you and your business and would like to schedule a free consultation with us, please reach out to us at [sales@lookingpoint.com](mailto:sales@lookingpoint.com) and we’ll be happy to help!

[![Contact Us](https://no-cache.hubspot.com/cta/default/2215854/7814218f-8d49-4d01-9a8c-095c00c0b08d.png)](https://cta-redirect.hubspot.com/cta/redirect/2215854/7814218f-8d49-4d01-9a8c-095c00c0b08d)

 Written By:

Pablo Mirsoian, Network Engineer

 SHARE:

- [**](https://www.facebook.com/sharer/sharer.php?u=https://www.lookingpoint.com/blog/understanding-bgp-and-the-ip-as-path-access-list-command-on-cisco&title=Understanding%20BGP%20and%20the%20IP%20as-path%20Access-List%20Command%20on%20Cisco&picture=&description=In%20this%20technical%20blog,%20we'll%20delve%20into%20BGP%20and%20explore%20the%20significance%20of%20the%20ip%20as-path%20access-list%20command%20on%20Cisco%20devices.)
- [**](https://twitter.com/intent/tweet?source=https://www.lookingpoint.com/blog/understanding-bgp-and-the-ip-as-path-access-list-command-on-cisco&text=Understanding%20BGP%20and%20the%20IP%20as-path%20Access-List%20Command%20on%20Cisco)
- [**](https://plus.google.com/share?url=https://www.lookingpoint.com/blog/understanding-bgp-and-the-ip-as-path-access-list-command-on-cisco)
- [**](http://www.linkedin.com/shareArticle?mini=true&url=https://www.lookingpoint.com/blog/understanding-bgp-and-the-ip-as-path-access-list-command-on-cisco&title=Understanding%20BGP%20and%20the%20IP%20as-path%20Access-List%20Command%20on%20Cisco&summary=In%20this%20technical%20blog,%20we'll%20delve%20into%20BGP%20and%20explore%20the%20significance%20of%20the%20ip%20as-path%20access-list%20command%20on%20Cisco%20devices.)
- [**](mailto:?subject=Understanding%20BGP%20and%20the%20IP%20as-path%20Access-List%20Command%20on%20Cisco&body=Understanding%20BGP%20and%20the%20IP%20as-path%20Access-List%20Command%20on%20Cisco%20https://www.lookingpoint.com/blog/understanding-bgp-and-the-ip-as-path-access-list-command-on-cisco)

### Topics

- [cisco](https://www.lookingpoint.com/blog/topic/cisco)
- [security](https://www.lookingpoint.com/blog/topic/security)
- [cybersecurity](https://www.lookingpoint.com/blog/topic/cybersecurity)
- [Cisco ISE](https://www.lookingpoint.com/blog/topic/cisco-ise)
- [collaboration](https://www.lookingpoint.com/blog/topic/collaboration)
- [ISE](https://www.lookingpoint.com/blog/topic/ise)
- [webex](https://www.lookingpoint.com/blog/topic/webex)
- [IT Solutions](https://www.lookingpoint.com/blog/topic/it-solutions)
- [cisco webex](https://www.lookingpoint.com/blog/topic/cisco-webex)
- [SD-WAN](https://www.lookingpoint.com/blog/topic/sd-wan)

### Latest Tweets **

### subscribe to our blog

## Get New Unique Posts

![looking-point_LogoWhite _ Presidio-1](https://www.lookingpoint.com/hubfs/looking-point_LogoWhite%20_%20Presidio-1.svg)

 391 Taylor Blvd. Suite 120 Pleasant Hill, California 94523

[Call Us +1 925-566-3480](tel:+19255663480)

[sales@lookingpoint.com](mailto:sales@lookingpoint.com)

- [**](https://www.facebook.com/lookingpoint?fref=ts)
- [**](https://twitter.com/lookingpoint)
- [**](https://www.linkedin.com/company/lookingpoint)
- [**](https://www.instagram.com/lookingpoint/)

 SOLUTIONS

- [Collaboration](https://www.lookingpoint.com/it-solutions-collaboration)
- [ Security](https://www.lookingpoint.com/it-solutions-security)
- [Networking ](https://www.lookingpoint.com/it-solutions-networking)
- [Cloud](https://www.lookingpoint.com/cloud)
- [Data Center ](https://www.lookingpoint.com/data-center)
- [Project Management ](https://www.lookingpoint.com/project-management)
- [Lifecycle Management](https://www.lookingpoint.com/lifecycle-management-acela)
- [Wireless Surveys Assessments](https://www.lookingpoint.com/en-us/wireless-surveys-assessments)

 MANAGED SERVICES

- [Assess and Design](https://www.lookingpoint.com/assess-and-design-it-solutions)
- [Deployment](https://www.lookingpoint.com/deployment-it-services-solutions)
- [Support](https://www.lookingpoint.com/it-support-services)
- [Integration Center](https://www.lookingpoint.com/integration-services)
- [Lifecycle Support](https://www.lookingpoint.com/it-lifecycle-support)
- [Locations Serviced](https://www.lookingpoint.com/it-consulting-san-francisco-bay-area)
- [Customer Success](https://www.lookingpoint.com/services-customer-success)

 COMPANY

- [Contact Us](https://www.lookingpoint.com/contact-us)
- [Career](https://www.lookingpoint.com/career)
- [About Us](https://www.lookingpoint.com/about-us)
- [ FAQ](https://www.lookingpoint.com/faq)
- [ Partners](https://www.lookingpoint.com/partner)
- [Blog](https://www.lookingpoint.com/blog)
- [Privacy Policy](https://www.lookingpoint.com/privacy-policy)
- [DO NOT SELL OR SHARE MY PERSONAL INFORMATION](https://na1.hs-data-privacy.com/request/TrvvEe3VpnlESmYolHn3xw)

 GET IN TOUCH

 Join our mailing list to stay up to date and get notices about our new releases!

 Looking Point Inc. 2026

 Cookie Settings