MandrivaThis Forum is for the discussion of Mandriva (Mandrake) Linux.
Notices
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.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
nameserver 207.217.120.83
or whatever.
You can probably set it to the xp box's IP as well.
Well I know the IPs on the other computers are 192.168.0.xx (xx being a random number)
I tried running that line you gave me but it says command not found. Keep in mind that I'm new to this, if I could just run commands that would be great... The GUIs are extremely confusing.
What 'bout that file, should I just add that nameserver line at the bottom?
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
nameserver 192.168.0.1
# 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.
The line that reads search simply defines that if you ping or try to go to a host machine with just the hostname part, it will automatically tack on the domain part.
In other words, lets say I have my domain amfoster.com (which It is)
I have a line that says
search amfoster,com
I can ping srv (the name of one of my boxes here) and it would be the same as saying
ping srv.amfoster.com
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.
I checked my connections...
192.168.0.1 is the IP that my XP machine gives to the switch.
Now the IP address that my cable company gives me is... 67.177.44.82
I've tried many of those numbers in this line....
route add default gw xxx.xxx.xxx.xxx
and nothing happens... just like it performed the command in the background, doesn't say anything to me. But then I go to Mozilla and try to open a page says it cannot resolve host.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.