Operating System - Linux
1832527 Members
8241 Online
110043 Solutions
New Discussion

Re: Vlans and bonded devices

 
Mike Hedderly
Advisor

Vlans and bonded devices

I have just installed the HP PSP pack 7.51 for linux and my vlans have stopped working. It seems that there is a new script vlan used for startup and a config file vlan.conf.

The network scripts should have all ip information removed and added to vlan.conf
bond0 11 192.168.1.1 255.255.255.128
bond0 12 192.168.2.1 255.255.255.128
bond0 13 10.1.1.1 255.255.255.128

which I have , the trounle is after the restart it has marked bond0 as inactive. the vlan.txt file is not clear. Does anyone have an example of a vlan.conf file for bonded vlans.

Thanks
3 REPLIES 3
Mark Partain
Occasional Advisor

Re: Vlans and bonded devices

I will reply with your answer soon.

Let me put together all the files that need attention.
If it ain't broke, I'm not done yet!
Mark Partain
Occasional Advisor

Re: Vlans and bonded devices

START OF VLAN.CONF FILE
#
#Vlan Configuration file
#interface vlan_id ip_addr net_mask
#

#
# Name type for vlan interfaces. The Name type indicates
# the format in which the Vlan devices have to be named.
# Supported types are indicated below.
# For Ex: If a VLAN of ID=5 is created over an
# eth0 interface, the names of the interfaces
# for each type are shown in brackets.
#
# VLAN_PLUS_VID (vlan0005)
# VLAN_PLUS_VID_NO_PAD (vlan5)
# DEV_PLUS_VID (eth0.0005)
# DEV_PLUS_VID_NO_PAD (eth0.5) - Default name type.

#nametype DEV_PLUS_VID_NO_PAD


# Sample Entry for vlan created with VLANID=4090
# over the eth0 interface

#eth0 4090 10.10.5.1 255.255.255.0

# Sample Entry for 2 vlan's created with VLAN_ID=4092
# and VLAN_ID=4093 over a bonding interface bond0

#bond0 4092 10.10.10.1 255.255.255.0
#bond0 4093 10.10.20.1 255.255.255.0
bond0 100 199.110.123.50 255.255.255.0
END OF VLAN.CONF FILE

START OF IFCFG-BOND0 FILE
DEVICE=bond0
#NETMASK=255.255.255.0
#NETWORK=199.110.123.0
#BROADCAST=199.110.123.255
BOOTPROTO=none
USERCTL=no
ONBOOT=yes
TYPE=Ethernet
END OF IFCFG-BOND0 FILE

START OF IFCFG-ETHx FILE(S)
# Please read /usr/share/doc/initscripts-*/sysconfig.txt
# for the documentation of these parameters.
USERCTL=no
IPV6INIT=no
PEERDNS=yes
TYPE=Ethernet
BOOTPROTO=none
DEVICE=eth1
ONBOOT=yes
MASTER=bond0
SLAVE=yes
END OF IFCFG-ETHx FILE(S)

START OF MODPROBE.CONF FILE
alias eth0 tg3
alias eth1 tg3
alias usb-controller ohci-hcd
install bond0 /sbin/modprobe \
tg3; /sbin/modprobe --ignore-install \
bonding -o bond0 miimon=100
END OF MODPROBE.CONF FILE
If it ain't broke, I'm not done yet!
Mike Hedderly
Advisor

Re: Vlans and bonded devices

Thanks for the update thats very sumilar to what I have. I have bond0 which is the primary interface and 3 vlans bond0.11 12 13

But there has been the introduction of a new script vlan on startup this creates the vlans and then marks bond0 with an ip address of 0.0.0.0

This is the section of code
and this is my Vlan.conf
# Sample Entry for 2 vlan's created with VLAN_ID=4092
# and VLAN_ID=4093 over a bonding interface bond0

#bond0 4092 10.10.10.1 255.255.255.0
#bond0 4093 10.10.20.1 255.255.255.0
bond0 11 192.168.1.1 255.255.255.128
bond0 12 192.168.2.1 255.255.255.128
bond0 13 10.1.1.1 255.255.255.128

However - there is no reference on what to do with the bond0 device. I have tried to uncomment the bond0 network script. But the Vlan startup scripts marks bond0 as 0.0.0.0 and this is the offending lines

vif=`cat $VLANPROCDIR/config | egrep "$iface" | egrep $vlan_id |
awk -F'|' '{print $1}' | sed 's/ //g'`
/sbin/ifconfig $vif $ip_addr netmask $netmask up
/sbin/ifconfig $iface 0.0.0.0