PDA

View Full Version : network configuration boot problems



mobad
08-27-2004, 08:56 PM
hi there,

im just trying my first steps with knoppix(linux in general) so far and encountering the first problems with setting up the network config of my notebook. i ask for patience :wink: first problem is after installing knoppix on hdd there is slight problem with starting the network functionally. at the boot screen i can see network cards are properly recognized and ip-adresses get assigned. but after starting flux and trying to ping some host on my lan > timeout.
ifconfig shows me the nics are recognized but not configured (no assigned ip adresses...). then i use "/etc/init.d/networking start" and voilá it starts moving ;) strange thing is it says the devices are already configured :? my first question is: how to configure this properly?
so fortuna is gentle and allows me to ping clients on the lan. but here comes the second problem. i cant get a working inet connection. no ping possible to www.google.com (dns works). my first thought on this since lan works: router config problem. but hey it works on my 2nd ! winXP partition. so i cross-checked the router config and the knoppix network config for discrepancies. nothing unusual at all :?
the problem lies within the routing. there are three nics installed and configured for network access - ethernet eth2 and wifi eth0, wifi eth1(intel2100bg - not working..yet). as long as my wifi card eth0 is "up" (but not connected), i can resolve hostnames from inet, but cant reach them (e.g. via ping, http,...). when the wlan adapter eth0 is "down", it works via eth2. whats going on here? somebody help pls.

/etc/network/interfaces
-----------------------------
auto lo eth2 eth0
iface lo inet loopback

iface eth0 inet static
address 192.168.0.22
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1 >>> #wlan-router#

iface eth2 inet static
address 192.168.0.21
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1
----------------------------------------------#

/etc/resolv.conf
------------------
nameserver 192.168.0.1

----------------------------------------------#

eth0 activated:

#route -n
---------
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 * 255.255.255.0 U 0 0 0 eth0
192.168.0.0 * 255.255.255.0 U 0 0 0 eth2
0.0.0.0 192.168.0.1 0.0.0.0 U 0 0 0 eth0
0.0.0.0 192.168.0.1 0.0.0.0 U 0 0 0 eth2

----------------------------------------------------------------------------------#

eth0 deactivated

#route -n
----------
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 * 255.255.255.0 U 0 0 0 eth2
0.0.0.0 192.168.0.1 0.0.0.0 U 0 0 0 eth2

how and in what file to configure the default routing entrys?

my writing style is confusing and my english sucks...but i hope u can help :D

thx & greetz
mobad

shah
08-28-2004, 02:06 AM
This is what I see.

1) You don't need gateway in eth2, you can remove it.
2) /etc/resolv.conf, your name server is wrong. It shouldn't be your gateway.
It should be the name server provided by your ISP.

Don't forget networking restart after changing it.
:D

mobad
08-28-2004, 08:45 PM
thx shah for helping :D

i tried the way you posted...and it works now :D

since im a spoiled windows user, linux seems for me more complicated - better - more digging deeper into the material , so i have just a few more questions/problems :mrgreen:

1. i deleted gateway-entry in eth2 ... this didnt work as this is the main nic/at the moment physically connected to lan. otherwise it worked for deleting gateway in eth0 and keeping the entry for eth2. no routing problems in eth2 by now.
in my scenario, when i get eth0 (wlan-nic) working (at the moment lack of time resolving the problem with tkip under linux), this will be my master entry to the network...so i'll have to reconfigure the gateways again. this solution isnt satisfying. how to ensure co-existenz of both cards, independently when and in what combination i use them?

2. the network isnt available at boot-up, i.e. i have to login as root and "ifdown eth2" then "ifup eth2" that the full network config is getting assigned and the connection is operational. the other option is doing networking restart twice to make it work. how to configure this properly, so that after booting, login in (as root or normal user), starting tux, flux, kde or whatever and launch my browser the network is UP ????

3. do you know a good linux/knoppix faq/howto/resource website besides the first ten results from google? :wink:

thx again & greetz :D
mobad

shah
08-29-2004, 02:29 AM
Mobad

1) Both your card can coexist but can't use same gateway ( I believed ). When your eth0 is working, you need to configure the gateway.
But you can try this:
Set your eth0(wlan) to received ip from router (DHCP) and eth2 leave it as it is. Make sure your Wlan router set as DHCP server (dhcp broadcast).
Meaning your /etc/network/interfaces should look like this:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

auto lo eth2
iface eth2 inet static
address 192.168.0.21
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1

**You can change between eth0 or eth2, which one you prefer to received IP automatically.
**This might not work.

2) This is a known problem, bug in knoppix-autoconfig. There are two ways to solve this problem, editing knoppix-autoconfig or make your own script.
a) Editing /etc/init.d/knoppix-autoconfig
comment out line that reads: pump -i $DEVICE >/dev/null 2>&1 &
and add line : /etc/init.d/networking restart
ex:
broadcasting for IP.${NORMAL}"
trap 2 3 11
#pump -i $DEVICE >/dev/null 2>&1 &
/etc/init.d/networking restart
trap "" 2 3 11
sleep 1
echo " ${BLUE}(Backgrounding)${NORMAL}"

b) Create your own script:
ex:
#!/bin/sh
ifconfig eth0 down
ifconfig eth2 down
/etc/init.d/networking stop
ifconfig eth0 up
ifconfig eth2 up
/etc/init.d/networking start

name it to what ever you wan't ex: mynet.sh and save it in /etc/init.d
and run update-rc.d mynet.sh defaults so it can run on boot. To remove , run update-rc.d -f mynet.sh remove .

3) Don't google for knoppix, but google for Debian. That what knoppix based on.

Happy knoppix :D :D