LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices



Reply
 
Search this Thread
Old 08-09-2003, 08:36 AM   #1
phlasnicek
LQ Newbie
 
Registered: Aug 2003
Posts: 8

Rep: Reputation: 0
Angry problems accessing the internet on boot up


I have a system with win2000 on one hard drive and slackware 9.0 on another hard drive. This is a single pc not connected to any networks. I am running cox cable internet access.

Sometimes when I run in linux, I do not get any internet access. When I bring up the browser (Netscape or Mozilla) I get an error message that the web location cannot be found.

Running ifconfg, the system does not see my ethernet card. I do notice that on boot up, the DCHP seems to have trouble accessing my internet and times out.

This does not happen all of the time but enough to frustrate me. I usually can reboot to get it back, but sometime it takes more than one try.
 
Old 08-10-2003, 09:32 AM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 65
Try using static IPs there isn't much point using dhcp for only one machine.
 
Old 08-10-2003, 07:28 PM   #3
gkhewitt
Member
 
Registered: Jun 2003
Distribution: ClarkConnect (RH9)
Posts: 41

Rep: Reputation: 15
Can only do static IPs if the ISP supports it (which I doubt it does). When he says ethernet card I think he means that he uses an ethernet connection to connect to a cable modem.

phlasnicek, does ifconfig *never* see your eth card, or only when the internet fails to work?
 
Old 08-11-2003, 08:44 AM   #4
phlasnicek
LQ Newbie
 
Registered: Aug 2003
Posts: 8

Original Poster
Rep: Reputation: 0
David, I have a cable modem card in my pc and not an ethernet card. sorry for the confusion.

With Cox cable, my IP address does change periodically.

gkhewitt, When the internet is working, ifconfig does see the eth card.
Whe the internet is not working and I run ifconfig, no eth card information is present.

I appreciate your help. I'm new at linux and I'm trying to break away from the win platforms.
 
Old 08-11-2003, 08:58 AM   #5
Looking_Lost
Senior Member
 
Registered: Apr 2003
Location: Eire
Distribution: Slackware 12.0, OpenSuse 10.3
Posts: 1,120

Rep: Reputation: 45
Never used a cable modem card so I don't have any particular knowledge on how it all works and what the relation to eth is but
it sounds like everything is flying by too quick for networking to get initialized properly if it doesn't happen quick enough. For example I have a usb network card which get's an IP via DHCP, computer trys to get an IP before the usb has been activated so the card always fails but If I try and bring it up after everythings booted it works fine. To get round it I put the commands in rc.local then it works fine

ifconfig eth1 up
dhcpcd eth1

As I said don't know a slightest thing about cable modem cards but it looks like it maybe the same sort of scenario.
 
Old 08-11-2003, 11:54 AM   #6
phlasnicek
LQ Newbie
 
Registered: Aug 2003
Posts: 8

Original Poster
Rep: Reputation: 0
Thanks, I'll give that a try tonight. I have been paying closer attention to the boot up messages and it looks like DHCP does time out at times and that is when I have no internet access.

I'll let you know if this helps
 
Old 08-13-2003, 08:20 AM   #7
phlasnicek
LQ Newbie
 
Registered: Aug 2003
Posts: 8

Original Poster
Rep: Reputation: 0
The script in rc.local works great if the DCHP failed to get the IP address. But if the DCHP did not fail, I wasn't able to get into the internet even though ifconfig saw eth0.
 
Old 08-26-2003, 11:11 PM   #8
woranl
Member
 
Registered: Apr 2003
Location: Toronto
Distribution: Fedora Core
Posts: 119

Rep: Reputation: 15
From what I know, most cable isp requires u to put in their assigned hostname (eg. Cr45783-a) and normally, u assign the hostname by dhcpcd -h hostname but after u restart ur computer, that hostname will be erased... u can edit the /sbin/ifup file, in there find something similar to

