Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Networking & Security
  • Search

[SOLVED] tc shaping

Having problems getting connected to the internet or running a server? Wondering about securing your box? Ask here.
Post Reply
Advanced search
2 posts • Page 1 of 1
Author
Message
akam
Tux's lil' helper
Tux's lil' helper
Posts: 82
Joined: Mon Sep 04, 2006 8:05 am
Location: Nab. Chelny, Russia

[SOLVED] tc shaping

  • Quote

Post by akam » Wed May 23, 2012 7:49 am

Hello, can you help me, please? I want to shape traffic on port 5150. I use this commands:

Code: Select all

/sbin/tc qdisc add dev tap1 root handle 1:0 htb default 30

/sbin/tc class add dev tap1 parent 1:0 classid 1:1 htb rate 10mbit ceil 10mbit
/sbin/tc class add dev tap1 parent 1:1 classid 1:10 htb rate 250kbit ceil 250kbit
/sbin/tc class add dev tap1 parent 1:0 classid 1:30 htb rate 250kbit ceil 10mbit
and iptables rule:
-A OUTPUT -t mangle -p tcp -m multiport --dport 5150,5160 -j MARK --set-mark 10

But it shape all traffic, including 5150 port :(
(sorry for my bad english)
Top
akam
Tux's lil' helper
Tux's lil' helper
Posts: 82
Joined: Mon Sep 04, 2006 8:05 am
Location: Nab. Chelny, Russia

  • Quote

Post by akam » Wed May 23, 2012 8:40 am

Code: Select all

tc qdisc add dev tap1 parent root handle 1: hfsc default 11
tc class add dev tap1 parent 1: classid 1:1 hfsc sc rate 10mbit ul rate 10mbit
tc class add dev tap1 parent 1:1 classid 1:11 hfsc sc rate 250kbit ul rate 10mbit
tc class add dev tap1 parent 1:1 classid 1:12 hfsc sc rate 250kbit ul rate 250kbit

tc qdisc add dev tap1 parent 1:11 handle 11:1 pfifo
tc qdisc add dev tap1 parent 1:12 handle 12:1 pfifo

Code: Select all

iptables -A OUTPUT -t mangle -p tcp -m multiport --dport 5150,5160 -j CLASSIFY --set-class 1:12
Top
Post Reply

2 posts • Page 1 of 1

Return to “Networking & Security”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic