LinuxQuestions.org
Visit Jeremy's Blog.
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 10-13-2005, 08:35 AM   #1
planoru
LQ Newbie
 
Registered: Oct 2005
Distribution: slack 10.1/10.2 hybrid
Posts: 17

Rep: Reputation: 0
Netconfig or some network problem!


Hello!
This is my first post here and my english is not that good, so don't be rough on me.
I had some troubleshooting with my network. Description would be:
- used netconfig to set my eth0 but I had problems with gateway and/or DNS server.
I've used both DHCP and IPstatic, but route -n would not show me any line with the Gw ip. Using "route add default gw i.p. eth0" fixed this temporary, but after the daemons where restarted everythig was lost so the "route" part had to be done again. Now it works( I have manually edited "rc.inetd" adding gateway and "yes" to DHCP"),
Anybody else had this problem? Both debian and windows work fine on this matter.
P.S.: I have added some of the base package from 10.2 to my 10.1, but the problem was the same before.
 
Old 10-13-2005, 07:37 PM   #2
Franklin
Senior Member
 
Registered: Oct 2002
Distribution: Slackware
Posts: 1,348

Rep: Reputation: 217Reputation: 217Reputation: 217
Wecome to LQ!

running "netconfig" as root "should" allow you to set the default gateway and DNS servers.
I have not had any problems with this ever.

If that does not work, you can always edit the config files by hand.
For gateway, go to /etc/rc.d/rc.inet1.conf and look for the following lines:
Code:
# Default gateway IP address:
GATEWAY="192.168.1.1"
Just enter your gateway instead of "192.168.1.1"

DHCP can be set to yes here as well:
Code:
# Config information for eth0:
IPADDR[0]="192.168.1.11"
NETMASK[0]="255.255.255.0"
USE_DHCP[0]=""
DHCP_HOSTNAME[0]=""
DNS servers are listed in /etc/resolv.conf
Mine looks like this:

search local
nameserver 4.2.2.1
nameserver 4.2.2.2

edit yours accordingly (as root of course).

rc.inet1.conf is the network interface config file that is called by /etc/rc.inet1

HTH

PS. Your english is excellent - unless I've completely misunderstood you - in which case perhaps not
 
Old 10-14-2005, 10:56 AM   #3
sweetnsourbkr
Member
 
Registered: Aug 2005
Location: Bay
Distribution: Zenwalk, OpenBSD, Slackware
Posts: 167

Rep: Reputation: 30
I think what he's talking about is enabling DHCP, rather than setting a static IP for his box.

In which case I think you should forgo

IPADDR[0]="192.168.1.11"
NETMASK[0]="255.255.255.0"


and just say YES at DHCP.

Make sure you run dhcpcd ... that should turn on the dhcp client on your box and it will communicate with your router.
 
Old 10-14-2005, 12:54 PM   #4
Franklin
Senior Member
 
Registered: Oct 2002
Distribution: Slackware
Posts: 1,348

Rep: Reputation: 217Reputation: 217Reputation: 217
Quote:
Originally posted by sweetnsourbkr
I think what he's talking about is enabling DHCP, rather than setting a static IP for his box.

In which case I think you should forgo

IPADDR[0]="192.168.1.11"
NETMASK[0]="255.255.255.0"


and just say YES at DHCP.

Make sure you run dhcpcd ... that should turn on the dhcp client on your box and it will communicate with your router.
Ya, thanks for clarifying that. I had meant that section only to illustrate where to look for the line to edit, but it is a static setup I copied and does look like incorrect info.

Thanks.

F
 
Old 10-16-2005, 06:39 PM   #5
Alezzandro
LQ Newbie
 
Registered: Oct 2005
Location: Italy, Naples
Distribution: Slackware 10.1\10.2
Posts: 2

Rep: Reputation: 0
I have the same problem without dhcp

Hi guys,
I have the same problem, born after the last system upgrading (from Slack 10.1 to 10.2 with swaret), without dhcp enabled (I have static ip)..
I tried to edit rc.inet1.conf but my Slackware doens't set the gw.
this is my rc.inet1.conf:

# Config information for eth0:
IPADDR[0]="192.168.1.15"
NETMASK[0]="255.255.255.0"
USE_DHCP[0]=""
DHCP_HOSTNAME[0]=""

