LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 04-30-2010, 05:19 AM   #1
wubai
Member
 
Registered: Dec 2009
Posts: 103

Rep: Reputation: 20
how to setting a static ip address on slackware64 13


Hi,all !

I tried to setting a static ip from dhcp, I changed lines in /etc/rc.d/rc.inet1.conf as follow:

# Config information for eth0:

#IPADDR[0]=""
IPADDR[0]="192.168.18.7"
#NETMASK[0]=""
NETMASK[0]="255.255.255.0"
#USE_DHCP[0]="yes"
USE_DHCP[0]=""
DHCP_HOSTNAME[0]=""

and then I run "/etc/rc.d/rc.inet1 restart"

after that, can't access net, and couldn't ping the gateway[192.168.18.1], I have to change it back, anybody can help me ?
 
Old 04-30-2010, 05:29 AM   #2
stureedy
LQ Newbie
 
Registered: Jul 2009
Location: Lexington, Kentucky, USA
Distribution: Slackware
Posts: 26
Blog Entries: 3

Rep: Reputation: 1
It sounds to me like your default route is not getting set correctly. Did you set the gateway in /etc/rc.d/rc.inet1.conf?

GATEWAY="192.168.18.1"

What error--if any--do you get from ping?

What output to you get from the command route?

Regards,
Stu...
 
Old 04-30-2010, 05:38 AM   #3
ROXR
Member
 
Registered: Jan 2009
Location: Spain
Posts: 102
Blog Entries: 1

Rep: Reputation: 18
Yo can use in root mode #netconfig

..or configure with ifconfig

Code:
ifconfig eth0 192.168.X.X netmask 255.255.255.0 up
route add default gw 192.168.X.X eth0  # gateway, router ip
 
Old 04-30-2010, 06:22 AM   #4
wubai
Member
 
Registered: Dec 2009
Posts: 103

Original Poster
Rep: Reputation: 20
Quote:
Originally Posted by ROXR View Post

Code:
ifconfig eth0 192.168.X.X netmask 255.255.255.0 up
route add default gw 192.168.X.X eth0  # gateway, router ip
@ROXR ,I follwed above , and it works !

btw, I checked rc.inet1 nad rc.inet1.conf, nothing changed, then which file does "ifconfig..." write into ?

thanks again , all of you !

 
Old 04-30-2010, 06:33 AM   #5
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 227Reputation: 227Reputation: 227
Quote:
btw, I checked rc.inet1 nad rc.inet1.conf, nothing changed, then which file does "ifconfig..." write into ?
It doesn't. The fix you have done is temporary and you should do this:
Quote:
Yo can use in root mode #netconfig
to make it permanent. That is run this from your command line :
Code:
su -c "netconfig"
and enter the necessary information. This will update rc.inet1.conf.
 
1 members found this post helpful.
Old 11-12-2012, 07:21 PM   #6
wubai
Member
 
Registered: Dec 2009
Posts: 103

Original Poster
Rep: Reputation: 20
Thank you all ! appreciate !
 
  


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
Setting a static IP address, but dynamically obtaining DNS config from a router bgoodr Linux - Hardware 3 09-28-2008 12:33 PM
Setting a static IP address thedp Slackware 4 05-02-2008 01:09 PM
Set IP address to static from DHCP assigned address jborn Linux - Networking 4 02-02-2007 08:38 PM
[SOLVED] Converting static IP-address to dynamic IP-address Blue_Ice Linux - Networking 3 07-20-2006 03:35 AM
Setting up a static I.P. address partyk1d24 Linux - Networking 13 12-29-2005 06:23 AM


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

Main Menu
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