if ......
[-n "$NEEDHOSTNAME"] DHCPARGS="$DHCPARGS -H"
......
fi

( I don't remember the exact code, but just look for word $NEEDHOSTNAME )

under that scoop of code, type

DHCPARGS="DHCPARGS -h yourhostname ${DEVICE}"

yourhostname refer to the one given by ur isp
now everytime u restart ur compu. the hostname will set to yourhostname

hope this help
 
Old 08-26-2003, 11:13 PM   #9
woranl
Member
 
Registered: Apr 2003
Location: Toronto
Distribution: Fedora Core
Posts: 119

Rep: Reputation: 15
correction

it should be
DHCPARGS="$DHCPARGS -h yourhostname ${DEVICE}"
 
Old 08-27-2003, 01:01 PM   #10
phlasnicek
LQ Newbie
 
Registered: Aug 2003
Posts: 8

Original Poster
Rep: Reputation: 0
Thanks woranl, I'll give it a try tonight. Lately I've just been running

ifconfig eth0 up
dhcpcd eth0

when it times out looking for an ip address from the cable.

Thanks again for your suggestion.

Paul
 
Old 09-10-2003, 12:01 PM   #11
phlasnicek
LQ Newbie
 
Registered: Aug 2003
Posts: 8

Original Poster
Rep: Reputation: 0
Talking Network config solution

I have found a solution to this problem. I found the posting out on google:

I use slackware also. You can edit /etc/rc.d/rc.inet[12], or
you can do what I did, and combine then into something simpler.

My reasoning for this was that slackware's rc.inet[12] files are
designed to work for a wide variety of setups. So they have a
lot more complexity than is really needed for a single
configuration. I decided to clean things up and simplify it.

I use a /etc/rc.d/rc.network file now, which is called from
rc.M. Configuring for dhcp boils down to 3 lines, but I cut a
lot of extra junk out of rc.inet[12] and made the rc.network.

Here is rc.network. The three lines that setup the actual
network are the ifconfig, dhcpcd and route lines.

# !/bin/sh
# /etc/rc.d/rc.network

/bin/hostname -F /etc/HOSTNAME

# the three magic commands
/sbin/ifconfig lo 127.0.0.1
/sbin/dhcpcd
/sbin/route add -host 127.0.0.1 lo

NET="/usr/sbin"

echo -n "Starting daemons: "

if [ -f ${NET}/syslogd ]; then
echo -n " syslogd"
${NET}/syslogd
sleep 1
echo -n " klogd"
${NET}/klogd -c 3
fi

if [ -f ${NET}/inetd ]; then
echo -n " inetd"
${NET}/inetd
else
echo
echo "WARNING: ${NET}/inetd not found."
echo -n "Continuing daemon loading: "
fi

echo

# end of rc.network

I needed to make a small change to /etc/rc.d/rc.M:

# Initialize the NET subsystem.
if [ -x /etc/rc.d/rc.network ]; then
. /etc/rc.d/rc.network
else
if [ -x /usr/sbin/syslogd ]; then
/usr/sbin/syslogd
sleep 1
/usr/sbin/klogd -c 3
fi
fi

Just look through your rc.M, find the sections that refer to
rc.inet[12] and replace them with the above bits.


Thanks to all that have responded to this problem.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Problems accessing internet through wireless connection setilight Linux - Wireless Networking 2 01-25-2006 03:48 AM
Accessing the internet... TBomb Linux - Networking 7 07-24-2005 09:54 AM
problems accessing internet with WPA_PSK Hockeyfan Linux - Wireless Networking 2 01-16-2005 03:22 PM
Problems with Mandrake 9.2 Accessing the Internet through a Linksys ADSL Router DarkUser247 Linux - Networking 5 02-02-2004 05:30 PM
System Commander wont boot RH 7.2 and Internet Problems offroad Linux - Software 3 11-02-2001 12:11 PM


All times are GMT -5. The time now is 04:05 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration