Click to See Complete Forum and Search --> : I don't know how to install the driver of my network card under Linux. Help please.


rendy
08-13-2002, 08:18 AM
Hi,

I use Linux Mandrake 8.2, when I type in a console: uname -a
It puts:
Linux localhost.localdomain 2.4.18-6mdk #1 Fri Mar 15 02:59:08 CET 2002 i686 unknown
The problem is that I want to install the driver of my network card(NexNIC ND012C from UNEX company...), they say that I have to compile the driver which is "in" a source code file, they also say that I have to use the instructions that are at the end of this file, the source code is at this adress(couldn't put it in this post...too long... ):
http://membres.lycos.fr/arkamnet/newpage.html

And so, the "instruction are at the end of this *.c file...
And I don't know how to do this, I tried, but there were errors each time... ...
So??? Can somebody help me please?
For example, could you tell me what do I have to write in the console to be able to compile????(I would like to learn ).
Here is what's in the other instructions file, if it can help you...:

Unex ND01X adopt Realtek's 8139 as it main core of Ethernet/Fast Ethernet
PCI bus adapter. Hence, you can use the driver written by Donald Becker
for RTL8129/RTL8139 Ethernet chips to run on Unex ND01x Ethernet/Fast
Ethernet PCI Bus adapter. The procedure to activate Unex ND01x on
linux is as follows:

step 1: compile:
The instruction for compiling the driver is include at the
end of the driver file. (run this instruction at
/usr/src/linux)

step 2: insert the driver as module:
insmod rtl8139.o
parameter can be added by adding options=..... behind the istrruction
0x16(bit 4):full duplex
bit 0-3 :default port
(run 'lsmod' to see if the module is inserted)

step 3: bind your card to an IP address

/sbin/ifconfig eth0 ${IPADDR} broadcast ${BROADCAST} netmask ${NETMASK}
(run 'netstat -i' to see if there is a interface 'ne0')

step 4: add your card to IP routing table, then add gateway also
your card:
/sbin/route add -net ${NETWORK} netmask ${NETMASK} eth0
(should be able to ping local network now)
gateway:
/sbin/route add default gw ${GATEWAY} netmask 0.0.0.0 metric 1

step 5: start inet deamon.
/usr/sbin/inetd
(you are on the network now)

*make sure that your kernel is built with network, fast_ethernet and module
support. Otherwise, you have to rebuild your kernel.
(1:go to /usr/src/linux directory
2:run 'make menuconfig' or 'make config'
3:mark the options list above.
4:exit and rebuild your kernel.
make dep;make clean;make zImage
the file 'zImage' will be at /usr/src/linux/arch/i386/boot/zImage
5:modify /etc/lilo.conf.(this file specify where kernel image is)
6:run 'lilo' )

You can run 'netconfig' which will do step 3,4,5 for you. This will create
'/etc/rc.d/inet1' and 'inet2' files. These two files will run at boot time.
Then just add a line at the beginning of 'inet1'.
'insmod /your driver'path/rtl8139.o'

then your driver will work every time you boot.



Thanks a lot for all the help that you can give.
Bye, and see you later I hope.

rendy

michaelk
08-13-2002, 08:36 AM
Can you post the instructions for compiling the driver?

I don't think you will have to recompile the kernel.

dfx
08-13-2002, 09:08 AM
Linux comes with a 8139 driver (actually, two of them), try using that first. As root, run:

modprobe 8139cp
modprobe 8139too

One of those should give no errors, and that's the driver you should use. Then assign an ip and subnet mask (that's step 3 of the instructions you pasted):

ifconfig eth0 1.2.3.4 netmask 255.255.255.0

And that's pretty much it. You can continue with step 4 if you want.

rendy
08-13-2002, 09:33 AM
Thanks for your help, i'll try all this right now, and post when I can if I have any problems...
Originally posted by michaelk
Can you post the instructions for compiling the driver?

I don't think you will have to recompile the kernel.
Michaelk, here are the instructions:

* compile-command: "gcc -DMODULE -D__KERNEL__ -Wall -Wstrict-prototypes -O6 -c rtl8139.c `[ -f /usr/include/linux/modversions.h
] && echo -DMODVERSIONS`"
* SMP-compile-command: "gcc -D__SMP__ -DMODULE -D__KERNEL__ -Wall -Wstrict-prototypes -O6 -c rtl8139.c `[ -f /usr/include/linux/modversions.h
] && echo -DMODVERSIONS`"
* cardbus-compile-command: "gcc -DCARDBUS -DMODULE -D__KERNEL__ -Wall -Wstrict-prototypes -O6 -c rtl8139.c -o realtek_cb.o
-I/usr/src/pcmcia-cs-3.0.9/include/"
* c-indent-level: 4
* c-basic-offset: 4
* tab-width: 4
* End:
*/

Thanks again for your help :).
Bye, and see you later I hope.

rendy
P.s.: If it can be useful for you, the source code of the driver is at this adress(those instructions are at the end of the source code):
http://membres.lycos.fr/arkamnet/newpage.html
Bye, see you later.

michaelk
08-13-2002, 10:40 AM
Its true what DFX says. If the realtek modules are compatable with your card then his suggestion will work.

This will just load the network modules.
modprobe -t net

rendy
08-13-2002, 10:41 AM
Originally posted by dfx
Linux comes with a 8139 driver (actually, two of them), try using that first. As root, run:

modprobe 8139cp
modprobe 8139too

One of those should give no errors, and that's the driver you should use. Then assign an ip and subnet mask (that's step 3 of the instructions you pasted):

ifconfig eth0 1.2.3.4 netmask 255.255.255.0

And that's pretty much it. You can continue with step 4 if you want.
I did what you said, and I made a screenshot, you can see it at this adress:
http://www.villagephotos.com/viewpubimage.asp?id_=545961&uid=38989
Is that "ok":confused:??
Thanks for your help.
Bye, see you later.

rendy

DMR
08-13-2002, 05:43 PM
That looks correct. Now type "ifconfig" (no quotes) to verify that eth0 is really up and running. The result should look very similar to this:[root@penguinbox/etc/rc.d/rc3.d]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:E0:29:5F:B9:29
inet addr:192.168.1.14 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:21242 errors:0 dropped:0 overruns:0 frame:0
TX packets:18772 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:23148884 (22.0 Mb) TX bytes:4122175 (3.9 Mb)
Interrupt:10 Base address:0x5000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:676 errors:0 dropped:0 overruns:0 frame:0
TX packets:676 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:65480 (63.9 Kb) TX bytes:65480 (63.9 Kb)You should also be able to ping the card:

ping -c5 192.168.1.14


To load the 8139 driver each time you boot, make sure the following line appears in your /etc/modules.conf file:

alias eth0 8139too

If the line doesn't exist, open the file in any text editor and add the line.

rendy
08-13-2002, 07:09 PM
Originally posted by DMR
That looks correct. Now type "ifconfig" (no quotes) to verify that eth0 is really up and running. The result should look very similar to this:[root@penguinbox/etc/rc.d/rc3.d]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:E0:29:5F:B9:29
inet addr:192.168.1.14 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:21242 errors:0 dropped:0 overruns:0 frame:0
TX packets:18772 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:23148884 (22.0 Mb) TX bytes:4122175 (3.9 Mb)
Interrupt:10 Base address:0x5000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:676 errors:0 dropped:0 overruns:0 frame:0
TX packets:676 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:65480 (63.9 Kb) TX bytes:65480 (63.9 Kb)You should also be able to ping the card:

ping -c5 192.168.1.14


To load the 8139 driver each time you boot, make sure the following line appears in your /etc/modules.conf file:

alias eth0 8139too

If the line doesn't exist, open the file in any text editor and add the line.
Hi, I did what you said, and I got this:
http://www.villagephotos.com/viewpubimage.asp?id_=548007&uid=38989
Is all this good?
You can see that le line you said is in the /etc/modules.conf file, but the(other)problem is that since the last screenshots, I rebooted my computer to see...and I get at the startup of Linux, the same thing that before which is:
Activation of the network interface eth0: [ERROR]
Again, thanks a lot for your help.
Bye, and see you later I hope.

rendy

DMR
08-13-2002, 08:20 PM
OK-

The ping and the 8139too line in /etc/modules.conf look good, and you can bring the card up manually, but something is obviously interfering with the card initialization at bootup. Try (in the order listed) the troubleshooting steps I gave at the end of this thread (http://linuxnewbie.org/forum/showthread.php?s=&threadid=58747&highlight=lspci+cat). Turn off Plug-N-Play support in your BIOS before doing anything else. Also look at your startup log to see if there are any errors concerning eth0 or the 8139too module. Use the following command to do so:

dmesg |less

You can scroll through the resulting output with your up/down arrow keys or the pg up/pg down keys.

Also- post the contents of your /etc/sysconfig/network and /etc/sysconfig/network-scripts/ifcfg-eth0 files.

dfx
08-14-2002, 03:36 AM
I don't know how mandrake boot scripts work, but after you do the modprobe and ifconfig (in fact, you can leave off the modprobe now that you have the alias line in modules.conf), your network is up already, and you should be able to access other comps in it (at least by ip, check /etc/resolv.conf for dns config). The only thing left to do after that is to get mandrake do the same thing at bootup (all the bootscripts basically do is run those same commands), but someone else will have to explain that.

rendy
08-14-2002, 01:14 PM
Thanks a lot for your help, but a friend told me to do that:

try this run the Mandrake Control Center on your desktop. yours might look different then mine, because i've upgraded stuff a few times, but the dialogs will be close enough. put in your root password when it asks.
http://www.rinux.org/ed2k/2.png

click on Connection
http://www.rinux.org/ed2k/1.png

u will see some info and stuff. click on Wixard...
http://www.rinux.org/ed2k/3.png

next...
http://www.rinux.org/ed2k/4.png

Lan, next...
http://www.rinux.org/ed2k/5.png

OK
http://www.rinux.org/ed2k/6.png

if ur using dhcp do it like this, if not uncheck dhcp and put in your ip and netmask, next...
http://www.rinux.org/ed2k/7.png

this is for a static ip, the dhcp window will only have the hostname box, next...
http://www.rinux.org/ed2k/8.png

restart network, Yes, next...
http://www.rinux.org/ed2k/9.png

finish
http://www.rinux.org/ed2k/a.png

now when you reboot it should keep everything configured.

So I did all that(I unchecked the dhcp and fixed the IP Adress: 192.168.1.14). Is all this good???
Then I rebooted and the "error message" seems to have dissapeared:).
Just after rebooting I tried to ping myself with ping -c5 192.168.1.14 and it worked perfectly:) .
So?? Do my network card is ready to work now??
Then I typed in a console: dmesg |less
And I got this(its a screenshot of whats seems to talk about the "driver"):
http://membres.lycos.fr/rendy23/twodescphotos.html
Is all this good????
Again, thank you very much for all your help.
Bye, and see you later I hope.

rendy
P.s.: After all this, I have this in my /etc/sysconfig/network file:

NETWORKING=yes
FORWARD_IPV4=false
HOSTNAME=ben.col.org
DOMAINNAME=col.org
GATEWAY=192.168.1.14


And in the /etc/sysconfig/network-scripts/ifcfg-eth0, I have:

DEVICE=eth0
BOOTPROTO=static
IPADDR=192.168.1.14
NETMASK=255.255.255.0
NETWORK=192.168.1.14
BROADCAST=192.168.1.14
ONBOOT=yes

So?? Is all this good???
Is it a problem if the IP Adress of the computer is the same that the one at the "GATEWAY" line("GATEWAY=192.168.1.14")??????
Thanks again:D .
Bye, see you later.

DMR
08-14-2002, 09:17 PM
Progress is good; it sounds as though you basically have the card configured correctly.

The fact that you originally had DHCP enabled was probably what was causing the failure at bootup- if you are manually assigning static IP addresses, you can't/don't use DHCP.

As far as the entries in /etc/sysconfig/network-scripts/ifcfg-eth0 go, you do have a couple of errors:

NETWORK=192.168.1.14 should be NETWORK=192.168.1.0
BROADCAST=192.168.1.14 should be
BROADCAST=192.168.1.255

As far as the GATEWAY address goes, the correct IP to use there depends on how you connect to the Internet; the gateway device is the machine that you go through to get out of your LAN to the Internet/outside world. Describe your network/Internet connection in specific detail (include IPs of any/all other devices on the network), and we can probably tell you what you need to do from there.

:)

rendy
08-15-2002, 08:53 AM
Originally posted by DMR As far as the entries in /etc/sysconfig/network-scripts/ifcfg-eth0 go, you do have a couple of errors:

NETWORK=192.168.1.14 should be NETWORK=192.168.1.0
BROADCAST=192.168.1.14 should be
BROADCAST=192.168.1.255
Why is all that wrong :confused: ?? The IP adress that I fixed for this computer is 192.168.1.14, so? Should the NETWORK be different?? Why?
Also, why is it wrong for the BROADCAST:confused: ???
Those are just "curiosity questions:D " because I've made some changes(I change from ben.col.org to ben.denhaag and I changed the IP Adress of the GATEWAY to 192.168.1.13 because the computer who accesses the internet has the IP :192.168.1.13...
And now, i have this in /etc/sysconfig/network-scripts/ifcfg-eth0 :


DEVICE=eth0
BOOTPROTO=static
IPADDR=192.168.1.14
NETMASK=255.255.255.0
NETWORK=192.168.1.0
BROADCAST=192.168.1.255
ONBOOT=yes

So???? I think its all "good":D ! No????
Originally posted by DMR As far as the GATEWAY address goes, the correct IP to use there depends on how you connect to the Internet; the gateway device is the machine that you go through to get out of your LAN to the Internet/outside world. Describe your network/Internet connection in specific detail (include IPs of any/all other devices on the network), and we can probably tell you what you need to do from there.
I only have 2 computers(1 with Linux and Win98 on it : 192.168.1.14 and another one with only Win98 on it at the moment : 192.168.1.13). Both are the Windows workgroup : DENHAAG.
On the Only Win98 Machine(192.168.1.13) I have 1network card, the same as the one who's on the other computer(192.168.1.14), I have a CABLE CONNECTION to the internet that uses the network card of the computer, so each time I want to use my small network, I have to disconnect the CABLE for internet, and connect the network cable... So, to be able to have internet on the 2 computers at the same time, I have to wait until I have another network card on the Only Win98 Machine(192.168.1.13).
Is all that "OK" for you?
Thanks a lot.
Bye, and see you later I hope.

rendy

DMR
08-15-2002, 04:15 PM
Originally posted by rendy
The IP adress that I fixed for this computer is 192.168.1.14, so? Should the NETWORK be different?? Why? Also, why is it wrong for the BROADCAST?For a full explanation of this, you should read up on the concepts and structure of IP addressing. It can be a little confusing at first, but you should be able to wrap your brain around it after a while. Here's a place to start (http://www.webopedia.com/DidYouKnow/Internet/2002/IPaddressing.asp).

Very basically, the first and last addresses in any range are reserved for the network address and the broadcast address respectively. The network address refers to the entire network range, not a specific node (any computer, router, printer, etc.) on that network. The broadcast addresss is used to transmit a piece of information to all machines on the network simultaneously (hence the term "broadcast").

In your case, the address range 192.168.0.x - 192.168.255.x is a group of private addresses in the class C range of IP addresses. Private addresses are reserved for use only on internal networks (LANs), and are not used by devices connected directly to the Internet.

For the above private address range, 192.168.0.0 is reserved for the network address, and 192.168.0.255 is reseved for the broadcast address. Hence, the addresses available for actual nodes/devices within that range becomes limited to 192.168.0.1 through 192.168.0.254.

Again, the above is quite simplified, but that's the basic idea.


Hmm, which brings up a question though:

When you switch between your internal network and your cable Internet connection, do you have to change any of your setting? Your ISP certainly isn't assigning you the 192.168.0.13 and .14 IP addresses.

...Now I'm a bit :confused:

rendy
08-15-2002, 06:53 PM
Originally posted by DMR
Hmm, which brings up a question though:

When you switch between your internal network and your cable Internet connection, do you have to change any of your setting? Your ISP certainly isn't assigning you the 192.168.0.13 and .14 IP addresses.

Thanks a lot for those information :D !
To answer your question, no, my ISP isn't assigning me the 192.168.1.13 and .14 IP Adresses.
When I "switch", I don't change anything, I don't even reboot, then I get a Dynamique IP which is always like: 62.234.x.x, like right now, I have that IP Adresse : 62.234.100.89.
The machine that I use to go on the internet at the moment is the Only Win98 Machine(192.168.1.13)....I wait for the Mandrake 9.0 to come out to also install Linux on it.
Do you think there might be problems if 1 machine uses Linux Mandrake 8.2 and the other one uses Linux Mandrake 9.0 :confused: ????
Thanks again for your help.
Bye, and see you later.

rendy

DMR
08-15-2002, 08:33 PM
That's just weird-

I have Win98 on one of my machines as well, but I didn't think it was possible to have DHCP enabled and still assign a static IP. I've never tried though, as the machine has always been assigned a static IP. It sits behind a router which is my gateway to the 'Net; it takes care of the address translation (NAT) for me.


Gotta grab some dinner right now, but I'll post back later.

:)

rendy
08-16-2002, 08:17 AM
Ok :D .
Maybe its because I had to install some programs and drivers from my ISP to be able to use internet...don't know... :rolleyes:
Do you think there might be problems (on the small network or something else) if 1 machine uses Linux Mandrake 8.2 and the other one uses Linux Mandrake 9.0 :confused: ????
Thanks a lot.
Bye and see you later.

rendy

rendy
08-18-2002, 07:17 AM
I wanted to tell you, today (where I live) its the 18th August 2002, and I have to go on holiday the 19th August 2002, for like 10days, so I won't be able to post for that period , but I'll post again when I'll come back, so we could continu this thread . But can you reply to my other post please??
Thanks a lot for your help :D .
Bye, and see you later.

rendy

anojgoel
09-14-2002, 07:35 PM
Originally posted by dfx
Linux comes with a 8139 driver (actually, two of them), try using that first. As root, run:

modprobe 8139cp
modprobe 8139too

One of those should give no errors, and that's the driver you should use. Then assign an ip and subnet mask (that's step 3 of the instructions you pasted):

ifconfig eth0 1.2.3.4 netmask 255.255.255.0

And that's pretty much it. You can continue with step 4 if you want.

i am following this for a similar problem. the 8139too gives an error but modprobe 8139 says no module by that name found. i have redhat 7.1 installed. how do i add 8139 driver

rendy
09-15-2002, 08:29 PM
Originally posted by anojgoel


i am following this for a similar problem. the 8139too gives an error but modprobe 8139 says no module by that name found. i have redhat 7.1 installed. how do i add 8139 driver
I'm really sorry, but I use Mandrake 8.2, so I don't know with RedHat 7.1 :(. Sorry :( .
Maybe you can try to search those drivers on the net.
But if you want to ask somethings, no problem, actually, I got this problem fixed :D, with the help of every body here and some friends :D, so, if you have other questions, go ahead :D :D.
Again, sorry, and good luck ;) :D!
Bye, and see you later.

rendy

monkeyboi
09-15-2002, 09:25 PM
y don't u jux use mandrake control center...
they have tools to automatically install ur driver and load up ur net interface

rendy
09-19-2002, 08:18 PM
Originally posted by monkeyboi
y don't u jux use mandrake control center...

What :confused:? Sorry but I don't understand what you said, can you rexplain please :confused: ???
Thanks a lot for your help :D.
Bye, and see you later.

rendy