еще раз ставлю закачку...
pf.conf
Код: Выделить всё
altq on vr0 cbq bandwidth 100Mb queue { lan adsl }
queue lan bandwidth 98Mb cbq(borrow)
queue adsl bandwidth 1024Kb { alla in64 }
queue alla cbq(default borrow)
queue in64 bandwidth 64Kb cbq(red borrow)
nat on vr1 from 192.168.0.0/24 to any ->(vr1)
pass out on vr0 from any to 192.168.0.3 queue in64
Код: Выделить всё
# pfctl -f /etc/pf.conf
pfctl: the sum of the child bandwidth higher than parent "adsl"
#
Код: Выделить всё
pfTop: Up State 1-8/8, View: default, Order: none, Cache: 10000 18:21:00
PR DIR SRC DEST STATE AGE EXP PKTS BYTES
tcp Out 192.168.0.3:4691 194.186.55.19:2041 ESTABLISHED:ESTABLISHED 10:24:14 13:39:11 38 10507
tcp Out 192.168.0.3:4519 194.186.55.23:2041 ESTABLISHED:ESTABLISHED 11:13:29 13:35:20 230 22425
tcp Out 192.168.0.3:4717 194.186.55.28:2041 ESTABLISHED:ESTABLISHED 10:18:18 13:42:56 31 10111
tcp Out 192.168.0.3:1101 194.186.55.31:2041 ESTABLISHED:ESTABLISHED 00:02:20 23:59:42 30 9790
tcp Out 192.168.0.3:1106 213.79.68.155:80 ESTABLISHED:ESTABLISHED 00:00:07 23:59:57 7 720
tcp Out 192.168.0.3:1105 213.79.68.155:80 ESTABLISHED:ESTABLISHED 00:00:08 24:00:00 108 89199
udp Out 192.168.0.3:50468 195.38.32.2:53 MULTIPLE:SINGLE 00:00:16 00:00:22 5 408
udp Out 192.168.0.3:50468 195.38.33.2:53 SINGLE:NO_TRAFFIC 00:00:15 00:00:22 3 183
Код: Выделить всё
pfTop: Up Queue 1-5/5, View: queue, Cache: 10000 18:21:34
QUEUE BW SCH PRIO PKTS BYTES DROP_P DROP_B QLEN BORROW SUSPEN P/S B/S
root_vr0 100M cbq 0 349 395607 0 0 0 0 0
lan 98M cbq 0 0 0 0 0 0 0
adsl 1024K cbq 0 0 0 0 0 0 0
alla 1024K cbq 55 11018 0 0 0 0 0
in64 64000 cbq 294 384589 12 17208 14 211 38
Код: Выделить всё
pfTop: Up State 1-9/9, View: speed, Order: none, Cache: 10000 18:21:56
PR DIR SRC DEST RATE PEAK AVG BYTES STATE PKTS AGE EXP RU GW
tcp Out 192.168.0.3:4691 194.186.55.19:2041 0 0 0 10507 4:4 38 37510 49095 * 192.168.1.253:51758
tcp Out 192.168.0.3:4519 194.186.55.23:2041 0 0 0 22425 4:4 230 40465 48864 * 192.168.1.253:55108
tcp Out 192.168.0.3:4717 194.186.55.28:2041 0 0 0 10111 4:4 31 37154 49320 * 192.168.1.253:63666
tcp Out 192.168.0.3:1101 194.186.55.31:2041 0 0 52 10310 4:4 38 196 86388 * 192.168.1.253:64236
tcp Out 192.168.0.3:1107 213.79.68.155:80 1460 1460 1718 89386 4:4 110 52 86400 * 192.168.1.253:55862
tcp Out 192.168.0.3:1108 213.79.68.155:80 4948 4948 3309 164K 4:4 209 51 86400 * 192.168.1.253:54389
tcp Out 192.168.0.3:1106 213.79.68.155:80 0 0 2216 136K 4:4 180 63 86393 * 192.168.1.253:63628
tcp Out 192.168.0.3:1109 213.79.68.155:80 2312 2312 2432 102K 4:4 134 43 86400 * 192.168.1.253:54776
tcp Out 192.168.0.3:1105 213.79.68.155:80 300 4340 1963 122K 4:4 155 64 86400 * 192.168.1.253:61433
Код: Выделить всё
pfTop: Up Rule 1-1/1, View: rules, Cache: 10000 18:22:22
RULE ACTION DIR LOG Q IF PR K PKTS BYTES STATES MAX INFO
0 Pass Out vr0 648 879025 0 inet from any to 192.168.0.3/32 queue in64
Код: Выделить всё
# dmesg && messages
Copyright (c) 1992-2007 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 6.2-RELEASE #0: Wed Aug 20 06:49:38 UTC 2008
root@:/usr/obj/usr/src/sys/CUBE
ACPI APIC Table: <GBT AWRDACPI>
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: AMD Athlon(tm) XP 1800+ (1540.49-MHz 686-class CPU)
Origin = "AuthenticAMD" Id = 0x681 Stepping = 1
Features=0x383fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE>
AMD Features=0xc0400800<SYSCALL,MMX+,3DNow+,3DNow>
real memory = 1073676288 (1023 MB)
avail memory = 1041690624 (993 MB)
ioapic0 <Version 0.3> irqs 0-23 on motherboard
kbd1 at kbdmux0
acpi0: <GBT AWRDACPI> on motherboard
acpi0: Power Button (fixed)
cpu0: <ACPI CPU> on acpi0
acpi_throttle0: <ACPI CPU Throttling> on cpu0
acpi_button0: <Power Button> on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
agp0: <VIA 8377 (Apollo KT400/KT400A/KT600) host to PCI bridge> mem 0xd0000000-0xd7ffffff at device 0.0 on pci0
pcib1: <PCI-PCI bridge> at device 1.0 on pci0
pci1: <PCI bus> on pcib1
pci1: <display, VGA> at device 0.0 (no driver attached)
rl0: <RealTek 8139 10/100BaseTX> port 0xd000-0xd0ff mem 0xeb000000-0xeb0000ff irq 17 at device 9.0 on pci0
miibus0: <MII bus> on rl0
rlphy0: <RealTek internal media interface> on miibus0
rlphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
rl0: Ethernet address: 00:50:22:c8:2a:f5
vr0: <VIA VT6105 Rhine III 10/100BaseTX> port 0xd400-0xd4ff mem 0xeb001000-0xeb0010ff irq 18 at device 10.0 on pci0
miibus1: <MII bus> on vr0
ukphy0: <Generic IEEE 802.3u media interface> on miibus1
ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
vr0: Ethernet address: 00:0d:88:63:9f:24
vr1: <VIA VT6105 Rhine III 10/100BaseTX> port 0xd800-0xd8ff mem 0xeb002000-0xeb0020ff irq 19 at device 11.0 on pci0
miibus2: <MII bus> on vr1
ukphy1: <Generic IEEE 802.3u media interface> on miibus2
ukphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
vr1: Ethernet address: 00:15:e9:3d:54:a7
pci0: <serial bus, USB> at device 16.0 (no driver attached)
pci0: <serial bus, USB> at device 16.1 (no driver attached)
pci0: <serial bus, USB> at device 16.2 (no driver attached)
pci0: <serial bus, USB> at device 16.3 (no driver attached)
isab0: <PCI-ISA bridge> at device 17.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <VIA 8235 UDMA133 controller> port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xe800-0xe80f at device 17.1 on pci0
ata0: <ATA channel 0> on atapci0
ata1: <ATA channel 1> on atapci0
pci0: <multimedia, audio> at device 17.5 (no driver attached)
sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0
sio0: type 16550A
sio1: <16550A-compatible COM port> port 0x2f8-0x2ff irq 3 on acpi0
sio1: type 16550A
ppc0: <Standard parallel printer port> port 0x378-0x37f irq 7 on acpi0
ppc0: Generic chipset (NIBBLE-only) in COMPATIBLE mode
ppbus0: <Parallel port bus> on ppc0
plip0: <PLIP network interface> on ppbus0
lpt0: <Printer> on ppbus0
lpt0: Interrupt-driven port
ppi0: <Parallel I/O> on ppbus0
atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on acpi0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
pmtimer0 on isa0
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
Timecounter "TSC" frequency 1540488435 Hz quality 800
Timecounters tick every 1.000 msec
ad0: 38166MB <Seagate ST340016A 3.19> at ata0-master UDMA100
acd0: DVDR <PIONEER DVD-RW DVR-112D/1.22> at ata1-master UDMA66
Trying to mount root from ufs:/dev/ad0s1a
uhci0: <VIA 83C572 USB controller> port 0xdc00-0xdc1f irq 21 at device 16.0 on pci0
uhci0: [GIANT-LOCKED]
usb0: <VIA 83C572 USB controller> on uhci0
usb0: USB revision 1.0
uhub0: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
uhci1: <VIA 83C572 USB controller> port 0xe000-0xe01f irq 21 at device 16.1 on pci0
uhci1: [GIANT-LOCKED]
usb1: <VIA 83C572 USB controller> on uhci1
usb1: USB revision 1.0
uhub1: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
uhci2: <VIA 83C572 USB controller> port 0xe400-0xe41f irq 21 at device 16.2 on pci0
uhci2: [GIANT-LOCKED]
usb2: <VIA 83C572 USB controller> on uhci2
usb2: USB revision 1.0
uhub2: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub2: 2 ports with 2 removable, self powered
ehci0: <VIA VT6202 USB 2.0 controller> mem 0xeb003000-0xeb0030ff irq 21 at device 16.3 on pci0
ehci0: [GIANT-LOCKED]
usb3: EHCI version 1.0
usb3: companion controllers, 2 ports each: usb0 usb1 usb2
usb3: <VIA VT6202 USB 2.0 controller> on ehci0
usb3: USB revision 2.0
uhub3: VIA EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
uhub3: 6 ports with 6 removable, self powered
altq: emulate 256000000Hz cpu clock
vr1: link state changed to DOWN
vr1: link state changed to UP
vr1: link state changed to DOWN
vr1: link state changed to UP
messages: Command not found.
#