diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-10-29 15:58:49 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-10-29 16:00:34 -0700 |
commit | b557e1b2a8e2a8c15cbb7552cbce70321cf12a96 (patch) | |
tree | 474c8b520362d0e9f411b101689f8496a10f99e3 /templates | |
parent | aa669cec4147e760ac417078e6a452ab0ad12762 (diff) | |
download | vyatta-cfg-system-b557e1b2a8e2a8c15cbb7552cbce70321cf12a96.tar.gz vyatta-cfg-system-b557e1b2a8e2a8c15cbb7552cbce70321cf12a96.zip |
Allow setting MTU of VIF
Bug 3531
Diffstat (limited to 'templates')
-rw-r--r-- | templates/interfaces/bonding/node.tag/vif/node.tag/mtu/node.def | 10 | ||||
-rw-r--r-- | templates/interfaces/ethernet/node.tag/vif/node.tag/mtu/node.def | 10 |
2 files changed, 20 insertions, 0 deletions
diff --git a/templates/interfaces/bonding/node.tag/vif/node.tag/mtu/node.def b/templates/interfaces/bonding/node.tag/vif/node.tag/mtu/node.def new file mode 100644 index 00000000..b824b017 --- /dev/null +++ b/templates/interfaces/bonding/node.tag/vif/node.tag/mtu/node.def @@ -0,0 +1,10 @@ +type: u32 +help: Maximum Transmission Unit (MTU) +val_help: u32:68-9000; Maximum Transmission Unit (MTU) +syntax:expression: $VAR(@) >= 68 && $VAR(@) <= 9000; "MTU must be between 68 and 9000" +commit:expression: $VAR(../../mtu) >= $VAR(@); \ + "MTU of VIF must be not be greater than MTU of underlying device" + +update: ip link set $VAR(../../@).$VAR(../@) mtu $VAR(@) +delete: [ -d /sys/class/net/$VAR(../../@).$VAR(../@) ] || exit 0 + ip link set $VAR(../../@).$VAR(../@) mtu 1500 diff --git a/templates/interfaces/ethernet/node.tag/vif/node.tag/mtu/node.def b/templates/interfaces/ethernet/node.tag/vif/node.tag/mtu/node.def new file mode 100644 index 00000000..b824b017 --- /dev/null +++ b/templates/interfaces/ethernet/node.tag/vif/node.tag/mtu/node.def @@ -0,0 +1,10 @@ +type: u32 +help: Maximum Transmission Unit (MTU) +val_help: u32:68-9000; Maximum Transmission Unit (MTU) +syntax:expression: $VAR(@) >= 68 && $VAR(@) <= 9000; "MTU must be between 68 and 9000" +commit:expression: $VAR(../../mtu) >= $VAR(@); \ + "MTU of VIF must be not be greater than MTU of underlying device" + +update: ip link set $VAR(../../@).$VAR(../@) mtu $VAR(@) +delete: [ -d /sys/class/net/$VAR(../../@).$VAR(../@) ] || exit 0 + ip link set $VAR(../../@).$VAR(../@) mtu 1500 |