# Config information for eth1:
IPADDR[1]=""
NETMASK[1]=""
USE_DHCP[1]=""
DHCP_HOSTNAME[1]=""

# Config information for eth2:
IPADDR[2]=""
NETMASK[2]=""
USE_DHCP[2]=""
DHCP_HOSTNAME[2]=""

# Config information for eth3:
IPADDR[3]=""
NETMASK[3]=""
USE_DHCP[3]=""
DHCP_HOSTNAME[3]=""

# Default gateway IP address:
GATEWAY="192.168.1.254"

# Change this to "yes" for debugging output to stdout. Unfortunately,
# /sbin/hotplug seems to disable stdout so you'll only see debugging output
# when rc.inet1 is called directly.
DEBUG_ETH_UP="yes"

As you can see i tried to set DEBUG_ETH_UP="yes" but it didn't show any error.

But the real strange thing is that if I try to run manually /etc/rc.d/rc.inet1 or /etc/rc.d/rc.M after booting it sets the gw!!

Please help me..

Last edited by Alezzandro; 10-16-2005 at 06:45 PM.
 
Old 10-16-2005, 06:49 PM   #6
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 53
Did you replaced the old rc.X files with the new ones when you upgraded? Usually the new ones have a .new extention.
 
Old 10-16-2005, 07:50 PM   #7
Alezzandro
LQ Newbie
 
Registered: Oct 2005
Location: Italy, Naples
Distribution: Slackware 10.1\10.2
Posts: 2

Rep: Reputation: 0
Yes I do, but finally I found a way.

I do as you says but it doesn't work.
So I tried to exchange the order of same commands in rc.M and so it works!
in fact this is my new rc.M (I paste only the part changed):

Code:
# Initialize the hotplugging subsystem for Cardbus, IEEE1394, PCI, and USB devices:
if [ -x /etc/rc.d/rc.hotplug -a -r /proc/modules ]; then
  # Don't run hotplug if 'nohotplug' was given at boot.
  if ! grep nohotplug /proc/cmdline 1> /dev/null 2> /dev/null ; then
    echo "Activating hardware detection:  /etc/rc.d/rc.hotplug start"
    . /etc/rc.d/rc.hotplug start
     sleep 5
  fi
fi

# Initialize the networking hardware.  If your network driver is a module
# and you haven't loaded it manually, this will be deferred until after
# the hotplug system loads the module below.
if [ -x /etc/rc.d/rc.inet1 ]; then
  . /etc/rc.d/rc.inet1
fi

# Start networking daemons:
if [ -x /etc/rc.d/rc.inet2 ]; then
  . /etc/rc.d/rc.inet2
fi
As you can see in this new rc.M the hotplug initialization isn't between rc.inet1 and rc.inet2, finally I added "sleep 5" (in hotplug initialization) to give the necessary time to complete the hotplug initialization.
Probably hotplug spends much time for his initialization and make problem to rc.inet1 script.

I hope this solution can help other linux users like me.

Alessandro.
 
Old 10-18-2005, 06:15 AM   #8
planoru
LQ Newbie
 
Registered: Oct 2005
Distribution: slack 10.1/10.2 hybrid
Posts: 17

Original Poster
Rep: Reputation: 0
Thanks guys!
Mine seems to be a combination of problems.
It was behaving exactly just like Alezzandro(great job) described, but this was happening with the 10.1 also. I think it was related to my sis900 onboard LAN adapter and some modules. The realtek is working without trouble. But the thing is that the "netconfig" utility does not seem to write the rc.inet1 gateway line even if I choose and set it with staticIP.
 
  


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
Network not configured - netconfig doesn't help!! NetRAVEN5000 Slackware 11 07-16-2005 09:34 AM
Problem with netconfig jimdaworm Slackware 1 03-13-2005 11:48 PM
Problem with netconfig Jeka Slackware 7 02-20-2004 05:05 PM
netconfig problem e1000 Slackware 3 11-06-2003 04:58 AM
Setting DHCP on a network card in text mode (no netconfig!) ferrantepunto Linux - Networking 3 12-11-2002 06:58 AM

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

All times are GMT -5. The time now is 03:07 PM.

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