Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I've pretty much got Linux figured out, but the one thing my book didn't cover enough(they only got as far as "How To Install Your Network Card") is configuring one's network. I've tried both the graphical interface and ifconfig , but they always seem to mess up. For example, when I click connect in the graphical interface, Linux assigns itself the IP 192.168.1.1, when that is actually the IP for the LAN's router. After looking around a bit, I also found out that Linux thinks the LAN router's IP is 192.168.1.0. How do I fix this mess up? I know I'm doing something wrong, I just don't know what.
as root have you tried running this in a terminal #netconf
i always find it easier to give my linux box a static Ip and make sure you have a correct domain name ex: mybox.home.net.cc
enter the gateway as your routers Ip
and primary DNS as your routers IP
i am running mdk 9.1 through a DHCP enabled router to ADSL network this is my linux box's setup as an example
hope this may help
I am guessing that this for a small network at home with only about 2 or 3 computers on it? If so a static ip address would probably be easiest if you do not already have a functioning network that is using a DHCP server. I have mostly just used static IP addresses and do not have much experience with using a DHCP server to provide the ip addresses for me. With a static ip address I just choose the ip addresses myself and type them in manually. With a large complex constantly changing network a DHCP server makes sense. My network at home consists of just 2 computers with an additional 3 virtual computers that sometimes run on my newer computer as well. I do not need very many ip addresses for such a small network so to me it just seemed simplest to use static address.
You mentioned the number 192.168.1.0. That would be the number of your network itself. In an un-subnetted class C ip address such as you are using the zero in the last octet would indicate that you are talking about the network itself and not any specific host.
You also metioned that your router uses 192.168.1.1 as the port on the router that you connect your network to. If there is only one router on the network it is typically given an ip address with a 1 in the last octet. However, any number between 1 and 254 can be used in the last octet of the address for the router. You are correct in assuming that your computer should not be using that same ip address. If you can figure out how to edit the number use some other number between 2 and 254 in the last octet. Make sure that no other computers are are using that same ip address.
You should also check to see what ip address are already being used by your other computers. If they are running Windows type in the command ipconfig in a command window to see what ip address, subnet mask and default gateway they are using. On a Linux computer type the command ifconfig to get the same information. If that does not work try typing in /sbin/ifconfig instead.
I use Red Hat 9 and do not have much experience with Mandrake so I can not advise you on how to edit the necessary settings. I do not consider myself an expert so I might have forgotten a few details.
The ip address you are using is part of a group of numbers reserved as private ip addresses. In other words you can only use those numbers on a private network but not use those numbers on the Internet. With a class C address such as what you are using the appropriate subnet mask would be 255.255.255.0. That says that the first 3 octets are the network number and the last octet is used to identify the host. I hope I did not confuse you!
Once you set all that correctly try pinging another computer's ip address with a command such as this:
That command will work with either windows or Linux. Try pinging the 192.168.1.1 ip address of your router. Also, try pinging other computers in your network. In addition, try pinging yourself using the computers own ip address. Furthermore, try pinging the loopback address of your computer by using the address of 127.0.0.1.
If you want to connect to anything outside your network you will need a default gateway. If I am not mistaken, I believe the ip address for the port on your router would be your default gateway. You know the gateway to the rest of the world. You can look and see what gatway Windows was already using and it would be the same.
P.S. I do not have any experience using a router to connect to the Internet. The only routers that I have used were used to connect two ordinary networks together when I was taking a college class. I am not sure about how to connect to the Internet with a router. I use a dial-up connection at home. You might possibly need to get infomation from a DHCP server to connect to the Internet but probably would not be relying on that DHCP server for the addresses in your private network. The other port on your router would presumably be on a different network and not be using a private ip address.
In a simple small private network having a domain name is optional if users on the internet or other networks do not need to access your computer. The use of of a computer name is also optional. Inside a small simple home network a DNS server would not be needed. It possibly might be needed when accessing other networks but not inside it. One other thought is that if your computers have not been assigned domain names then a Domain Name Server (DNS) would not have any domain names to look up. When multiple networks become connected together such as with the Internet DNS servers become important.
When I once installed Mandrake it seemed to insist that I give it a domain name. Red Hat did not make me use a domain name. I have not used Mandrake much at all. Also do not confuse a DHCP server with a DNS server. For the outgoing side of your router knowing how to access a DNS server or DHCP server might be needed. Just look and see what settings Windows was using or call your Internet provider. As I said, I do not connect to the Internet that way at home so I do not know all those details.