I have two NICs. My network will not work unless the gateway is specified to "sit on" eth1. *) This will work: gateway="eth1/10.0.1.1" **) This will not work: gateway="eth0/10.0.1.1" The problem is easily seen when the gateway is "moved to" eth0. A "/etc/init.d/net.eth0 restart" will give you a functioning network but a following "/etc/init.d/net.eth1 restart" will break the network. As eth0 is started before eth1 when booting, this has the consequence of making the network not working. Putting the gateway on eth1 will make the network work as eth1 is started last in the boot sequence. Reproducible: Always Steps to Reproduce: 1.See "Details" above. 2. 3. Actual Results: The gateway *must* sit on the NIC that is started last in the boot sequence. This should at least be mentioned in the handbook. Expected Results: It should be possible to specify a gateway that isn't bound to any local NIC in particular. omc-1 conf.d # emerge --info Portage 2.0.51.22-r2 (default-linux/x86/2005.0, gcc-3.3.5-20050130, glibc-2.3.5-r0, 2.6.11-gentoo-r11 i686) ================================================================= System uname: 2.6.11-gentoo-r11 i686 Intel(R) Pentium(R) 4 CPU 3.00GHz Gentoo Base System version 1.6.13 dev-lang/python: 2.3.5 sys-apps/sandbox: 1.2.10 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.5 sys-devel/binutils: 2.15.92.0.2-r10 sys-devel/libtool: 1.5.18-r1 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks sandbox sfperms strict" GENTOO_MIRRORS="http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/ http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ http://pandemonium.tiscali.de/pub/gentoo/ ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo http://mirror.gentoo.no/ http://gentoo.prz.rzeszow.pl http://ftp.du.se/pub/os/gentoo ftp://mirror.pudas.net/gentoo" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="x86 X apm berkdb bitmap-fonts bzip2 cdr crypt cups curl eds emacs emboss fam fbcon foomaticdb fortran gdbm gif gnome gstreamer gtk gtk2 gtkhtml hal imlib ipv6 jpeg libg++ libwww motif mozilla mpeg ncurses nls nptl opengl pam pdflib perl png python quicktime readline sdl spell ssl symlink tcpd tetex tiff truetype truetype-fonts type1-fonts unicode xml2 xv zlib userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS, PORTDIR_OVERLAY
The new configuration in baselayout-1.11.13 allows the use of the route_eth0 syntax to set gateways http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=4&chap=1 routes_eth0=( "default via 10.0.1.1" ) routes_eth1=( "default via 10.0.1.1" )
(In reply to comment #1) > The new configuration in baselayout-1.11.13 allows the use of the route_eth0 > syntax to set gateways > > http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=4&chap=1 > > routes_eth0=( "default via 10.0.1.1" ) > routes_eth1=( "default via 10.0.1.1" ) I tried that, but it doesn't work. My exact /etc/conf.d/net is: ############# iface_eth0="10.0.1.4 broadcast 10.0.1.255 netmask 255.255.255.0" iface_eth1="10.0.1.5 broadcast 10.0.1.255 netmask 255.255.255.0" routes_eth0=( "default via 10.0.1.1" ) routes_eth1=( "default via 10.0.1.1" ) #gateway="eth1/10.0.1.1" ############# It only works if the "gateway=..." is effective.
config_eth0=( "10.0.1.4 broadcast 10.0.1.255 netmask 255.255.255.0" ) config_eth1=( "10.0.1.5 broadcast 10.0.1.255 netmask 255.255.255.0" ) routes_eth0=( "default via 10.0.1.1" ) routes_eth1=( "default via 10.0.1.1" ) There ya go :) BTW, the gateway var is translated into a routes_ethx variable However - with the current stable version of baselayout you can only have one default route, and you're adding two - if both interfaces are active at the same time. baselayout-1.12.0 will solve this issue by clever use of route metrics :)
(In reply to comment #3) > config_eth0=( "10.0.1.4 broadcast 10.0.1.255 netmask 255.255.255.0" ) > config_eth1=( "10.0.1.5 broadcast 10.0.1.255 netmask 255.255.255.0" ) > > routes_eth0=( "default via 10.0.1.1" ) > routes_eth1=( "default via 10.0.1.1" ) > > There ya go :) Thanks a lot. Works fine :-)