Options

BGP path selection confusion

densmadensma Member Posts: 40 ■■□□□□□□□□
digging into my EBGP peers from JNCIP topology. OSPF network 192.168/22 which advertised to bgp from R5.
i dont understand why C2 prefered C1 path to 192.168/22 instead of C2-R7 path

here's the output and what does Inactive reason: Active preferred means?


[edit]
root@C2# run show route 192.168/22 exact detail

inet.0: 59 destinations, 96 routes (59 active, 0 holddown, 0 hidden)
192.168.0.0/22 (2 entries, 1 announced)
*BGP Preference: 170/-101
Next hop type: Router, Next hop index: 466
Next-hop reference count: 60
Source: 200.0.0.1
Next hop: 200.0.0.1 via fxp0.0, selected
State: <Active Ext>
Local AS: 65020 Peer AS: 65010
Age: 11:22
Task: BGP_65010.200.0.0.1+179
Announcement bits (2): 0-KRT 2-BGP RT Background
AS path: 65010 65412 I Aggregator: 65412 10.0.3.5
Localpref: 100
Router ID: 200.200.0.1
BGP Preference: 170/-101
Next hop type: Router, Next hop index: 465
Next-hop reference count: 45
Source: 172.16.0.25
Next hop: 172.16.0.25 via fxp1.0, selected
State: <Ext>
Inactive reason: Active preferred
Local AS: 65020 Peer AS: 65413
Age: 6:07
Task: BGP_65413.172.16.0.25+54017
AS path: 65413 65412 I Aggregator: 65412 10.0.3.5
Localpref: 100
Router ID: 10.0.9.7

[edit]
root@C2#

[edit]
root@C2# run traceroute 192.168.1.1 source 201.201.0.1
traceroute to 192.168.1.1 (192.168.1.1) from 201.201.0.1, 30 hops max, 40 byte packets
1 200.0.0.1 (200.0.0.1) 4.542 ms 3.777 ms 2.496 ms
2 172.16.0.5 (172.16.0.5) 5.448 ms 172.16.0.9 (172.16.0.9) 6.501 ms 5.660 ms
3 10.0.2.9 (10.0.2.9) 7.178 ms 9.461 ms 9.415 ms
4 10.0.8.5 (10.0.8.5) 9.900 ms 7.188 ms 7.042 ms
5 192.168.1.1 (192.168.1.1) 12.490 ms 9.139 ms 11.534 ms

[edit]
root@C2#

