Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 01 Aug 2014, 20:41
All times are UTC - 4
 Forum index » Advanced Topics » Hardware » Networking
How to use static IP addresses for my LAN? (SOLVED)
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [3 Posts]  
Author Message
iansl2000


Joined: 22 Mar 2006
Posts: 35
Location: UK

PostPosted: Tue 17 Apr 2007, 16:27    Post subject:  How to use static IP addresses for my LAN? (SOLVED)  

I've so impressed with puppy on my main PC that I'd like to use it on a another PC in the house.

At the moment I connect on the main PC (Wireless card chip Ralink RT2500) at start up with the following script (provided at least in part from forum members) in /etc/rc.d/rc.local

Code:
echo "Trying to get IP address from DHCP server (60sec timeout)..."
rm /etc/dhcpc/dhcpcd-ra0.pid 2>/dev/null #if left over from last session, causes trouble.
rm /etc/dhcpc/dhcpcd-ra0.cache 2>/dev/null #ditto
rm /etc/dhcpc/dhcpcd-ra0.info 2>/dev/null #ditto
ifconfig ra0 down
ifconfig ra0 up
iwpriv ra0 set AuthMode=WPAPSK
iwpriv ra0 set EncrypType=TKIP
iwconfig ra0 essid "zoelucy"
iwpriv ra0 set WPAPSK="passwordplaintext"
iwconfig ra0 essid "zoelucy"
dhcpcd ra0


I've tried the same script on the second PC (Wireless card chip Ralink RT61)but with no luck. If I try Rutilt it sees the network but cannot get an ip address. So I thought I'd try a static ip address. Can anyone tell me what amendments I need to make to the above script to use a static ip address?
Up to now I've have been using PClinuxos on this second machine using a similar script and only get an ip address sometimes.

Many thanks in advance for any help.
Ian

Last edited by iansl2000 on Sun 22 Apr 2007, 05:37; edited 1 time in total
Back to top
View user's profile Send private message 
John Doe

Joined: 01 Aug 2005
Posts: 1689
Location: Michigan, US

PostPosted: Tue 17 Apr 2007, 16:44    Post subject: Re: Use Static IP address  

While you're waiting for the static IP info (I don't know how myself). You might try the network wizard, after the card is up. I've found setting static IPs is real easy that way.

You might be having the trouble you mentioned because of how you are calling dhcpcd (just a guess, let us know).

Replace this in your script and try this on each machine (maybe reset the router first):

#1:
dhcpcd -h hostName1 ra0

#2
dhcpcd -h hostName2 ra0
Back to top
View user's profile Send private message 
iansl2000


Joined: 22 Mar 2006
Posts: 35
Location: UK

PostPosted: Tue 17 Apr 2007, 17:35    Post subject: Use Static IP address  

John Doe,
Thanks for the quick reply and suggesting the network wizard.

On my main machine, which has no trouble connecting, I went directly to the static ip button in the wizard and looked at the file that it created-then copied the output over the

Code:
ifconfig ra0 up


line so that it read
Code:

ifconfig ra0 192.168.1.76 netmask 255.255.255.0 broadcast 192.168.1.255 up
route add -net default gw 192.168.1.1


I commented out the

Code:
dhcpcd ra0


line and viola I have a static ip address.

So the full script is now

Code:
echo "Trying to get IP address from DHCP server (60sec timeout)..."
rm /etc/dhcpc/dhcpcd-ra0.pid 2>/dev/null #if left over from last session, causes trouble.
rm /etc/dhcpc/dhcpcd-ra0.cache 2>/dev/null #ditto
rm /etc/dhcpc/dhcpcd-ra0.info 2>/dev/null #ditto
ifconfig ra0 down
ifconfig ra0 192.168.1.76 netmask 255.255.255.0 broadcast 192.168.1.255 up
route add -net default gw 192.168.1.1
iwpriv ra0 set AuthMode=WPAPSK
iwpriv ra0 set EncrypType=TKIP
iwconfig ra0 essid "zoelucy"
iwpriv ra0 set WPAPSK="passwordplaintext"
iwconfig ra0 essid "zoelucy"
#dhcpcd -h puppypc ra0


By the way the

Code:
dhcpcd -h puppypc ra0


that you suggested worked ok too.

I'll let you know how I get on with the secondary (suspect) machine tomorrow - its late now.
Thanks again
Ian
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [3 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Hardware » Networking
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0480s ][ Queries: 11 (0.0032s) ][ GZIP on ]