Application Layer Packet Shaping on Linux 353
sommere writes "We have added application layer (layer-7) filtering to Linux. That means that you can set up your linux-router/linux-switch to prioritize mail over the web over kazaa or gnutella regardless of what port each program is using. Colleges have been paying thousands of dollars for packet shapers to prioritize their networks, now you can do it for free. Get your kernel patch at l7-filter.sourceforge.net."
cool (Score:5, Insightful)
Re:cool (Score:2, Insightful)
this could be a help for me at home (Score:5, Interesting)
I'd like to be able to leave it running in a weighted environment without having to manually decide what share he should get or kill all the downloads
Re:this could be a help for me at home (Score:5, Funny)
Re:this could be a help for me at home (Score:3, Informative)
somehow that is appropriate
Let me get this straight... (Score:5, Funny)
Kjella
Re:this could be a help for me at home (Score:5, Funny)
Re:this could be a help for me at home (Score:4, Funny)
Re:this could be a help for me at home (Score:5, Informative)
Jason
Re:this could be a help for me at home (Score:3, Informative)
so there you go.
Re:cool (Score:2)
Good God, I almost fell out of my chair laughing at this one.
This will be nice (Score:5, Insightful)
Re:This will be nice (Score:5, Insightful)
(Seriously. A modified PC is more flexible, but it isn't going to beat custom hardware of the same generation. In a few years, though...)
Re:This will be nice (Score:5, Interesting)
However, for SOHO applications, this could save people thousands of dollars (especially small-to-medium businesses).
Re:This will be nice (Score:5, Insightful)
Re:This will be nice (Score:4, Informative)
Not even the large ones can do really advanced shaping.
You'll need specialised boxes that *aren't* routers or firewalls at all but only do packetshaping.
They're usually totaly transparent to the network, except that they shape the traffic.
The best product I know in this field is the Packeteer Packetshaper [packeteer.com], but there might be other products that are as good or even better out there...
Re:This will be nice (Score:5, Insightful)
My comment wasn't intended to be derogatory - this is a nifty project and I'm glad to see it. But I've already seen a few comments (and there will likely be more) talking about how this is going to "kill Cisco" or "pave the way for a linux only datacenter". Such talk is just silly
Re:This will be nice (Score:2)
Re:This will be nice (Score:5, Insightful)
Re:This will be nice (Score:3, Interesting)
Re:This will be nice (Score:5, Informative)
If you put your ISP on a commodity linux box and expect five 9's you need to back off the medication.
While not five 9's, I do run an ISP off of commodity Linux boxes and achieve three 9's (8.77 hours out of the year downtime) -- we're a commercial ISP and frankly, if that's not good enough for you, go buy someone else's service. I can't get three 9's downtime out of my upstream ISP if you count the scheduled downtime (which my three 9's figure does count).
Re:This will be nice (Score:2)
You do realize that since all the
For example: a Cisco 2501 you can find for probably $400 - $500. I'd rather have one of those than a Linux box, just for that whole "Best tool for the job" bit...
Re:This will be nice (Score:5, Insightful)
Re:This will be nice (Score:3, Interesting)
The Fact is that a properly configured PC router is going to be faster than a special purpose cisco box simply beause you can throw more hardware at the problem for less money.
I.e. A PC with 3x 1 Gig NICs on a 64 bit PCI bus with 2GB ram, 3 disc raid 0, 2.4 GH CPU and prperly tuned kernel will still cost $1200 or so. Far less than any cisco box that even aproches the performance it will deliver under high loads.
($1200 Cisco boxes don't even do layer 7 filtering. So performan
Re:This will be nice (Score:4, Funny)
Re:This will be nice (Score:2, Insightful)
The good thing about the l7-filter and similar software such as zebra is the chance for an alternative. There is nothing stopping some enterprising invidual from supporting this software for a fee. Just because it isn't created by a so-called "Big Name", doesn't mean it is not a feasible alternative.
Re:This will be nice (Score:5, Insightful)
Re:This will be nice (Score:3, Insightful)
I didn't take a close look at the specifics, but a low-end Cisco box I glanced the innards of appeared powered by a mere M68030, and a SecureIDS box I looked at was definitely a Dell PowerEdge with a sticker covering the Dell logo. Given Cisco's markup, you could buy a kickass PeeCee for the same price. I call this the "US automobile" approach to performance; why bother
Re:This will be nice (Score:3, Interesting)
(Seriously. A modified PC is more flexible, but it isn't going to beat custom hardware of the same generation. In a few years, though...)
I'm confused. Most of (Cisco/Nortel/Alteon etc. etc. etc.)'s shit is modified PCs, and those whose kernels are not based on Linux are based on BSD.
I started working recently with the packet shaping options in Linux. A modern Linux box can shape easily at line rate on a 100 mbps LAN. You have to get into carrier class routers to do that in "hardware". And the flexib
your sig (Score:3, Insightful)
This is not a nightmare
It really is this bad
Please don't insult the suffering of all those who have actually lived under totalitarian rule.
So, if you happen to act like a terrorist the government will treat you one. They might even be blatantly racist and overzealous. But they're not totalitarian.
Dissent is still very much a part of America--and no one, yet, has been punished just for speaking out against the government. (Well, not citizens by the gov
Re:This will be nice (Score:3, Informative)
http://www.imagestream.com/
Don't take my word for it, either. ImageStream's Rebel Router with a DS3 interface was reviewed in Linux Journal and Network Computing last year. Both publications confirmed the wirespeed specification.
Re:This will be nice (Score:2)
Re:This will be nice (Score:3, Funny)
Re:This will be nice (Score:3, Informative)
often encountered in the phrase "Unix boxen", used to describe
commodity Unix hardware. The connotation is that any two
Unix boxen are interchangeable.
--FOLDOC
Shape them right! (Score:5, Funny)
---
Refusing to be a karma hore! Score: +5 Funny, -1 Karma Hore
Re:Shape them right! (Score:3, Funny)
I hope they don't get them.
Good or bad? (Score:5, Insightful)
In the other hand, my ISP may downgrade my Quake performance or my school may block telnetting to my home box completely (no matter which port I put the demon on). And this was bad.
The idea is good but I'm worried it will be heavily abused and that worries me. In the other hand, it may mean a neat security tool...
Re:Good or bad? (Score:2)
Re:Good or bad? (Score:2)
On an upnote, I have been playing tetris on my sh
Re:Good or bad? (Score:2)
Re:Good or bad? (Score:2)
Re:Good or bad? (Score:2)
1) The other end supports it. (HTTP? Kazaa?? Multiplayer games???)
2) The admin doesn't know/notice and doesn't downgrade all -your- encrypted transfers...
Re:Good or bad? (Score:4, Funny)
While your post is not quite plaintext, its encryption is not very good. I was able to quickly determine that "your" = you're, and "wont" = won't. Next time try a more complex scheme.
15 grand for 100mbit to be exact (Score:5, Informative)
OpenBSD (Score:3, Informative)
Re:OpenBSD (Score:5, Insightful)
ALTQ relies on the fact that well-known services are traditionally bound to assigned ports. The new layer 7 code allows the administrator to eliminate such an assumption.
Re:OpenBSD (Score:2, Insightful)
Hmmm, you're quite wrong there.
The differences would be:
ALTQ does not recognize if my sessions are on arbitary ports
This is for the application layer (which is why its called layer 7 packet filter), while ALTQ is for Layer 3.
And more than that, ALTQ controls only outgoing traffic.
:-)
I have not seen it mentioned anywhere that hints that L-7 Filter does the same. Since it is at L7, I guess it would be both incoming and outgoing.
(I could be wrong, I've not tried it, atleast not yet
Re:OpenBSD (Score:2)
Can you explain how this Linux patch is different?
I always though it was impossible to do throttling on inbound packets, as it's impossible to control the rate at which someone sends stuff to you..
Re:OpenBSD (Score:4, Informative)
This linux patch is different in those ways from ALTQ... because that's it's entire purpose? You can already do all the things altq does with iptables as it already stands. The entire purpose of this patch is that it allows you to shape traffic based on application rather than based on port. The inbound/outbound thing already works under iptables (like I said, I'm doing it myself).
Re:OpenBSD (Score:3, Interesting)
Personally, I hope to see this kind of thing in OpenBSD soon myself. However, all the guys working on PF don't seem to be too interested i
Priorities (Score:5, Funny)
I vote for more kazaa than mail. Unless someone sends me movies by mail.
Re:Priorities (Score:2)
It very well may be the contract that allows the interns to continue being an intern through the summer.
For home users, this may not be as important, unless you are doing a SoHo business, and would like the same kind of feature while your kids are getting their
Sure! (Score:2)
DOS potential? (Score:4, Interesting)
Another thing: couldn't the ??AA get ISPs to use this feature, not to kill P2P sharing, but to reduce its priority (perhaps as a compromise from not being able to kill P2P outright)?
Of course, there are many benefits to this as well, I'm just pointing out possiblities.
Damn you, sir! (Score:5, Funny)
Darl "Sue em" McBride
How does it work? (Score:4, Interesting)
Re:How does it work? (Score:5, Interesting)
Re:How does it work? (Score:3, Informative)
Re:How does it work? (Score:4, Interesting)
To better illustrate how this might work, consider this packet:
This is clearly web traffic, even if we ignore that fact that it's on port 80, you can see evidence of http in the data itself. Now this SSH packet could be carrying anything... it's hard to tell. Still, certain applications might have patterns, as suggested.
Re:How does it work? (Score:2)
Dave
Re:How does it work? (Score:2)
It doesn't need to know which port it is bound to, it just rocognizes the protocols in the packets.
Re:How does it work? (Score:5, Funny)
This portal is used to summon thousand of magic gnomes that sit in the spaces between time on your ethernet interface where they use their prescient abilities to determine who is trying to download pr0n so they know exactly when to reach out and "snatch" your packets. Depending on your configuration each gnome will hold the packets in stasis for a predetrmined amount of time, thus limiting your bandwidth.
duh!
Wohoo! (Score:3, Interesting)
Yes! Hopefully my college's sysadmin will be nice enough to make Kazaa so slow that people will stop installing that spyware-infested, OS-breaking POS software, so that I (being a dorm's paid computer janitor) won't have to fix their computer later on :P
Now, if something could be done about stopping those fine young college girls inadvertantly running attacks on their campus's servers? :P
(Now that I think about it, I don't mind the girls needing help so much as the dumb college guys spilling beer on their laptop's keyboard...)
Re:Wohoo! (Score:2)
Three words.
On
Site
Service.
New type of linux distro? (again) (Score:5, Interesting)
Re:New type of linux distro? (again) (Score:4, Informative)
Mandrake and Red Hat will work fine as well.
Or I guess you could buy a Netwinder www.netwinder.net which really is plug and play.
"If Linux is going to break into home of joe average that might very well be the way."
Well realistically that's really not likely to happen. Joe average doesn't go around setting up servers. Of course no offense, but I'm not really sure what your initial point was
For businesses it might spur more linux adoption though.
Packets at Layer 7? (Score:5, Insightful)
Re:Packets at Layer 7? (Score:5, Funny)
Re:Packets at Layer 7? (Score:2, Insightful)
Good try, though. You almost convinced us you were smart, until you said something stupid.
Re:Packets at Layer 7? (Score:2, Funny)
Re:Packets at Layer 7? (Score:2)
Re:Packets at Layer 7? (Score:3, Interesting)
So it still is packetshaping. =) (Haven't read the code though, so I might very well be wrong there.)
But maybe it should be labeled "packetshaping at layer 3 based on layer 7 data" instead. =/ Hmm...
Shape Spoofer, read on (Score:5, Interesting)
Suppose you have a Kazaa packet that is tunneling through HTTP. The shaper notes the HTTP header and passes the data according to HTTP rules until the embedded Kazaa packet is found. Now the shaper switches to Kazaa mode and shaping changes accordingly.
Now, if you want to defeat the shaper, tar and compress your kazaa files, then uuencode them and embed them inside html files. To the packet shaper, it looks like you are transfering some very large web pages. Alternately, drop your uuencoded text into mail messages, instant messages, etc.
Re:Shape Spoofer, read on (Score:3, Informative)
Of course you may set up a tunnel between your home box and some remote host of some friend, outside the shaped network. But then the admin will notice excessive transfers over that tunnel between the two hosts and downgrade your transfers using old-fashioned source&dest IP match.
Re:Shape Spoofer, read on (Score:2)
Plus the losers at the other end may be pissed off that Y0UR MP3Z AR BR0K3N
Wondershaper (Score:5, Interesting)
Correct me if I'm wrong, but CBQ anyone? (Score:2, Informative)
I've been doing traffic shaping based on port policies for months using the CBQ.init Script [sourceforge.net].
What's the advantage of using Layer-7 shaping, when CBQ does it quite efficiently?
Re:Correct me if I'm wrong, but CBQ anyone? (Score:4, Informative)
Arms race ++ (Score:4, Interesting)
Re:Arms race ++ (Score:2)
The uni I'm at handles bandwidth use "socially" (Score:3, Interesting)
Just looking at the stats rather than the protocol is also good for plausible deniability, since they don't particularly want to know the
correct me if i'm wrong (Score:4, Interesting)
On a local network, well that's another story. There will always be ways around stuff like this though. It wouldn't be hard to get another link (cellphone?) and send just enough packets over that to make stuff confusing.
Re:correct me if i'm wrong (Score:5, Insightful)
Re:correct me if i'm wrong (Score:2, Insightful)
Let's do a calculation: 1GB transferred with 128 byte packets gives 8388608 packets. With 56 bytes of TCP/IP data per packet that makes 448MB of overhead. Yeah, the download will be going slower, but a lot of bandwidth will be lost on TCP/IP.
The whole idea is useless, anyway. Many tools like Snort can already reassemble fragments to avoid being foiled by tricks like this.
Oh, and you can tell the remote host to send smaller packets by changing the MTU.
Damn - nearly got excited (Score:2, Informative)
Now that would be useful to have in the kernel.
I know you can do a certain amount with Apache, but to be able to slot a nice little Linux box in where an Alteon would normally sit would be a)cool and b)cheap.
Not that you would... (Score:2)
Re:Not that you would... (Score:2)
Trickle (Score:5, Informative)
Does SCO... (Score:5, Funny)
behind the times (Score:2, Informative)
Whoa (Score:3, Funny)
I feel safe using this patch! (Score:5, Interesting)
+is added (not sure why). */
This ain't touching my kernel...
Packetlogic already does it! (Score:4, Interesting)
Ssshh (Score:5, Funny)
Code (Score:5, Funny)
The equivalent Cisco technology, NBAR (Score:3, Interesting)
The Cisco equivalent of this is called Network-Based Application Recognition (NBAR) [cisco.com]. Rather than use regular expressions, Cisco ship PDLMs (Packet Description Language Modules) that can loaded and unloaded whilst IOS is running, much like you'd get by combining Netfilter's ip_conntrack_helper modules with the ideas these guys have.
(I still think they should be doing this inside Netfilter rather than qdisc)
NBAR can also be - and is - used to filter network worms at ISP borders, by matching the specially-crafted URLs used to compromise vulnerable systems. For example, here's the Cisco config [cisco.com] to catch the Nimda worm.
Re:Any documentation on this? (Score:2)
Re:Dont Worry! (Score:3, Insightful)
Re:Dont Worry! (Score:2)
Re:Amazing enhancement (Score:4, Insightful)
Let's look at why this is important. Imagine someone wanted to use an inexpensive PC as their router? They can do a whole lot with this router, but up until now, it lacked being able to do layer 7 shaping and switching. Applications like Gnutella don't use any specific port, so you have to look into the packet to find out what kind of packet it is. This feature was previously only available in super-expensive "layer 7 switches". Now, it's freely available to everyone. It really increases the value of a linux router to people who want this type of shaping.
Don't spout off before you understand the subject, ok? Promise? Good.