network diagnostic


Forum: Networking
Topic: network diagnostic
started by: kreon28

Posted by kreon28 on May 01 2007,17:33
Hi,

I used the wiki way to save my static IP and it worked.
But since couple of days, my network is dead.
Everything looks fine, I mean dhcp is disabled and when I start netcardconfig evertything is ok, I just have to click ok.
But..I have to do it every boot. So I wonder where can I find some diagnostic log why I have to config my net everytime I reboot my box.

p,s.
My bootlocal.sh
Code Sample

#!/bin/bash
# put other system startup command here
/sbin/syslogd
loadkeys pl
xmodmap /usr/share/xmodmap/xmodmap.pl
ifconfing eth0 192.168.0.2
route add default gw 192.168.0.255
echo nameserver 194.204.159.1 > /etc/resolv.comf
ifup eth0


after rebooting - I tried to run bootlocal,sh in the terminal
Code Sample

#/opt/bootlocal.sh
syslogd: Could not connect to socket /dev/log: Address already in use
Loading /usr/share/keymaps/i386/qwerty/pl/kmap.gz
Keymap 0: Permission denied
Keymap 1: Permission denied
Keymap 2: Permission denied
Keymap 3: Permission denied
Keymap 4: Permission denied
KDSKBENT: Operation not permitted
loadkeys: could not deallocate keymap 5
/opt/bootlocal.sh: line 6: ifconfig: command not found
SIOCADDRT: Operation not permitted
/opt/bootlocal.sh: line 8 /etc/resolv.conf: Permission deniad
ifup: failed to open statefile /etc/network/ifstate: Permission denied

Posted by curaga on May 03 2007,14:39
All of those errors are caused by you not being root... Sudo won't work, 'cause it doesn't make your $PATH what it is when you're really root...

What kind of install do you use?

Posted by kreon28 on May 03 2007,15:44
Well, it's A HD install /DSL 3.1/
Posted by curaga on May 03 2007,16:05
Change your bootlocal.sh to this:

Quote
#!/bin/ash
# put other system startup command here
/sbin/syslogd
loadkeys pl
xmodmap /usr/share/xmodmap/xmodmap.pl
ifconfig eth0 192.168.0.2 up
route add default gw 192.168.0.255


ash is there 'cause it's a lot faster than bash, echo is not needed as you have a hd-install (everything is permanent)

I think this'll let your net work automatically...

Posted by kreon28 on May 04 2007,15:06
Quote (curaga @ May 03 2007,12:05)
ash is there 'cause it's a lot faster than bash, echo is not needed as you have a hd-install (everything is permanent)

I think this'll let your net work automatically...

Unfortunately, nothing changes :(
During boot, I got an error:
Code Sample
SIOCADDRT: Network is unreachable

Ifconfig works fine and eth0 is seen as 192.168.0.2, but ping and internet don't work.

P.S. Command I pasted into bootlocal.sh
Code Sample
xmodmap /usr/share/xmodmap/xmodmap.pl

doesn't work either and I have to run it every boot

Posted by curaga on May 04 2007,15:23
Do you mean after the bootlocal, manually?
Oh yea, xmodmap! it's an X app! So put it in /home/dsl/.xinitrc instead of bootlocal... Above the case line..

Googling showed that error related to netmask... Is your netmask 255.255.255.0? Then that ifconfig line could be
ifconfig eth0 192.168.0.2/24 up

edit: oops, gateway needs to exist before up'ping. Here's the whole script:
Quote
#!/bin/ash
# put other system startup command here
/sbin/syslogd
loadkeys pl
ifconfig eth0 192.168.0.2/24
route add default gw 192.168.0.255
ifconfig eth0 up


edit 2: WTF? your gateway just cannot be .255, that's the broadcast address! (aka sent to All on that net) Check the gateway?

Posted by kreon28 on May 04 2007,17:09
Quote (curaga @ May 04 2007,11:23)
edit 2: WTF? your gateway just cannot be .255, that's the broadcast address! (aka sent to All on that net) Check the gateway?

Yeah, gateway address was f#$%ed up :/
But after changing it and writing your script, it looks like everything works  :D
Thanx!

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.