Hello everyone,
I'm working on new traffic shaper, firewall generator based on pf queues. The situation in simplest case looks like that for single router/firewall:
- one WAN interface (either VLAN or PHY)
- one LAN interface, but mostly with multiple VLANs
- users have upperlimit for upload and download
- OS : FreeBSD 7.3, but actually I'm moving to 8.2, so if 7.3 lacks in some functionality that is not a big deal.:e
So, to make it clearer,
1. What is better for that situation CBQ or HFSC ?
2. I've heard that queues actually working only on PHY, so i put rule altq on phy_interface. Is that true?
3. It happens that whole sum of all queues is bigger than the actual bandwidth of interface (1Gb) like 3,2Gb. In that situation , at least in CBQ, pfctl rise a warning. So should I declare bandwidth higher ? like 4Gb. I know that situation is quite disturbing, but according to stats the whole load is never bigger than 500Mbps in prime time.
4. Some clients have multiple termination points, so they must have subqueue for their own traffic, still in the same bandwidth, but without hardlimits between them.
I was thinking about something like that (in case of upload, right, because we can only shape incoming traffic for an interface):
So I got queues declared. Now, the trouble is some clients need to be behind NAT (public IP is an additional service).
So I could create table of IP, IP/CIDR with private adresses (kept in file)
then
later I make the rule to let them pass through
Is that correct ?
Do I need to make passes like these for each client? If that so, damn, it makes pf.conf so big :e
I'd really appreciate any suggestion. I've read the whole "Book of PF", so I received quite the lessons but still need some guidance and I'm open for discussion.
I'm working on new traffic shaper, firewall generator based on pf queues. The situation in simplest case looks like that for single router/firewall:
- one WAN interface (either VLAN or PHY)
- one LAN interface, but mostly with multiple VLANs
- users have upperlimit for upload and download
- OS : FreeBSD 7.3, but actually I'm moving to 8.2, so if 7.3 lacks in some functionality that is not a big deal.:e
So, to make it clearer,
1. What is better for that situation CBQ or HFSC ?
2. I've heard that queues actually working only on PHY, so i put rule altq on phy_interface. Is that true?
3. It happens that whole sum of all queues is bigger than the actual bandwidth of interface (1Gb) like 3,2Gb. In that situation , at least in CBQ, pfctl rise a warning. So should I declare bandwidth higher ? like 4Gb. I know that situation is quite disturbing, but according to stats the whole load is never bigger than 500Mbps in prime time.
4. Some clients have multiple termination points, so they must have subqueue for their own traffic, still in the same bandwidth, but without hardlimits between them.
I was thinking about something like that (in case of upload, right, because we can only shape incoming traffic for an interface):
Code:
altq on wan0 hfsc { client1, client2 }
queue client1 hfsc (upperlimit 1Mb)
queue client2 hfsc (upperlimit 2Mb) { client2_term1, client2_term2 }
queue client2_term1 hfsc (50% realtime)
queue client2_term2 hfsc (50% realtime)
So I got queues declared. Now, the trouble is some clients need to be behind NAT (public IP is an additional service).
So I could create table of IP, IP/CIDR with private adresses (kept in file)
then
Code:
nat on wan0 from <clients> to ! <ournetwork>
later I make the rule to let them pass through
Code:
pass in on lan0 from 10.x.x.x to !<ournetwork> keep state queue client1
Do I need to make passes like these for each client? If that so, damn, it makes pf.conf so big :e
I'd really appreciate any suggestion. I've read the whole "Book of PF", so I received quite the lessons but still need some guidance and I'm open for discussion.
