LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Internet Problem - Linux Newbie (https://www.linuxquestions.org/questions/slackware-14/internet-problem-linux-newbie-702637/)

RoonHapoon 02-05-2009 11:04 PM

Internet Problem - Linux Newbie
 
So I installed Slackware Linux yesterday, the firs time I've ever tried linux. I found some website that said to run netconfig from the terminal So I ran that. Set my hostname as my name, and the website said for the domain name to enter ubc.ca so I did that, and then USE DHCP. So it saved the settings and my internet did not work.

So I edited /etc/rc.d/rc.inet1 conf to look like this

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

and I saved it. And internet worked fine. But now when I started up my computer today, the internet won't work. Any help?

jschiwal 02-06-2009 12:46 AM

I don't use slackware so I'm not familiar with its configuration files. The name of the file you edited "rc.inet1" might imply that it is the settings for eth1. Could you check your example or documentation to see if you should use /etc/rc.d/rc.inet0.conf instead. I'm just guessing here.

Is there a boot script that runs "ifup-eth0" directly or indirectly?

Drakeo 02-06-2009 02:13 AM

realy all you had to do is this. in the /etc/rc.d/rc.inet.conf was dhcp=yes this would make it eth0 start at boot and run dhcpcd and it would do the gateway and ip. Then to be real cool down load from slackware extra wicd and install it and just start your machine it configures everything for you and your on line does your wifi if the device is there does wpa etc. good stuff but one cool thing you did do was a netconfig. that least your not darkstar there is a million out there. that is a grateful dead thing Pat loves the DEAD. down load then right click on it open it with system Package Manager and then reboot. your up and going. most likely wicd will be a part of the next distro.

cwwilson721 02-06-2009 12:18 PM

Now to translate to American English with grammar and punctuation.

Quote:

Set my hostname as my name, and the website said for the domain name to enter ubc.ca so I did that, and then USE DHCP. So it saved the settings and my internet did not work.
No need for that, unless you use the actual ubc.ca as your internet provider, AND it is required for you to logon.

I personally use mshome.net to keep compatibility with my windows machines.

Now for questions:
  1. Do you use dhcp?
  2. Could you post the results of
    Code:

    ifconfig
    (This will let us know if the ethernet port is even working)
  3. Could you post the results of
    Code:

    lsmod
    (This will tell us what modules are loading)
You may have to cut/paste to get the results, or write them out on paper...A pain, I know!

After that, we'll see what needs to be done next.

As for wicd, unless you use wi-fi to connect, you don't need it.
Actually, I have wi-fi, and don't use it, so....

veeall 02-06-2009 09:11 PM

On my system DHCP does not detect my router ip correctly but instead automatically configures it for my Digital TV access, so when using netconfig i had to choose "static ip" and not "dhcp" and insert my machine an router ip addresses by hand. Baseless assumption maybe, but thought i mention it. For now probably DHCP just reconfigures your net upon boot.

I use example.org as my domain, lol

guanx 02-06-2009 10:03 PM

Quote:

Originally Posted by jschiwal (Post 3433830)
I don't use slackware so I'm not familiar with its configuration files. The name of the file you edited "rc.inet1" might imply that it is the settings for eth1. Could you check your example or documentation to see if you should use /etc/rc.d/rc.inet0.conf instead. I'm just guessing here.

Is there a boot script that runs "ifup-eth0" directly or indirectly?

Terrible naming convention. I heard that some distribution name the interface configuration files after the interface name, while the content of the config files also contain this name. Then the interface name is specified multiple times, which deviates the Tao of programming.

Instead, Slackware names the internet service scripts after the "stage". In the first stage, IFs are brought up, routing table is set, DNS server addresses are obtained, etc.. Corresponding script is rc.inet1. In the second stage, servers are brought up. Corresponding script is rc.inet2.

guanx 02-06-2009 10:08 PM

Quote:

Originally Posted by RoonHapoon (Post 3433755)
So I installed Slackware Linux yesterday, the firs time I've ever tried linux. I found some website that said to run netconfig from the terminal So I ran that. Set my hostname as my name, and the website said for the domain name to enter ubc.ca so I did that, and then USE DHCP. So it saved the settings and my internet did not work.

So I edited /etc/rc.d/rc.inet1 conf to look like this

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

and I saved it. And internet worked fine. But now when I started up my computer today, the internet won't work. Any help?

If you specified "USE DHCP" in netconfig, then the value of USE_DHCP[0] should have been "yes". Now it's empty. Confusing.

And, what do you mean by "won't work"? What error message did you get? Knowing that may narrow our search of errors.

guanx 02-06-2009 10:13 PM

Quote:

Originally Posted by veeall (Post 3434756)
On my system DHCP does not detect my rooters ip correctly but instead automatically configures it for my Digital TV access, so when using netconfig i had to choose "static ip" and not "dhcp" and insert my machine an rooter ip addresses by hand. Baseless assumption maybe, but thought i mention it. For now probably DHCP just reconfigures your net upon boot.

I use example.org as my domain, lol

Do you mean "router"? As you said "configures for ..." I think you are running a dhcp server, not a client. That may be the reason why it does not work.

veeall 02-07-2009 12:50 AM

Quote:

Originally Posted by guanx (Post 3434784)
Do you mean "router"? As you said "configures for ..." I think you are running a dhcp server, not a client. That may be the reason why it does not work.

Sorry, of course "router", i fixed that in my post too.
I get both internet and TV from the same wire, both have his own ip and dns assigned from my service provider. I think thats why dhcp gets confused but this is not really problem for me because i want my machine to have static ip anyway.

While not very literate in networking i was just suggesting that by editing maually /etc/rc.d/rc.inet1 to "USE_DHCP[0]=""" and typing in ip and dns info - the same would be achieved by choosing "static ip" instead "dhcp" during 'netconfig' and that way it should stick over reboot also. Correct me if i´m wrong.


Sorry for misused english words. English is not my native language.

guanx 02-07-2009 01:06 AM

Quote:

Originally Posted by veeall (Post 3434847)
Sorry, of course "router", i fixed that in my post too.
I get both internet and TV from the same wire, both have his own ip and dns assigned from my service provider. I think thats why dhcp gets confused but this is not really problem for me because i want my machine to have static ip anyway.

Do you mean you wish to keep "/etc/resolv.conf" or similar things untouched on making dhcp queries? You can set
Code:

DHCP_KEEPRESOLV[i]="yes"
where i should be replaced by the interface index. Have a look into "/etc/rc.d/rc.inet1". There are many such options.

Quote:

Sorry for misused english words. English is not my native language.
It's not mine, either. I always make mistakes here and there. But for keywords, I often look up a dictionary before posting :)

RoonHapoon 02-07-2009 09:42 AM

In response to guanx: I don't get a system error message, but when I open up Konqueror and try to go to a website I get

"An error occured while trying to load http://whatever

Unknown host google (or whatever site I try to go to)

In response to cwwilson721: First off, I'm not exactly sure if I use DHCP or not, I was just told that's how to set up internet. But I have a linksys wireless router. But I plug an ethernet chord into it and then plug it into the ethernet jack on my laptop. And here are the results you wanted

bash-3.1# ifconfig
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:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)


