# eth0 & eth1

## bluesky

My computer has 2 NICs. one is integrated 3COM and the other is netgear(natsemi).  If I  compiled kernel with both NICs options then natsemi did not work.  If I only compiled with netgear option then it worked.WHY?  

Note: netgear  is connected to the linksys router.    :Mad: 

----------

## Woland

Of course, the obvious answer would be to complie both as modules, and then try to load them by hand using insmod.   Of course, you migfht also look at your start up messages, seeing what the kernel recognizes, and seeing if it freaks out.  (I use dmesg >& ~/dmesg.current and then looking through ~/dmesg.current)

The only actual reason I can think of is that it is not a kerlel issue, but a configuration one---perhaps what is eth0 and eth1 gets switched when you complile in both.  But I am not convinsed of this myself.

----------

## bluesky

The question is  if both NICs  are built into the kernel,  will their  position( either eth0 or eth1) pre-determined? for example the inegrated nic will be destined to be eth0.   :Mad: 

----------

## klasikahl

you dont understand, you cannot build them both in.  what is the issue?  (ethX assigning goes by position on the PCI bus (afaik))

----------

## Woland

Yes, their assignment will be determined by their order on the PCI bus, but I belive you can change that with options passed to the kernel at boot time (in either lilo or grub).  However, I don't know what those are, and it probably is easier to just figure out what gets assigned what.  I have two machines with two different NIC's apiece, and they are all compiled in to the kernel, without any problems---so it can be done, and in fact is very common. 

   Can you tell which card is which from the contenets of your dmesg?

----------

## klasikahl

woland, yes, he should be able to.

excuse my mistake, it isnt the order on the PCI bus (although if set to AUTO assign on the IRQ, it is), but rather the IRQ they are assigned.  i beive it is the lower the IRQ, the lower it is on ethX (example only irq 11=eth0, irq 12=eth1)

----------

## bluesky

>Can you tell which card is which from the contenets of your dmesg?

I recompiled the kernel now it only has one card builtin and the internet connection works. So, I can't answer to your question.  And from your answers above, it seemed that  my questions have been answered fully.  Thanks.   :Very Happy: 

----------

## klieber

 *klasikahl wrote:*   

> you dont understand, you cannot build them both in. 

 

You can't?

```
z3 root # cat /proc/pci |grep Ethernet

    Ethernet controller: Linksys Network Everywhere Fast Ethernet 10/100 model NC100 (rev 17).

    Ethernet controller: Linksys Network Everywhere Fast Ethernet 10/100 model NC100 (#2) (rev 17).

    Ethernet controller: 3Com Corporation 3c905B 100BaseTX [Cyclone] (rev 36).
```

damn -- someone forgot to tell my firewall that...it's been working with two separate NIC drivers compiled into the kernel for months now.  Mebbe it's just a bug, though.

--kurt

----------

## klasikahl

when i said you, i literally meant you.  from his previous experiances, it seemed as though HE could not build them in, hence my use of the word YOU in a sentece directed towards him.  if i mean it is impossible for everyone in the world to compile them both in, i would have said 'one cannot compile', etc.  ((sorry if i seem mean, a little high)).

----------

## Woland

What you wrote, klasikahl, is :

 *Quote:*   

> you dont understand, you cannot build them both in. what is the issue? (ethX assigning goes by position on the PCI bus (afaik)

 

Which sounds to most people as: 

 *Quote:*   

> You dont understand: you cannot build them both in. What is the issue?

 

However, if you had written thus:

You don't understand, you can not build them both in; which is the issue?

There would be no ambiguity.  Now, I am not one of those (choose your epithet) people who browse through fora just to correct spelling and grammer---and god knows I have few stones to cast in the direction of eihter.  But sometimes Mr. Punctuation can be our friend: if countless hours of Saturday morning television have taught me one thing, it was that.

----------

## bluesky

> from his previous experiances, it seemed as though HE could not build them in

Hmm. Whose previous experiences? No comment.

----------

## rizzo

Do we need to fork this off into a "Semantics of the English Language" thread?

To get back on topic, I always recommend compiling NIC drivers (and any drivers) as modules, not compiling into the kernel.  Just a thing I have I guess.

----------

## Woland

 *Quote:*   

> Do we need to fork this off into a "Semantics of the English Language" thread? 
> 
> 

 

I hope not, then I couldn't post.  As I implied in a previous message my expertiese mostly comes from Saturday morning t. v.

 *Quote:*   

> To get back on topic, I always recommend compiling NIC drivers (and any drivers) as modules, not compiling into the kernel. Just a thing I have I guess.

 

I wonder if this is a religious subject, but I have always held the contrary view.  Especially in servers or routers, the NICs have to be up fast and up all the time, so why not just complie them in, instead of relying on a script which is JATTGW (just another thing to go wrong).

  The other benefit, of course, is that my router is an old, slow machine, and I compile kernels for it on a much faster box.  Saves a bit of time and irritation to just send over a complete kernel, without having to worry about lots of pesky modules (I know, I know, if I was a real h4ck3r I'd have a sript that does that and fries up eggs at the same time); plus disabeling  module support makes your kernel a bit smaller---what a deal. 

I belive one argument for NIC modularization involves being able to test the drivers.  But after the initial stage, why bother?  I have never had a working driver stop working all of a sudden, so if it works, why mess with it?

Just my $0.02.

----------

