[no subject]
Hiya all, Could someone clarify for me the purpose of the bandwidth parameter when used with hfsc? Please consider my queue (512Kb max upload through the ADSL line): altq on em1 bandwidth 500Kb hfsc queue { ack, dns, ssh, other } queue ackbandwidth 95% priority 8 qlimit 500 hfsc (realtime 20%) queue dnsbandwidth 95% priority 7 qlimit 500 hfsc (realtime5%) queue sshbandwidth 95% priority 6 qlimit 500 hfsc (realtime 20%) {ssh_login, ssh_bulk} queue ssh_login bandwidth 95% priority 6 qlimit 500 hfsc queue ssh_bulk bandwidth 95% priority 5 qlimit 500 hfsc queue other bandwidth 95% priority 5 qlimit 500 hfsc (realtime 20% default) My understanding was that "bandwidth xx%" tells pf that the queue can only use xx% of the total parent queue bandwidth and the various guides on the Internet say that it cannot go above 100% which sort of makes sense. However what I want, for example, is the 'other' queue to get all the upload bandwidth as long as there is no acks or ssh traffic in the queue. If I set bandwidth 20% for other, won't that mean that no matter what, the 'other' queue will only get a maximum of 20% of the bandwidth (even if there is no ssh traffic waiting?) I think I haven't quite understood this properly but perhaps someone could clarify it. I found a lot out from calomel.org's excellent page but that's the only bit that confused me. Thanks
CARP + PF
Hi all, I have a cable modem and an ADSL line at home; the DSL line gives me a static ip but the cable modem gives me a dynamic one. My plan was to use 2 openbsd boxes as network routers with CARP for failover, the idea being that I would plug the cable modem into a switch and plug both boxes into said switch, with the DSL line doing the same thing on a different vlan on the basis that only one interface would be active at a time. The question I have is how do I get dhclient working with the cable modem, given that the IP address is dynamic? dhclient doesn't work when the carp interface is in INIT mode and I'm not sure how to get carp to "share" the IP address between the 2 boxes. I presume that this must be possible to do as I am sure others would want to do it too. What would the best way of doing this be? My criteria is: - 1 cable modem with an IP assigned by my provider via DHCP - 1 dsl modem with statically assigned IPs - 2 boxes running OpenBSD, 1 master and 1 backup. If the master goes down, the backup takes over the master's duties and routes traffic through the cable modem and dsl modem according to my routing/firewall rules [which I am happy with - basically load balancing through various NAT rules] I'd appreciate any comments or advice
Re: CARP + PF
Oh I see, so carp_up would be when its acting as master and carp_down for when its acting as a backup? Stu --- On Thu, 5/8/10, Claer wrote: From: Claer Subject: Re: CARP + PF To: misc@openbsd.org Date: Thursday, 5 August, 2010, 16:59 On Thu, Aug 05 2010 at 50:12, Z Wing wrote: [...] > The question I have is how do I get dhclient working with the cable modem, > given that the IP address is dynamic? dhclient doesn't work when the carp > interface is in INIT mode and I'm not sure how to get carp to "share" the IP > address between the 2 boxes. I presume that this must be possible to do as I > am sure others would want to do it too. > > What would the best way of doing this be? My criteria is: > > - 1 cable modem with an IP assigned by my provider via DHCP > - 1 dsl modem with statically assigned IPs > - 2 boxes running OpenBSD, 1 master and 1 backup. If the master goes down, the > backup takes over the master's duties and routes traffic through the cable > modem and dsl modem according to my routing/firewall rules [which I am happy > with - basically load balancing through various NAT rules] > > I'd appreciate any comments or advice I wouldn't use carp for the Internet connections but for the LAN interfaces. For establishing Internet connections, one can use ifstated using the CARP state of the lan interface. You'll end up with a simple state machine (in pseudo language): carp init : if carp.up state carp_up if carp.down state carp_down carp_up : start dhclient, pppoe on dsl pfctl -f if carp.down state carp_down carp_down : stop dhclient, pppoe if carp.up state carp_up