Internet in Linux

Status
Not open for further replies.

MetalX

Posts: 1,364   +4
Sorry guys, I am a complete newb when it comes to Linux but I have Xandros currently installed on my extra HDD (40gb) and I'm having a hell of a time getting the internet to work. I have a DSL modem that is connected to my router and no matter what I try, nothing seems to be able to allow it to get on the net through the router. I have also tried connecting the modem directly to my computer and attempting to connect that way but to to avail. Can anyone help me?
 
hey, maybe disconnect the power to the modem, then take out your ethernet cable, and replug it into the modem.
Plug the modem back into the modem, and wait till it starts up.
Boot up linux.
If you can access the command line, then type dhclient You must be root user.
then, wait till it ends, and then try clicking on firefox, or you web browser.

Hope this helps.
 
wazza said:
Your network interface setting, the same thing ipconfig does for Windows
dahhh! I'm hoping the originator will post that data here:)
 
Hey MetalX

You should check to see if your network/s cards are coming up, use the folowing command in a terminal/console: service network restart
make sure you have plugged the network cables into the comp.

This command restarts your network services.

After entering in the command tell me post what comes on the screen and I will be able to assist you
 
When I type that into the console I get the following:

bash: service:command not found

BTW, I am trying to configure the internet on my router. That is, the router is hooked up to the computer and the modem is connected to the router. The modem is not directly connected to the computer... but should it be?
 
The modem is not directly connected to the computer... but should it be?
NO!

first things first, however. your NIC must be operational to get anywhere,
which is why I suggested getting the results from ifconfig

this will tell you if the nic is operational and how it is configured.
without proper settings, you will NEVER get to the router or the modem.

so, pls post your findings ...
 
This is what I get when I type "ifconfig" into the console:

eth0 Link encap:Ethernet HWaddr 00:13:8F:B3:32:C3
inet addr:192.168.62.52 Bcast:192.168.62.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:2 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:120 (120.0 b) TX bytes:0 (0.0 b)
Interrupt:10 Base address:0xe800

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:452 errors:0 dropped:0 overruns:0 frame:0
TX packets:452 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:34305 (33.5 KiB) TX bytes:34305 (33.5 KiB)

I have absolutely no idea what to make of it... but I hope you can help!
 
very good;

eth0 Link encap:Ethernet HWaddr 00:13:8F:B3:32:C3
inet addr:192.168.62.52 Bcast:192.168.62.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
the UP says your NIC is running
(fyi: you can control this with ifconfig eth0 {up,down}
the addr: and Mask: are just fine

so, we have hope that this is workable.

now try to access the router via your browser. from your addr: info,
it looks like it would be 192.168.62.1, but that's not any known default ...
did you change it? get your setup info for the router -- it will tell you
the DEFAULT router lan address -- the usual addresses are
192.168.0.1; 192.168.1.1; 192.168.2.1

keep trying one of these and take not which one works (if any).

without any hard docs on your setup, I will guess that nothing will work
and we will need to reconfig the NIC.

fyi: the system nic must be in the same subnet as the router,
eg: router 192.168.0.1 and the system nic might be anything like 192.168.0.X
 
Well I can tell you for sure that the router is 192.168.62.1 and that is how it came packaged. I have tried accessing the router from the browser but it doesn't work...
 
MetalX said:
Well I can tell you for sure that the router is 192.168.62.1 and that is how it came packaged. I have tried accessing the router from the browser but it doesn't work...

On linux we use ifconfig instead of ipconfig -- the arguments are very different too
so see man ifconfig

this article will give you some basics to start from

You will need to access your router’s configuration page which is brand-name dependent:
Code:
    Netgear 192.168.0.1
    D-Link 192.168.0.1
    Linksys 192.168.1.1
    Belkin 192.168.2.1


1) disconnect the system from the router.
2) reset the router with the switch on backside.
3) power cycle the router
4) while disconnected, use ifconfig to down the interface
(ifconfig eth0 down)
this will return the device to the MFG defaults and prepare your nic
for another DHCP setup.

5) reconnect to the router and then ifconfig eth0 up
 
I tried that... but it didn't seem to do anything... :( Oh, maybe I should mention that my router is something of an obscure brand. The brand is "inexq". Google it for more info although the website is HORRIBLY designed. Anyway, it might not be compatible with linux. If it isn't, is there a way to connect using the DSL modem connected right to the computer? ...Linux really seems hell-bent on keeping me off the internet... hope you guys can help!
 
First things 1st.

