R1 R4
[64501] [64503]
(192.0.2.1/32) (192.0.2.4/32)
| |
| eBGP iBGP |
(local-as 65551 private |
no-prepend-global-as) |
+-------------+ +-------------+
| |
|___ ____|
___ R3____
(192.0.2.3/32)
| [64503] |
| |
| |
+-------------+ +-------------+
| |
| eBGP iBGP |
| |
(192.0.2.2/32) (192.0.2.5/32)
R2 R5
[64502] [64503]
The following five example scenarios cover all the cases where local AS private no-prepend-global-as configuration on an eBGP setup impacts the AS path.
Please note that “*” in below examples marks the neighbor on which R3 (DUT) has the local-as configuration applied.
Example 1: Route propagation from eBGP* (R1) to eBGP (R2)
This example describes the propagation of routes learned via eBGP from R1 to the eBGP peer R2, where R3 applies a local AS private no-prepend-global-as on its eBGP session with R1. R1 advertises its loopback address 192.0.2.1/32 to R3, which then re-advertises the prefix to R2.
AS path of prefix 192.0.2.1/32 in the routing table inet.0 on R3:
RE3# run show route 192.0.2.1
inet.0: 20 destinations, 20 routes (20 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
192.0.2.1/32 *[BGP/170] 00:06:12, localpref 100
AS path: 64501 I, validation-state: unverified
> to 198.51.100.1 via ge-0/0/0.0
AS path of prefix 192.0.2.1/32 in the show route advertising-protocol output on R3:
RE3# run show route advertising-protocol bgp 198.51.100.5 192.0.2.1 detail
inet.0: 20 destinations, 20 routes (20 active, 0 holddown, 0 hidden)
* 192.0.2.1/32 (1 entry, 1 announced)
BGP group r2 type External
Nexthop: Self
AS path: [64503] 64501 I
AS path of prefix 192.0.2.1/32 in the BGP UPDATE message sent to R2:
BGP SEND 198.51.100.6+179 -> 198.51.100.5+64799
BGP SEND message type 2 (Update) length 52
BGP SEND Update PDU length 52
BGP SEND flags 0x40 code Origin(1): IGP, length(1)
BGP SEND flags 0x40 code ASPath(2) (4-byte-cap) length 10: 64503 64501
BGP SEND flags 0x40 code NextHop(3): 198.51.100.6 length(4)
End-of-Attributes
BGP SEND 192.0.2.1/32
Example 2: Route propagation from eBGP* (R1) to iBGP (R4)
This example describes the propagation of routes learned via eBGP from R1 to the iBGP peer R4, where R3 applies a local AS private no-prepend-global-as on its eBGP session with R1. R1 advertises its loopback address 192.0.2.1/32 to R3, which then re-advertises the prefix to R4.
AS path of prefix 192.0.2.1/32 in the routing table inet.0 on R3:
RE3# run show route 192.0.2.1
inet.0: 20 destinations, 20 routes (20 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
192.0.2.1/32 *[BGP/170] 00:06:12, localpref 100
AS path: 64501 I, validation-state: unverified
> to 198.51.100.1 via ge-0/0/0.0
AS path of prefix 192.0.2.1/32 in the show route advertising-protocol output on R3:
RE3# run show route advertising-protocol bgp 203.0.113.1 192.0.2.1 detail
inet.0: 20 destinations, 20 routes (20 active, 0 holddown, 0 hidden)
* 192.0.2.1/32 (1 entry, 1 announced)
BGP group r4 type Internal
Nexthop: Self
Flags: Nexthop Change
Localpref: 100
AS path: [64503] 64501 I
AS path of prefix 192.0.2.1/32 in the BGP UPDATE message sent to R4:
BGP SEND 203.0.113.2+179 -> 203.0.113.1+55678
BGP SEND message type 2 (Update) length 55
BGP SEND Update PDU length 55
BGP SEND flags 0x40 code Origin(1): IGP, length(1)
BGP SEND flags 0x40 code ASPath(2) (4-byte-cap) length 6: 64501
BGP SEND flags 0x40 code NextHop(3): 203.0.113.2 length(4)
BGP SEND flags 0x40 code LocalPref(5): 100 length(4)
End-of-Attributes
BGP SEND 192.0.2.1/32
Example 3: Route propagation from DUT (R3) to eBGP* (R1)
This example examines the AS path of a direct/static route advertised to an eBGP peer. R3 advertises its loopback address 192.0.2.3/32 to R1.
AS path of prefix 192.0.2.3/32 in the routing table inet.0 on R3:
RE3# run show route 192.0.2.3 detail
inet.0: 20 destinations, 20 routes (20 active, 0 holddown, 0 hidden)
192.0.2.3/32 (1 entry, 1 announced)
*Direct Preference: 0
Next hop type: Interface, Next hop index: 0
Address: 0x825c294
Next-hop reference count: 1
Kernel Table Id: 0
Next hop: via lo0.0, selected
State: <Active Int>
Local AS: 64503
Age: 17:35
Validation State: unverified
Task: IF
Announcement bits (1): 3-Resolve tree 1
AS path: I
Thread: junos-main
The AS path of prefix 192.0.2.3/32 as shown in the output of the show route advertising-protocol command on R3:
RE3# run show route advertising-protocol bgp 198.51.100.1 192.0.2.3 detail
inet.0: 20 destinations, 20 routes (20 active, 0 holddown, 0 hidden)
* 192.0.2.3/32 (1 entry, 1 announced)
BGP group r1 type External
Nexthop: Self
AS path: [65551] I
The example above includes square brackets to indicate the AS number being prepended to the AS path before advertisement
AS path of prefix 192.0.2.1/32 in the BGP UPDATE message sent to R1:
BGP SEND 198.51.100.2+64091 -> 198.51.100.1+179
BGP SEND message type 2 (Update) length 48
BGP SEND Update PDU length 48
BGP SEND flags 0x40 code Origin(1): IGP, length(1)
BGP SEND flags 0x40 code ASPath(2) (4-byte-cap) length 6: 65551
BGP SEND flags 0x40 code NextHop(3): 198.51.100.2 length(4)
End-of-Attributes
BGP SEND 192.0.2.3/32
Example 4: Route propagation from eBGP (R2) to eBGP* (R1)
This example describes the propagation of routes learned via eBGP from R2 to the eBGP peer R1, where R3 applies a local AS private no-prepend-global-as on its eBGP session with R1. R2 advertises its loopback address 192.0.2.2/32 to R3, which then re-advertises the prefix to R1.
AS path of prefix 192.0.2.2/32 in the routing table inet.0 on R3:
RE3# run show route 192.0.2.2
inet.0: 20 destinations, 20 routes (20 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
192.0.2.2/32 *[BGP/170] 00:00:41, localpref 100
AS path: 64502 I, validation-state: unverified
> to 198.51.100.5 via ge-0/0/2.0
AS path of prefix 192.0.2.2/32 in the show route advertising-protocol output on R3:
RE3# run show route advertising-protocol bgp 198.51.100.1 192.0.2.2 detail
inet.0: 20 destinations, 20 routes (20 active, 0 holddown, 0 hidden)
* 192.0.2.2/32 (1 entry, 1 announced)
BGP group r1 type External
Nexthop: Self
AS path: 64502 I
AS path of prefix 192.0.2.2/32 in the BGP UPDATE message sent to R1:
BGP SEND 198.51.100.2+65526 -> 198.51.100.1+179
BGP SEND message type 2 (Update) length 52
BGP SEND Update PDU length 52
BGP SEND flags 0x40 code Origin(1): IGP, length(1)
BGP SEND flags 0x40 code ASPath(2) (4-byte-cap) length 10: 65551 64502
BGP SEND flags 0x40 code NextHop(3): 198.51.100.2 length(4)
End-of-Attributes
BGP SEND 192.0.2.2/32
Example 5: Route propagation from iBGP (R4) to eBGP* (R1)
This example describes the propagation of routes learned via iBGP from R4 to the eBGP peer R1, where R3 applies a local AS default on its eBGP session with R1. R4 advertises its loopback address 192.0.2.4/32 to R3, which then re-advertises the prefix to R1.
AS path of prefix 192.0.2.4/32 in the routing table inet.0 on R3:
RE3# run show route 192.0.2.4
inet.0: 20 destinations, 20 routes (20 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
192.0.2.4/32 *[BGP/170] 00:11:08, localpref 100
AS path: I, validation-state: unverified
> to 203.0.113.1 via ge-0/0/4.0
AS path of prefix 192.0.2.4/32 in the show route advertising-protocol output on R3:
RE3# run show route advertising-protocol bgp 198.51.100.1 192.0.2.4 detail
inet.0: 20 destinations, 20 routes (20 active, 0 holddown, 0 hidden)
* 192.0.2.4/32 (1 entry, 1 announced)
BGP group r1 type External
Nexthop: Self
AS path: I
AS path of prefix 192.0.2.4/32 in the BGP UPDATE message sent to R1:
BGP SEND 198.51.100.2+54678 -> 198.51.100.1+179
BGP SEND message type 2 (Update) length 48
BGP SEND Update PDU length 48
BGP SEND flags 0x40 code Origin(1): IGP, length(1)
BGP SEND flags 0x40 code ASPath(2) (4-byte-cap) length 6: 65551
BGP SEND flags 0x40 code NextHop(3): 198.51.100.2 length(4)
End-of-Attributes
BGP SEND 192.0.2.4/32
Private No-Prepend-Global-AS local AS Option Behavior for an eBGP Peer
Route Direction (S -> DUT -> D) |
As Path Local RIB |
AS Path (show adv to "D") |
UPDATE MESSAGE to "D" |
ASPATH_PREPEND by DUT |
| R1 -> R3 -> R2 |
64501 I |
[64503] 64501 I |
64503 64501 I |
Global-as |
| R1 -> R3 -> R4 |
64501 I |
[64503] 64501 I |
64501 I |
|
| R3 -> R1 |
I |
[65551] I |
65551 I |
Local-as |
| R2 -> R3 -> R1 |
64502 I |
64502 I |
65551 64502 I |
Local-as |
| R4 -> R3 -> R1 |
I |
I |
65551 I |
Local-as |
Configuration: Local AS configured towards iBGP peer (R4)
R1 R4
[64501] [64503]
(192.0.2.1/32) (192.0.2.4/32)
| |
| eBGP iBGP |
| (local-as 65551 private no-prepend-global-as)
+-------------+ +-------------+
| |
|___ ____|
___ R3____
(192.0.2.3/32)
| [64503] |
| |
| |
+-------------+ +-------------+
| |
| eBGP iBGP |
| |
(192.0.2.2/32) (192.0.2.5/32)
R2 R5
[64502] [64503]
The following five example scenarios cover all the cases where local AS private no-prepend-global-as configuration on an iBGP setup impacts the AS path.
Example 1: Route propagation from iBGP* (R4) to eBGP (R1)
This example describes the propagation of routes learned via iBGP from R4 to the eBGP peer R1, where R3 applies a local AS default on its iBGP session with R4. R4 advertises its loopback address 192.0.2.4/32 to R3, which then re-advertises the prefix to R1.
AS path of prefix 192.0.2.4/32 in the routing table inet.0 on R3:
RE3# run show route 192.0.2.4
inet.0: 20 destinations, 20 routes (20 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
192.0.2.4/32 *[BGP/170] 00:09:12, localpref 100
AS path: I, validation-state: unverified
> to 203.0.113.1 via ge-0/0/4.0
AS path of prefix 192.0.2.4/32 in the show route advertising-protocol output on R3:
RE3# run show route advertising-protocol bgp 198.51.100.1 192.0.2.4 detail
inet.0: 20 destinations, 20 routes (20 active, 0 holddown, 0 hidden)
* 192.0.2.4/32 (1 entry, 1 announced)
BGP group r1 type External
Nexthop: Self
AS path: [64503] I
AS path of prefix 192.0.2.4/32 as seen in the BGP UPDATE message sent to R1:
BGP SEND 198.51.100.2+179 -> 198.51.100.1+54118
BGP SEND message type 2 (Update) length 53
BGP SEND Update PDU length 53
BGP SEND flags 0x40 code Origin(1): IGP, length(1)
BGP SEND flags 0x40 code ASPath(2) (4-byte-cap) length 6: 64503
BGP SEND flags 0x40 code NextHop(3): 198.51.100.2 length(4)
End-of-Attributes
BGP SEND 192.0.2.4/32
Example 2: Route propagation from iBGP* (R4) to iBGP (R5)
This example describes the propagation of routes learned via iBGP from R4 to the iBGP peer R5, where R3 applies a local AS private no-prepend-global-as on its iBGP session with R4. R4 advertises its loopback address 192.0.2.4/32 to R3, which then re-advertises the prefix to R5.
AS path of prefix 192.0.2.4/32 in the routing table inet.0 on R3:
RE3# run show route 192.0.2.4
inet.0: 20 destinations, 20 routes (20 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
192.0.2.4/32 *[BGP/170] 00:09:12, localpref 100
AS path: I, validation-state: unverified
> to 203.0.113.1 via ge-0/0/4.0
AS path of prefix 192.0.2.4/32 in the show route advertising-protocol output on R3:
RE3# run show route advertising-protocol bgp 203.0.113.5 192.0.2.4 detail
inet.0: 20 destinations, 20 routes (20 active, 0 holddown, 0 hidden)
* 192.0.2.4/32 (1 entry, 1 announced)
BGP group r5 type Internal
Nexthop: Self
Flags: Nexthop Change
Localpref: 100
AS path: [64503] I
Cluster ID: 192.0.2.3
Originator ID: 192.0.2.4
AS path of prefix as seen in the BGP UPDATE message sent to R5:
BGP SEND 203.0.113.6+179 -> 203.0.113.5+50904
BGP SEND message type 2 (Update) length 63
BGP SEND Update PDU length 63
BGP SEND flags 0x40 code Origin(1): IGP, length(1)
BGP SEND flags 0x40 code ASPath(2) (4-byte-cap) length 0: <null>
BGP SEND flags 0x40 code NextHop(3): 203.0.113.6 length(4)
BGP SEND flags 0x40 code LocalPref(5): 100 length(4)
BGP SEND flags 0x80 code Originator_Id(9) 192.0.2.4 length(4)
BGP SEND flags 0x80 code Cluster_List(10): length(4) 192.0.2.3
End-of-Attributes
BGP SEND 192.0.2.4/32
Example 3: Route propagation from DUT (R3) to iBGP* (R4)
This example examines the AS path of a direct/static route advertised to an iBGP peer. R3 advertises its loopback address 192.0.2.3/32 to R4.
AS path of prefix 192.0.2.3/32 in the routing table inet.0 on R3:
RE3# run show route 192.0.2.3 detail
inet.0: 20 destinations, 20 routes (20 active, 0 holddown, 0 hidden)
192.0.2.3/32 (1 entry, 1 announced)
*Direct Preference: 0
Next hop type: Interface, Next hop index: 0
Address: 0x825e394
Next-hop reference count: 1
Kernel Table Id: 0
Next hop: via lo0.0, selected
State: <Active Int>
Local AS: 64503
Age: 2:34:38
Validation State: unverified
Task: IF
Announcement bits (1): 3-Resolve tree 1
AS path: I
Thread: junos-main
AS path of prefix 192.0.2.3/32 in the show route advertising-protocol output on R3:
RE3# run show route advertising-protocol bgp 203.0.113.1 192.0.2.3 detail
inet.0: 20 destinations, 20 routes (20 active, 0 holddown, 0 hidden)
* 192.0.2.3/32 (1 entry, 1 announced)
BGP group r4 type Internal
Nexthop: Self
Localpref: 100
AS path: [65551] I
AS path of prefix 192.0.2.3/32 as seen in the BGP UPDATE message sent to R4:
BGP SEND 203.0.113.2+179 -> 203.0.113.1+53190
BGP SEND message type 2 (Update) length 49
BGP SEND Update PDU length 49
BGP SEND flags 0x40 code Origin(1): IGP, length(1)
BGP SEND flags 0x40 code ASPath(2) (4-byte-cap) length 0: <null>
BGP SEND flags 0x40 code NextHop(3): 203.0.113.2 length(4)
BGP SEND flags 0x40 code LocalPref(5): 100 length(4)
End-of-Attributes
BGP SEND 192.0.2.3/32
Example 4: Route propagation from eBGP (R1) to iBGP* (R4)
This example describes the propagation of routes learned via eBGP from R1 to the iBGP peer R4, where R3 applies a local AS default on its iBGP session with R4. R1 advertises its loopback address 192.0.2.1/32 to R3, which then re-advertises the prefix to R4.
AS path of prefix 192.0.2.1/32 in the routing table inet.0 on R3:
RE3# run show route 192.0.2.1
inet.0: 20 destinations, 20 routes (20 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
192.0.2.1/32 *[BGP/170] 00:00:58, localpref 100
AS path: 64501 I, validation-state: unverified
> to 198.51.100.1 via ge-0/0/0.0
AS path of prefix 192.0.2.1/32 in the show route advertising-protocol output on R3:
RE3# run show route advertising-protocol bgp 203.0.113.1 192.0.2.1 detail
inet.0: 20 destinations, 20 routes (20 active, 0 holddown, 0 hidden)
* 192.0.2.1/32 (1 entry, 1 announced)
BGP group r4 type Internal
Nexthop: Self
Flags: Nexthop Change
Localpref: 100
AS path: 64501 I
AS path of prefix 192.0.2.1/32 as seen in the BGP UPDATE message sent to R4:
BGP SEND 203.0.113.2+179 -> 203.0.113.1+49601
BGP SEND message type 2 (Update) length 55
BGP SEND Update PDU length 55
BGP SEND flags 0x40 code Origin(1): IGP, length(1)
BGP SEND flags 0x40 code ASPath(2) (4-byte-cap) length 6: 64501
BGP SEND flags 0x40 code NextHop(3): 203.0.113.2 length(4)
BGP SEND flags 0x40 code LocalPref(5): 100 length(4)
End-of-Attributes
BGP SEND 192.0.2.1/32
Example 5: Route propagation from iBGP (R5) to iBGP* (R4)
This example describes the propagation of routes learned via iBGP from R5 to the iBGP peer R4, where R3 applies a local AS private no-prepend-global-as on its iBGP session with R4. R5 advertises its loopback address 192.0.2.5/32 to R3, which then re-advertises the prefix to R4.
AS path of prefix 192.0.2.5/32 in the routing table inet.0 on R3:
RE3# run show route 192.0.2.5
inet.0: 20 destinations, 20 routes (20 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
192.0.2.5/32 *[BGP/170] 00:00:44, localpref 100
AS path: I, validation-state: unverified
> to 203.0.113.5 via ge-0/0/6.0
AS path of prefix 192.0.2.5/32 in the show route advertising-protocol output on R3:
RE3# run show route advertising-protocol bgp 203.0.113.1 192.0.2.5 detail
inet.0: 20 destinations, 20 routes (20 active, 0 holddown, 0 hidden)
* 192.0.2.5/32 (1 entry, 1 announced)
BGP group r4 type Internal
Nexthop: Self
Flags: Nexthop Change
Localpref: 100
AS path: I
Cluster ID: 192.0.2.3
Originator ID: 192.0.2.5
AS path of prefix 192.0.2.5/32 as seen in the BGP UDPATE message sent to R4:
BGP SEND 203.0.113.2+179 -> 203.0.113.1+49764
BGP SEND message type 2 (Update) length 63
BGP SEND Update PDU length 63
BGP SEND flags 0x40 code Origin(1): IGP, length(1)
BGP SEND flags 0x40 code ASPath(2) (4-byte-cap) length 0: <null>
BGP SEND flags 0x40 code NextHop(3): 203.0.113.2 length(4)
BGP SEND flags 0x40 code LocalPref(5): 100 length(4)
BGP SEND flags 0x80 code Originator_Id(9) 192.0.2.5 length(4)
BGP SEND flags 0x80 code Cluster_List(10): length(4) 192.0.2.3
End-of-Attributes
BGP SEND 192.0.2.5/32
Private No-Prepend-Global-AS local AS Option Behavior for an iBGP Peer
Route Direction (S -> DUT -> D) |
As Path Local RIB |
AS Path (show adv to "D") |
UPDATE MESSAGE to "D" |
ASPATH_PREPEND by DUT |
| R4 -> R3 -> R1 |
I |
[64503] I |
64503 I |
Global-as |
| R4 -> R3 -> R5 |
I |
[64503] I |
<null> |
|
| R3 -> R4 |
I |
[65551] I |
<null> |
|
| R1 -> R3 -> R4 |
64501 I |
64501 I |
64501 I |
|
| R5 -> R3 -> R4 |
I |
I |
<null> |
|
Conclusion
This article covered the details of Private No-prepend-global-AS Local AS option, please check the articles in the section below for the other options.
Useful links
Local-AS options articles:
Glossary
- AS(N): Autonomous System (Number)
- BGP: Border Gateway Protocol
- DUT: Device Under Test
- ISP: Internet Service Provider
- RIB: Routing Information Base