git://git.onelab.eu
/
nodemanager-topo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4958342
)
Set txqueuelen on EGRE tunnel device. The default is 0, which causes HTB to drop...
author
Andy Bavier
<acb@cs.princeton.edu>
Mon, 26 Apr 2010 20:37:11 +0000
(20:37 +0000)
committer
Andy Bavier
<acb@cs.princeton.edu>
Mon, 26 Apr 2010 20:37:11 +0000
(20:37 +0000)
setup-egre-link
patch
|
blob
|
history
diff --git
a/setup-egre-link
b/setup-egre-link
index
56771f6
..
7264bb3
100755
(executable)
--- a/
setup-egre-link
+++ b/
setup-egre-link
@@
-1,7
+1,5
@@
#!/bin/sh +x
#!/bin/sh +x
-IP=/sbin/ip
-
SLICE=$1
SLICEID=`id -u $SLICE`
NODEID=$2
SLICE=$1
SLICEID=`id -u $SLICE`
NODEID=$2
@@
-18,8
+16,8
@@
modprobe ip_gre
### Setup EGRE tunnel
EGRE=d$LINK
### Setup EGRE tunnel
EGRE=d$LINK
-
$IP
tunnel add $EGRE mode gre type eth remote $REMOTE key $KEY ttl 64
-
$IP
link set $EGRE up
+
ip
tunnel add $EGRE mode gre type eth remote $REMOTE key $KEY ttl 64
+
ip
link set $EGRE up
### Setup macvlan
MACV=a$LINK
### Setup macvlan
MACV=a$LINK
@@
-28,11
+26,12
@@
ip link add link $EGRE $MACV type macvlan
### Put a process in the vserver so we can move the interface there
su $SLICE -c "sleep 30 &"
PID=`su $SLICE -c "pgrep -n sleep"`
### Put a process in the vserver so we can move the interface there
su $SLICE -c "sleep 30 &"
PID=`su $SLICE -c "pgrep -n sleep"`
-
$IP
link set $MACV netns $PID
+
ip
link set $MACV netns $PID
naddress --add --nid $SLICEID --ip ${VIRTIP}${SUBNET}
su $SLICE -c "sudo /sbin/ifconfig $MACV ${VIRTIP}${SUBNET} mtu 1458 up"
### Set rate
naddress --add --nid $SLICEID --ip ${VIRTIP}${SUBNET}
su $SLICE -c "sudo /sbin/ifconfig $MACV ${VIRTIP}${SUBNET} mtu 1458 up"
### Set rate
+ifconfig $EGRE txqueuelen 1000
tc qdisc add dev $EGRE root handle 1: htb default 10
tc class add dev $EGRE parent 1: classid 1:10 htb rate $RATE ceil $RATE
tc qdisc add dev $EGRE root handle 1: htb default 10
tc class add dev $EGRE parent 1: classid 1:10 htb rate $RATE ceil $RATE