728x90


A와 B가 12.12.12.0/24 대역을 CE_1에게 광고함.


    [A]--------------[CE]--------------[B]

    12.12.12.0/24-->          <--12.12.12.0/24



LB 설정

chano@CE_1# show | display set | match ECMP 

set routing-options forwarding-table export ECMP

set policy-options policy-statement ECMP then load-balance per-packet

set policy-options policy-statement ECMP then accept



BGP 설정

chano@CE_1# show protocols bgp | display set 


set protocols bgp group EBGP type external

set protocols bgp group EBGP peer-as 6619

set protocols bgp group EBGP local-as 65001

set protocols bgp group EBGP multipath

set protocols bgp group EBGP neighbor 10.10.1.1

set protocols bgp group EBGP neighbor 10.10.2.2


BGP 네이버 상태

chano@CE_1# run show bgp summary 

Groups: 1 Peers: 2 Down peers: 0

Table          Tot Paths  Act Paths Suppressed    History Damp State    Pending

inet.0               

                       2          1          0          0          0          0

Peer                     AS      InPkt     OutPkt    OutQ   Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped...

10.10.1.1              6619        865        864       0       0     1:05:07 1/1/1/0              0/0/0/0

10.10.2.2              6619        881        881       0       0     1:06:23 0/1/1/0              0/0/0/0



A와 B에게서 수신한 루트 확인

chano@CE_1# run show route receive-protocol bgp 10.10.1.1 


inet.0: 12 destinations, 13 routes (12 active, 0 holddown, 0 hidden)

  Prefix                  Nexthop              MED     Lclpref    AS path

* 12.12.12.0/24           10.10.1.1                               6619 I


[edit]

chano@CE_1# run show route receive-protocol bgp 10.10.2.2    


inet.0: 12 destinations, 13 routes (12 active, 0 holddown, 0 hidden)

  Prefix                  Nexthop              MED     Lclpref    AS path

  12.12.12.0/24           10.10.2.2                               6619 I



multipath 설정 전 라우팅 테이블 확인

chano@CE_1# run show route 12.12.12.0 


inet.0: 12 destinations, 13 routes (12 active, 0 holddown, 0 hidden)

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


12.12.12.0/24      *[BGP/170] 00:20:35, localpref 100

                      AS path: 6619 I, validation-state: unverified

                    > to 10.10.1.1 via ge-0/0/2.0

                    [BGP/170] 00:19:11, localpref 100

                      AS path: 6619 I, validation-state: unverified

                    > to 10.10.2.2 via ge-0/0/1.0


multipath 설정 전 포워딩 테이블 확인

chano@CE_1# run show route forwarding-table destination 12.12.12.0    

Routing table: default.inet

Internet:

Destination        Type RtRef Next hop           Type Index    NhRef Netif

12.12.12.0/24      user     0 10.10.1.1          ucst      569     4 ge-0/0/2.0


Routing table: __master.anon__.inet

Internet:

Destination        Type RtRef Next hop           Type Index    NhRef Netif

default            perm     0                    rjct      521     1



multipath  설정

[edit]

chano@CE_1# set protocols bgp group EBGP multipath 


[edit]

chano@CE_1# commit 

commit complete



설정 후 테이블 확인
chano@CE_1# run show route 12.12.12.0 

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

12.12.12.0/24      *[BGP/170] 00:21:25, localpref 100
                      AS path: 6619 I, validation-state: unverified
                      to 10.10.2.2 via ge-0/0/1.0
                    > to 10.10.1.1 via ge-0/0/2.0
                    [BGP/170] 00:20:01, localpref 100
                      AS path: 6619 I, validation-state: unverified
                    > to 10.10.2.2 via ge-0/0/1.0

[edit]
chano@CE_1# run show route 12.12.12.0 extensive                       

inet.0: 12 destinations, 13 routes (12 active, 0 holddown, 0 hidden)
12.12.12.0/24 (2 entries, 1 announced)
TSI:
KRT in-kernel 12.12.12.0/24 -> {10.10.2.2}
        *BGP    Preference: 170/-101
                Next hop type: Router
                Address: 0x965007c
                Next-hop reference count: 1
                Source: 10.10.1.1
                Next hop: 10.10.2.2 via ge-0/0/1.0, selected
                Session Id: 0x0
                Next hop: 10.10.1.1 via ge-0/0/2.0
                Session Id: 0x0
                State: <Active Ext>
                Local AS: 65001 Peer AS:  6619
                Age: 33:26 
                Validation State: unverified 
                Task: BGP_6619.10.10.1.1+60722
                Announcement bits (1): 0-KRT 
                AS path: 6619 I
                Accepted Multipath
                Localpref: 100
                Router ID: 1.1.1.5
         BGP    Preference: 170/-101
                Next hop type: Router, Next hop index: 568
                Address: 0x95b05b4
                Next-hop reference count: 2
                Source: 10.10.2.2
                Next hop: 10.10.2.2 via ge-0/0/1.0, selected
                Session Id: 0x140
                State: <NotBest Ext>
                Inactive reason: Not Best in its group - Active preferred
                Local AS: 65001 Peer AS:  6619
                Age: 32:02 
                Validation State: unverified 
                Task: BGP_6619.10.10.2.2+52071
                AS path: 6619 I
                Accepted MultipathContrib
                Localpref: 100
                Router ID: 1.1.1.6


설정 후 포워딩테이블 확인
chano@CE_1# run show route forwarding-table destination 12.12.12.0 
Routing table: default.inet
Internet:
Destination        Type RtRef Next hop           Type Index    NhRef Netif
12.12.12.0/24      user     0                    ulst  1048574     2
                              10.10.2.2          ucst      568     3 ge-0/0/1.0
                              10.10.1.1          ucst      569     3 ge-0/0/2.0

Routing table: __master.anon__.inet
Internet:
Destination        Type RtRef Next hop           Type Index    NhRef Netif
default            perm     0                    rjct      521     1




+ Recent posts