Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 123018 - baselayout won't set ip addr to a adsl interface
Summary: baselayout won't set ip addr to a adsl interface
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Roy Marples (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-16 03:54 UTC by Steve Yin
Modified: 2006-02-16 23:14 UTC (History)
2 users (show)

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 Steve Yin 2006-02-16 03:54:02 UTC
Say, I have a computer with only one net interface, and I have a adsl connection to that interface, Of course I want this computer to be a gateway for my home network.

But, the baselayout won't set ip address to that interface if I set config_eth0=( "adsl" ) to /etc/conf.d/net . This will cause a big problem, I can not set nor get the ip address to the nic, thus I can not set it as a gateway.

A easy solve is to manually start the adsl connection, But , this is not a good  solution. If one had to do this, then  what is the statement config_eth0=("adsl") for??

So, I want to know if this can be done in next version of baselayout?
Comment 1 SpanKY gentoo-dev 2006-02-16 06:02:16 UTC
works fine for me

provide `emerge info` along with some more info and re-open
Comment 2 Steve Yin 2006-02-16 07:26:13 UTC
no need to post emerge info, just check this:

steve steve # grep config_eth0 /etc/conf.d/net
...
config_eth0=( "192.168.0.1 netmask 255.255.255.0 broadcast 192.168.0.255" )
...
config_eth0=( "adsl" )
...

I set the eth0 to 192.168.0.1 then check the ifconfig output

steve steve # ifconfig
eth0      Link encap:Ethernet  HWaddr 00:20:ED:5C:84:C1
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:596 errors:0 dropped:0 overruns:0 frame:0
          TX packets:867 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:450624 (440.0 Kb)  TX bytes:116550 (113.8 Kb)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:107 errors:0 dropped:0 overruns:0 frame:0
          TX packets:107 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:6704 (6.5 Kb)  TX bytes:6704 (6.5 Kb)

ppp0      Link encap:Point-to-Point Protocol
          inet addr:221.226.197.243  P-t-P:218.2.135.63  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1
          RX packets:132 errors:0 dropped:0 overruns:0 frame:0
          TX packets:145 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:60099 (58.6 Kb)  TX bytes:37790 (36.9 Kb)

there is a adsl connection: ppp0, but where is the 192.168.0.1 ip address i set to eth0?

the check the ping :
steve steve # ping 192.168.0.1
PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.

--- 192.168.0.1 ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 1014ms

eth0 is not set to 192.168.0.1, if eth0 have no ipaddress, How can I set it as a gateway of a network?

if I set the wrong config, How can I set the config? the net config guide didn't  told me anything about this.
Comment 3 Alin Năstac (RETIRED) gentoo-dev 2006-02-16 07:58:41 UTC
you set the config_eth0 twice. naturally, at the end of /etc/conf.d/net execution, config_eth0 will have the value ( "adsl" ).

probably you wanted to set it like this:
...
config_eth0=( 
   "192.168.0.1 netmask 255.255.255.0 broadcast 192.168.0.255"
   "adsl" 
)
...
Comment 4 SpanKY gentoo-dev 2006-02-16 10:01:19 UTC
you need to post `emerge info` when you file a bug about baselayout because we often change code dramatically between branches

in this case, we have no idea whether you're using baselayout 1.11.x or 1.12.x
Comment 5 SpanKY gentoo-dev 2006-02-16 10:01:44 UTC
Alin just pointed out the issue
Comment 6 Steve Yin 2006-02-16 17:32:17 UTC
sorry for the info, here it is.

Portage 2.1_pre4-r1 (default-linux/x86/2005.1, gcc-3.4.4, glibc-2.3.6-r2, 2.6.15-gentoo-r5 i686)
=================================================================
System uname: 2.6.15-gentoo-r5 i686 Intel(R) Pentium(R) 4 CPU 2.40GHz
Gentoo Base System version 1.6.14
dev-lang/python:     2.4.2
sys-apps/sandbox:    1.2.12
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.6-r1
sys-devel/binutils:  2.16.1-r1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium4 -fomit-frame-pointer -pipe -DNDEBUG -fno-ident"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/3/share/config /usr/share/X11/xkb /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/bind /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=pentium4 -fomit-frame-pointer -pipe -DNDEBUG -fno-ident  -fno-enforce-eh-specs -fvisibility-inlines-hidden"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://mirror.datapipe.net/pub/gentoo ftp://ftp.linuxforum.net/pub/gentoo"
LC_ALL="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,-Bdirect"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://owl.gentoo.org/gentoo-portage"
USE="x86 X a52 aac aalib accessibility acl acpi alsa apache2 apm arts audiofile authdaemond avi bash-completion bcmath berkdb bitmap-fonts bluetooth bmp bonobo bzip2 bzlib cairo caps cdr cjk crypt cscope ctype cups curl dbus directfb dlloader dmx dri dts dvd dvdr eds emacs-w3 emboss encode esd exif expat fam fbcon ffmpeg firefox flac foomaticdb fortran freetds freetype gd gdbm ggi gif gimpprint glitz glut gmp gnome gnutls gphoto2 gpm gstreamer gtk gtk2 gtkhtml guile hal iconv idn imagemagick imlib immqt-bc ipv6 ithreads jack java javascript jikes joystick jpeg jpeg2k junit kdeenablefinal kerberos lcms ldap libcaca libg++ libwww lirc lm_sensors mad maildir mailwrapper matroska memlimit mikmod mime mmap mmx mng motif mp3 mpeg mysql mysqli nas ncurses nis nls nocardbus nptl nptlonly nsplugin odbc offensive ogg oggvorbis openal openexr opengl pam pcmcia pcntl pcre pda pdflib perl php plotutils png pnp portaudio posix postgres ppds profile python qt quicktime readline ruby samba sasl sdl sftplogging skey slang slp sndfile snmp soap socks5 speex spell sqlite sse ssl svg svga symlink tcltk tcpd tetex theora threads tiff truetype truetype-fonts trusted type1-fonts unicode usb vcd vhosts vorbis win32codecs wmf xine xinerama xml xml2 xpm xprint xv xvid zlib elibc_glibc input_devices_mouse input_devices_keyboard input_devices_joystick input_devices_evdev kernel_linux userland_GNU video_cards_nv video_cards_none"
Unset:  ASFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, LANG, LINGUAS


Alin Nastac is right, the problem is the config problem. And also, I think this should be right in the installation handbook. Because there must be some people have the same problem as mine.
Comment 7 Alin Năstac (RETIRED) gentoo-dev 2006-02-16 23:14:51 UTC
gentooers should at least know how to set a variable in a bash script. 
you can't expect to learn everything there is to know about Unix systems from a handbook.