Junos OS

 View Only
last person joined: 7 days ago 

Ask questions and share experiences about Junos OS.
  • 1.  Per-packet load balancing isn't effective if using "from" in policy statement

    Posted 09-11-2018 03:40

     Hi,

     

    I made a per-packet load balancing test for specifc subnet 10.10.10.0/24. If I don't configure "from" statement of routing policy, I could see 2 paths in forwarding table. However, with from 10.10.10.0/24 load balancing configured, I could see only one next hop in forwarding table. Would you please have a look and tell me why?

     

    Thank you very much.


    root@R1# run show route 23.23.23.0/24

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

    23.23.23.0/24 *[OSPF/10] 00:42:26, metric 2
    to 12.12.12.2 via em0.0
    > to 13.13.13.3 via em1.0

    [edit]
    root@R1#

     

    root@R1# ...route forwarding-table family inet destination 23.23.23.0/24

    Routing table: default.inet

    Internet:

    Destination        Type RtRef Next hop           Type Index NhRef Netif

    23.23.23.0/24      user     0 13.13.13.3         ucst   527     4 em1.0

     

    Routing table: __master.anon__.inet

    Internet:

    Destination        Type RtRef Next hop           Type Index NhRef Netif

    default            perm     0                    rjct   521     1

     

    [edit]

    root@R1#

     

    CONFIGURATION:

     

    interfaces {

        em0 {

            unit 0 {

                family inet {

                    address 12.12.12.1/24;

                }

            }

        }

        em1 {

            unit 0 {

                family inet {

                    address 13.13.13.1/24;

                }

            }

        }

        em2 {

            unit 0 {

                family inet {

                    address 10.10.10.1/24;

                }

            }

        }

        em3 {

            unit 0 {

                family inet {

                    address 20.20.20.1/24;

                }

            }

        }

    }

    forwarding-options {

        hash-key {

            family inet {

                layer-3;

                layer-4;

            }

        }

    }

    routing-options {

        forwarding-table {

            export LB-Net10-perPacket;

        }

    }

    protocols {

        ospf {

            area 0.0.0.0 {

                interface em0.0;

                interface em1.0;

            }

        }

    }

    policy-options {

        policy-statement LB-Net10-perPacket {

            from {

                route-filter 10.10.10.0/24 orlonger;

            }

            then {

                load-balance per-packet;

            }

        }

    }

     

     

    root@R1# run show version
    Hostname: R1
    Model: olive
    JUNOS Base OS boot [12.1R1.9]
    JUNOS Base OS Software Suite [12.1R1.9]
    JUNOS Kernel Software Suite [12.1R1.9]
    JUNOS Crypto Software Suite [12.1R1.9]
    JUNOS Packet Forwarding Engine Support (M/T Common) [12.1R1.9]
    JUNOS Packet Forwarding Engine Support (M20/M40) [12.1R1.9]
    JUNOS Online Documentation [12.1R1.9]
    JUNOS Voice Services Container package [12.1R1.9]
    JUNOS Border Gateway Function package [12.1R1.9]
    JUNOS Services AACL Container package [12.1R1.9]
    JUNOS Services LL-PDF Container package [12.1R1.9]
    JUNOS Services PTSP Container package [12.1R1.9]
    JUNOS Services Stateful Firewall [12.1R1.9]
    JUNOS Services NAT [12.1R1.9]
    JUNOS Services Application Level Gateways [12.1R1.9]
    JUNOS Services Captive Portal and Content Delivery Container package [12.1R1.9]
    JUNOS Services RPM [12.1R1.9]
    JUNOS Services HTTP Content Management package [12.1R1.9]
    JUNOS AppId Services [12.1R1.9]
    JUNOS IDP Services [12.1R1.9]
    JUNOS Services Crypto [12.1R1.9]
    JUNOS Services SSL [12.1R1.9]
    JUNOS Services IPSec [12.1R1.9]
    JUNOS Runtime Software Suite [12.1R1.9]
    JUNOS Routing Software Suite [12.1R1.9]

    [edit]



  • 2.  RE: Per-packet load balancing isn't effective if using "from" in policy statement
    Best Answer

    Posted 09-11-2018 03:55
    That would the destination address/subnet which is used in “from” term in policy.

    Load balancing would be done only for 10.10.10/24 if you use “from 10.10.10.0/24”


  • 3.  RE: Per-packet load balancing isn't effective if using "from" in policy statement

    Posted 09-11-2018 04:22

    Hi Kingsman,

     

    Thanks a lot for correcting my understanding. It works well.

     

    Regards.