ok here is the interesting situtation i'm stuck with :
we have several ubuntu servers(8.04 and 8.10) in our internal network that are in 192.168.0.x subnet.
We also use 192.168.1.x and 192.168.2.x subnets for our clients. We also administer our server using ssh from subnet 192.168.2.x. An layer-3 switch does routing between subnets.
All servers have vlans active and working and use samba for their services.
Recently we purchased another server, i installed 9.04 on it and first thing to do was to copy the /etc/network/interfaces and smb.conf from another server to the newest (changed the ip addresses of course ) and installed vlan package.
so let's see the problem :
Code:
$sudo /etc/init.d/networking restart
* Reconfiguring network interfaces...
* if-up.d/mountnfs[eth0]: waiting for interface vlan2 before doing NFS mounts
* if-up.d/mountnfs[eth0]: waiting for interface vlan1 before doing NFS mounts
Set name-type for VLAN subsystem. Should be visible in /proc/net/vlan/config
Added VLAN with VID == 3 to IF -:eth0:-
* if-up.d/mountnfs[vlan2]: waiting for interface vlan1 before doing NFS mounts
Set name-type for VLAN subsystem. Should be visible in /proc/net/vlan/config
Added VLAN with VID == 2 to IF -:eth0:-
...done.
after that i loose connection from any other location except 192.168.0.x subnet. while networking restarts correctly and all vlans are up
Code:
$cat /proc/net/vlan/config
VLAN Dev name | VLAN ID
Name-Type: VLAN_NAME_TYPE_PLUS_VID_NO_PAD
vlan2 | 3 | eth0
vlan1 | 2 | eth0
so my clients (samba) or even me (ssh) can't connect to the 9.04 server unless i physically go and bring the vlans down :
Code:
$ ifdown vlan1
$ ifdown vlan2
route -n is as expected.
/etc/network/interfaces is the same as in the other ubuntu machines.
i don't have any network mount point in my fstab (as networking thinks ...)
modules are different (maybe the problem is there ??)
in 9.04
Code:
$lsmod |grep 8021
8021q 31776 0
garp 17792 1 8021q
in 8.04 or 8.10
Code:
$lsmod |grep 8021
8021q 31776 0
i tried to remove garp but obvisouly i can't.
also the if-up.d/mountnfs script is different :
in 9.04
Code:
#! /bin/sh
# Description: Now that TCP/IP is configured, mount the NFS file
# systems in /etc/fstab if needed. If possible,
# start the portmapper before mounting (this is needed for
# Linux 2.1.x and up).
#
# Also mounts SMB filesystems now, so the name of
# this script is getting increasingly inaccurate.
PATH=/sbin:/bin
. /lib/init/vars.sh
. /lib/lsb/init-functions
. /lib/init/mount-functions.sh
do_start() {
[ -f /etc/fstab ] || return
#
# Read through fstab line by line. If it is NFS, set the flag
# for mounting NFS file systems. If any NFS partition is found and it
# not mounted with the nolock option, we start the portmapper.
#
# If any sec={krb5,krb5i,krb5p} option is given, or any of the file
# systems are nfs4, we'll need to start rpc.gssd and/or rpc.idmapd too;
# we'll leave that to nfs-common.
#
exec 9<&0 </etc/fstab
start_nfs=no
NETFS=""
NETDEV=""
while read DEV MTPT FSTYPE OPTS REST
do
case "$DEV" in
""|\#*)
continue
;;
esac
case "$OPTS" in
noauto|*,noauto|noauto,*|*,noauto,*)
continue
;;
_netdev|*,_netdev|_netdev,*|*,_netdev,*)
NETDEV=yes
;;
esac
case "$FSTYPE" in
nfs)
# NFS filsystems normally require statd and portmap. However,
# if nolock is set, portmap and statd are not required for this
# file system.
case "$OPTS" in
nolock|*,nolock|nolock,*|*,nolock,*)
# no action
;;
*)
start_nfs=yes
;;
esac
# However, Kerberos requires gssd, so start nfs-common anyway.
case "$OPTS" in
sec=krb5|*,sec=krb5|sec=krb5,*|*,sec=krb5,*|sec=krb5i|*,sec=krb5i|sec=krb5i,*|*,sec=krb5i,*|sec=krb5p|*,sec=krb5p|sec=krb5p,*|*,sec=krb5p,*)
start_nfs=yes
;;
esac
;;
nfs4)
# NFSv4 requires idmapd, so start nfs-common no matter what the options are.
start_nfs=yes
;;
smbfs|cifs|coda|ncp|ncpfs|ocfs2|gfs)
;;
*)
FSTYPE=
;;
esac
if [ "$FSTYPE" ]
then
case "$NETFS" in
$FSTYPE|*,$FSTYPE|$FSTYPE,*|*,$FSTYPE,*)
;;
*)
NETFS="$NETFS${NETFS:+,}$FSTYPE"
;;
esac
fi
done
exec 0<&9 9<&-
#
# Initialize nfs-common (which starts rpc.statd, rpc.gssd
# and/or rpc.idmapd, and loads the right kernel modules if
# applicable) if we use Kerberos and/or NFSv4 mounts.
#
if [ "$start_nfs" = yes ] && [ -x /etc/init.d/portmap ] && [ -x /etc/init.d/nfs-common ]
then
/etc/init.d/portmap start
/etc/init.d/nfs-common start
fi
pre_mountall
if [ "$NETFS" ]
then
mount -a -t$NETFS
fi
if [ "$NETDEV" ]; then
mount -a -O _netdev
fi
post_mountall
}
exit_unless_last_interface() {
grep "^[:space:]*auto" /etc/network/interfaces | \
sed -e 's/[ \t]*auto[ \t]*//;s/[ \t]*$//;s/[ \t]/\n/g' | \
while read i; do
if [ `grep -c $i /var/run/network/ifstate` -eq "0" ]; then
msg="if-up.d/mountnfs[$IFACE]: waiting for interface $i before doing NFS mounts"
log_warning_msg "$msg"
# Can not pass this as a variable because of the while subshell
mkdir /var/run/network/mountnfs_earlyexit 2> /dev/null
fi
done
if [ -d /var/run/network/mountnfs_earlyexit ]; then
rmdir /var/run/network/mountnfs_earlyexit 2>/dev/null
exit 0
fi
}
# Using 'no !=' instead of 'yes =' to make sure async nfs mounting is
# the default even without a value in /etc/default/rcS
if [ no != "$ASYNCMOUNTNFS" ]; then
# Not for loopback!
[ "$IFACE" != "lo" ] || exit 0
# Lock around this otherwise insanity may occur
mkdir /var/run/network 2>/dev/null || true
# Wait until all auto interfaces are up before attemting to mount
# network file systems.
exit_unless_last_interface
if mkdir /var/run/network/mountnfs 2>/dev/null ; then
:
else
msg="if-up.d/mountnfs[$IFACE]: lock /var/run/network/mountnfs exist, not mounting"
log_failure_msg "$msg"
# Log if /usr/ is mounted
[ -x /usr/bin/logger ] && /usr/bin/logger -t "if-up.d/mountnfs[$IFACE]" "$msg"
exit 0
fi
on_exit() {
# Clean up lock when script exits, even if it is interrupted
rmdir /var/run/network/mountnfs 2>/dev/null || exit 0
}
trap on_exit EXIT # Enable emergency handler
do_start
elif [ yes = "$FROMINITD" ] ; then
do_start
fi
while in 8.10 points in this script in lib
Code:
#! /bin/sh
# Description: Mount all networked filesystems defined in /etc/fstab
# Start the portmapper before mounting (this is needed for
# Linux 2.1.x and up) if necessary.
PATH=/sbin:/bin
. /lib/init/vars.sh
. /lib/lsb/init-functions
. /lib/init/mount-functions.sh
# Some simple locking to ensure we never have two parallel instances
# running, but that each one called will eventually execute serially.
LOCKNAME=/var/run/mountall-net-fs.lock
trap "rm -rf $LOCKNAME" 0
while [ -d $LOCKNAME ] || [ -d /dev/shm/var.run ] || ! mkdir $LOCKNAME 2>/dev/null; do
sleep 1
done
do_start() {
[ -f /etc/fstab ] || return
#
# Read through fstab line by line. If it is a networked file system,
# set the flag for mounting networked file systems;
# if any NFS are found and are not mounted with the
# nolock option, we start the portmapper.
#
# If any sec={krb5,krb5i,krb5p} option is given, or any of the file
# systems are nfs4, we'll need to start rpc.gssd and/or rpc.idmapd
# too; we'll leave that to nfs-common.
#
exec 9<&0 </etc/fstab
start_nfs=no
while read DEV MTPT FSTYPE OPTS REST
do
case "$DEV" in
""|\#*)
continue
;;
esac
case "$OPTS" in
noauto|*,noauto|noauto,*|*,noauto,*)
continue
;;
esac
case "$FSTYPE" in
nfs)
# NFS filsystems normally require statd and portmap.
# However, if nolock is set, portmap and statd are not
# required for this file system.
case "$OPTS" in
nolock|*,nolock|nolock,*|*,nolock,*)
# no action
;;
*)
start_nfs=yes
;;
esac
# However, Kerberos requires gssd, so start nfs-common
# anyway.
case "$OPTS" in
sec=krb5|*,sec=krb5|sec=krb5,*|*,sec=krb5i,*|sec=krb5i|*,sec=krb5i|sec=krb5i,*|*,sec=krb5i,*|sec=krb5p|*,sec=krb5p|sec=krb5p,*|*,sec=krb5p,*)
start_nfs=yes
;;
esac
;;
nfs4)
# NFSv4 requires idmapd, so start nfs-common no matter
# what the options are.
start_nfs=yes
;;
smbfs|cifs|coda|ncp|ncpfs|ocfs2|gfs)
;;
*)
FSTYPE=
;;
esac
if [ "$FSTYPE" ]
then
case "$NETFS" in
$FSTYPE|*,$FSTYPE|$FSTYPE,*|*,$FSTYPE,*)
;;
*)
NETFS="$NETFS${NETFS:+,}$FSTYPE"
;;
esac
fi
done
exec 0<&9 9<&-
#
# Initialize nfs-common (which starts rpc.statd, rpc.gssd
# and/or rpc.idmapd, and loads the right kernel modules if
# applicable) if we use Kerberos and/or NFSv4 mounts.
#
if [ "$start_nfs" = yes ] && [ -x /etc/init.d/portmap ] && [ -x /etc/init.d/nfs-common ]
then
/etc/init.d/portmap start
/etc/init.d/nfs-common start
fi
if [ "$NETFS" ]
then
pre_mountall
mount -a -t$NETFS
post_mountall
fi
}
do_start
:
i also tried removing /etc/network/if-up.d/mountnfs but nothing changes ...
here is my /etc/network/interfaces:
Code:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.0.17
netmask 255.255.240.0
broadcast 192.168.15.255
gateway 192.168.0.1
### vlans
auto vlan2
iface vlan2 inet static
address 192.168.2.17
netmask 255.255.255.0
broadcast 192.168.2.255
vlan_raw_device eth0
auto vlan1
iface vlan1 inet static
address 192.168.1.17
netmask 255.255.255.0
broadcast 192.168.1.255
vlan_raw_device eth0
and i also here is my testparm for smb.conf
Code:
[global]
unix charset = iso8859-7
workgroup = SERVERS
server string = New server
interfaces = 127.0.0.0/8, eth0
bind interfaces only = Yes
security = SHARE
obey pam restrictions = Yes
passdb backend = tdbsam
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n .
unix password sync = Yes
syslog = 0
log file = /var/log/samba/log.%m
max log size = 1000
name resolve order = wins host bcast
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
load printers = No
printcap name = /dev/null
disable spoolss = Yes
show add printer wizard = No
domain master = No
dns proxy = No
wins server = 192.168.0.1
panic action = /usr/share/samba/panic-action %d
printing = bsd
print command = lpr -r -P'%p' %s
lpq command = lpq -P'%p'
lprm command = lprm -P'%p' %j
i tried adding the vlans at interfaces in smb.conf but that didn't help also.
the most annoying thing is that the same setup works great in 8.04 and 8.10!
so what can possibly be the issue here ?
Bookmarks