LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Help Setting up internet through commandline! (https://www.linuxquestions.org/questions/linux-newbie-8/help-setting-up-internet-through-commandline-214124/)

orangeh 08-06-2004 02:37 AM

Help Setting up internet through commandline!
 
Hello,

I have recently installed linux on an old computer. I had to do some research to find something that would run and settled on deli-linux so I have a GUI but I dont see a control panel of any sorts so I'm figuring that I will have to learn how to use linux through commandline (sounds like fun! this is just a box im using to teach myself stuff anyhow)

Anyways, I am trying to setup this box as a web surfing / mp3 box and I cannot get connected to the internet. I have my box plugged into a d-link router which is running DHCP. I have my windows box plugged into the router as well and, as you can tell by this post, its working fine.

I have tried to research this topic but everything I find is redhat this or suse that and unfortunately I dont have a GUI with any sort of control panel that I can find. I have ran netconfig from the commandline but were not sure of what I should set my hostname or domain as ( I filled both in as my router IP ) and i set it for DHCP but no luck. It doesnt connect and I cant even ping my router. Please help me get this going or direct me to a good tutorial for commandline commands as everything I do I will be doing from the commandline

as a linux newbie this is probably the hardest way to learn :/ Thanks for any help

/bin/bash 08-06-2004 11:48 AM

Hostname can be whatever you choose. Use hostname command to change it (must be root.)
hostname spongebob

Make sure you have correct module loaded for your NIC using lsmod.
lsmod

Use ifconfig to setup and start/stop your nic.
ifconfig eth0 down
ifconfig eth0 up
ifconfig

Use route to check that the nic can reach the router, and if necessary you can add default route.
route

Finally put your DNS nameserver in /etc/resolv.conf file.
nameserver 255.224.247.235
nameserver 255.224.247.236

orangeh 08-06-2004 06:22 PM

thanks for the response. Unfortunately its a little over my head :( I remember when i ran netconfig it said a i have a nic that uses tulip.o

anyhow i did lsmod and it shows tulip in there and says its used by "(unused)"

i assume ifconfig eth0 down stops your nic and up starts it. I did "ifconfig eth0 up" and it said SIOCSIFFLAGS: Resources temporarily unavailable

i did route and it did a loopback so i tried "route 192.168.0.1" which is my router ip and it didnt work :(

I'm sorry but I am so used to windows and now I have to do things by typing instead of clicking! I'm up for the challenge but I cant wrap my head around it or at least havent yet.

Also why would you set DNS servers? All of my stuff including DNS is assigned through DHCP from my ISP

Thanks again for reply!

/bin/bash 08-06-2004 08:29 PM

Well I don't know anything about Deli Linux but you should be able to get your network up by using just a few commands.

Lets try starting from scratch and adding an IP address then a route and then ping the router:

ifconfig eth0 down

ifconfig eth0 192.168.0.2

route add -net 192.168.0.0 netmask 255.255.255.0 dev eth0

ping -c2 192.168.0.1

Try to include as much info as you can when you reply, such as the output from commands and any errors you get.

orangeh 08-06-2004 09:07 PM

I really appreciate the help. I did "ifconfig eth0 192.168.0.2" and it gave me an error message that say "SIOCSIFFLAGS: Resource temporarily unavailable"

:(

thanks for any help you can offer i really dont know what to do lol

btmiller 08-06-2004 09:17 PM

What does '/sbin/ifconfig -a' (no quotes) say?

orangeh 08-06-2004 10:21 PM

ok im typing this all. Hope its helpful. This is what i get when i type "/sbin/ifconfig -a"

dummy:

link encap:Ethernet HWaddr 00:00:00:00:00:00
BROADCAST NOARP MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:00 frame:0
TX packets:0 errors:0 dropped:0 overruns:00 frame:0
collisions:0 txqueuelen:0

eth0:

Link encap:Ethernet HWaddr 00:C0:F0:96:3E:F3
inet addr: 192.168.0.2 Bcast:192.168.0.255 Mask 255.255.255.0
BROADCAST NOTRAILERS RUNNING MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:00 frame:0
TX packets:0 errors:0 dropped:0 overruns:00 frame:0
collisions:0 txqueuelen:0
Base address:0xfc00

lo:

Link encap:Local Loopback
inet addr:127.0.0.1 Mask: 255.0.0.0
UP LOOPBACK RUNNING MTU:3924 Metric: 1
RX packets:18 errors:0 dropped:0 overruns:00 frame:0
TX packets:18 errors:0 dropped:0 overruns:00 frame:0
collisions:0 txqueuelen:0

jschiwal 08-06-2004 11:53 PM

googling I found this quote (http://www.scyld.com/pipermail/tulip...ry/001767.html):
jlhagen@collins.rockwell.com <jlhagen@collins.rockwell.com> wrote:
>
> [root@cutlass /dev]# /sbin/ifconfig eth0 192.168.1.3 netmask 255.255.255.0 up
> SIOCSIFFLAGS: Resource temporarily unavailable
> SIOCSIFFLAGS: Resource temporarily unavailable

The only place I see in the Tulip driver that can return EAGAIN (the
error code for "Resource temporarily unavailable") is when the IRQ is
being allocated. In other words, the IRQ for the network card is being
used by some other bit of hardware.


orangeh 08-07-2004 01:44 AM

oh no i never understood IRQ things :( It was hard enough in windows and now from the commandline its impossible!

If i remove all my cards in my expansion slots and leave just the NIC will this fix it? And also i saw a reference to "modules" is this the linux equivalent of "drivers"? Again, thanks for any help. Once i get this baby on the internet it should be a lot easier to teach myself things

/bin/bash 08-07-2004 09:08 PM

Quote:

If i remove all my cards in my expansion slots and leave just the NIC will this fix it?
Maybe, maybe not. Sometimes all you have to do is move the card to another slot.
Quote:

And also i saw a reference to "modules" is this the linux equivalent of "drivers"?
Yes, that is correct.

orangeh 08-07-2004 10:00 PM

I've tried removing all cards except sound card and moving my network card to a different pci slot but still get errors. I have to have sound working as well so thats why I left it in. Does anyone have any ideas how to edit IRQ settings through commandline? I figure its going to be hard so I'm looking for guides but in the meantime anyone have some light they can shed on the topic? Perhaps a link to some IRQ through commandline information. Thanks


All times are GMT -5. The time now is 07:39 AM.