Support Support Downloads Knowledge Base Case Manager My Juniper Community

Knowledge Base

Search our Knowledge Base sites to find answers to your questions.

Ask All Knowledge Base Sites All Knowledge Base Sites JunosE Defect (KA)Knowledge BaseSecurity AdvisoriesTechnical BulletinsTechnotes Sign in to display secure content and recently viewed articles

[M/MX] How to overcome AS Loops when configuring 'local-as' in BGP

0

0

Article ID: KB26804 KB Last Updated: 24 Jul 2013Version: 3.0
Summary:
This article provides information on how to overcome AS loops via the as-loops statement, when local-as is implemented between BGP sessions.
Symptoms:
Topology:
               EBGP2                           EBGP1
R3----------------------------R2------------------------------R1
(AS 65010)         (New AS 65001)                          (AS 65001)
                   (Old AS 8618)
R2 is migrating to AS 65001 from AS 8618. R1 will still use AS 8618 for its BGP peering with R2. R2 will use the local-as statement to preserve the AS 65001, when exchanging the routes.

On R3 and R1, loopbacks are exported to advertise the routes to R2. When R1 advertises the route (103.103.103.103) to R2, R1 advertises it; but at R2, it will be in the hidden route.

R1 advertises the route:
lab@R1# run show route advertising-protocol bgp 192.168.200.1

inet.0: 5 destinations, 6 routes (5 active, 0 holddown, 0 hidden)
Prefix Nexthop MED Lclpref AS path
* 103.103.103.103/32 Self I

[edit]
R2 receives it in the hidden state:
lab@R2# run show route receive-protocol bgp 192.168.200.2 hidden

inet.0: 9 destinations, 9 routes (8 active, 0 holddown, 1 hidden)
Prefix Nexthop MED Lclpref AS path
103.103.103.103/32 192.168.200.2 65001 I

mpls.0: 3 destinations, 3 routes (3 active, 0 holddown, 0 hidden)

[edit]
lab@R2#
If you take a look at the route detail for the hidden route, it displays it as if the AS has looped:
[edit]
lab@R2# run show route receive-protocol bgp 192.168.200.2 hidden detail

inet.0: 9 destinations, 9 routes (8 active, 0 holddown, 1 hidden)
103.103.103.103/32 (1 entry, 0 announced)
Nexthop: 192.168.200.2
AS path: 65001 I (Looped: 65001)<
The routes are advertised from R1 to R2 via BGP, but the routes in R2 from the R1 peer remain hidden, as it has been looped, after configuring local-as of the same AS of the R1 peer. So, due to this loop condition, the route will not be advertised to the R3 router.
Cause:

Solution:
To resolve this issue, you have to configure the following settings:
lab@R2# show protocols bgp
group ebgp2 {
    type external;
    local-as 65001 loops 2; <
    neighbor 192.168.100.1 {
        peer-as 65010;
    }
}

lab@R2# run show route receive-protocol bgp 192.168.200.2

inet.0: 9 destinations, 9 routes (9 active, 0 holddown, 0 hidden)
Prefix Nexthop MED Lclpref AS path
* 103.103.103.103/32 192.168.200.2 65001 I

mpls.0: 3 destinations, 3 routes (3 active, 0 holddown, 0 hidden)

[edit]
lab@R2# run show route receive-protocol bgp 192.168.200.2 detail

inet.0: 9 destinations, 9 routes (9 active, 0 holddown, 0 hidden)
* 103.103.103.103/32 (1 entry, 1 announced)
Accepted
Nexthop: 192.168.200.2
AS path: 65001 I <

[edit]
lab@R2# run show route advertising-protocol bgp 192.168.100.1

inet.0: 9 destinations, 9 routes (9 active, 0 holddown, 0 hidden)
Prefix Nexthop MED Lclpref AS path
* 103.103.103.103/32 Self 8618 65001 I

[edit]
Even the routes will be available on R3, when the loops statement is configured. Depending on the number of loops in the network, the numbers can be changed.
lab@lin# run show route 103.103.103.103 detail

inet.0: 8 destinations, 8 routes (8 active, 0 holddown, 0 hidden)
103.103.103.103/32 (1 entry, 1 announced)
*BGP Preference: 170/-101
Next hop type: Router, Next hop index: 555
Next-hop reference count: 2
Source: 192.168.100.2
Next hop: 192.168.100.2 via em0.0, selected
State: <Active Ext>
Local AS: 65010 Peer AS: 65001
Age: 13:24
Task: BGP_65001.192.168.100.2+63505
Announcement bits (1): 0-KRT
AS path: 65001 8618 65001 I< multiple (identical) AS paths
Accepted
Localpref: 100
Router ID: 101.101.101.101
Configurations:

Configuration of R2:
group ebgp1 {
    type external;
    peer-as 65001;<
    neighbor 192.168.200.2;
}
group ebgp2 {
    type external;
    local-as 65001;,<
    neighbor 192.168.100.2 {
        peer-as 65010;
    }
}

show routing-options
autonomous-system 8618;
Configuration of R3:
group ebgp2 {
    type external;
    export local-as;
    neighbor 192.168.100.1 {
        peer-as 65001;
    }
}
show routing-options
autonomous-system 65010;
Configuration of R1:
group ebgp1 {
     type external;
     export bgplocal-as;
     peer-as 8618;
     neighbor 192.168.200.1;
}
show routing-options
autonomous-system 65001;

Related Links

Comment on this article > Affected Products Browse the Knowledge Base for more articles related to these product categories. Select a category to begin.

Getting Up and Running with Junos

Getting Up and Running with Junos Security Alerts and Vulnerabilities Product Alerts and Software Release Notices Problem Report (PR) Search Tool EOL Notices and Bulletins JTAC User Guide Customer Care User Guide Pathfinder SRX High Availability Configurator SRX VPN Configurator Training Courses and Videos End User Licence Agreement Global Search