LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook
User Name
Password
Linux - Laptop and Netbook Having a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).

Notices


Reply
  Search this Thread
Old 07-31-2006, 02:12 PM   #1
mpdsal
LQ Newbie
 
Registered: Jul 2006
Posts: 10

Rep: Reputation: 0
Running Slackware on a Toshiba Tecra- can't obtain an ip address


Greetings. My first post here and a relative newbie to Linux. I have an old Toshiba Tecra running Slackware/Linus version 2.4.26. I realize this is a bit dated but it has been working fine for over a year now. I use it run Nessus scans of my network. It last ran fine in April. Haven't fired up since then. Well, I fired it up the other day, it boots up fine, no error statement yet I cannot get an ip address. It appears to be in Loopback. My PCMCIA card appears to be fine. My network light is lit and the cable is live. What can I do to troubleshoot this to obtain an ip address. I appreciate any and all assistance. Thanks

Mark
 
Old 07-31-2006, 02:48 PM   #2
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900

Rep: Reputation: 69
Run :
dhclient
- or -
if you know what ip you should have try:

ifconfig eth0 xxx.xxx.xxx.xxx netmask <255.255.255.000/or something> up
route -n add default gw yyy.yyy.yyy.yyy

also add dns to /etc/resolv.conf
 
Old 07-31-2006, 03:12 PM   #3
mpdsal
LQ Newbie
 
Registered: Jul 2006
Posts: 10

Original Poster
Rep: Reputation: 0
Raskin, when I type dhclient this is what it returns:
DHCP Client V3.0p12

No broadcast interaces found - exiting

Thanks

Mark
 
Old 07-31-2006, 03:25 PM   #4
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900

Rep: Reputation: 69
Oooh. Bonus. I knew dhclient is funny.
ifconfig eth0 1.1.1.1 up
dhclient
 
Old 07-31-2006, 03:56 PM   #5
mpdsal
LQ Newbie
 
Registered: Jul 2006
Posts: 10

Original Poster
Rep: Reputation: 0
Raskin, here is what I get when I try that command:

Listening on Socket/eth0
Sending on Socket/eth0

DHCPDISCOVER on port 67 interval 5,6,7,13,20,10


NO DHCPOFFERS Received
No working leases in persistent database - sleeping

What's next? I appreciate your assistance.

Mark
 
Old 07-31-2006, 04:02 PM   #6
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900

Rep: Reputation: 69
Well, no auto-configuration. What net are you connected to? Do you know what IP should you be using? Did you try ifconfig/route way?
 
Old 07-31-2006, 04:22 PM   #7
mpdsal
LQ Newbie
 
Registered: Jul 2006
Posts: 10

Original Poster
Rep: Reputation: 0
What is the syntax for the ifconfig/route again? should I ask for a static ip address? What do I put in place of the xxx.xxx.xxx.xxx?
 
Old 08-01-2006, 04:16 AM   #8
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900

Rep: Reputation: 69
xxx.xxx.xxx.xxx is your IP address (static)
yyy.yyy.yyy.yyy is router IP address
<2555.255.255.000/whatever> is your netmask

I gave you lines that should work, but still read man ifconfig, man route
 
Old 08-02-2006, 11:17 AM   #9
mpdsal
LQ Newbie
 
Registered: Jul 2006
Posts: 10

Original Poster
Rep: Reputation: 0
Waiting for my static ip address from IT. Will try your commands when I receive that. Stay tuned.
 
Old 08-02-2006, 02:16 PM   #10
mpdsal
LQ Newbie
 
Registered: Jul 2006
Posts: 10

Original Poster
Rep: Reputation: 0
That worked! You're a genius!! Now do I have to type this in manually everytime I power up? Is there a way to assign this permanently so when it powers up this is all there? Thanks
Mark
 
Old 08-02-2006, 02:26 PM   #11
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900

