Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
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 installed Mandrake 9.2 successfuly yesterday, and it read all of my hardware perfectly! Including my ethernet card.
So now my computer has both Linux and WinXP. My ethernet card is connected to a D-Link router which is connected to a DSL modem. This connection works fine on Windows XP, but I really need help on setting up a LAN on Mandrake 9.2!
I ran the internet wizzard and selected LAN but after the wizzard it did not work!
Can someone please help me get my internet connection working!?!?
Don't want to sound like I'm arguing with codecruncher here, but I'll offer an alternative suggestion.
1. As codecruncher suggests, get data from your XP environment to understand how it's networking has been configured:
Start -> Settings -> Network Connection
You should see a window with one or more icons in it, one of which should have a name something like "Local Area Connection". Highlight this, and then from the panel on the left, select "Change the settings of this connection".
You should get *another* popup window, this one titled "Local Area Connection Properties". In the centre of this window is a scroll-box filled with lots of property entries. Scroll to the bottom of this, where you should find something for TCP/IP.
Highlight that protocol and click the right-most of three buttons, labelled "properties". If your XP setup is anything like mine, you'll find the display showing you that "Obtain an IP Address" automatically and "Obtain DNS Server address automatically" have both been selected. Fine.
To confirm exactly what values these are, open a "command prompt" window and type this:-
ipconfig
and you should see something a bit like this:-
C:\>ipconfig
Windows IP Configuration
Ethernet adapter Local Area Connection:
make a note of your XP box IP Address, subnet mask and default gateway.
Now boot into your Mandrake Build. Use Control Centre for this - although codecruncher wants you to edit files, he may not be aware of the fact that Mandrake will overwrite changes you make manually when you next re-boot your PC...
In the network settings, you want to make 2 changes. By all means use the wizard to set up networking. You need to change the address to DHCP [and it should get a new IP Address from your router or DSL box].
You also need to change your default gateway [should be a click button *above* the LAN settings. You need to change this to the same value that you saw on your XP build.
Now you need to do a reboot of Mandrake.
Try it when it comes up. If it still doesn't work, open a command window, su to root, and type the following:-
shell$> ifconfig -a
Look at the output [there will be a lot]. In there somewhere should be a label for a network port, something like eth0. Look for an IP address next to it. Is it similar to your XP build? It should be.
shell$> cat /etc/resolv.conf
Look at the contents of this file. It should point to the same "DNS" Server as your XP build [again, probably your D-Link Router].
If either of these entries are different, or if above suggestions still don't work, one get-around might be to over-ride your Mandrake build and set it up with a static IP address in the right range. Check the above, and post back if it still doesn't work.... I have a Mandrake build connected to the 'net in the way that you're trying to achieve, so I can dig out exact settings if required.
codecruncher is right I'm afraid you're better off getting in there and getting your hands dirty!! Edit the ifcfg-eth0 file which is in the same place under MDK 9.2. The network GUI setup programs under MDK are pretty crap. Try setting up eth0 for <bootp/dhcp> though that might help.
Boot in Windows XP. Open up the <network connections> dialog box. Right click on the ethernet card icon and select <status> in the context menu. In the status popup window select the <support> tab at the top. Just copy all the text in the popup window and post it on here. We can give you hand then - cause we'll know whats going on a bit better!!
Any changes you make to the ifcfg-eth0 are parmenant under MDK 9.2 (I should know cause I'm using the same distro!!)
Can you ping your router under Linux? Can you ping your modem under Linux? Can you browse to the Web configuration screens for you router and modem under Linux?
You may need to put your ISP's DNS server ip address into /etc/resolv.conf. You can't always really on routers to handle DNS resolution properly (I know that a Vigor 2600We I have doesn't do such a good job of this).
By the way any changes to the networks settings under Linux DO NOT NEED A REBOOT (sacra bleu ytene!!) You just need to type (as root probably):
# service network stop
# service network start
(don't type the '#' thou!!)
-------------------------------------
Address type: Assigned by DHCP
ip address: 192.168.0.100
Subnet Mask: 255.255.255.0
Default gateway: 192.168.0.1
--------------------------------------
Theres the info.
Remember im a complete newbie!
I've only had this installed for a day and I only know the basic cammand line stuff. So i would need more specific instructions on editing these files.
Thanks a lot guys! It looks like this is going on the right track!
I went into ect/sysconfig/network-scripts/ and looked for ifcfg-eth0... didnt find it.... but i did see a ifcfg-lo.... so naturaly i created an ifcfg-eth0 file, and it brought me much closer, this time it recondized that it was lan! but it still didnt connect
I ran # service network status.... and it said something like:
Devices:
lo eth0
Active Devices:
lo
So i knew that lo came from the file ifcfg-lo and i thought that it thought that that was my device, so i deleted ifcfg-lo
Now when startx the initialization it just stays there, and does nothing.......
so i already broke my linux !
so im guess ill have to go in and emacs another ifcfg-lo, but i dont know what the contents of the file was?!?
can someone please explain what to do to get my gui working again!?
Hy,
ifcfg-lo is the config file for the lo (loopback) interface. A lot of software uses this interfaces for communication with other software, the kernel,....
You wrote, that your PC is hooked up to a router, which is hooked up to a modem, is that right?
I take it, you do not have to authanticate at the router (under WinXP) to get internet access, right?
Just in case I am right, here is the config you would need for a DHCP configuration of eth0:
Code:
DEVICE=eth0
BOOTPROTO=dhcp
onBOOT=yes
TYPE=Ethernet # not sure wether you need this entry...
After you edited this file (ifcfg-eth0) you do a /etc/init.d/network restart. After that, you should do a ifconfig. My output looks like this:
__________________________
Make a text file <ifcfg-eth0> using this and stick in the </etc/sysconfig/network-scripts> directory. Make sure you have a blank line at the bottom of the script (always!!)
Can't go wrong as we are both using MDK 9.2!! BTW don't ask me what the MII business is
Restart you networking:
# service network restart
You could also try running Harddrake->configure you ethernet cards, Mandrake Control Centre->networking, etc. GUI's and configuring you network card to use dhcp/bootp that way. It will write the above configuration script for you!!
Perhaps you could post your:
# ifconfig -a
output here? (BTW the -a switch will list all interfaces even if they are down). That output would be useful.
If the interface is still not starting up try:
# ifup eth0
to force it to start up!!
I don't think that the fact your DSL is PPPoE (Point to Point over Ethernet) should affect anything. Your DSL modem will buffer this from your router and your laptop. Note that PPPoE transmits packets that the standard ethernet size of 1500 bytes. But it uses an extra header of 8 bytes while travelling over the link to your ISP. This means that you should set the MTU for all your devices to 1492 bytes (MTU=maximum transmittion unit).
Colin you should get yourself subscribed to MDK mailing lists (when you get your internet access working of course!!) They are specific to the Linux distribution you are using. Just go to the Mandrake home page. The more sources of help you've got the quicker you'll solve your Linux problems!!
I think the lo thinger is all screwed up, because i don't have the original file! what should ifconfig-lo have in it? and eth0 still shows up inactive if i do #service network status !?
ifcfg-lo:
___________________________________________________________________
DEVICE=lo
IPADDR=127.0.0.1
NETMASK=255.0.0.0
NETWORK=127.0.0.0
# If you're having problems with gated making 127.0.0.0/8 a martian,
# you can change this to something else (255.255.255.255, for example)
BROADCAST=127.255.255.255
ONBOOT=yes
NAME=loopback
____________________________________________________________________
Colin
When you get your local loopback interface backup can you post the output from:
# ifconfig -a
# ip route
so we can see what you network thinks its doing!!
when i run
#ifconfig -a
it only shows the information for lo and not for eth0..... and when i do
#service network status
it says:
------------------------------
configured devices:
lo eth0
currently active:
lo
-------------------------------
so eth0 isnt active!?!? is this part of the reason?!?
If
# ifconfig -a
doesn't show your eth0 NIC at all then you have some kind of hardware problem I would think.
Try disabling and reenabling your network. Then check your syslog file for errors or problems:
# service network restart
# tail -n 20 /var/log/syslog
Also I would go into HardDrake and just double check that your NIC has the correct device driver loaded for it. Does the driver MDK think is right actually match your hardware?
I would also get onto the Mandrake mailing lists ASAP and get some help that way.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.