LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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 09-10-2009, 05:22 AM   #1
mobinskariya
Member
 
Registered: Sep 2007
Location: Kerala, India
Distribution: ubuntu 10.04
Posts: 367

Rep: Reputation: 55
problem connecting to the internet.


i am new to slackware.. i have been using ubuntu for almost 2 years and installed slackware 12.2 for the first time today .. there was no need to configure the networks in ubuntu and everything was already configured that i didnt take much pain in learning how it works.. so iam new to networking and linux too(disadvantage of using ubuntu, i think).also i read a little of slackbook that, way of arranging startup scripts are totally different from that of ubuntu.

i have a utstarcom router through which i connect to the internet(dhcp enabled)..my problem is when i plugin my lan cable after booting, i cant connect to internet but can ping my router.. if i plug it before the booting slackware, i can connect to the internet..also i want to disable the dhcp discover during the boot time..it takes a lot of time when not connected to lan. i dont know whether my description is confusing..please let me know whether i should describe it some other way..

tanks in advance
mobin
 
Old 09-10-2009, 05:52 AM   #2
/dev/me
Member
 
Registered: May 2008
Distribution: Slackware 13
Posts: 116

Rep: Reputation: 20
If you plug in your cable after booting Slackware, you need to restart your network service.

As root:
Code:
/etc/rc.d/rc.inet1 restart
And if you want to disable DHCP during boot, well my methid would be to just edit /etc/rc.d/rc.inet1.conf
Code:
# Config information for eth0:
IPADDR[0]=""
NETMASK[0]=""
#USE_DHCP[0]="yes"
USE_DHCP[0]=""
DHCP_HOSTNAME[0]=""
And then either add static values (you may need to enable this on your router) or run a DHCP request manually when you want to connect.
As root:
Code:
dhcpcd eth0
Setting up static is a bit more work than DHCP, but you only need to do it once. In order for your machine to connect to the internet you need at least three things:
An IP address
A gateway
Nameservers

This can be fine tuned with things like subnet masks, but if you don't specify those the machine will fall back to defaults which should be good enough for most purposes.
Anyway, you can define your IP address in /etc/rc.d/rc.inet1.conf or define it manually by running:
Code:
ifconfig eth0 {address}
You can define your gateway in /etc/rc.d/rc.inet1.conf or define it manually by running:
Code:
route add default gw {router_address}
And the nameservers are defined in /etc/resolv.conf. Chances are they are already defined by previous runs of dhcpcd:
Code:
cat /etc/resolv.conf
# Example: uses opendns
nameserver 208.67.222.220
nameserver 208.67.220.222

Last edited by /dev/me; 09-10-2009 at 05:54 AM.
 
Old 09-10-2009, 06:32 AM   #3
mobinskariya
Member
 
Registered: Sep 2007
Location: Kerala, India
Distribution: ubuntu 10.04
Posts: 367

Original Poster
Rep: Reputation: 55
thanks. it helped.is there any way that when i plugin my lan cable, it automatically gets its ip address other than giving the commands to restart the services(as in ubuntu)?

Last edited by mobinskariya; 09-10-2009 at 06:34 AM.
 
Old 09-10-2009, 06:48 AM   #4
/dev/me
Member
 
Registered: May 2008
Distribution: Slackware 13
Posts: 116

Rep: Reputation: 20
Well, I don't use it myself, but there is ifplugd.

And now you probably are wondering how on earth you install a SlackBuild



EDIT: Oh! I didn't see a buildscript for Slack 12.2 (or 13 for that matter). I don't know if this matters much, as I've found by trial and error that you can install 12.1 packages on 12.2. But I'm not qualified to comment on the risks involved. No guarantees.
Alternatively you can create your own slackbuild or build from source. I usually do the latter.

Last edited by /dev/me; 09-10-2009 at 06:58 AM. Reason: Added disclaimer
 
  


Reply

Tags
slackware


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
problem in connecting internet shariefbe Linux - Software 6 02-22-2009 02:52 AM
problem connecting to internet ruzle0 Linux - Networking 2 11-28-2005 03:48 PM
problem connecting to the internet mentallysilent Linux - Laptop and Netbook 0 01-20-2005 09:41 PM
Problem connecting to the internet sabaum Linux - Networking 10 05-16-2004 05:59 PM
Problem connecting to the internet! Ghettozn Debian 4 07-24-2003 01:47 AM


All times are GMT -5. The time now is 10:33 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