git://git.onelab.eu
/
vsys.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Tagging module vsys - vsys-0.7-18
[vsys.git]
/
factory
/
setup-link
diff --git
a/factory/setup-link
b/factory/setup-link
index
b8c748c
..
e5cbd2f
100755
(executable)
--- a/
factory/setup-link
+++ b/
factory/setup-link
@@
-36,7
+36,7
@@
ifconfig $BRIDGE up
iptables -t mangle -A FORWARD -o $BRIDGE -j MARK --set-mark $SLICEID
### Create "grab link" script
iptables -t mangle -A FORWARD -o $BRIDGE -j MARK --set-mark $SLICEID
### Create "grab link" script
-GRAB=/vsys/grab-$ETUN0
+GRAB=/vsys/
local_
grab-$ETUN0
echo $SLICE > $GRAB.acl
rm -f $GRAB
cat > $GRAB <<EOF
echo $SLICE > $GRAB.acl
rm -f $GRAB
cat > $GRAB <<EOF
@@
-49,17
+49,16
@@
EOF
chmod +x $GRAB
### Create script for setting link rate
chmod +x $GRAB
### Create script for setting link rate
-BIND=/vsys/rate-$ETUN0
+BIND=/vsys/
local_
rate-$ETUN0
echo $SLICE > $BIND.acl
rm -f $BIND
cat > $BIND <<EOF
#!/bin/sh
read rt
echo $SLICE > $BIND.acl
rm -f $BIND
cat > $BIND <<EOF
#!/bin/sh
read rt
-read lt
-read burs
-tc qdisc add dev $EGRE root tbf rate \$rt latency \$lt burst \$burs
+tc qdisc add dev $EGRE root handle 1: htb default 10
+tc class add dev $EGRE parent 1: classid 1:10 htb rate \$rt ceil \$rt
rm -rf $BIND.acl
touch $BIND.acl
rm -rf $BIND.acl
touch $BIND.acl
@@
-68,7
+67,7
@@
EOF
chmod +x $BIND
### Create "delete link" script
chmod +x $BIND
### Create "delete link" script
-DELETE=/vsys/delete-$ETUN0
+DELETE=/vsys/
local_
delete-$ETUN0
echo $SLICE > $DELETE.acl
rm -f $DELETE
cat > $DELETE <<EOF
echo $SLICE > $DELETE.acl
rm -f $DELETE
cat > $DELETE <<EOF