Ariel Tubaltsev atubaltsev@vmware.com
Arkajit Ghosh arkajit.ghosh@tcs.com
Atzm Watanabe atzm@stratosphere.co.jp
+Aurélien Poulain aurepoulain@viacesi.fr
Bastian Blank waldi@debian.org
Ben Basler bbasler@nicira.com
Bob Ball bob.ball@citrix.com
creating a veth pair. One end of the interface becomes 'eth1' inside the
container and the other end attaches to 'br-int'.
-The script also lets one to add IP address, MAC address and Gateway address to
-the interface. e.g.:
+The script also lets one to add IP address, MAC address, Gateway address and
+MTU for the interface. e.g.:
```
% ovs-docker add-port br-int eth1 $CONTAINER_ID --ipaddress=192.168.1.2/24 \
---macaddress=a2:c3:0d:49:7f:f8 --gateway=192.168.1.1
+--macaddress=a2:c3:0d:49:7f:f8 --gateway=192.168.1.1 --mtu=1450
```
* A previously added network interface can be deleted. e.g.:
GATEWAY=`expr X"$1" : 'X[^=]*=\(.*\)'`
shift
;;
+ --mtu=*)
+ MTU=`expr X"$1" : 'X[^=]*=\(.*\)'`
+ shift
+ ;;
*)
echo >&2 "$UTIL add-port: unknown option \"$1\""
exit 1
ip netns exec "$PID" ip link set dev "${PORTNAME}_c" name "$INTERFACE"
ip netns exec "$PID" ip link set "$INTERFACE" up
+ if [ -n "$MTU" ]; then
+ ip netns exec "$PID" ip link set dev "$INTERFACE" mtu "$MTU"
+ fi
+
if [ -n "$ADDRESS" ]; then
ip netns exec "$PID" ip addr add "$ADDRESS" dev "$INTERFACE"
fi
Commands:
add-port BRIDGE INTERFACE CONTAINER [--ipaddress="ADDRESS"]
[--gateway=GATEWAY] [--macaddress="MACADDRESS"]
+ [--mtu=MTU]
Adds INTERFACE inside CONTAINER and connects it as a port
in Open vSwitch BRIDGE. Optionally, sets ADDRESS on
INTERFACE. ADDRESS can include a '/' to represent network
- prefix length. Optionally, sets a GATEWAY and a MACADDRESS.
- e.g.:
+ prefix length. Optionally, sets a GATEWAY, MACADDRESS
+ and MTU. e.g.:
${UTIL} add-port br-int eth1 c474a0e2830e
--ipaddress=192.168.1.2/24 --gateway=192.168.1.1
- --macaddress="a2:c3:0d:49:7f:f8"
+ --macaddress="a2:c3:0d:49:7f:f8" --mtu=1450
del-port BRIDGE INTERFACE CONTAINER
Deletes INTERFACE inside CONTAINER and removes its
connection to Open vSwitch BRIDGE. e.g.: