LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 02-11-2009, 07:22 AM   #1
netpumber
Member
 
Registered: Sep 2007
Location: In My Box
Distribution: Arch Linux
Posts: 423

Rep: Reputation: 33
Static ip prob in slackware 12.2


Hi!! When im gonna change the /etc/rc.d/inet1.conf file in to this
Code:
# Config information for eth0:
IPADDR[0]="192.168.1.101"
NETMASK[0]="255.255.255.0"
USE_DHCP[0]="no"
DHCP_HOSTNAME[0]=""
GATEWAY="192.168.1.1"
It can't connect into the net... And when i turn it in dhcp all are ok..:s Any help or idea?
 
Old 02-11-2009, 07:31 AM   #2
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019
You probably need to add a nameserver to /etc/resolv.conf. dhcpd normally does this for you. If you're using static addresses you'll have to put your own in.
 
Old 02-11-2009, 07:52 AM   #3
SkinnerC
Member
 
Registered: Dec 2007
Location: New England, USA
Distribution: Ubuntu 8.04 LTS, Slackware 12.2
Posts: 138
Blog Entries: 1

Rep: Reputation: 20
Quote:
Originally Posted by GazL View Post
You probably need to add a nameserver to /etc/resolv.conf. dhcpd normally does this for you. If you're using static addresses you'll have to put your own in.
You can add the gateway as your nameserver. I assume you have a Linksys router that is connected to a modem. The router will act as your nameserver and forward requests to the ISP nameserver.
 
Old 02-11-2009, 09:46 AM   #4
netpumber
Member
 
Registered: Sep 2007
Location: In My Box
Distribution: Arch Linux
Posts: 423

Original Poster
Rep: Reputation: 33
SkinnerC can you be more specific ? I have put and in the resolve file the name servers but nothing happens...Thanx..
 
Old 02-11-2009, 10:20 AM   #5
arubin
Senior Member
 
Registered: Mar 2004
Location: Middx UK
Distribution: Slackware64 15.0 (multilib)
Posts: 1,350

Rep: Reputation: 75
An easy way to do this is to run netconfig as root.

You may then have to restart networking to get it working.
 
Old 02-11-2009, 10:35 AM   #6
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019
Can you show us the output of:

cat /etc/resolv.conf

/sbin/ifconfig

/sbin/route -n

Please wrap the output in "code tags" to make it more readable when you post it on LQ.
 
Old 02-11-2009, 11:07 AM   #7
netpumber
Member
 
Registered: Sep 2007
Location: In My Box
Distribution: Arch Linux
Posts: 423

Original Poster
Rep: Reputation: 33
Code:
# Generated by dhcpcd for interface eth0
nameserver 194.219.227.1
nameserver 193.92.150.3
Code:
eth0      Link encap:Ethernet  HWaddr 00:13:d4:c6:4f:04
          inet addr:192.168.1.104  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::213:d4ff:fec6:4f04/64 Scope:Link
          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:22968 errors:0 dropped:0 overruns:0 frame:0
          TX packets:18954 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:29066405 (27.7 MiB)  TX bytes:2203437 (2.1 MiB)
          Interrupt:23 Base address:0xa400

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:8 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:560 (560.0 B)  TX bytes:560 (560.0 B)
Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo
0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 eth0

Quote:
An easy way to do this is to run netconfig as root.

You may then have to restart networking to get it working.
I had tried it but nothing happened..:s
 
Old 02-11-2009, 11:13 AM   #8
SkinnerC
Member
 
Registered: Dec 2007
Location: New England, USA
Distribution: Ubuntu 8.04 LTS, Slackware 12.2
Posts: 138
Blog Entries: 1

Rep: Reputation: 20
Where did the nameserver info come from? Is that the ISP nameservers? If so then try to replace them with your router address and see if that clears it.

The router is connecting as DHCP to the ISP but has to have the DHCP server for your internal network turned off.

Last edited by SkinnerC; 02-11-2009 at 11:16 AM. Reason: edit answer
 
Old 02-11-2009, 11:21 AM   #9
netpumber
Member
 
Registered: Sep 2007
Location: In My Box
Distribution: Arch Linux
Posts: 423

Original Poster
Rep: Reputation: 33
Yes these nameservers are from my isp...i ll change it in a while cuz now i have lesson Thanx a lot
 
Old 02-11-2009, 11:24 AM   #10
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019
You've given the host .101 in your inet1.conf file above, but the interface has an address of .104.
Have you left the old dhcpcd daemon running? If so you might want to kill it and then try running /etc/rc.d/rc.inet1 restart.

I'd be inclined to reboot myself just to make sure everything has been cleared out. Not strictly necessary, but at least you know its all good from that point on. Next step would be to check you can ping your gateway and nameservers

ping -c1 192.168.1.1
ping -c1 194.219.227.1
ping -c1 193.92.150.3

and if they work ok, check dns resolution is working with something like

host -r www.google.com

... but before you do those, It'd be an idea to get that inconsisten IP address on eth0 sorted first.
 
Old 02-13-2009, 09:25 AM   #11
netpumber
Member
 
Registered: Sep 2007
Location: In My Box
Distribution: Arch Linux
Posts: 423

Original Poster
Rep: Reputation: 33
So...in /etc/resolv.conf i add my router's ip
Quote:
# Generated by dhcpcd for interface eth0
nameserver 192.168.1.1
nameserver 192.168.1.1
and this in rc.inet1.conf


Quote:
# Config information for eth0:
IPADDR[0]="192.168.1.101"
NETMASK[0]="255.255.255.0"
USE_DHCP[0]="no"
DHCP_HOSTNAME[0]=""
GATEWAY="192.168.1.1"
Quote:
ping www.google.com
connect: Network is unreachable
OMG .. something is not going right :s
 
Old 02-14-2009, 12:54 PM   #12
urka58
Member
 
Registered: Nov 2003
Distribution: slackware 15
Posts: 546

Rep: Reputation: 43
This is an excerpt from /etc/rc.d/rc.inet1.conf
Code:
# /etc/rc.d/rc.inet1.conf
#
# This file contains the configuration settings for network interfaces.
# If USE_DHCP[interface] is set to "yes", this overrides any other settings.
# If you don't have an interface, leave the settings null ("").
Have you tried that?
 
Old 02-15-2009, 08:44 AM   #13
slaggy
LQ Newbie
 
Registered: Feb 2009
Distribution: slackware 12.2
Posts: 4

Rep: Reputation: 0
what about:
Code:
# ifconfig -a
do you have more than one ethernet card?
 
  


Reply



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
Samba: fails with static ip. No prob dynamic TotalLinuxNoob Linux - Networking 2 03-03-2007 01:42 PM
Another Slackware network prob snakle Slackware 23 10-10-2006 10:38 AM
Keyboard Prob on Slackware 10!! Help! Devboy Linux - General 3 12-26-2004 04:52 AM
Slackware 2nd.CD prob. 777JR Slackware 5 12-04-2003 09:32 PM
slave hd and Slackware install prob pine0279 Slackware 3 07-03-2003 02:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:43 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
Open Source Consulting | Domain Registration