Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (3) </ [1] 2 3 >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: IFCONFIG Help, Setting up static IP at boot< Next Oldest | Next Newest >
supercluver Offline





Group: Members
Posts: 3
Joined: Jan. 2005
Posted: Jan. 10 2005,04:27 QUOTE

Hi all!!  New to the forums and new to Linux (I've played a little with SUSE 9.1 I guess, but very little), but loving it.  But I could use a little help from some guru-

in my /opt/bootlocal.sh file I have:

#!/bin/bash
# put other system startup command here
ifconfig eth0 address xxx.xxx.xxx.xxx netmask 255.255.255.0 broadcast xxx.xxx.xxx.xxx
route add default gw xxx.xxx.xxx.xxx
echo nameserver xxx.xxx.xxx.xxx > /etc/resolv.conf
echo nameserver xxx.xxx.xxx.xxx >> /etc/resolv.conf

where x is replaced by a number of course.
But upon booting I cannot access the network or get online.
I then type ifconfig -a and I can see that everything looks set, but it is not listed as up.
So then I type the ifconfig and route commands into the command line and whammo I can get online just fine.  Why?  What am I leaving out?  Do I need to add sudo before the commands?  I have to be superuser to enter them into the command line.  Thanks in advance!!
Back to top
Profile PM 
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: Jan. 10 2005,04:47 QUOTE

bootlocal is run as root, so sudo is not necessary.
Try adding 'eth0 up' to bootlocal


--------------
http://www.tldp.org/LDP/intro-linux/html/index.html
Back to top
Profile PM WEB 
supercluver Offline





Group: Members
Posts: 3
Joined: Jan. 2005
Posted: Jan. 10 2005,05:59 QUOTE

Thanks I tried that, no dice.  I still have to go to netcardconfig or use ifconfig at the command line to get it to work.  Could it be because DHCP is automatic when booting?  Should I shut down the card first with "ipconfig eth0 down" and then try to bring it up???  Thanks again for your help.
Back to top
Profile PM 
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: Jan. 10 2005,06:05 QUOTE

I'm not sure...my ethernet seems to work fine with DHCP, and i don't know much about manually configuring networks.  Let's hope someone here can help you more than I can.

--------------
http://www.tldp.org/LDP/intro-linux/html/index.html
Back to top
Profile PM WEB 
green Offline





Group: Members
Posts: 453
Joined: Oct. 2004
Posted: Jan. 11 2005,02:46 QUOTE

Well, I have not done what you are trying, but I would try another approach if I didn't get it working the way you suggest. If you have anything on your network acting as a DHCP server, do you have the option enter your MAC address and have you router/firewall do 'dynamic static'/ IP assignments? If you do, you could have your router/firewall assign the same IP to that MAC address everytime it asks for an IP. I know that's not what you're looking for, but it would work if all else fails. Do you "need" a static IP ?
Back to top
Profile PM 
10 replies since Jan. 10 2005,04:27 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (3) </ [1] 2 3 >/
reply to topic new topic new poll
Quick Reply: IFCONFIG Help

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code