[Cake] a start at vething cake for 200 subscribers

Dave Taht dave.taht at gmail.com
Sat Jul 28 17:03:11 EDT 2018


so I was tempted to try. I didn't enable namespaces. just coded this
little bit up...

a very quick test of this setup showed I wasn't routing packets through the
veth interfaces so I figure network namespaces, and... oh look! the sun's out!

#!/bin/bash

# Create the bridge
ip link add cable type bridge
ip link set cable up

# Create network namespaces and veth interfaces
# do I even need to use namespaces?
# do I need ips just to pass it through to the bridge?

ip route flush proto 51

for client in `seq 2 10`
do
    c=c${client}
    ip netns del $c
    ip netns add $c
# probly all this needs to end up in namespaces
    ip link add ${c}.l type veth peer name ${c}.r
    ip link set ${c}.l up
    ip link set ${c}.r up
    ip addr add 10.10.0.1/24 dev ${c}.l
    ip addr add 10.10.0.$client/24 dev ${c}.r
# fixme add ipv6 subnets
# I kind of wanted the route table to be global tho
    ip route add 10.10.0.$client/32 dev ${c}.l proto 51
# fixme add default route back?
    tc qdisc replace dev ${c}.l root cake bandwidth 20mbit flows
done

# fixme hook up to the bridge
# fixme hang actual clients off the bridge? or the namespace

-- 

Dave Täht
CEO, TekLibre, LLC
http://www.teklibre.com
Tel: 1-669-226-2619


More information about the Cake mailing list