-   Linux - Newbie (
-   -   Differentiate between internal and external nic's (

skimeer 02-08-2012 09:42 AM

Differentiate between internal and external nic's
I have machine with multiple network cards.I want to differentiate between internal and external cards.

1.We can use interrupt but that depends upon hardware.For some nic its configurable but for some not

2.I have tried with /proc/interrupts. But I guess, it only shows interrupt for nic that is up.

Can any one help on this.

catkin 02-08-2012 11:31 AM

What do you mean by "internal" and "external"? LAN/WAN? Motherboard/expansion?

skimeer 02-09-2012 12:57 AM

By internal, I mean on-board nics and external means nic added on expansion slots. Eg. I have brodcom nic on motherboard and I have added Intel quad network adapter in expansion slot. Now I want to identify which one is internal and which one is external.

catkin 02-09-2012 03:01 AM

Each network adapter should have a unique MAC address, shown as HWaddr in ifconfig output.

EDIT: would that serve your purpose?

skimeer 02-09-2012 03:31 AM

I want to differentiate internal and external nics, I am not sure how I can do this on the basis of Hardware address. My idea was to use interrupt no. or bus info to achieve this. But not getting exact way to get interrupt for all the nics.

knudfl 02-09-2012 03:41 AM

On most Linux OS you will get interrupt info with :

lspci -vvv | grep -iA 10 net

skimeer 02-09-2012 03:50 AM

Hi knudfl,

Thanks for command, I am able to get the interrupt for all nic now. Now my next target is to decide which one are for internal and which one for external.

[root@Test ~]# lspci -vvv | grep -iA 10 net | grep Interrupt
Interrupt: pin A routed to IRQ 185
Interrupt: pin B routed to IRQ 193
Interrupt: pin A routed to IRQ 201
Interrupt: pin A routed to IRQ 209
Interrupt: pin A routed to IRQ 169
Interrupt: pin B routed to IRQ 217

The bus info for the nic are as follow, Can we use it.

[root@Test ~]# lspci | grep eth -i | cut -d' ' -f1

Sorry if creating confusion :)

knudfl 02-09-2012 03:59 AM

Well, I guess you know the device names. Like Intel 82562EZ, etc. etc.

'lspci -vvv | grep -iA 10 net'
.. will reply with "device name + the used interrupt".

skimeer 02-09-2012 04:51 AM

Hi knudfl,

OK got it, Thanks for help. Now I can get the details about nics.

All times are GMT -5. The time now is 05:41 AM.