Hi,
I was configuring the prefix-mapping for two different LSPs as in chapter two of the JNCIE book.
LSPs are between r7 and r3, called r7-r3 and r7-r3-prime.
R3 sends 130.130/16 routes into the AS via BGP. Idea is to map different prefix lengths to different LSPs.
So far, so good.
When I configure r3, r4 and r5 as RR, the solution as such does not work any more, as the policy matches on BGP neighbor. So r6 and r7 are clients to r5.
So below my take on it, where I was matching on neighbor. Unfortunately it does not work. Which field must I match in the policy to get the routes that originally came from r3?
TIA
lab@lab-1# show policy-options policy-statement lsp-map
term 10 {
from {
protocol bgp;
next-hop 10.0.3.3;
route-filter 0.0.0.0/0 prefix-length-range /0-/19;
}
then {
install-nexthop lsp r7-r3;
accept;
}
}
term 20 {
from {
protocol bgp;
next-hop 10.0.3.3;
route-filter 0.0.0.0/0 prefix-length-range /20-/32;
}
then {
install-nexthop lsp r7-r3-prime;
accept;
}
}
[edit logical-systems r7]
lab@lab-1# show protocols mpls
label-switched-path r7-r1 {
to 10.0.6.1;
ldp-tunneling;
install 10.0.5.10/32;
no-cspf;
}
label-switched-path r7-r3 {
to 10.0.3.3;
}
label-switched-path r7-r3-prime {
to 10.0.3.3;
}
interface all;
interface fxp0.0 {
disable;
}
[edit logical-systems r7]
lab@lab-1# show routing-options
aggregate {
route 10.0.0.0/16 discard;
}
autonomous-system 65412;
forwarding-table {
export lsp-map;
}
[edit logical-systems r7]
lab@lab-1# run show route logical-system r7 next-hop 10.0.3.3
inet.0: 62 destinations, 67 routes (62 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
3.0.0.0/8 *[BGP/170] 00:09:32, localpref 100, from 10.0.3.5
AS path: 65222 I
> to 10.0.2.18 via fe-0/0/9.0, label-switched-path r7-r3
to 10.0.8.9 via fe-0/0/4.0, label-switched-path r7-r3-prime
10.0.0.0/16 [BGP/170] 00:09:32, localpref 100, from 10.0.3.5
AS path: I
> to 10.0.2.18 via fe-0/0/9.0, label-switched-path r7-r3
to 10.0.8.9 via fe-0/0/4.0, label-switched-path r7-r3-prime
130.130.0.0/24 *[BGP/170] 00:09:32, localpref 100, from 10.0.3.5
AS path: 65222 I
> to 10.0.2.18 via fe-0/0/9.0, label-switched-path r7-r3
to 10.0.8.9 via fe-0/0/4.0, label-switched-path r7-r3-prime
130.130.1.0/24 *[BGP/170] 00:09:32, localpref 100, from 10.0.3.5
AS path: 65222 I
> to 10.0.2.18 via fe-0/0/9.0, label-switched-path r7-r3
to 10.0.8.9 via fe-0/0/4.0, label-switched-path r7-r3-prime
130.130.2.0/24 *[BGP/170] 00:09:32, localpref 100, from 10.0.3.5
AS path: 65222 I
> to 10.0.2.18 via fe-0/0/9.0, label-switched-path r7-r3
to 10.0.8.9 via fe-0/0/4.0, label-switched-path r7-r3-prime
130.130.3.0/24 *[BGP/170] 00:09:32, localpref 100, from 10.0.3.5
AS path: 65222 I
> to 10.0.2.18 via fe-0/0/9.0, label-switched-path r7-r3
to 10.0.8.9 via fe-0/0/4.0, label-switched-path r7-r3-prime
130.130.4.0/24 *[BGP/170] 00:09:32, localpref 100, from 10.0.3.5
AS path: 65222 I
> to 10.0.2.18 via fe-0/0/9.0, label-switched-path r7-r3
to 10.0.8.9 via fe-0/0/4.0, label-switched-path r7-r3-prime
130.130.5.0/24 *[BGP/170] 00:09:32, localpref 100, from 10.0.3.5
AS path: 65222 I
> to 10.0.2.18 via fe-0/0/9.0, label-switched-path r7-r3
to 10.0.8.9 via fe-0/0/4.0, label-switched-path r7-r3-prime
130.130.6.0/24 *[BGP/170] 00:09:32, localpref 100, from 10.0.3.5
AS path: 65222 I
> to 10.0.2.18 via fe-0/0/9.0, label-switched-path r7-r3
to 10.0.8.9 via fe-0/0/4.0, label-switched-path r7-r3-prime
130.130.7.0/24 *[BGP/170] 00:09:32, localpref 100, from 10.0.3.5
AS path: 65222 I
> to 10.0.2.18 via fe-0/0/9.0, label-switched-path r7-r3
to 10.0.8.9 via fe-0/0/4.0, label-switched-path r7-r3-prime
inet.3: 7 destinations, 8 routes (3 active, 0 holddown, 5 hidden)
mpls.0: 3 destinations, 3 routes (3 active, 0 holddown, 0 hidden)
[edit logical-systems r7]
lab@lab-1# run show route logical-system r7 next-hop 10.0.3.3 3/8
inet.0: 62 destinations, 67 routes (62 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
3.0.0.0/8 *[BGP/170] 00:09:38, localpref 100, from 10.0.3.5
AS path: 65222 I
> to 10.0.2.18 via fe-0/0/9.0, label-switched-path r7-r3
to 10.0.8.9 via fe-0/0/4.0, label-switched-path r7-r3-prime
[edit logical-systems r7]
lab@lab-1# run show route logical-system r7 next-hop 10.0.3.3 3/8 detail
inet.0: 62 destinations, 67 routes (62 active, 0 holddown, 0 hidden)
3.0.0.0/8 (1 entry, 1 announced)
*BGP Preference: 170/-101
Next hop type: Indirect
Next-hop reference count: 28
Source: 10.0.3.5
Next hop type: Router, Next hop index: 262153
Next hop: 10.0.2.18 via fe-0/0/9.0 weight 0x1, selected
Label-switched-path r7-r3
Label operation: Push 299872
Next hop: 10.0.8.9 via fe-0/0/4.0 weight 0x1
Label-switched-path r7-r3-prime
Label operation: Push 100048
Protocol next hop: 10.0.3.3
Indirect next hop: 8d2b140 262147
State: <Active Int Ext>
Local AS: 65412 Peer AS: 65412
Age: 9:41 Metric2: 2
Task: BGP_65412.10.0.3.5+4602
Announcement bits (2): 3-KRT 6-Resolve tree 1
AS path: 65222 I (Originator) Cluster list: 10.0.3.5
AS path: Originator ID: 10.0.3.3
Communities: 65412:100
Accepted
Localpref: 100
Router ID: 10.0.3.5
[edit logical-systems r7]
lab@lab-1#