[ovs-discuss] RHEL patch to support GRE tunnels
Madko
madko77 at gmail.com
Thu Oct 10 17:59:50 UTC 2013
Hi,
If someone is interested here are 2 trivial patches to add ifcfg
ifup/ifdown ovs scripts to support gre interface
--- etc_sysconfig_network-scripts_ifup-ovs 2013-10-10 19:52:02.298129524
+0200
+++ /etc/sysconfig/network-scripts/ifup-ovs 2013-10-10
19:48:34.835432813 +0200
@@ -117,6 +89,11 @@
${OTHERSCRIPT} ${CONFIG} ${2}
OVSINTF=${DEVICE} /sbin/ifup "$OVS_BRIDGE"
;;
+ OVSGre)
+ echo /sbin/ifup "$OVS_BRIDGE"
+ echo ovs-vsctl -t ${TIMEOUT} -- --may-exist add-port
"$OVS_BRIDGE" "$DEVICE" $OVS_OPTIONS -- set Interface "$DEVICE" type=gre
$OVS_GRE_OPTIONS ${OVS_EXTRA+-- $OVS_EXTRA}
+ ${OTHERSCRIPT} ${CONFIG} ${2}
+ ;;
*)
echo $"Invalid OVS interface type $TYPE"
exit 1
--- etc_sysconfig_network-scripts_ifdown-ovs 2013-10-10
19:52:02.298129524 +0200
+++ /etc/sysconfig/network-scripts/ifdown-ovs 2013-10-10
19:49:29.647236866 +0200
@@ -42,7 +42,7 @@
retval=$?
ovs-vsctl -t ${TIMEOUT} -- --if-exists del-br "$DEVICE"
;;
- OVSPort|OVSIntPort|OVSBond)
+ OVSPort|OVSIntPort|OVSBond|OVSGre)
${OTHERSCRIPT} ${CONFIG} $2
retval=$?
ovs-vsctl -t ${TIMEOUT} -- --if-exists del-port "$OVS_BRIDGE"
"$DEVICE"
And as an example:
[root at rhel]# cat /etc/sysconfig/network-scripts/ifcfg-ovs-gre
DEVICE=ovs-gre
ONBOOT=yes
DEVICETYPE=ovs
TYPE=OVSGre
BOOTPROTO=static
OVS_BRIDGE=ovs
OVS_GRE_OPTIONS="options:remote_ip=192.168.2.333"
best regards,
--
Edouard Bourguignon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openvswitch.org/pipermail/ovs-discuss/attachments/20131010/208e72bc/attachment-0001.html>
More information about the discuss
mailing list