LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-12-2011, 06:36 AM   #1
jeffmonte
LQ Newbie
 
Registered: Jul 2010
Posts: 29

Rep: Reputation: 1
What is deciding which interface has the priority


I am seeing a lot of servers using eth1 and commonly eth0, just want to know what if I run ping command, what is deciding the fact that I have my global network binded on eth1 so the ping request has to go on via that interface?
 
Old 11-12-2011, 07:01 AM   #2
SecretCode
Member
 
Registered: Apr 2011
Location: UK
Distribution: Kubuntu 11.10
Posts: 562

Rep: Reputation: 102Reputation: 102
Do you mean multiple interfaces on the host you are pinging from? You can find out which one will be used from the metric in the output of the route command.

If you mean which interface on the target host responds, just use its IP address. Afaik each interface on a host needs to have its own IP address.
 
Old 03-28-2013, 01:05 AM   #3
jeffmonte
LQ Newbie
 
Registered: Jul 2010
Posts: 29

Original Poster
Rep: Reputation: 1
No, on a linux machine, if you are pinging google, which interface takes the priority and sends ICMP packets through that interface?
 
Old 03-30-2013, 09:43 AM   #4
hamlindsza
Member
 
Registered: Aug 2012
Distribution: Debian, CentOS
Posts: 74

Rep: Reputation: Disabled
by default its eth0. You can specify the interface with the -I option
 
Old 04-18-2013, 08:04 AM   #5
jeffmonte
LQ Newbie
 
Registered: Jul 2010
Posts: 29

Original Poster
Rep: Reputation: 1
Is there a config file or something that directs the server to send ICMP packets through that interface?
 
Old 04-18-2013, 03:22 PM   #6
jefro
LQ Guru
 
Registered: Mar 2008
Posts: 13,138

Rep: Reputation: 1665Reputation: 1665Reputation: 1665Reputation: 1665Reputation: 1665Reputation: 1665Reputation: 1665Reputation: 1665Reputation: 1665Reputation: 1665Reputation: 1665
A lot of rules determine what nic is used. The first issue is more of why you have multiple routes to the wan like that. You really should only have one gateway for an IP or a range of IP's.

Things like metric, qos, and even slot or mac addresses may cause issues with selection.
 
  


Reply


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] Network interface priority SqdnGuns Slackware 4 05-11-2011 09:12 AM
X: warning; priority set to -1 instead of requested priority 0 HitmanX Linux - Newbie 5 12-13-2010 11:09 AM
process priority,nice -- small question regarding high/low priority values beeblequix Linux - Newbie 1 10-11-2006 10:22 AM
Wired interface priority over wireless in Debian Debian_Poland Linux - Wireless Networking 5 02-03-2006 11:51 AM
I really need help deciding on something? rodeoclown General 8 06-08-2004 01:04 PM


All times are GMT -5. The time now is 01:24 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration