LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 07-04-2011, 08:57 PM   #1
sorcerer25
LQ Newbie
 
Registered: Jul 2011
Posts: 3

Rep: Reputation: Disabled
two LAN connections to same server or interface metric ... how to


hi,

i have an server, an wireless access point and a wireless network card on the server
server is few switches away from me

now ! i want server to work with wired connection, but in the case i have lan connection fail (server is in another building) i would like to be able to enter server via wireless connection (wireless access point is close to me) and do some debugging (or something)

but, the problem is that be cause both wired and wireless connections are on the same LAN (i use access point for other wireless connections, so i cannot make it dedicated only to this backup access to server) seems like that without any reason server is start using wireless connection instead of wired one

i tried to put a different subnet on wireless, i tried to change metrics in routing table, still the same problem

my guess is what i need is to change interfaces metrics ... but ...

I CANNOT CHANGE INTERFACES METRICS IN ... LINUX !

this is really and i mean REALLY incredible by itself, i can do that just fine in windows,
ifconfig even have the metric option, can display the metrics of interfaces but refuse to change them with the error: "SIOCSIFMETRIC: Operation not supported", and that is about linux generally, not driver or anything be cause it don't work on any interface (wired, wireless, or even loopback)

after reading Setting metric for eth interfaces?
i tried ifmetric ... this program is not reporting anything of what it does ! (if it does anything at all), it cannot show/list metrics of interfaces in the system and according to ifconfig no metric is changed (all interfaces metrics remains set to 1 no matter what i do)

so ! any ideea for my problem or/and (i'm curios REALLY about this) how to set metrics on network connections in linux ?

Last edited by sorcerer25; 07-04-2011 at 09:16 PM.
 
Old 07-05-2011, 02:15 AM   #2
lithos
Senior Member
 
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144

Rep: Reputation: 217Reputation: 217Reputation: 217
Hi,

My thoughts about it would be like:
- configure Wifi card to be disabled at boot (ONBOOT=no), leaving LAN on -- so it should connect through LAN
- checking with some kind of script (if possible) if LAN is out then enable Wifi otherwise disable it again (ifup, ifdown)

How to do it is not in my ability, but maybe it's acceptable for you to investigate it further...


good luck

Last edited by lithos; 07-05-2011 at 02:20 AM.
 
Old 07-05-2011, 02:51 AM   #3
kasl33
Member
 
Registered: Oct 2004
Location: USA
Distribution: Ubuntu-Server, Mac OS X, Arch Linux
Posts: 356

Rep: Reputation: 48
if you have two nic's, they each have their own ip address. Why not just have all network traffic point to eth0 and, if it goes down, use the alternate wlan0 ip. If it's all traffic that needs to use this setup, the only [modern] routing protocols I know of that use a metric other than hops (for a small network) are ospf and eigrp. So I don't believe metric will help unless you have more hops using wireless and are using rip or rip v2.

your server by default is probably load balancing since you have set up a form of link aggregation.
 
Old 07-06-2011, 01:46 AM   #4
sorcerer25
LQ Newbie
 
Registered: Jul 2011
Posts: 3

Original Poster
Rep: Reputation: Disabled
thank you for your answers !

i need both connections on server to work in the same time
server is closer to internet router than me

it means that i can lose connection to wired but not the server ...

also ! server switching against all odds, all by itself default working connection (default gateway is set up on a different interface) is something i still believe can be fixed with metrics
 
  


Reply



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
can metric prioritize between two Ethernet lan ? Joydeep Bakshi Linux - Networking 3 06-18-2010 12:08 AM
All connections being refused on LAN server Carpintonto Linux - Server 7 05-26-2010 03:54 PM
Network connections cut-out but pinging IP works: two lan cards+dhcp server+www Cyberman Linux - Networking 4 02-14-2010 09:30 PM
Balancing multiple connections over same interface mailmaldi Linux - Networking 5 08-25-2005 04:07 PM
LAN interface on Gateway stops being able to send info to LAN intermittantly. BurnFEST Debian 2 11-01-2003 03:16 AM

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

All times are GMT -5. The time now is 03:40 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