From 7e9cdbd16efae84169bf93d115d02fe36289781c Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Sun, 19 Apr 2009 21:35:26 +0000 Subject: [PATCH] Document \$int and how to create bridge and vlan interfaces. --- conf.d/network.Linux | 17 +++++++++++++++-- conf.d/network.in | 2 ++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/conf.d/network.Linux b/conf.d/network.Linux index 9967301d..c477d61e 100644 --- a/conf.d/network.Linux +++ b/conf.d/network.Linux @@ -5,6 +5,19 @@ # Create a bonded interface # interfaces="bond0" -# ifup_bond0="modprobe bonding; ifconfig bond0 up; ifenslave bond0 bge0" -# ifconfig_bond0="192.168.0.10/24" +# ifup_bond0="modprobe bonding; ifconfig \$int up; ifenslave \$int bge0" +# ifconfig_bond0="192.168.0.10 netmask 255.255.255.0" # ifdown_bond0="rmmod bonding" + +# Create a bridged interface - let dhcpcd configure the address +# interfaces="br0" +# ifup_br0="brctl addbr \$int; brctl add \$int eth1; brtctl add \$int eth2" +# ifdown_br0="ifconfig \$int down; btctl delbr \$int" + +# Create VLAN +# interfaces="eth0_2 eth0_3 eth0_4" +# ifup_eth0="vconfig add \$int 2; vconfig add \$int 3; vconfig add \$int 4" +# ifconfig_eth0_2="192.168.2.10 netmask 255.255.255.0" +# ifconfig_eth0_3="192.168.3.10 netmask 255.255.255.0" +# ifconfig_eth0_4="192.168.4.10 netmask 255.255.255.0" +# ifdown_eth0="vconfig rem \$int.2; vconfig rem \$int.3; vconfig rem \$int.4" diff --git a/conf.d/network.in b/conf.d/network.in index ab054664..cee7ef00 100644 --- a/conf.d/network.in +++ b/conf.d/network.in @@ -1,6 +1,7 @@ # Assign static IP addresses and run custom scripts per interface. # Seperate commands with ; # Prefix with ! to run a shell script. +# Use \$int to represent the interface # ifconfig_eth0="192.168.0.10 netmask 255.255.255.0" # You also have ifup_eth0 and ifdown_eth0 to run other commands when @@ -17,4 +18,5 @@ # /etc/ifup.eth0 is equivalent to ifup_eth0 # /etc/ifdown.eth0 is equivalent to ifdown_eth0 # Any files found will automatically be put into the interfaces variable. +# You don't need to escape variables in files, so use $int instead of \$int.