Routing

 View Only

IMPORTANT MODERATION NOTICE

This community is currently under full moderation, meaning  all posts will be reviewed before appearing in the community. Please expect a brief delay—there is no need to post multiple times. If your post is rejected, you'll receive an email outlining the reason(s). We've implemented full moderation to control spam. Thank you for your patience and participation.



  • 1.  advertise-peer-as command not working as expected

    Posted 09-10-2014 05:54

    Hi,

     

        I am having issue making the " advertise-peer-as " command to work. I am advertising the network 137.22.111.0/26 from JR7 which is in AS 65535. On JR2 I have " advertise-peer-as " configured so I do see JR2 advertising the 137.22.111.0/26 back to JR7 which is in AS 65535 and back to JR3 which is also in AS 65535. However, when I check JR3's routing table I don't see the 137.22.111.0/26 being recieved.  Below are relevant outpout for the three routers and the network diagram. Thank you

     

     

    JR2 Output:
    
    root@SRX2# show protocols bgp group EBGP_TO_AS_65535
    type external;
    advertise-peer-as;
    peer-as 65535;
    local-as 200;
    multipath;
    neighbor 163.44.12.2;
    neighbor 163.44.45.2;
    
    [edit]
    root@SRX2#
    
    
    root@SRX2# run show bgp summary
    Groups: 2 Peers: 3 Down peers: 0
    Unconfigured peers: 1
    Table          Tot Paths  Act Paths Suppressed    History Damp State    Pending
    inet.0                13         13          0          0          0          0
    Peer                     AS      InPkt     OutPkt    OutQ   Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped...
    10.1.1.1                200       1174       1768       0       0     1:19:24 8/8/8/0              0/0/0/0
    163.44.12.2           65535       1388       1377       0       0    10:17:58 2/2/2/0              0/0/0/0
    163.44.45.2           65535       1387       1378       0       0    10:18:06 3/3/3/0              0/0/0/0
    
    [edit]
    root@SRX2#
    
    
    root@SRX2# run show route protocol bgp
    
    inet.0: 21 destinations, 23 routes (21 active, 0 holddown, 0 hidden)
    + = Active Route, - = Last Active, * = Both
    
    137.22.111.0/26    *[BGP/170] 00:53:18, localpref 100
                          AS path: 65535 I
                        > to 163.44.45.2 via em3.0
    166.16.173.0/24    *[BGP/170] 01:20:06, MED 0, localpref 100
                          AS path: I
                        > to 10.1.1.1 via em2.0
    166.166.166.0/24   *[BGP/170] 01:20:06, MED 0, localpref 100
                          AS path: I
                        > to 10.1.1.1 via em2.0
    166.166.167.0/24   *[BGP/170] 01:20:06, MED 0, localpref 100
                          AS path: I
                        > to 10.1.1.1 via em2.0
    166.166.168.0/24   *[BGP/170] 01:20:06, MED 0, localpref 100
                          AS path: I
                        > to 10.1.1.1 via em2.0
    166.166.169.0/24   *[BGP/170] 01:20:06, MED 0, localpref 100
                          AS path: I
                        > to 10.1.1.1 via em2.0
    166.166.170.0/24   *[BGP/170] 01:20:06, MED 0, localpref 100
                          AS path: I
                        > to 10.1.1.1 via em2.0
    166.166.171.0/24   *[BGP/170] 01:20:06, MED 0, localpref 100
                          AS path: I
                        > to 10.1.1.1 via em2.0
    166.166.172.0/24   *[BGP/170] 01:20:06, MED 0, localpref 100
                          AS path: I
                        > to 10.1.1.1 via em2.0
    172.24.0.0/24      *[BGP/170] 10:18:48, localpref 100, from 163.44.45.2
                          AS path: 65535 I
                        > to 163.44.12.2 via em0.0
                          to 163.44.45.2 via em3.0
                        [BGP/170] 10:18:40, localpref 100
                          AS path: 65535 I
                        > to 163.44.12.2 via em0.0
    172.24.1.0/24      *[BGP/170] 10:18:48, localpref 100
                          AS path: 65535 I
                          to 163.44.12.2 via em0.0
                        > to 163.44.45.2 via em3.0
                        [BGP/170] 10:18:40, localpref 100
                          AS path: 65535 I
                        > to 163.44.12.2 via em0.0
    
    [edit]
    root@SRX2#
    
    
    root@SRX2# run show route advertising-protocol bgp 163.44.45.2
    
    inet.0: 21 destinations, 23 routes (21 active, 0 holddown, 0 hidden)
      Prefix                  Nexthop              MED     Lclpref    AS path
    * 137.22.111.0/26         163.44.45.2                             65535 I
    * 166.16.173.0/24         Self                                    I
    * 166.166.166.0/24        Self                                    I
    * 166.166.167.0/24        Self                                    I
    * 166.166.168.0/24        Self                                    I
    * 166.166.169.0/24        Self                                    I
    * 166.166.170.0/24        Self                                    I
    * 166.166.171.0/24        Self                                    I
    * 166.166.172.0/24        Self                                    I
    * 172.24.0.0/24           163.44.45.2                             65535 I
    * 172.24.1.0/24           163.44.45.2                             65535 I
    
    [edit]
    root@SRX2# run show route advertising-protocol bgp 163.44.12.2
    
    inet.0: 21 destinations, 23 routes (21 active, 0 holddown, 0 hidden)
      Prefix                  Nexthop              MED     Lclpref    AS path
    * 137.22.111.0/26         Self                                    65535 I
    * 166.16.173.0/24         Self                                    I
    * 166.166.166.0/24        Self                                    I
    * 166.166.167.0/24        Self                                    I
    * 166.166.168.0/24        Self                                    I
    * 166.166.169.0/24        Self                                    I
    * 166.166.170.0/24        Self                                    I
    * 166.166.171.0/24        Self                                    I
    * 166.166.172.0/24        Self                                    I
    * 172.24.0.0/24           Self                                    65535 I
    * 172.24.1.0/24           Self                                    65535 I
    
    [edit]
    root@SRX2#
    

     

    JR3 Output:
    
    root@SRX3# show protocols bgp group EBGP_200
    type external;
    import ALLOW_IN;
    export ADV_BGP;
    peer-as 200;
    local-as 65535;
    neighbor 163.44.12.1;
    
    [edit]
    root@SRX3#
    
    
    root@SRX3# run show bgp summary
    Groups: 2 Peers: 2 Down peers: 1
    Table          Tot Paths  Act Paths Suppressed    History Damp State    Pending
    inet.0                 8          8          0          0          0          0
    Peer                     AS      InPkt     OutPkt    OutQ   Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped...
    162.32.17.1           65535          0          0       0       0    10:26:16 Active
    163.44.12.1             200       1386       1398       0       0    10:26:11 8/8/8/0              0/0/0/0
    
    [edit]
    root@SRX3#
    
    
    root@SRX3# run show route protocol bgp
    
    inet.0: 19 destinations, 20 routes (19 active, 0 holddown, 0 hidden)
    + = Active Route, - = Last Active, * = Both
    
    166.16.173.0/24    *[BGP/170] 01:24:38, localpref 100
                          AS path: 200 I
                        > to 163.44.12.1 via em0.0
    166.166.166.0/24   *[BGP/170] 01:24:38, localpref 100
                          AS path: 200 I
                        > to 163.44.12.1 via em0.0
    166.166.167.0/24   *[BGP/170] 01:24:38, localpref 100
                          AS path: 200 I
                        > to 163.44.12.1 via em0.0
    166.166.168.0/24   *[BGP/170] 01:24:38, localpref 100
                          AS path: 200 I
                        > to 163.44.12.1 via em0.0
    166.166.169.0/24   *[BGP/170] 01:24:38, localpref 100
                          AS path: 200 I
                        > to 163.44.12.1 via em0.0
    166.166.170.0/24   *[BGP/170] 01:24:38, localpref 100
                          AS path: 200 I
                        > to 163.44.12.1 via em0.0
    166.166.171.0/24   *[BGP/170] 01:24:38, localpref 100
                          AS path: 200 I
                        > to 163.44.12.1 via em0.0
    166.166.172.0/24   *[BGP/170] 01:24:38, localpref 100
                          AS path: 200 I
                        > to 163.44.12.1 via em0.0
    
    [edit]
    root@SRX3#

    root@SRX3# run show route receive-protocol bgp 163.44.12.1

    inet.0: 19 destinations, 20 routes (19 active, 0 holddown, 0 hidden)
    Prefix Nexthop MED Lclpref AS path
    * 166.16.173.0/24 163.44.12.1 200 I
    * 166.166.166.0/24 163.44.12.1 200 I
    * 166.166.167.0/24 163.44.12.1 200 I
    * 166.166.168.0/24 163.44.12.1 200 I
    * 166.166.169.0/24 163.44.12.1 200 I
    * 166.166.170.0/24 163.44.12.1 200 I
    * 166.166.171.0/24 163.44.12.1 200 I
    * 166.166.172.0/24 163.44.12.1 200 I

    [edit]
    root@SRX3#

     

     

     

     

    JR7 Output:
    
    root@R7# show protocols bgp group EBGP_200
    type external;
    export ADV_BGP;
    peer-as 200;
    local-as 65535;
    neighbor 163.44.45.1;
    
    [edit]
    root@R7#
    
    
    root@R7# show policy-options policy-statement ADV_BGP
    term 1 {
        from {
            route-filter 172.24.0.0/24 exact;
            route-filter 172.24.1.0/24 exact;
            route-filter 137.22.111.0/26 exact;
        }
        then accept;
    }
    
    [edit]
    root@R7#
    
    
    
    

     

     

     

     

    Network_Diagram.GIF

     

     


    #BGP
    #ebgp
    #routing


  • 2.  RE: advertise-peer-as command not working as expected

    Posted 09-10-2014 07:12

    Hi,

     

     

    Your prefix 137.22.111.0/26 is being correctly advertised by JR2 to JR3 as you proved with the command show route advertising-protocol bgp 163.44.45.2 on JR2.

    But later when JR3 receives this prefix it will discard it because of the AS path loop. On JR3 you need to configure set routing-options autonomous-system 65535 loops 2 to allow JR3 to see its own AS in the AS Path.

     

     

    Also avoid using local-as in your BGP configuration. You don't need it.

     

     

     

     

     

    --
    If this post solves your problem, please mark this post as "Accepted Solution".
    Kudos are appreciated



  • 3.  RE: advertise-peer-as command not working as expected

    Posted 09-10-2014 07:39

    Pantunes,

     

         You suggestion fixed the issue. However, I thought I didn't require that command since on JR2 I have "advertise-peer-as" command configured? Also regarding the "local-as" option I have that configured because JR2 also has other AS configured on it.  Thank you

     

     

     

    Surya,

     

        You suggestion also works. But I have the same question as above I thought I wouldn't need that command if I had "advertise-peer-as" command configured.  Thank you 



  • 4.  RE: advertise-peer-as command not working as expected

     
    Posted 09-10-2014 07:45

    Victor,

     

    "advertise-peer-as" is local to the router where it is configured and doesn't alter the default behaviour on BGP peer.

    Hence we would need to tweak the connected BGP peer as well in order to get this going.

     

    Regards

    Surya



  • 5.  RE: advertise-peer-as command not working as expected

    Posted 09-10-2014 08:03

    I understand. Thank you both your help



  • 6.  RE: advertise-peer-as command not working as expected

    Posted 09-10-2014 08:34

    Also if you configure as-override you don't need advertise-peer-as.



  • 7.  RE: advertise-peer-as command not working as expected
    Best Answer

     
    Posted 09-10-2014 07:19

    Hi Victor,

     

    This is expected behaviour by JR3 to prevent "loop" with in the AS. However to override the default behviour you would need to configure "as-override" in JR3

     

     

    http://www.juniper.net/techpubs/en_US/junos14.1/topics/reference/configuration-statement/as-override-edit-protocols-bgp.html

     

    ======

    Enabling the AS override feature allows routes originating from an AS to be accepted by a router residing in the same AS. Without AS override enabled, the routing device refuses the route advertisement once the AS path shows that the route originated from its own AS. This is done by default to prevent route loops. The as-override statement overrides this default behavior.

    ======

     

    Regards

    Surya