MandrivaThis Forum is for the discussion of Mandriva (Mandrake) Linux.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I just installed 10.0 and I want to connect to the internet. Here's my setup...
I've my highspeed internet going straight into an XP machine, then from that machine going into a switch, then to my linux machine.
How would I setup the internet on the linux machine, anyone familiar with this?
first, on the xp box, you need to share that internet connection. That will probably set the xp box's IP to something like 192.168.0.1. (maybe different)
Then on the linux box, ya need the IP to be on the same net as that shared connection. Also you need to set the default route to that of the xp box.
route add default gw 192.168.0.1
Do not forget to make an entry in the /etc/resolv.conf to point to a valid nameserver.
You can probably set it to the xp box's IP as well.
Hmmm, I'm starting to make my way around Linux nicely, but came across a little problem.
Here's what my resolv.conf looks like now... search 255.255.255
# search homeland.net
# ppp temp entry
The nameserver line did have 127.0.0.0 next to it, but I changed that number to the 192 because it looked familiar from my XP machine (which I'm typing from right now).
Then after changing that successfully I typed in what you said in the sbin and this is the message I got Network is unreachable.
I know it is because when I swap out HDs on this machine to my XP HD (the machine has 2 HDs, Linux and XP but both not connected at same time) it performs fine on the network.
I do feel we're gettin' close here tho....
I ran the route command and it just went to the next line waiting for the next command, like it did something but it had no output. I tried the route command with both numbers it has listed in the .conf.
That file (/etc/resolv.conf) can be changed at any time. It has nothing to do with the route, but rather to point to what nameservers should be checked when reaching out to machines by name rather than IP. You do not need the search line at all. It is there just as a benefit.
As for the default route,
from the command line just type it as root
route add default gw 192.168.0.1 (if that is the IP to the machine actually connected to the internet.
Better would be to have that line executed everytime you boot into Linux.
A simple way would be to write a script and put it in the appropriate rc directory.
Lets say you come up in run level 5 all the time (Xwindows)
Look for the rc5.d directory on your box. In RedHat it is /etc/rc.d/rc5.d
In debian it is /etc/rc5.d
I am not sure about Mandrake. I do not use it, but it was originally based off of redhat, so it may be /etc/rc.d/rc5.d
On Redhat there is a file named /etc/rc.local which is executed no matter what run level you go into. The route statement can be put in there as well. It is /etc/rc.d/boot.local on SuSE Linux. Not sure about Mandrake again. I do not use it. I am partial to
Debian, SuSE and then RedHat.
That should work out for you.
I am sure the default route can be set in a GUI dialog on Mandrake, but again, I don't use it, not\r do I do any admin except for at the command line.
Whoa, okay, you're gettin' ahead of me so far. I'll work on the script once I get connected to the internet for the first time. lol
So this IP of the machine actually connected to the internet, how would I get this? I see NUMEROUS numbers. I see gateway numbers, I see IP address, masks, etc.
Since my connection of the internet goes into this main machine, then through the switch, THEN through to the linux machine, I couldn't use the same IP that the cable company gives me could I? Isn't it a different IP from what my linux box would have (since it goes thru a switch)
Maybe explain that a lil better, then we can work on that script.
The resolv.conf file lets the Linux box know where the DNS servers are. Just as a test, ping an entity out there in the world by it's IP address. If that works fine, then the /etc/resolv.conf just needs entries.