1) your computer dual-boots xandros & windows?
2) when in windows you have access to the internet?
3) from xandros we need the output of route -n
4) from windows send us the results of ipconfig/all and netstat -r
 
MetalX said:
Anyway, it might not be compatible with linux. If it isn't, is there a way to connect using the DSL modem connected right to the computer? ...Linux really seems hell-bent on keeping me off the internet..
Linux doesn't even know any router exists, so refocus your time.

Yes you can directly couple your system to the modem B U T you better config
IPTABLES to inhibit all inbound for ports 0-1024, except port 53+687.
IMO, you will have more success and find it easier and safer to use the ROUTER approach.

you NIC needs DHCP to be configured correctly
 
YosefM said:
1) your computer dual-boots xandros & windows?
2) when in windows you have access to the internet?
3) from xandros we need the output of route -n
4) from windows send us the results of ipconfig/all and netstat -r
1) Yes.
2) Yes.
3) Is route -n something I should type into the console?
4) Ok here they are:

ipconfig.jpg

netstat.jpg
 
all of this is letter PERFECT (on the windows side)

now get the same from your Linux environment
 
hmmmm - thanks. route table looks fine - totally unremarkable, just as it should be. ifconfig looks normal as well.
in xandros do these commands from console, you shouldn't need to be root. Post the results.
ping -c 4 127.0.0.1

ping -c 4 192.168.62.52

ping -c 4 192.168.62.1

traceroute 216.109.112.135

ping -c yahoo.com


I suspect you simply need to reconfigure your network card to use a dynamic IP address instead of static, this will give it the proper route out and set the router as your name server. If it's already dynamic, and the only thing that fails is the ping to yahoo.com by name, edit the file /etc/route.conf to add this line:
nameserver 192.168.62.1
 
YosefM said:
hmmmm - thanks. route table looks fine - totally unremarkable, just as it should be. ifconfig looks normal as well.
in xandros do these commands from console, you shouldn't need to be root. Post the results.
ping -c 4 127.0.0.1

ping -c 4 192.168.62.52

ping -c 4 192.168.62.1

traceroute 216.109.112.135

ping -c yahoo.com


I suspect you simply need to reconfigure your network card to use a dynamic IP address instead of static, this will give it the proper route out and set the router as your name server. If it's already dynamic, and the only thing that fails is the ping to yahoo.com by name, edit the file /etc/route.conf to add this line:
nameserve
r 192.168.62.1
How do I do that last part?
 
YosefM said:
hmmmm - thanks. route table looks fine - totally unremarkable, just as it should be. ifconfig looks normal as well.
in xandros do these commands from console, you shouldn't need to be root. Post the results.
ping -c 4 127.0.0.1

ping -c 4 192.168.62.52

ping -c 4 192.168.62.1

traceroute 216.109.112.135

ping -c yahoo.com


I suspect you simply need to reconfigure your network card to use a dynamic IP address instead of static, this will give it the proper route out and set the router as your name server. If it's already dynamic, and the only thing that fails is the ping to yahoo.com by name, edit the file /etc/route.conf to add this line:
nameserver 192.168.62.1
Here are the results in the order that you posted them.
 
ok. Analysis of results:
1) ping is working - it hits your lo (loopback interface, 127.0.0.1)
2) NIC is working, you can ping yourself
3)while route -n reports the router as your gateway, you cannot ping it.
I think we need to set a default gateway. One syntax of the route command looks like this:
route [add default gw] <ip_address> <interface>
do this as root from the console in xandros:
route add default gw 192.168.62.1 eth0

Then use a text editor from the xandros GUI (also as root) to edit the file /etc/route.conf Add this line to the end of the file:
nameserver 192.168.62.1

That should get you up & surfing.
 
in the /etc directory, the file name is route.conf
You might have to be root to edit it. If you dont find it, then you will need to use whatever administration tools xandros supplies to configure your network and NIC.
Specifying a nameserver gives your system a destination for DNS lookup queries (this translates an internet server name like yahoo.com to an IP address like 216.109.112.135). Without this you could only use the numeric address, and who could remember more than a few of those?
 
YosefM said:
in the /etc directory, the file name is route.conf
You might have to be root to edit it. If you dont find it, then you will need to use whatever administration tools xandros supplies to configure your network and NIC.
Specifying a nameserver gives your system a destination for DNS lookup queries (this translates an internet server name like yahoo.com to an IP address like 216.109.112.135). Without this you could only use the numeric address, and who could remember more than a few of those?
There is no file called route.conf. How can I configure it in the adminitstration tools? BTW thanks for all your help so far!
 
Status
Not open for further replies.
Back