LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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, 07: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, 08: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, 02: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, 10: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, 09: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, 04:22 PM   #6
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,293

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

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:33 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
Open Source Consulting | Domain Registration