Jump to content

ALTQ на внешнем интерфейсе

Задача: сделать приоретизацию исходящего трафика на внешнем интерфейсе

Вот что сделал:



    set skip on re0

    altq on $ext_if priq bandwidth 2000Kb queue { def_out, icmp_out, http_out, ssh_out }
    queue def_out  priq(default)
    queue icmp_out priority 15
    queue http_out priority 14
    queue ssh_out  priority 13

    nat on xl0 from to any -> 17*.*.*.**

    block in on $ext_if all
    block out on $ext_if all

    pass in on re0 inet proto tcp from any to any port ssh

    pass out on $ext_if inet proto { udp icmp } from ($ext_if) to any keep state
    pass out on $ext_if inet proto tcp from ($ext_if) to any flags S/SA keep state queue def_out
    pass out on $ext_if inet proto tcp from ($ext_if) to any port 80 queue http_out
    pass out on $ext_if inet proto tcp from ($ext_if) to any port 22 queue ssh_out



Очереди создаются, трафик в них попадает, но канал не ограничивается по ширине :(

Канал на xl0 100 Мбит, но нужно создать тестовую платформу в 2 Мбита.

Edited by Zohan

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this