Jump to content

Recommended Posts

Posted (edited)

1. Правильно ли я ограничиваю скорость до 1 мегабита пользавателю?

Проверял работает но хочу быть увереным.

ОС FreeBSD 6.1

 

ipfw -f flush

ipfw add 10 divert natd all from any to any via xl0

 

ipfw -f pipe flush

 

ipfw add 80 pipe 3 ip from any to 192.168.0.2 out

ipfw add 81 pipe 3 ip from 192.168.0.2 to any in

ipfw pipe 3 config bw 1Mbit/s queue 10

 

2. Нужно сделать так чтоб канал равномерно распределялся между всеми пользавателями в сети. Написал вот такое правило,

 

ipfw pipe 1 config bw 10Mbit/s queue 10

ipfw queue 1 config pipe 1 weight 50

ipfw add 20 queue 1 ip from any to any

 

Будет ли работать?

Спасибо )

 

ЗЫ

Посоветывали сделать вот так

ipfw add pipe 1 ip from any to any

ipfw pipe 1 config bw 10 Mbit/s queue 100 red 0.002/30/80/0.1

 

Как правильней?

Edited by devchaos
Posted

Чтобы работало по пункту 2 надо писать так:

 

ipfw pipe 10 config bw 10Mbit/s

ipfw pipe 20 config bw 10Mbit/s

ipfw queue 10 pipe 10 weight 50 mask src-ip 0xffffffff

ipfw queue 20 pipe 20 weight 50 mask dst-ip 0xffffffff

 

ipfw add ... queue 10 ip from any to any in via rl0

ipfw add ... queue 20 ip from any to any out via rl0

 

где rl0 - сетевая карта, обращенная в сторону "юзеров"

Posted
Чтобы работало по пункту 2 надо писать так:

 

ipfw pipe 10 config bw 10Mbit/s

ipfw pipe 20 config bw 10Mbit/s

ipfw queue 10 pipe 10 weight 50 mask src-ip 0xffffffff

ipfw queue 20 pipe 20 weight 50 mask dst-ip 0xffffffff

 

ipfw add ... queue 10 ip from any to any in via rl0

ipfw add ... queue 20 ip from any to any out via rl0

 

где rl0 - сетевая карта, обращенная в сторону "юзеров"

Спасибо =)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...
На сайте используются файлы cookie и сервисы аналитики для корректной работы форума и улучшения качества обслуживания. Продолжая использовать сайт, вы соглашаетесь с использованием файлов cookie и с Политикой конфиденциальности.