LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 02-23-2013, 01:24 PM   #1
itrilok
LQ Newbie
 
Registered: Jan 2009
Distribution: Fedora
Posts: 29

Rep: Reputation: 0
How do I make precedence among two routes ...


N/W : H1(eth0)--- LAN1
(eth1)--- LAN1

The below route stops my LAN connection .

# ip route show
192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.59
192.168.1.0/24 dev eth1 proto kernel scope link src 192.168.1.2
127.0.0.0/8 dev lo scope link
default via 192.168.1.254 dev eth1 proto static

# ifconfig eth0 down

Then
# ip route show
192.168.1.0/24 dev eth2 proto kernel scope link src 192.168.1.2
127.0.0.0/8 dev lo scope link
default via 192.168.1.254 dev eth2 proto static

How do I make this route take precedence over eth0 while keeping eth0 for networking to my lan ?
 
Old 02-23-2013, 10:14 PM   #2
jnihil
Member
 
Registered: Dec 2012
Distribution: Debian, Xubuntu, Gentoo, CentOS, Bhodi
Posts: 47

Rep: Reputation: 2
Quote:
Originally Posted by itrilok View Post
How do I make this route take precedence over eth0 while keeping eth0 for networking to my lan ?
Use the route command to set the metric on duplicate routes. The route with the lower metric is used for forwarding.
 
  


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
Virtio Balloon- Does -m take precedence? dman777 Linux - Virtualization and Cloud 0 10-11-2011 10:23 PM
what routes to add in order to make VPN work? stevena Linux - Networking 2 02-06-2010 05:09 AM
Static routes using routes/ifroutes-eth-id.. files and default gateway disabled TimtheEagle Linux - Networking 0 05-31-2008 08:08 PM
operator precedence in C Majjj Programming 2 07-07-2004 12:48 PM
debian - make routes permanent codeape Debian 2 02-14-2004 02:18 PM


All times are GMT -5. The time now is 02:23 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration