Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
03-28-2002, 06:29 PM
|
#1
|
LQ Newbie
Registered: Mar 2002
Posts: 7
Rep:
|
ifconfig and dhcpcd - scripted
Redhat 7.2, kernel 2.4.17, iptables compiled in. DSL service through a hub. No authentication (hostname, user, MAC address, whatever) required.
I can manually call ifconfig eth0 up and then dhcpcd to connect. No problem.
My simple script
#!/bin/sh
/sbin/ifconfig eth0 up
/sbin/dhcpcd eth0
does not connect me. Ifconfig tells me that it loaded eth0, but didn't find me an IP address. No blinkies, no nothing. The one-two combo I mentioned above gets me a connection inside 10 seconds every time. The scripted dhcpcd timed out. After I try the script, running ifconfig / dhcpcd myself from the command line does not work, either. After a reboot everything's okay again.
Any ideas?
|
|
|
03-28-2002, 07:08 PM
|
#2
|
Member
Registered: Feb 2002
Location: Orlando
Distribution: Whatever I feel like at the time I install.
Posts: 284
Rep:
|
Have you tried manually editing the /etc/sysconfig/network-scripts/ifcfg-eth0 file to setup dhcp on boot. Here is what mine looks like
DEVICE=eth0
IPADDR=
NETMASK=
BROADCAST=
ONBOOT=yes
BOOTPROTO=dhcp
NAME=3c509
If that isn't working then what NIC card are you trying to use. I have used both PCI and ISA this way and it all seems to work fairly simply.
|
|
|
03-28-2002, 10:04 PM
|
#3
|
LQ Newbie
Registered: Mar 2002
Posts: 7
Original Poster
Rep:
|
It's an integrated NIChip on a SiS 735 AMD mainboard. Like I said, the NIC itself works fine, and dhcpcd works when I call ifconfig and dhcpcd separately from the command line. I'm connected via dhcpcd right now, enjoying the wonders of X.
I've tried what you suggest. All I get is a long delay and no result. Leads me to believe that it doesn't want to run from a script, init or otherwise, so I wonder what I've got set wrong to cause this.
I don't have the NAME parameter set. But why would that make things more difficult from a script, rather than from a manual program call?
|
|
|
03-28-2002, 10:58 PM
|
#4
|
Member
Registered: Feb 2002
Location: Orlando
Distribution: Whatever I feel like at the time I install.
Posts: 284
Rep:
|
It seems that it just wants to be lame. Just to make sure but did you check the /etc/modules.conf file to make sure that you had your alias setup correctly for the NIC. If that doesn't help then I don't have anything else to add. This is a really wierd situation.
|
|
|
03-29-2002, 04:28 PM
|
#5
|
Member
Registered: Mar 2002
Distribution: Mandrake 8.1
Posts: 386
Rep:
|
Try putting a "-d" option on your dhcpcd line and run it again. Then check your system log to see what happened.
Also, could it be a timing issue? Maybe put a "sleep 10" between the ifconfig and dhcpcd lines.
|
|
|
All times are GMT -5. The time now is 02:06 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|