Rep: Reputation: 69
Go to /etc/rc.d/init.d (or just /etc/init.d ?) . Create a script (and make it executable) that does the job. Symlink it to rcsysinit.d next to init.d wherever it is located, or maybe to rc3.d and rc5.d, with a name starting with S (look how everything is made in the dir and act in the same way). Read man init, man inittab also.
 
Old 08-02-2006, 04:11 PM   #12
mpdsal
LQ Newbie
 
Registered: Jul 2006
Posts: 10

Original Poster
Rep: Reputation: 0
Hold on, you are getting too technical. I don't have any experience with writing Linux scripts. Can you shoot me an email on how to create a script with the required syntax for the commands that need to be inserted, or point me to a site that shows me? Here is my address: mark.doherty@gerberscientific.com
Thanks
 
Old 08-02-2006, 04:34 PM   #13
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900

Rep: Reputation: 69
Well, as I collect threads I can link to, I will continue here..

Script is:
Code:
#! /bin/bash
- as a first line. #! as 2 first characters make kernel read the rest of line (/bin/bash) and use it as an interpreter, that means, feed it with the file. You are using bash (if you don't know, you are), so it should be like that.

Then goes what you would type in shell, except that there are additional variables:
Code:
echo "$PATH"
shows PATH variable in both shell and script, but
Code:
echo "$1"
works only in script and shows first parameter to script (parameter is something on command line after command name).

But you don't need it. So you just paste
Code:
ifconfig eth0 xxx.xxx.xxx.xxx netmask <255.255.255.000/or something> up
route -n add default gw yyy.yyy.yyy.yyy
Now you save it (heh) and run
Code:
chmod a+x ip-address
It says to system, that the file is intended to be executed as a script (not only read as text).

Now you can run it as root:
Code:
[localhost /]# ./ip-address
and check it gives you network (do it after reboot).
Code:
[localhost /]#
is only simulation of root prompt (as opposed to ordinary user's). Don't retype it! (Well, more interesting for those who copy-paste - don't do it without reading)

Now go to /etc . You will find either /etc/rc.d/init.d or /etc/init.d .
Copy script to it. Go to init.d dir, then to ../rc3.d . With
Code:
ln -s ../init.d/ip-address S99_50ip-address
create a link for it (really, any S-starting symlink will do, but this will do it last command in init sequence).
Now do the same in ../rc5.d . Reboot. Doest it work?
 
Old 08-03-2006, 09:05 AM   #14
mpdsal
LQ Newbie
 
Registered: Jul 2006
Posts: 10

Original Poster
Rep: Reputation: 0
I'll give it a try. Thanks for all of your assistance. I have one more question. This laptop, when I ran it last in April, was able to get an ip address automatically. When I powered up this week I couldn't automatically get an ip address but the static address worked. What do you think went wrong, or bad with the dhcp capability?
 
Old 08-03-2006, 02:30 PM   #15
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900

Rep: Reputation: 69
Well.. Maybe try to upgrade (or downgrade?) dhclient - because dhcp server was upgraded in incompatible manner. Unlikely. Maybe IT department just had a good reason to shut down DHCP in network with nearly fixed number of computers. Maybe you don't remember that you've never succeeded to connect to this network with dhcp.
By the way, you can ask IT if DHCP is running now.. I guess they will say "No, it is not supposed to be running, but we've already told you your settings." . In this case troubleshooting will be finished.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Obtain ip address and check for running process via Bash Script? xconspirisist Programming 10 09-12-2008 01:18 PM
Toshiba Tecra M3 with Slackware (also, what about removing Windows?) BrianW Linux - Laptop and Netbook 0 12-02-2005 06:31 PM
Toshiba Tecra 740CDT, Sound and Slackware 10 statguy Slackware 0 01-01-2005 08:02 PM
toshiba tecra m2 sound issues in slackware 10 somuchfor Linux - Hardware 8 10-25-2004 02:57 PM
Help With Lilo (toshiba satellite running slackware 9.1) x12344321 Linux - Software 0 03-14-2004 09:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook

All times are GMT -5. The time now is 10:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration