View previous topic :: View next topic |
Author |
Message |
Daniel_2 n00b
Joined: 11 Sep 2004 Posts: 55
|
Posted: Fri Sep 17, 2004 5:37 pm Post subject: After installation - How to set-up network? |
|
|
On my minimal cd's installation process the network was detected automatically. Now, after installation, it isn't.
I don't know if I use pppt/pppoe/pppoa or any other fancy acronym that is explained in the handbook, that is why I ask here.
The physical network set-up here goes like this:
My computer is connected through a 10/100 realtek network card to a switch that is connected to an Alcatel ADSL modem.
I suppose that the switch or the modem have a DHCP server, which is the reason the network was automatically detected by the minimal CD.
So, what do I do now? How do I know what network compoments do I need to install, and how do I install them?
A good starting point is that when I try to ping some IP, like my modem's (which is 10.0.0.138) I get the message "Network is unreachable".
Thank you. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54785 Location: 56N 3W
|
Posted: Fri Sep 17, 2004 6:03 pm Post subject: |
|
|
Daniel_2,
There are two steps to getting your network up.
1) You need the kernel module for your NIC built and loaded.
2) You need /etc/conf.d/net configured
3) You need to run Code: | rc-update add net.eth0 default |
(alright three steps)
To see which module you need, boot with the liveCD and run lsmod.
One of the listed modules is for your NIC (8139too maybe ?)
Write down the list of names and boot your own kernel. Do lsmod again. Cross the names off your list.
Does ifconfig show and eth0 ?
If so, your kernel module is loaded and the NIC is working, its jusr not configured yet.
If you don't have an eth0 modprobe each module mot crosssed off your list and test for eth0 afer each modprobe.
If you get to the end of the list without getting eth0 up, its not compiled. You need to configure your kernel again.
When eth0 is up edit /etc/conf.d/net to set dhcp on eth0. There are comments in the file on how to do this.
Now try it run Code: | /etc/init.d/net.eth0 restart | and you should have connectivity. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Daniel_2 n00b
Joined: 11 Sep 2004 Posts: 55
|
Posted: Fri Sep 17, 2004 8:42 pm Post subject: |
|
|
Thank you for the informative answer. I remember I did copile my kernel with support to my realtek 8139 chip, and also for the dummy network card (or something like that) as a module.
I'll try what you've said tomorrow. |
|
Back to top |
|
|
gnuageux Veteran
Joined: 17 Apr 2004 Posts: 1201
|
Posted: Sat Sep 18, 2004 7:51 am Post subject: |
|
|
Uhhhh I had a whole fiasco with my RealTek card, eventually I ended up disabling it and using a 3com. Good luck! _________________ The realOTW: http://forums.realotw.org/index.php
Registered Linux user#364538 |
|
Back to top |
|
|
Daniel_2 n00b
Joined: 11 Sep 2004 Posts: 55
|
Posted: Sat Sep 18, 2004 8:44 am Post subject: |
|
|
gnuageux wrote: | Uhhhh I had a whole fiasco with my RealTek card, eventually I ended up disabling it and using a 3com. Good luck! |
Thanks
NeddySeagoon wrote: | Daniel_2,
There are two steps to getting your network up.
1) You need the kernel module for your NIC built and loaded.
2) You need /etc/conf.d/net configured
3) You need to run Code: | rc-update add net.eth0 default |
(alright three steps)
To see which module you need, boot with the liveCD and run lsmod.
One of the listed modules is for your NIC (8139too maybe ?)
Write down the list of names and boot your own kernel. Do lsmod again. Cross the names off your list.
Does ifconfig show and eth0 ?
If so, your kernel module is loaded and the NIC is working, its jusr not configured yet.
If you don't have an eth0 modprobe each module mot crosssed off your list and test for eth0 afer each modprobe.
If you get to the end of the list without getting eth0 up, its not compiled. You need to configure your kernel again.
When eth0 is up edit /etc/conf.d/net to set dhcp on eth0. There are comments in the file on how to do this.
Now try it run Code: | /etc/init.d/net.eth0 restart | and you should have connectivity. |
I didn't understand what shall I do first, the 3 steps above, or the lsmod :\ anyway, here's the output for lsmod on the livecd:
Code: |
Module Size Used by Not tainted
advansys 77441 0 (unused)
8139too 11944 1
mii 2112 0 [8139too]
serial 48676 0 (autoclean)
sbp2 15284 0 (unused)
usb-storage 60800 0 (unused)
hid 19652 0 (unused)
uhci 21916 0 (unused)
usbcore 53676 1 [usb-storage hid uhci]
|
and here is the output on my gentoo installation: Code: |
Module Size Used by Tainted: P
dummy 1208 0 (unused)
nvidia 1965248 0 (unused)
|
Things I need to note are that I compiled the kernel with nvidia and dummy network driver (or something like that) as a module. I didn't know what it is, but it was marked automatically, so I didn't touch it anyway, it's a module, and I didn't load it.
I *did* add support to my 8139 chip when I compiled the kernel.
While gentoo boots, it says something about eth0 (like it found or recognized it, and that my ip is 192.168.0.2.
What do I do now? |
|
Back to top |
|
|
gnuageux Veteran
Joined: 17 Apr 2004 Posts: 1201
|
Posted: Sat Sep 18, 2004 8:54 am Post subject: |
|
|
Is there anyway that you can post the exact error that eth0 throws when you boot? Whats returned from /etc/init.d/net.eth0 start? Looks like you do have the module for your nic loaded. There are a couple of modules for Realtek cards, but the 8139too seems to be the one thats most commonly used. Another thing you may try is boot using the livecd, enable your network, and then run lsmod to see which modules its using to make sure that youve got the same compiled.
Quote: | There are two steps to getting your network up.
1) You need the kernel module for your NIC built and loaded.
2) You need /etc/conf.d/net configured
3) You need to run |
These 3 steps do the following:
1) Youve done this, as you have the 8139too module loaded.
2) take a look at /etc/conf.d/net - this is where all of the stack settings for the network interface (in ur case net.eth0) are stored. (I.e ip address, bdcast addy, netmask, gw)
3)rc-update tells your box to start the said service (net.eth0) at the default runlevel. Youve already done this b/c when you boot you see the error. You can see what services are set to run at the default run level by: ls /etc/runlevels/default. There are symlinks there that point back to the init scripts in /etc/init.d/ _________________ The realOTW: http://forums.realotw.org/index.php
Registered Linux user#364538 |
|
Back to top |
|
|
Daniel_2 n00b
Joined: 11 Sep 2004 Posts: 55
|
Posted: Sat Sep 18, 2004 8:58 am Post subject: |
|
|
gnuageux wrote: | Is there anyway that you can post the exact error that eth0 throws when you boot? Whats returned from /etc/init.d/net.eth0 start? Looks like you do have the module for your nic loaded. There are a couple of modules for Realtek cards, but the 8139too seems to be the one thats most commonly used. Another thing you may try is boot using the livecd, enable your network, and then run lsmod to see which modules its using to make sure that youve got the same compiled.
|
I do not think it's an error at boot, I think it just says it has found it, normal message.
As for lsmod output - look at my previous message.
gnuageux wrote: |
These 3 steps do the following:
1) Youve done this, as you have the 8139too module loaded.
|
I think it is
gnuageux wrote: |
2) take a look at /etc/conf.d/net - this is where all of the stack settings for the network interface (in ur case net.eth0) are stored. (I.e ip address, bdcast addy, netmask, gw)
/ |
here's my net file:
http://rafb.net/paste/results/X8EKfh70.html
afaik my adsl modem, which I think is also my router and dhcp server, is located at 10.0.0.138.
gnuageux wrote: |
3)rc-update tells your box to start the said service (net.eth0) at the default runlevel. Youve already done this b/c when you boot you see the error. You can see what services are set to run at the default run level by: ls /etc/runlevels/default. There are symlinks there that point back to the init scripts in /etc/init.d/ |
I do not understand, what do I do now? :\ |
|
Back to top |
|
|
gnuageux Veteran
Joined: 17 Apr 2004 Posts: 1201
|
Posted: Sat Sep 18, 2004 10:11 am Post subject: |
|
|
Youre sure that your dsl modem is on the 10.0 network? Is there another device thats leasing dhcp then? If not I wonder how youre getting a 192.168 address? Or did you set that? Does this box dual boot, if so boot to the other OS and see what stack settings you have, post em here and well go from there. If you boot from the livecd and run ifconfig eth0 what ip address, bdcast address are returned? When booted from the livecd what does route -n return? You could uncomment the gateway line in /etc/conf.net/ add 10.0.0.138, change your ip to something in the 10.0.0.0/24 range and adjust your bdcast address to 10.0.0.255 and see if that helps too. _________________ The realOTW: http://forums.realotw.org/index.php
Registered Linux user#364538 |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54785 Location: 56N 3W
|
Posted: Sat Sep 18, 2004 11:44 am Post subject: |
|
|
Daniel_2,
Your eth0 interface is up, since it has an IP address.
and from your lsmod from the liveCD, the network card module is 8139too. You must have it built into your kernel.
From your /etc/conf.d/net.eth0 its allocated statically.
Quote: | #
iface_eth0="192.168.0.2 broadcast 192.168.0.255 netmask 255.255.255.0"
#iface_eth1="207.170.82.202 broadcast 207.0.255.255 netmask 255.255.0.0" |
If you want to use dhcp, comment out the static assignment and uncomment the line Quote: | #iface_eth0="dhcp" |
Now do Code: | /etc/init.d/net.eth0 restart |
If you router is on 10.x.x.x giveing your PC a 192.168.x.x IP will preevent it from working, since the addresses belong to two different networks. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Daniel_2 n00b
Joined: 11 Sep 2004 Posts: 55
|
Posted: Sat Sep 18, 2004 4:14 pm Post subject: |
|
|
OK, thank you all, network is up
All needed to do was commenting and regular line and uncommenting the dhcp one.
BTW, even if I have a dhcp server. I can still set an IP of my own (as long as it's 10.0.0.x), right?
How do I do this? |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54785 Location: 56N 3W
|
Posted: Sat Sep 18, 2004 4:35 pm Post subject: |
|
|
Daniel_2,
Your DHCP server will have a limited range of IP addresses that it will give out. If you want to set a staic IP address, you must avoid this range.
Your router is your DHCP server. It probably has a web interface to allow you to configure it. Try pointing your browser at http://10.0.0.138
To go back to static, you change the 192.168.0.2 that you used to use to 10.x.x.x (fix the x's) _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
robet l33t
Joined: 06 Sep 2004 Posts: 807 Location: Earth/NorthAmerica/USA/NY
|
|
Back to top |
|
|
|