OpenVZ Forum


Home » General » Support » How to change MTU for venet?
How to change MTU for venet? [message #36539] Mon, 29 June 2009 14:17 Go to next message
eclipser is currently offline  eclipser
Messages: 6
Registered: June 2009
Junior Member
Hi,

I tried the http://openvz.org/pipermail/users/2008-December/002545.html way but it doesn't work, unfortunately.

I need venet inside VEs being set to use an MTU of 9000. I presume that therefore the hosts' venet MTU also has to be set to 9000?

Unfortunately, I don't get it right. For veth, I got it, but I'd like to have the higher security and less overhead that venet provides.

Thanks & best regards,

Timo

vzyum-2.4.0-11
ovzkernel-2.6.18-128.1.1.el5.028stab062.3
vzpkg-2.7.0-18
vzctl-lib-3.0.23-1
vzrpm43-python-4.3.3-7_nonptl.6
vzquota-3.0.12-1
vzrpm44-4.4.1-22.5
vzrpm44-python-4.4.1-22.5
vzctl-lib-3.0.23-1
vzctl-3.0.23-1
Re: How to change MTU for venet? [message #36546 is a reply to message #36539] Tue, 30 June 2009 10:01 Go to previous messageGo to next message
maratrus is currently offline  maratrus
Messages: 1495
Registered: August 2007
Location: Moscow
Senior Member
Hello,

could you please describe in more detail what you have done already, what has been changed and what was the actual result?

[Updated on: Tue, 30 June 2009 10:03]

Report message to a moderator

Re: How to change MTU for venet? [message #36547 is a reply to message #36546] Tue, 30 June 2009 10:30 Go to previous messageGo to next message
eclipser is currently offline  eclipser
Messages: 6
Registered: June 2009
Junior Member
Hi,

I did set ``MTU=9000'' in

/etc/sysconfig/network-scripts/ifcfg-venet0

but it's being ignored at boot time. When I set it manually using ``ifconfig venet0 mtu 9000'' it is set to MTU: 9000 and works okay (AFAICS).

Inside the VE I configured /etc/sysconfig/network-scripts/ifup-eth 'the hard way' (just for testing):

--- ifup-eth_ORIG 2009-06-30 14:44:00.000000000 +0400
+++ ifup-eth 2009-06-30 13:23:31.000000000 +0400
@@ -155,9 +155,11 @@
done
fi

-if [ -n "${MTU}" ]; then
- ip link set dev ${DEVICE} mtu ${MTU}
-fi
+# if [ -n "${MTU}" ]; then
+ # ip link set dev ${DEVICE} mtu ${MTU}
+# fi
+# 200906230 by tis
+ip link set dev ${DEVICE} mtu 9000

if [ -n "${DYNCONFIG}" -a -x /sbin/dhclient ]; then
# Remove any temporary references which were previously added to dhclient config

and it works -- when rebooting the VE, it comes up with venet0 set to MTU 9000.
Re: How to change MTU for venet? [message #36548 is a reply to message #36547] Tue, 30 June 2009 11:09 Go to previous messageGo to next message
maratrus is currently offline  maratrus
Messages: 1495
Registered: August 2007
Location: Moscow
Senior Member
The link mentined above recommends to change /etc/vz/dists/scripts/redhat-add_ip.sh
Re: How to change MTU for venet? [message #36549 is a reply to message #36548] Tue, 30 June 2009 11:50 Go to previous messageGo to next message
eclipser is currently offline  eclipser
Messages: 6
Registered: June 2009
Junior Member
Yes, but it doesn't work. Changing this file was the first thing I tried.

Best,

Timo
Re: How to change MTU for venet? [message #36551 is a reply to message #36549] Tue, 30 June 2009 12:27 Go to previous messageGo to next message
maratrus is currently offline  maratrus
Messages: 1495
Registered: August 2007
Location: Moscow
Senior Member
What ostemplate your VE is based on?
It may occur that you need to change not redhat-add_ip.sh script but debian-add_ip.sh.
Re: How to change MTU for venet? [message #36552 is a reply to message #36551] Tue, 30 June 2009 12:38 Go to previous messageGo to next message
eclipser is currently offline  eclipser
Messages: 6
Registered: June 2009
Junior Member
maratrus wrote on Tue, 30 June 2009 14:27

What ostemplate your VE is based on?
It may occur that you need to change not redhat-add_ip.sh script but debian-add_ip.sh.


Hi, template is

http://download.openvz.org/template/precreated/centos-5-x86_ 64.tar.gz

so redhat-add_ip.sh should be okay. I think...
Re: SOLVED How to change MTU for venet? [message #36680 is a reply to message #36552] Thu, 09 July 2009 08:41 Go to previous message
eclipser is currently offline  eclipser
Messages: 6
Registered: June 2009
Junior Member
Hi,

I found that there was a typo in

/etc/sysconfig/network-scripts/ifcfg-venet0

that prevented the script from functioning correctly; this typo was caused during editing, so this thread can be ignored. Sorry for the noise.

Best,

Timo
Previous Topic: PAE Kernel Problem
Next Topic: SSL in cloned VEs
Goto Forum:
  


Current Time: Wed Aug 21 08:25:47 GMT 2024

Total time taken to generate the page: 0.03265 seconds