Ethernet Switching
Highlighted
Ethernet Switching

Bandwidth Shaping on IRB

‎01-06-2020 11:15 PM

Hi everyone,

 

Happy New Decade.

 

I'm attempting bandwidth management on an EX3400 and was wondering if the below scenario is the best way of achieving it. Or if there is a better way. Welcome any comment.

 

Thank you.

 

Scenario: a single EX3400 (VC) uplinks to two Cisco Viptela (active, passive). The uplinks are trunks with two separate VLANs, each in a separate virtual-router Blue and Red. IRB.100 = Blue, IRB.200 = Red. No control of Viptela.

Goal: hard split bandwidth 10Mbps on Blue and 20Mbps on Red up the trunk. 

Further improvement: Allow either VLANs to make use of the full 30Mbps when the link is not busy.

 

 

ex3400vc> show configuration interface
ge-0/0/1 {
    unit 0 {
bandwidth 30m; family ethernet-switching { interface-mode trunk; vlan { members [ vlan-blue vlan-red ]; } } } } ge-1/0/1 { unit 0 {
bandwidth 30m; family ethernet-switching { interface-mode trunk; vlan { members [ vlan-blue vlan-red ]; } } } } irb { unit 100 { bandwidth 10m; family inet { filter { input filter-blue; output filter-blue; } address 192.168.100.1/24; } } unit 200 { bandwidth 20m; family inet { filter { input filter-red; output filter-red; } address 192.168.200.1/24; } } } ex3400vc> show configuration firewall family inet { filter filter-blue { term allow { then { policer policer-10m; accept; } } } filter filter-red { term allow { then { policer policer-20m; accept; } } } } policer policer-10m { filter-specific; if-exceeding { bandwidth-limit 10m; } then discard; } policer policer-20m { filter-specific; if-exceeding { bandwidth-limit 20m; } then discard; } ex3400vc> show configuration routing-instances vr-blue { instance-type virtual-router; interface irb.100; routing-options { static { route 0.0.0.0/0 next-hop x.x.x.x; } instance-import red-routes; } } vr-red { instance-type virtual-router; interface irb.200; routing-options { static { route 0.0.0.0/0 next-hop y.y.y.y; } instance-import blue-routes; } }

 

 

3 REPLIES 3
Highlighted
Ethernet Switching

Re: Bandwidth Shaping on IRB

‎01-07-2020 05:07 AM

Great start @z3phyr.

I'd ask you to go down a full Scheduler, class of service route so you dont just hit the bandwidth limit and the then BOOM everythings dropped.

Implimenting a full scheduler class of service config enables what you want but also prioritises traffic to the priority traffic types as you reach the limits of the bandwidth so everything doesn't fall over.

 

https://www.juniper.net/documentation/en_US/junos/topics/concept/schedulers-overview-cos-config-guid...
KR

Adam

~~~~~~~~~~~~~~~~~~~~~~~
- Please Kudos if you found my response helpful
- Please accept my response as a 'Accepted Solution' if it solved your query
Highlighted
Ethernet Switching

Re: Bandwidth Shaping on IRB

‎01-07-2020 02:11 PM

Thanks AdamHartley.

Highlighted
Ethernet Switching

Re: Bandwidth Shaping on IRB

‎01-14-2020 11:17 PM

for anyone interested in my almost final config going down the CoS path

 

ex3400vc> show configuration firewall
family ethernet-switching {
    filter MF-CLASSIFIER {
        interface-specific;
        term blue {
            from {
                source-prefix-list {
                    blue-subnets;
                }
            }
            then {
                accept;
                forwarding-class blue-be;
            }
        }
        term red {
            from {
                source-prefix-list {
                    red-subnets;
                }
            }
            then {
                accept;
                forwarding-class red-be;
            }
        }
    }
}

ex3400vc> show configuration class-of-service
forwarding-classes {
    class blue-be queue-num 1;
    class red-be queue-num 2;
}
interfaces {
    ge-0/0/0 {
        scheduler-map SCHEDULER-MAP;
        shaping-rate 30m;
    }
}
scheduler-maps {
    SCHEDULER-MAP {
        forwarding-class blue-be scheduler Blue-Scheduler;
        forwarding-class red-be scheduler Red-Scheduler;
    }
}
schedulers {
    Red-Scheduler {
        transmit-rate 10m;
    }
    Blue-Scheduler {
        transmit-rate 20m;
    }
}

ex3400vc> show configuration interfaces ge-0/0/2
unit 0 {
    family ethernet-switching {
        vlan {
            members red-vlan;
        }
        filter {
            input MF-CLASSIFIER;
        }
    }
}

 

This is also a good reference: https://www.juniper.net/assets/us/en/local/pdf/books/day-one-poster-junos-cos.pdf

Somehow doesn't really show up in generic Google search; found it on Reddit

 

Notes:

  • There above only deals with download
  • EX3400 has a few limitation, for example with policer I was hoping to put excess traffic in another queue as the final best-effort fight for it among the different colors but there is only a discard as action
  • may test Remarking
  • there are more options under schedulers that i will explore

 

as usual, if you got comments or suggestions, please feel free to share

 

Thank you

 

Feedback