bash-3.1# lsmod
Module Size Used by
appletalk 33580 2
ax25 49892 2
ipx 27304 2
p8023 5504 1 ipx
snd_seq_dummy 6788 0
snd_seq_oss 33408 0
snd_seq_midi_event 10240 1 snd_seq_oss
snd_seq 50928 5 snd_seq_dummy,snd_seq_oss,snd_seq_midi_event
snd_seq_device 10380 3 snd_seq_dummy,snd_seq_oss,snd_seq
snd_pcm_oss 40480 0
snd_mixer_oss 17920 1 snd_pcm_oss
ipv6 241956 10
fuse 54684 2
lp 13572 0
b43 128412 0
rfkill 12184 1 b43
mac80211 158108 1 b43
cfg80211 27144 1 mac80211
led_class 7684 1 b43
input_polldev 7432 1 b43
ppdev 11268 0
yenta_socket 27020 2
snd_intel8x0 32540 2
rsrc_nonstatic 14464 1 yenta_socket
snd_ac97_codec 101412 1 snd_intel8x0
ac97_bus 5632 1 snd_ac97_codec
snd_pcm 70788 4 snd_pcm_oss,snd_intel8x0,snd_ac97_codec
ssb 41348 1 b43
pcmcia 36524 2 b43,ssb
snd_timer 23176 3 snd_seq,snd_pcm
parport_pc 28196 1
pcmcia_core 35604 5 b43,yenta_socket,rsrc_nonstatic,ssb,pcmcia
video 20624 0
psmouse 40592 0
thermal 19484 0
parport 34796 3 lp,ppdev,parport_pc
evdev 13088 0
8139too 26624 0
output 6656 1 video
mii 8448 1 8139too
snd 51748 11 snd_seq_oss,snd_seq,snd_seq_device,snd_pcm_oss,snd_mixer_oss,snd_intel8x0,snd_ac97_codec,snd_pcm,snd _timer
shpchp 33172 0
processor 36648 1 thermal
serio_raw 9220 0
i2c_nforce2 10244 0
amd64_agp 13832 1
container 7424 0
agpgart 32584 1 amd64_agp
thermal_sys 15144 3 video,thermal,processor
soundcore 10080 1 snd
snd_page_alloc 11400 2 snd_intel8x0,snd_pcm
k8temp 8192 0
battery 14340 0
button 10128 0
ac 8196 0
hwmon 6300 2 thermal_sys,k8temp
wmi 9768 0

guanx 02-07-2009 09:56 AM

Is /etc/rc.d/rc.inet1 executable?
Use "ls -l /etc/rc.d/rc.inet1" to see it.

RoonHapoon 02-07-2009 10:04 AM

Quote:

Originally Posted by guanx (Post 3435198)
Is /etc/rc.d/rc.inet1 executable?
Use "ls -l /etc/rc.d/rc.inet1" to see it.

Yes it is. I double checked and opened the properties box, and the x is marked to make it executable.

guanx 02-07-2009 10:55 AM

Quote:

Originally Posted by RoonHapoon (Post 3435203)
Yes it is. I double checked and opened the properties box, and the x is marked to make it executable.

Then use "ifconfig -a" to see the interface name. If it's not eth0, you have to specity its name like this:
Code:

# Config information for eth1:
IFNAME[0]="eth1"
IPADDR[0]="192.168.1.109"
NETMASK[0]="255.255.255.0"
USE_DHCP[0]=""
DHCP_HOSTNAME[0]=""


cwwilson721 02-07-2009 11:51 AM

From what I gather:

  • You use dhcp
  • Your ethernet card is not up
One more thing to post, please. Could you show the results of [code]lspci[\code] please? That command tells us the chipset of the ethernet interface.

If the module is not loading, all the editing of rc.inet1.conf will not do anything.
Lets first make sure the card is detected, loaded, and doing it's voodoo first, THEN work on configuration.


All times are GMT -5. The time now is 10:51 AM.