Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 96976 - kernel route problem with vlan
Summary: kernel route problem with vlan
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Roy Marples (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-24 12:42 UTC by Chan Min Wai
Modified: 2005-06-27 10:01 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chan Min Wai 2005-06-24 12:42:16 UTC
The ip route was not being added as it should be with vlan. Wrong route have
been added into the routing table and causing problem in the network.

Reproducible: Always
Steps to Reproduce:
1. Change /etc/conf.g/net and add an interface with Vlan, configure so that it
have proper subnet and ip address.
2. Start that interface, and check the route if is present.

Actual Results:  
ip route show
192.168.0.0/24 dev eth0  proto kernel  scope link  src 192.168.0.20
172.16.2.0/23 dev eth0.1  proto kernel  scope link  src 172.16.3.1
172.16.2.0/23 dev eth0.2  proto kernel  scope link  src 172.16.2.1
127.0.0.0/8 via 127.0.0.1 dev lo  scope link
default via 192.168.0.10 dev eth0

Expected Results:  
ip route show
192.168.0.0/24 dev eth0  proto kernel  scope link  src 192.168.0.20
172.16.3.0/23 dev eth0.1  proto kernel  scope link  src 172.16.3.1
172.16.2.0/23 dev eth0.2  proto kernel  scope link  src 172.16.2.1
127.0.0.0/8 via 127.0.0.1 dev lo  scope link
default via 192.168.0.10 dev eth0

Saw the different on line 3 (on the actual Result)
172.16.2.0/23 dev eth0.1  proto kernel  scope link  src 172.16.3.1
This is a wrong route.

Attach of /etc/conf.d/net as an example (the one that this example use)
# /etc/conf.d/net:
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/conf.d/net,v 1.7 2002/11/18
19:39:22 azarah Exp $
# Global config file for net.* rc-scripts
iface_eth0="dhcp"
dhcpcd_eth0="-HDN"
iface_eth0_vlans="1 2"
ifconfig_eth0_1=( "172.16.3.1 netmask 255.255.254.0" )
ifconfig_eth0_2=( "172.16.2.1 netmask 255.255.254.0" )



Portage 2.0.51.19 (default-linux/x86/2005.0, gcc-3.3.5-20050130,
glibc-2.3.4.20041102-r1, 2.6.11-gentoo-r6 i686)
=================================================================
System uname: 2.6.11-gentoo-r6 i686 Intel(R) Pentium(R) 4 CPU 1300MHz
Gentoo Base System version 1.6.12
Python:              dev-lang/python-2.3.5 [2.3.5 (#1, May 15 2005, 04:42:37)]
ccache version 2.3 [enabled]
dev-lang/python:     2.3.5
sys-apps/sandbox:    [Not Present]
sys-devel/autoconf:  2.59-r6, 2.13
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.5
sys-devel/binutils:  2.15.92.0.2-r10
sys-devel/libtool:   1.5.16
virtual/os-headers:  2.6.8.1-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -march=pentium4 -fomit-frame-pointer -pipe -falign-functions=64
-mmmx -msse -msse2"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env
/usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3.4/env
/usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config
/var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=pentium4 -fomit-frame-pointer -pipe -falign-functions=64
-mmmx -msse -msse2"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig buildpkg candy ccache distlocks fixpackages
sandbox sfperms strict"
GENTOO_MIRRORS="http://mymirror.asiaosc.org/gentoo/ http://mirror.gentoo.gr.jp/"
LANG="zh_TW.UTF-8"
LC_ALL="zh_TW.UTF-8"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /usr/local/got"
SYNC="rsync://rsync.asia.gentoo.org/gentoo-portage"
USE="x86 X a52 aac aalib acl acpi aim alsa apache2 apm arts audiofile avi
bash-completion berkdb bitmap-fonts bluetooth bonobo bootsplash bzip2 bzlib
calendar caps ccache cdb cdda cddb cdio cdparanoia cdr chroot cjk cpudetection
crypt css cups curl dbm dga dio divx4linux djbfft doc dts dvb dvd dvdr dvdread
eds emboss encode esd ethereal evo2 exif fam fame fb fbcon ffmpeg fftw flac
flash foomaticdb gd gif gnome gnutls gpm gstreamer gtk gtk2 gtkhtml guile hal
hardenedphp howl iconv icq imagemagick imap imlib innodb iodbc jabber java
javascript jp2 jpeg jpeg2k junit kde kerberos ldap libg++ libwww live lm_sensors
logitech-mouse mad maildir mbox mhash mikmod milter mime ming mjpeg mmx mmxext
motif mozcalendar mozilla mp3 mpeg mpeg4 mplayer msn mysql mysqli ncurses
network nls nptl nptlonly ogg oggvorbis openal opengl oscar oss pam pcre pda
pdflib perl php plotutils png posix postgres python qt quicktime rar readline
real rss samba sasl sblive sdl server sockets socks5 speex spell sse ssl svga
tcpd threads tiff tokenizer transcode truetype truetype-fonts trusted
type1-fonts unicode usb vcd vcdimager vhosts videos vnc vorbis win32codecs
wxwindows xine xml xml2 xmlrpc xmms xosd xpm xprint xscreensaver xv xvid yahoo
zh_TW zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CBUILD, CTARGET, LDFLAGS, LINGUAS
Comment 1 Chan Min Wai 2005-06-25 11:25:03 UTC
This is urgent any comment so far?
Comment 2 John Mylchreest (RETIRED) gentoo-dev 2005-06-27 10:01:13 UTC
This isnt actually a bug at all.
the /XX notation is CIDR notation. this is the value of consecutive 1's in the
netmask.
a /23 is 23 consecutive 1's which leaves 9 bits for the actual host range of any
network.
each octet contains the bits:
128 64 32 16 8 4 2 1 - which equates to
 1  1  1  1  1 1 1 0 - in binary for your netmask in the 3rd octet.
this means that the network addresses for the given subnets will be in groups of 2.
ie:

192.168.0.0
192.168.2.0
192.168.4.0

192.168.3.232/23 for example gives a network address of: 192.168.2.0 and a
broadcast address of: 192.168.3.255

I think you are looking for a /24 on those networks.
I will close as WONTFIX, please feel free to comment.