LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   LAN auto detection in slackware12 (https://www.linuxquestions.org/questions/slackware-14/lan-auto-detection-in-slackware12-610551/)

gopi.d 01-02-2008 05:07 AM

LAN auto detection in slackware12
 
i'm facing lot of troubles in setting up my lan. i have a ethernet router connected to the ethernet port and has dhcp enabled. i had configured the lan to get ip settings through dhcp because i tried with static ip but could not get internet working. now on everytime restarting my system i have to bring down the ethernet interface and bring it up to access internet. i guess there is some problem with the default gateway and pppoe internet connection. but i had tried with some distros like ubuntu, mandriva the network activates and configures itself automatically just like windows. i want the same to be done in my slackware also bcoz i don't want to change to other distros.

ottavio 01-02-2008 06:46 AM

did you run netconfig?

gopi.d 01-02-2008 10:54 AM

yes i had run netconfig and setup the lan to use dhcp. when i boot up my system i can see network configuration getting ip via dhcp and local browsing is possible but could not browse internet. to get internet working i have to manually bring down ethernet connection and start it again, i have to do this every time i start my computer. i tried setting ethernet ip statically but then also internet didn't work. now i had set ethernet interface without gateway ip and internet works fine. but i have plans to use this system as internet gateway so using lan without gateway will be problem for lan connections. i like the way ubuntu detects the ethernet interface when i switchon the router and configuring it automatically, i like to make the same way in slackware too because out of my experiments with linux distros only slackware proved to be stable than all. i don't want to give up slack but need the plug n play options like ubuntu and mandriva.

Alien_Hominid 01-02-2008 12:20 PM

ping google, maybe your DNS are servers are messed up

gopi.d 01-03-2008 05:47 AM

i have setup my lan connection sucessfully but i want to know is there any network manager available for slackware which will automatically detect when i plugin a network cable and automatically configure my ethernet card.

onebuck 01-03-2008 06:36 AM

Hi,

Quote:

Originally Posted by gopi.d (Post 3009563)
i have setup my lan connection sucessfully but i want to know is there any network manager available for slackware which will automatically detect when i plugin a network cable and automatically configure my ethernet card.

You can edit the 'etc/rc.d/rc.inet1.conf' file to change the settings. If you do make a change to the configuration then do a '/etc/rc.d/rc.inet1 restart' to configure the changes.

You could look at the 'network section' of the 'Slackware-Links' to get some good reference.

Quote:

Originally Posted by gopi.d (Post 3009563)
i want to know is there any network manager available for slackware which will automatically detect when i plugin a network cable and automatically configure my ethernet card.

You could write a simple script. But Why? You are going to change the configuration how often? If a laptop is traveling then you would move from Ethernet to wireless most likely. Once you have the device(s) configured then you would be using the active one. If you are using a 'X' environment then each has network support.

urka58 01-05-2008 04:55 AM

Routers, very often, have a service called "DNS relay" activated by default. This is a sort of automagically DNS discover. If you want to use this service you must indicate as default gateway of your LAN, the IP address of the router, commonly 192.168.1.1
If you want to set up a DNS of your choice, you must disable such service on the router or if possible (and usuallly it is) configure DNSs on the router.
If you choose not to use "DNS relay" you have to set DNS while running netconfig or manually on /etc/resolv.conf.
The problem comes when using DHCP configured network, as dhcpcd (the client) temporarely overwrite your /etc/resolv.conf with DNS stated on DHCP server.
This can be overridden by adding -R option when starting dhcpcd or permanently by adding a line such as:

# Config information for eth0:
IPADDR[0]=""
NETMASK[0]=""
USE_DHCP[0]="yes"
DHCP_HOSTNAME[0]=""
DHCP_KEEPRESOLV[0]="yes" <----THIS

to your /etc/rc.d/rc.inet1.conf

If you want your connection started when you plug in the cable there is a demon available called ifplugd
http://www.slackware.com/~alien/slac...lugd/pkg/12.0/
but it requires some modifications on your startup scripts.
It seems to me you're not prone to such kind of thinks...so is up to you.
Hope this helps
Ciao

campher 01-05-2008 04:15 PM

time
 
another possible problem is that one of your configurations causes a time out and the whole thing doesnt work in the end.

im not sure what this pppoe really is but when its an dialup connection and you are trying to configure a dns server before the connection is established then its possible that this configuration fails and you have no internet connection at all.

when i tinkered a script for automatic network configuration i had to put in lots of delay 5 or delay 10 lines inside the script because dhcp server or gateway (on static ip) wasnt answering fast enough.


campher

C-Sniper 01-06-2008 02:42 AM

have you tried running "dhcpcd eth0" or whatever you network is for the eth? that worked for me after trying everything else.


All times are GMT -5. The time now is 06:57 AM.