Routing

Expand all | Collapse all

Cisco To Junos Weight Configuration

  • 1.  Cisco To Junos Weight Configuration

    Posted 10-04-2015 18:27

    I have question regarding translating Cisco To Junos configuration. I've tried to use I2J tools from juniper but still not quite sure if that's the desired configuration. Since the "weight" attribute is missing from the Junos configuration (obviously since it's cisco proprietary). Could you please give me another solution for this configuration? I tried to use local-preference (since this is IBGP peering) but I cannot modify traffic using local-preference based on "next-hop" but "neighbor". Here's the configuration :

     

    router bgp 64567
    bgp router-id 172.28.199.202
    bgp always-compare-med
    bgp log-neighbor-changes
    bgp deterministic-med
    network 172.28.51.0 mask 255.255.255.240
    neighbor ibgppeers1 peer-group
    neighbor ibgppeers1 remote-as 64567
    neighbor ibgppeers1 route-map ibgppeers1-in in
    neighbor ibgppeers3 peer-group
    neighbor ibgppeers3 remote-as 64567
    neighbor ibgppeers3 route-map ibgppeers3-in in
    neighbor ibgppeers6 peer-group
    neighbor ibgppeers6 remote-as 64567
    neighbor ibgppeers6 route-map ibgppeers6-in in
    neighbor 172.28.32.2 peer-group ibgppeers3
    neighbor 172.28.51.14 peer-group ibgppeers1
    neighbor 172.28.199.201 peer-group ibgppeers6
    neighbor 172.28.199.201 shutdown
    distance bgp 200 200 200
    !

    route-map ibgppeers1-in permit 10
    match ip address prefix-list prelist2
    set ip next-hop 172.28.51.14
    set weight 200 
    !
    route-map ibgppeers1-in permit 20
    set ip next-hop 172.28.51.14
    !
    route-map ibgppeers3-in permit 10
    match ip address prefix-list prelist1
    set ip next-hop 172.28.32.17
    set weight 100 
    !
    route-map ibgppeers3-in permit 20
    match ip address prefix-list prelist2
    set ip next-hop 172.28.32.17
    set weight 100
    !
    route-map ibgppeers3-in permit 30
    set ip next-hop 172.28.32.17
    !
    route-map ibgppeers4-in deny 10
    !
    route-map ibgppeers6-in permit 10
    match ip address prefix-list prelist1
    set ip next-hop 172.28.199.201
    !
    route-map ibgppeers6-in permit 20
    match ip address prefix-list prelist2
    set ip next-hop 172.28.199.201
    !
    route-map ibgppeers6-in permit 30
    set ip next-hop 172.28.199.201
    set weight 100
    !



  • 2.  RE: Cisco To Junos Weight Configuration

     
    Posted 10-04-2015 22:00

    Hi,

     

    You can set the lpref based on neighbour.

     

    policy-statement neigh {
        term host1 {
            from neighbor 1.1.1.1;
            then {
                local-preference 110;
            }
        }
    }

    The cisco configuration you pasted is no completed as it is missing the acl's, can I suggest that you share your juniper configuration and we can validate that against the existing cisco configuration.

     

    Tim



  • 3.  RE: Cisco To Junos Weight Configuration

    Posted 10-04-2015 23:01

    Hi Thynard,

     

    thanks for your respond. What I'd like to achieve is change the preference based on next-hop, not neighbor. Since our device is peering to the other device using two different ISP, but using neighbor loopback interface as neighbor. 

     

    The topology is like this somehow :

     

                       ------------- ISP A --------------

    My Device                                                   Neighbor Device

                      ------------- ISP B -----------------

     

    What I want to do is specifying routes that I received from neighbor device that is using ISP A, as a primary link. Then set the same routes that I received from neighbor device, to ISB-B as a backup link. What do you suggest? do we have to configure the IBGP neighborship using IP Address on the physical link so we can adapt your scenario?

     

    Regards,



  • 4.  RE: Cisco To Junos Weight Configuration

     
    Posted 10-05-2015 03:50

    Hi,

     

    You can just substitute weight for lpref.

     

    policy-statement ibgppeers1-in {
        term 10 {
            from {
                prefix-list prelist2;
            }
            then {
                local-preference 110;
                next-hop 172.28.51.14;
                accept;
            }
        }
        term 20 {
            then {
                next-hop 172.28.51.14;
                accept;
            }
        }
    }

    Above is the cisco route-map converted into junos using lpref.

     

    Tim



  • 5.  RE: Cisco To Junos Weight Configuration

    Posted 03-11-2020 09:49

    correct me if I'm wrong, but CIsco's weight attribute is locally significant (on the router) whereas lpref is significance iBGP domain-wide.



  • 6.  RE: Cisco To Junos Weight Configuration

    Posted 06-19-2020 05:59

    Yes, weigth is local only.

    So none of the solution mentioned above have a 100% match on the cisco config.  



  • 7.  RE: Cisco To Junos Weight Configuration

    Posted 06-19-2020 12:04

    You can try the following:

     

    set policy-options policy-statement TEST term 1 from protocol bgp
    set policy-options policy-statement TEST term 1 from next-hop 172.28.51.14
    set policy-options policy-statement TEST term 1 from prefix-list prelist2
    set policy-options policy-statement TEST term 1 then local-preference 200

     

    Apply the above policy in import of concerned bgp neighborship.

    _____________________________________________________________________

    If this solves your problem, please mark this post as "Accepted Solution".
    If you think that my answer was helpful, please spend some Kudos.