Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I have three ethernet ports on my Debian etch 4.0r1 system.
eth0 is a 100mb port, connected directly to a cable modem @ 5mb/512kb and is dedicated to bittorrent transfers. I'd like this to be the lowest priority with a metric of 30. rtorrent is bound to this interface only.
eth1 is a 1000mb port, connected to the rest of my LAN through a gigabit switch, and to a router fed by another cable modem @ 7mb/1mb. I'd like only LAN traffic to flow through this interface. I'd like this as the middle priority with a metric of 20.
eth2 is a usb connection directly connected to the second cable modem. This port runs an FTP server and my SSH connections. I'd prefer all unbound internet traffic to use this interface and not use eth0 or eth1 by setting a metric of 10.
If that doesn't work remove the && and issue each command separately. Also, if you want all torrent traffic going only through eth0, LAN only going through eth1 and everything else through eth2 you may want to set up something like IPTables to do port forwarding specific to those services. Otherwise you may be getting traffic going through the interfaces you don't want it to go through. For help with that you'll need to get with someone else.
If that doesn't work remove the && and issue each command separately. Also, if you want all torrent traffic going only through eth0, LAN only going through eth1 and everything else through eth2 you may want to set up something like IPTables to do port forwarding specific to those services. Otherwise you may be getting traffic going through the interfaces you don't want it to go through. For help with that you'll need to get with someone else.
Gryyphyn, out.
If you specify [whit a diagram] what port and interfaces you need to setup, we can help you with the iptables configuration.
i don't really see how base level if metrics are really going to help you here. Have you come from a point where you believe that changing the metrics will make it act as you expect?
I'd suggest having a look at latrc.org to cover some details...
for eth0 that's for local traffic, so that's just a local subnet without any routing involved. so there's nothign special to do there at all.
for differentiating bittorrent from other internet traffic on your server (it's not really a laptop is it??) then you would presumably just want to return traffic to the route on the nic it came in on. I've not been in the situation where I've done this myself, but there are plenty of examples, such as this doc... http://tetro.net/misc/multilink.html in addition to lartc.org which covers things like the iptables mark module to send traffic back the way it came, or to mark based on port numbers if you are looking at outbound traffic.
i don't really see how base level if metrics are really going to help you here. Have you come from a point where you believe that changing the metrics will make it act as you expect?
It's more a "preventative" step than something I strictly need to enforce.
When I'm on the Debian machine and surfing, etc, I want traffic to go out via eth2 and is not impacted by torrent traffic on eth0... Unless eth2 happens to be down.
Quote:
Originally Posted by acid_kewpie
for eth0 that's for local traffic, so that's just a local subnet without any routing involved. so there's nothign special to do there at all.
Actually that's eth1... I forgot to label the connections on the diagrams.
(1) - eth0 - Bittorrent traffic
(2) - eth2 - USB connection for FTP server, pasv and sshe
(4) - eth1 - gig PCMICA card, file sharing, ssh, webmin
And, yes, it's a laptop. 1Ghz P3 with 512meg of memory. It's quiet, low power and has it's own battery backup. The ONLY problem I have with it is that the USB ports are only 1.1. I've got a USB 2 PCMICIA card installed, as well as a gigabit LAN PCMCIA card. Before I added the USB2 ports, I had 900gigs connected to it through the USB 1 ports.
It's not something thats urgent, or even important. It's just odd that Linux doesn't support the metric parameter.
it does support it, why did you think it didn't? just check the ifconfig manpages. i just don't see how a basic metric setting is actually going to help you here.
it does support it, why did you think it didn't? just check the ifconfig manpages. i just don't see how a basic metric setting is actually going to help you here.
Hrm... I'm sure I received a "Parameter not supported" (or something similar) when I tried to apply a metric.
I also updated the interfaces file, but all metrics still appear as 1 when I run ipconfig.
Like I said, it's not a big deal. More for my edification than anything.
Hrm... I'm sure I received a "Parameter not supported" (or something similar) when I tried to apply a metric.
I also updated the interfaces file, but all metrics still appear as 1 when I run ipconfig.
Like I said, it's not a big deal. More for my edification than anything.
First, it does support different metrics by interface. Second this would be useful for traffic shaping to ensure that specific traffic is routed to the correct interface, but more so if you're using the laptop as a router. The outbound traffic will be going to the correct interface by metric but inbound requests won't be unless you have your router set up to direct traffic correctly or you're accessing by specific IP remotely to come in that USB interface. And third the command has to be ifconfig, not ipconfig, and there may be some problems with the metric flag I provided earlier, though I use it quite frequently when experimenting. When in doubt use man pages. man ifconfig
And third the command has to be ifconfig, not ipconfig, and there may be some problems with the metric flag I provided earlier, though I use it quite frequently when experimenting. When in doubt use man pages. man ifconfig
Gryyphyn, out.
My bad... just a typo. I did mean ifconfig.
This is what happens when I try to apply a metric to an interface:
root@debian:/home/steve #ifconfig eth0 metric 30
SIOCSIFMETRIC: Operation not supported
no it's not what he needs. it what he asked for, and what you've already recommended once, but it is not going to actually provide the result being sought.
This is what happens when I try to apply a metric to an interface:
root@debian:/home/steve #ifconfig eth0 metric 30
SIOCSIFMETRIC: Operation not supported
Like I said before, it's not a major issue.
Have you checked to see that you're running the most updated network packages? That's the only thing that I can think would help you set the metrics. It's also possible that the card, any of them, may not support metrics. I can almost completely guarantee that the gig card will. I'm not sure that the usb will. Whether or not your 10/100 nic will is dependent on the chipset.
Check the capabilities on each of the interfaces you're using for network. I'd suggest going to the card manufacturuer/chipset manufacturer to see what they're capable of. I've never seen that error before on anything but the old 10Mb/s cards.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.