Description

PE1 configured with a vrf named TEST. The vrf TEST is configured with an AS number (64512). 

PE2 configured with a vrf named TEST11. The vrf TEST11 is configured with the same AS number(64512) . 

CE1 established ebgp neighbor with PE1, PE1 established ibgp neighbor with PE2


PE1's vrf receives routes from ebgp peer CE1, and advertise these routes using mpbgp over ibgp to PE2's vrf.

The behavior is these redistributed routes are sent from PE1 to PE2 with AS 64512 in the AS path, even though it's ibgp peer between PE1 and PE2. Is this a expected behavior?

Symptoms

Topology:

                        VRF-TEST             VRF-TEST11
+---------+        +----------------+      +----------------+       +-------+
| AS64894 +--EBGP--+ Global AS135895+------+ Global AS135895+-------+ AS6564|
|   CE1   |        |     PE1        |      |    PE2         |       |   CE2 |
+---------+        +----------------+      +----------------+       +-------+
lo0:192.168.1.1       TEST.inet.0            TEST11.inet.0              
                       AS 64512    <--IBGP-->   AS 64512

 

           

               

Solution

PE1 will advertise itself vrf TEST's AS number(64512) to IBGP peer (PE2), This is expected behavior. 

Lab verify:

 

labroot@PE1# run show route table TEST.inet.0

 

TEST.inet.0: 5 destinations, 6 routes (5 active, 0 holddown, 0 hidden)

+ = Active Route, - = Last Active, * = Both

 

10.49.160.0/19   *[BGP/170] 1d 15:29:40, localpref 100

           AS path: 64894 I, validation-state: unverified

          > to 172.16.199.1 via ge-0/0/0.0

23.0.0.0/24    *[BGP/170] 1d 15:29:32, localpref 100, from 192.168.218.7

           AS path: I, validation-state: unverified

          > to 12.0.0.2 via ge-0/0/1.0, label-switched-path PE1-PE2

172.16.199.0/24  *[Direct/0] 1d 15:29:43

          > via ge-0/0/0.0

          [BGP/170] 1d 15:29:40, localpref 100

           AS path: 64894 I, validation-state: unverified

          > to 172.16.199.1 via ge-0/0/0.0

172.16.199.2/32  *[Local/0] 1d 15:29:43

            Local via ge-0/0/0.0

192.168.1.1/32   *[BGP/170] 00:01:58, localpref 100

           AS path: 64894 I, validation-state: unverified

          > to 172.16.199.1 via ge-0/0/0.0

 

labroot@PE1# run show route table TEST.inet.0 detail

192.168.1.1/32 (1 entry, 1 announced)

    *BGP  Preference: 170/-101

        Next hop type: Router, Next hop index: 609

        Address: 0xc744d5c

        Next-hop reference count: 5

        Source: 172.16.199.1

        Next hop: 172.16.199.1 via ge-0/0/0.0, selected

        Session Id: 0x14f

        State: <Active Ext>

        Local AS: 64512 Peer AS: 64894

        Age: 2:07

        Validation State: unverified

        Task: BGP_64894_64512.172.16.199.1

        Announcement bits (2): 0-KRT 1-BGP_RT_Background

        AS path: 64894 I

        Accepted

        Localpref: 100

        Router ID: 128.49.180.26

 

labroot@PE1# run show route receive-protocol bgp 172.16.199.1

 

TEST.inet.0: 5 destinations, 6 routes (5 active, 0 holddown, 0 hidden)

 Prefix         Nexthop       MED   Lclpref  AS path

* 10.49.160.0/19     172.16.199.1              64894 I

 172.16.199.0/24     172.16.199.1              64894 I

* 192.168.1.1/32     172.16.199.1              64894 I

 

labroot@PE1# run show route advertising-protocol bgp 192.168.218.7

 

TEST.inet.0: 5 destinations, 6 routes (5 active, 0 holddown, 0 hidden)

 Prefix         Nexthop       MED   Lclpref  AS path

* 10.49.160.0/19     Self             100    64512 64894 I

* 172.16.199.0/24     Self             100    I

* 192.168.1.1/32     Self             100    64512 64894 I

 

Due to PE1 will advertise it's vrf AS number to PE2, so, route will be hidden in PE2.


TEST11.inet.0: 5 destinations, 5 routes (3 active, 0 holddown, 2 hidden)


+ = Active Route, - = Last Active, * = Both


23.0.0.0/24    *[Direct/0] 00:34:23



          > via ge-0/0/2.0



23.0.0.2/32    *[Local/0] 00:34:23



            Local via ge-0/0/2.0



172.16.199.0/24  *[BGP/170] 00:00:03, localpref 100, from 192.168.218.11



           AS path: I, validation-state: unverified



          > to 12.0.0.1 via ge-0/0/1.0, label-switched-path PE2-PE1



bgp.l3vpn.0: 3 destinations, 3 routes (1 active, 0 holddown, 2 hidden)



+ = Active Route, - = Last Active, * = Both



10:3786:172.16.199.0/24



          *[BGP/170] 00:00:03, localpref 100, from 192.168.218.11



           AS path: I, validation-state: unverified



          > to 12.0.0.1 via ge-0/0/1.0, label-switched-path PE2-PE1The solution will be configured


As for how to resolve route hidden issue in PE2 if AS number between two PE must be the same, The following method can be as a reference:
 

Method 1: add knob “loops” in PE2 .  
 

> set routing-instances TEST11 routing-options autonomous-system 64512 loops 2
 

Method 2: add knob "remove-private" in PE1 if both CE1 and CE2's AS number are public AS and acceptable by client.
 

> set protocols bgp group ibgp remove-private
 

Method 3: add knob "independent-domain" in PE1. 
 

> set routing-options autonomous-system 64512 independent-domain

 

https://www.juniper.net/documentation/us/en/software/junos/cli-reference/topics/ref/statement/remove-private-edit-protocols-bgp.html

https://www.juniper.net/documentation/us/en/software/junos/cli-reference/topics/ref/statement/loops-edit-routing-options-autonomous-system.html

https://www.juniper.net/documentation/us/en/software/junos/cli-reference/topics/ref/statement/independent-domain-edit-routing-options.html

https://datatracker.ietf.org/doc/rfc6368/

Modification History

2024-02-21 : Article Created