分类: LINUX
2011-06-01 11:10:55
[root@gateway ~]# ifconfig eth0 Link encap:Ethernet HWaddr A4:BA:DB:26:EF:1F inet addr:192.168.3.254 Bcast:192.168.3.255 Mask:255.255.255.0 inet6 addr: fe80::a6ba:dbff:fe26:ef1f/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:3455536667 errors:2170 dropped:426 overruns:0 frame:435 TX packets:3518258336 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:2154758281853 (1.9 TiB) TX bytes:2308641587019 (2.0 TiB) Interrupt:169 Memory:dfdf0000-dfe00000
eth1 Link encap:Ethernet HWaddr A4:BA:DB:26:EF:20 inet addr:192.168.100.254 Bcast:192.168.100.255 Mask:255.255.255.0 inet6 addr: fe80::a6ba:dbff:fe26:ef20/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:829881790 errors:0 dropped:80 overruns:0 frame:83 TX packets:726408761 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:444970246153 (414.4 GiB) TX bytes:306208100479 (285.1 GiB) Interrupt:177 Memory:dfef0000-dff00000
eth3 Link encap:Ethernet HWaddr 00:15:17:AE:E5:97 inet addr:210.21.210.210 Bcast:210.21.243.255 Mask:255.255.255.0 inet6 addr: fe80::215:17ff:feae:e597/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:372425932 errors:0 dropped:0 overruns:0 frame:0 TX packets:380566283 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:236502137297 (220.2 GiB) TX bytes:215773104528 (200.9 GiB) Memory:dfcc0000-dfce0000
lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:2091 errors:0 dropped:0 overruns:0 frame:0 TX packets:2091 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:185436 (181.0 KiB) TX bytes:185436 (181.0 KiB) |
网卡接口信息
1。网络基top图
dffd dsgdd |
注: 1.这里就是要限制的IP标记需要 3条红色一起才能对单个IP起限速作用。
2. 限制上传是在 外网接口,下载是在内网接口做限制,我们现在需要在eth0做下载与限制,需要在真实环境下实验,否则不成功,让我跑了很多弯路。
3.根据上面配置,定义下面脚本 (绿色部分是为我们奇特的网络环境添加的,因为我们要在同一接口实现上/下限制)
#下载不限速效果
#下载限速后的效果
#上传后限制效果