LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 02-08-2012, 09:42 AM   #1
skimeer
Member
 
Registered: Jun 2007
Posts: 55
Blog Entries: 1

Rep: Reputation: 0
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.
 
Old 02-08-2012, 11:31 AM   #2
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,524
Blog Entries: 27

Rep: Reputation: 1175Reputation: 1175Reputation: 1175Reputation: 1175Reputation: 1175Reputation: 1175Reputation: 1175Reputation: 1175Reputation: 1175
What do you mean by "internal" and "external"? LAN/WAN? Motherboard/expansion?
 
Old 02-09-2012, 12:57 AM   #3
skimeer
Member
 
Registered: Jun 2007
Posts: 55
Blog Entries: 1

Original Poster
Rep: Reputation: 0
Smile

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.
 
Old 02-09-2012, 03:01 AM   #4
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,524
Blog Entries: 27

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

EDIT: would that serve your purpose?

Last edited by catkin; 02-09-2012 at 03:02 AM.
 
Old 02-09-2012, 03:31 AM   #5
skimeer
Member
 
Registered: Jun 2007
Posts: 55
Blog Entries: 1

Original Poster
Rep: Reputation: 0
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.
 
Old 02-09-2012, 03:41 AM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,519

Rep: Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495
On most Linux OS you will get interrupt info with :

lspci -vvv | grep -iA 10 net
 
Old 02-09-2012, 03:50 AM   #7
skimeer
Member
 
Registered: Jun 2007
Posts: 55
Blog Entries: 1

Original Poster
Rep: Reputation: 0
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
03:0b.0
03:0b.1
06:07.0
07:08.0
08:00.0
08:00.1


Sorry if creating confusion

Last edited by skimeer; 02-09-2012 at 03:52 AM.
 
Old 02-09-2012, 03:59 AM   #8
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,519

Rep: Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495
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".
 
Old 02-09-2012, 04:51 AM   #9
skimeer
Member
 
Registered: Jun 2007
Posts: 55
Blog Entries: 1

Original Poster
Rep: Reputation: 0
Hi knudfl,

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


Reply

Tags
networking, nic


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Moved offices. External websites/internal ssh both work, but internal http doesn't. jasonws Linux - Networking 3 08-04-2011 03:26 PM
Forward traffic from internal NIC to external NIC laurens Linux - Newbie 4 07-30-2009 10:53 AM
1 internal 1 external nic neocontrol Linux - Networking 4 02-14-2007 12:53 PM
2 External Nic, 1 Internal Nic Router Problem trevanda Linux - Networking 0 10-13-2004 01:20 AM
2 NIC problem, no internal ping, only external browny_amiga Linux - Networking 3 12-02-2002 01:21 AM


All times are GMT -5. The time now is 11:36 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration