- 论坛徽章:
- 0
|
$tel = (re0)
$cnc = (re1)
$lan = (re2)
$lan_net =XXX.XXX.XXX.XXX/24
tel_gw = XXX.XXX.XXX.XXX
cnc_gw = XXX.XXX.XXX.XXX
altq on $tel hfsc bandwidth 100Mb queue { u1, u2, u3, u4, uouter}
queue u1 bandwidth 3200Kb hfsc ( upperlimit 4Mb red )
queue u2 bandwidth 3200Kb hfsc ( upperlimit 4Mb red )
....
queue uother bandwidth 20Mb hfsc ( default upperlimit 30Mb )
altq on $cnc hfsc bandwidth 100Mb queue { v1, v2, v3, v4, vouter}
queue v1 bandwidth 3200Kb hfsc ( upperlimit 4Mb red )
queue v2 bandwidth 3200Kb hfsc ( upperlimit 4Mb red )
....
queue vother bandwidth 20Mb hfsc ( default upperlimit 30Mb )
altq on $lan hfsc bandwidth 100Mb queue { c1, c2, c3, c4, couter}
queue c1 bandwidth 3200Kb hfsc ( upperlimit 4Mb red )
queue c2 bandwidth 3200Kb hfsc ( upperlimit 4Mb red )
.....
queue cother bandwidth 20Mb hfsc ( default upperlimit 30Mb )
table <dxip> persist file "/etc/dxip"
table <cncip> persist file "/etc/cncip"
nat on $tel from $lan_net to any -> ($tel)
nat on $cnc from $lan_net to any -> ($cnc)
pass in all
pass out all
##下面这两句起到双线分流作用.不加quick.不会分流,但是下面的限速规可以起作用.
加了quick后.后面限速的规则不管用了...
pass in quick on $lan route-to ($tel $tel_gw1) from any to <dxip>
pass in quick on $lan route-to ($cnc $cnc_gw2) from any to <cncip>
#pass in on $lan inet from 192.168.1.1 to any keep state tag 192.168.1.1 queue c1
#pass out on $tel inet all keep state tagged 192.168.1.1 queue u1
pass in on $lan inet from 192.168.1.2 to any keep state tag 192.168.1.2 queue c2
pass out on $tel inet all keep state tagged 192.168.1.2 queue u2
pass in on $lan inet from 192.168.1.3 to any keep state tag 192.168.1.3 queue c3
pass out on $tel inet all keep state tagged 192.168.1.3 queue u3
...........
.................................................................................
---------------------------------------------------------------------------------
##把上面的两后加到这后,可以不加quick,分流起作用.但是限速还是不管用..
pass in on $lan route-to ($tel $ext_gw1) from any to <dxip>
pass in on $lan route-to ($cnc $ext_gw2) from any to <cncip> |
|