small netowrk question


Forum: Networking
Topic: small netowrk question
started by: realpc

Posted by realpc on Oct. 21 2004,09:23
hello all.
i have tried all i know and been through this and other forums to try and find an answer and this is my last resort.
when booting dsl i need to run ifup eth0 in order for the network card to function, all the setting (ip, gw, snm) are there and used but before it will work on the network i need to run the above command

as this box will be a file server i need it to happen automatically.

its a hd install, its the latest version.

i have tried adding this line to the /etc/network/interfaces file and nothing.

i have also tried adding this line the the same file in /etc/r5.d that i run smbd and nmbd from and they start up fine, but eth0 still needs to be enabled using ifup eth0 from a terminal window.

any ideas please?

many thanks in advance.

Posted by skaos on Oct. 21 2004,09:54
You could try to put it in /opt/bootlocal.sh. Not a very clean solution (and I have no idea if it will work).
Posted by AwPhuch on Oct. 21 2004,16:13
place that command in /etc/rc5.d/S99bootlocal and it will autostart, in fact all commands for "startup" should go in there, even the swapon command works in there

S99bootlocal is like the /etc/rc.d/rc.local file in Redhat

Kinda like the "startup" dir on a M$ system

Brian
AwPhuch

Posted by steve on Oct. 21 2004,17:20
hi all.

tried all the above suggestions, done them all and te eth0 device wont come up on boot.

weird thing is i ping the dsl box with a -t from a m$ box, and as the dsl system comes up it settles at the login prompt. the m$ box has been unable to ping the dls box so i have a load of request timed out messages.

as soon as the dsl box settles at the login i get about 30 responses back on the m$ box and then after that it goes back to request timed out.

login and things are the same, still need to ifup to get anything out of it.

its a silly irritating problem but i guess life would be boring without them.

i have changed the nic also for a different speed and make, no better.

i dont know if this has any bearing but under the dls control panel dhcp is enabled, allthough i have set my /etc/network/interfaces file to static.and have run the netcardconfig and asked for static.

when i alter the control panel to turn off dhcp then after a reboot dhcp goes back to on again.

just prior to the login screen, there is a line (in green) that says network device eth0 detected broadcasting for ip (backgrounding).

again thanks for any advice.

steve.

Posted by realpc on Oct. 21 2004,17:24
sorry, forgot to log in, the above guest post if from me (realpc).

doh!

Posted by AwPhuch on Oct. 21 2004,18:03
if ifup doesnt work try
Code Sample
ifconfig eth0 up


does your server box need to be dhcp??

Brian
AwPhuch

Posted by realpc on Oct. 21 2004,18:08
nope, i want it to have a static.address, in fact i net card configed it to have one.

when i ifup eth0 then it adopts the static.addressing i gave it at the time of install.

Posted by AwPhuch on Oct. 21 2004,18:22
ifconfig eth0 up
ifconfig eth0 192.168.1.10 (or whatever)

if you do a ifconfig -a it will show you what you have

you can also create a script to auto-input all this for you

Code Sample
touch /usr/sbin/ethernet.setup

inside that file add
Quote

#!/bin/bash
# setting up eth0 with static.ip
ifconfig eth0 up
ifconfig eth0 192.168.1.10 <---change this to whatever ip you want


Then in the /etc/rc5.d/S99localboot put in the command line /usr/sbin/ethernet.setup
You also have to make it executable
Code Sample
chmod 700 /usr/sbin/ethernet.setup


You can either reboot to test or type /usr/sbin/ethernet.setup and it will run it

P.S. "ifconfig --help" gives you the output of what you can set with the ifconfig command

Brian
AwPhuch

Posted by realpc on Oct. 21 2004,18:43
thanks for this.

did all you told me to and after a reboot i got a message just above the login prompt saying...

/etc/rc5.d/S99bootlocal: line 4: /usr/sbin/ethernet.setup: permission denied.

i assigned all permissions to the ethernet.setup file just in case (rwxrwxrwx)

hmmm at least you are managing to get some response out of it!

regards.

steve.

Posted by AwPhuch on Oct. 21 2004,20:20
Quote (realpc @ Oct. 21 2004,14:43)
thanks for this.

did all you told me to and after a reboot i got a message just above the login prompt saying...

/etc/rc5.d/S99bootlocal: line 4: /usr/sbin/ethernet.setup: permission denied.

i assigned all permissions to the ethernet.setup file just in case (rwxrwxrwx)

hmmm at least you are managing to get some response out of it!

regards.

steve.

is it owned by root or another account?
Code Sample
cd /usr/sbin :  ls -lah

chown root:root /usr/sbin/ethernet.setup


I just tested on mine and it works fine...

Brian
AwPhuch

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