Comments

  • Options
    AldurAldur Member Posts: 1,460
    densma wrote: »
    [edit]
    root@C2# run show route 192.168/22 exact detail

    inet.0: 59 destinations, 96 routes (59 active, 0 holddown, 0 hidden)
    192.168.0.0/22 (2 entries, 1 announced)
    *BGP Preference: 170/-101
    Next hop type: Router, Next hop index: 466
    Next-hop reference count: 60
    Source: 200.0.0.1
    Next hop: 200.0.0.1 via fxp0.0, selected
    State: <Active Ext>
    Local AS: 65020 Peer AS: 65010
    Age: 11:22
    Task: BGP_65010.200.0.0.1+179
    Announcement bits (2): 0-KRT 2-BGP RT Background
    AS path: 65010 65412 I Aggregator: 65412 10.0.3.5
    Localpref: 100
    Router ID: 200.200.0.1
    BGP Preference: 170/-101
    Next hop type: Router, Next hop index: 465
    Next-hop reference count: 45
    Source: 172.16.0.25
    Next hop: 172.16.0.25 via fxp1.0, selected
    State: <Ext>
    Inactive reason: Active preferred
    Local AS: 65020 Peer AS: 65413
    Age: 6:07
    Task: BGP_65413.172.16.0.25+54017
    AS path: 65413 65412 I Aggregator: 65412 10.0.3.5
    Localpref: 100
    Router ID: 10.0.9.7

    The reason is that the the route advertisement from C1 arrived at C2 first before the route advertisement from R7. But what about the BGP path selection step 9 you say? Where it says that the lowest router ID wins. Sure looks like 10.0.9.7 is lower then 200.0.0.1.

    The key point here is that step 9 isn't used as a tie breaker if the advertisement comes from different AS's. As stated in the following doc.

    BGP Overview - JUNOS Software Interfaces and Routing Configuration Guide

    If you'd like to test this bring down the BGP session between C1 and C2 and the advertisement from R7 should become the active route when both routes are there.

    HTH
    "Bribe is such an ugly word. I prefer extortion. The X makes it sound cool."

    -Bender
  • Options
    densmadensma Member Posts: 40 ■■□□□□□□□□
    yup you right.
    Thanks

    root@C2# run show route 200.0.0.1

    inet.0: 60 destinations, 98 routes (60 active, 0 holddown, 0 hidden)
    + = Active Route, - = Last Active, * = Both

    200.0.0.0/24 *[Direct/0] 5d 08:45:17
    > via fxp0.0

    [edit]
    root@C2# deactivate interfaces fxp0

    [edit]
    root@C2# commit
    commit complete

    [edit]
    root@C2# run show route 192.168/22 exact detail

    inet.0: 57 destinations, 57 routes (57 active, 0 holddown, 0 hidden)
    192.168.0.0/22 (1 entry, 1 announced)
    *BGP Preference: 170/-101
    Next hop type: Router, Next hop index: 465
    Next-hop reference count: 68
    Source: 172.16.0.25
    Next hop: 172.16.0.25 via fxp1.0, selected
    State: <Active Ext>
    Local AS: 65020 Peer AS: 65413
    Age: 53:19
    Task: BGP_65413.172.16.0.25+54017
    Announcement bits (1): 0-KRT
    AS path: 65413 65412 I Aggregator: 65412 10.0.3.5
    Localpref: 100
    Router ID: 10.0.9.7

    [edit]
    root@C2# rollback 1
    load complete

    [edit]
    root@C2# commit
    commit complete

    [edit]

    [edit]
    root@C2# run show bgp summary
    Groups: 1 Peers: 2 Down peers: 1
    Table Tot Paths Act Paths Suppressed History Damp State Pending
    inet.0 34 34 0 0 0 0
    Peer AS InPkt OutPkt OutQ Flaps Last Up/Dwn State|#Active/Received/Damped...
    172.16.0.25 65413 4078 3998 0 1 1d 5:35:42 34/34/0 0/0/0
    200.0.0.1 65010 18991 16973 0 1 49 Active


    [edit]
    root@C2# run show bgp summary
    Groups: 1 Peers: 2 Down peers: 0
    Table Tot Paths Act Paths Suppressed History Damp State Pending
    inet.0 73 35 0 0 0 0
    Peer AS InPkt OutPkt OutQ Flaps Last Up/Dwn State|#Active/Received/Damped...
    172.16.0.25 65413 4079 4001 0 1 1d 5:36:07 24/34/0 0/0/0
    200.0.0.1 65010 19000 16983 0 1 6 11/39/0 0/0/0

    [edit]
    root@C2# run show route 192.168/22 exact detail

    inet.0: 60 destinations, 98 routes (60 active, 0 holddown, 0 hidden)
    192.168.0.0/22 (2 entries, 1 announced)
    *BGP Preference: 170/-101
    Next hop type: Router, Next hop index: 465
    Next-hop reference count: 58
    Source: 172.16.0.25
    Next hop: 172.16.0.25 via fxp1.0, selected
    State: <Active Ext>
    Local AS: 65020 Peer AS: 65413
    Age: 54:30
    Task: BGP_65413.172.16.0.25+54017
    Announcement bits (2): 0-KRT 2-BGP RT Background
    AS path: 65413 65412 I Aggregator: 65412 10.0.3.5
    Localpref: 100
    Router ID: 10.0.9.7
    BGP Preference: 170/-101
    Next hop type: Router, Next hop index: 466
    Next-hop reference count: 50
    Source: 200.0.0.1
    Next hop: 200.0.0.1 via fxp0.0, selected
    State: <Ext>
    Inactive reason: Active preferred
    Local AS: 65020 Peer AS: 65010
    Age: 9
    Task: BGP_65010.200.0.0.1+179
    AS path: 65010 65412 I Aggregator: 65412 10.0.3.5
    Localpref: 100
    Router ID: 200.200.0.1

    [edit]
    root@C2#
    root@C2# run traceroute 192.168.1.1 source 201.201.0.1
    traceroute to 192.168.1.1 (192.168.1.1) from 201.201.0.1, 30 hops max, 40 byte packets
    1 172.16.0.25 (172.16.0.25) 5.291 ms 3.778 ms 2.609 ms
    2 192.168.1.1 (192.168.1.1) 5.747 ms 4.591 ms 6.247 ms

    [edit]
    root@C2#
Sign In or Register to comment.