git://git.onelab.eu
/
nodemanager-topo.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Change NAT address block
[nodemanager-topo.git]
/
setup-egre-link
diff --git
a/setup-egre-link
b/setup-egre-link
index
cef4108
..
16c366a
100755
(executable)
--- a/
setup-egre-link
+++ b/
setup-egre-link
@@
-9,8
+9,9
@@
REMOTE=$3
KEY=$4
RATE=$5
VIRTIP=$6
KEY=$4
RATE=$5
VIRTIP=$6
+VIRTNET=$7
-
VIRTNET=`echo $VIRTIP|sed "s/\.[23]$/.0/"
`
+
SUBNET=`expr match "$VIRTNET" '.*\(/[0-9]*\)'
`
LINK=${KEY}x${NODEID}
modprobe ip_gre
LINK=${KEY}x${NODEID}
modprobe ip_gre
@@
-44,7
+45,7
@@
sleep 1
PID=`su $SLICE -c "pgrep sleep"`
chcontext --ctx 1 -- echo $PID > /sys/class/net/$ETUN0/new_ns_pid
sleep 1
PID=`su $SLICE -c "pgrep sleep"`
chcontext --ctx 1 -- echo $PID > /sys/class/net/$ETUN0/new_ns_pid
sleep 1
-su $SLICE -c "sudo /sbin/ifconfig $ETUN0 $
VIRTIP/24 up; sudo /sbin/route add -net $VIRTNET/24
dev $ETUN0"
+su $SLICE -c "sudo /sbin/ifconfig $ETUN0 $
{VIRTIP}${SUBNET} up; sudo /sbin/route add -net $VIRTNET
dev $ETUN0"
### Set rate
tc qdisc add dev $EGRE root handle 1: htb default 10
### Set rate
tc qdisc add dev $EGRE root handle 1: htb default 10