2009-04-07
Vyatta限速实验
栏目:Network , Note , Unix/Linux
411 views
尚无回复
首先在vmware上新建了一个虚拟机,双网卡,eth0连接到vmnet2(另一台xp虚拟机也连接到vmnet2),eth1设置为桥接连到实际网络,测试网络结构大约为:
intelnet <===> gw(.2) <===192.168.8.0/24===> (.16)vyatta(.1) <===192.168.1.0/24===> (.2)XP虚拟机
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | interfaces {
ethernet eth0 {
address 192.168.1.1/24
duplex auto
hw-id 00:0c:29:98:9e:cf
speed auto
}
ethernet eth1 {
address 192.168.8.16/24
duplex auto
hw-id 00:0c:29:98:9e:d9
qos-policy {
out OFFICE
}
speed auto
}
.
.
.
}
qos-policy {
traffic-limiter OFFICEIN {
class 10 {
bandwidth 512Kbit
burst 15k
match IP5 {
ip {
source {
address 192.168.1.2/24
}
}
}
priority 20
}
}
traffic-shaper OFFICE {
bandwidth 2048kbit
class 10 {
bandwidth 512kbit
burst 15k
ceiling 512kbit
match IP2 {
ip {
source {
address 192.168.1.2/24
}
}
}
queue-type fair-queue
}
default {
bandwidth 1024kbit
burst 15k
ceiling 1024kbit
queue-type fair-queue
}
}
}
service {
https
nat {
rule 1 {
destination {
address 0.0.0.0/0
}
outbound-interface eth1
protocol all
source {
address 192.168.1.0/24
}
type masquerade
}
}
}
system {
gateway-address 192.168.8.2
host-name vyatta
.
.
.
name-server 202.96.128.166
name-server 202.96.128.143
.
.
.
} |
以上内容是下面第5个测试环境的配置
下面是测试结果(没有设置ceiling)
序号 类型 接口 方向 IP位置 速度
1 traffic-shaper WAN out source 2.6m
2 traffic-shaper WAN out dest 2.6m
3 traffic-limiter WAN in dest 4.6m
4 traffic-limiter WAN in source 4.6m(设置了ceiling)
5 traffic-shaper WAN out source 2.6m
6 traffic-shaper WAN out dest 2.6m
也就是说,限速不成功。
标签:
转载注明:转自Yuzifu Studio
本站遵循:署名-非商业性使用-禁止演绎 3.0 共享协议
收藏分享:
QQ书签 /
百度收藏 /
Google书签 /
收藏到鲜果 /
Digg /
Del.icio.us
