转到正文

天亮了说晚安's Blog

欢迎您的光临! http://www.tllswa.com

cisco交换机限速配置

8 月 14
未分类

本文转自:http://zs266.blog.163.com/blog/static/191695046201243111436432/?latestBlog 交换机是cisco3550-24三层交换机,24口进100兆带宽,1口,2口,3口每个口出带宽限25兆,这些资料够了嘛 24口上面的网关ip是218.20.252.241,1口下面的ip是218.20.252.242,2口下面的ip是218.20.252.243,3口下面ip是218.20.252.244,我这台机的ip218.20.252.254,掩码是255.255.255.240 Switch#sh run Building configuration… Current configuration : 3239 bytes ! version 12.2 no service pad service timestamps debug uptime service timestamps log uptime no service password-encryption ! hostname Switch ! enable password cisco ! no aaa new-model ip subnet-zero ip routing ! mls qos aggregate-policer user1-in 25000000 2000000 exceed-action drop mls qos ! ! ! no file verify auto spanning-tree mode pvst spanning-tree extend system-id ! ! ! vlan internal allocation policy ascending ! class-map match-all match-alluser1-in match ip dscp default ! ! policy-map 10 class match-alluser1-in police aggregate user1-in ! ! ! interface F......Read More

本文转自:http://www.hackbase.com/tech/2011-08-05/64822.html 注:每个接口每个方向只支持一个策略;一个策略可以用于多个接口。因此端口下的网段的下载速率的限制都应该定义在同一个策略  1.在交换机上启动QOS  Switch(config)#mls qos    //在交换机上启动QOS  2. 定义访问控制列表  Switch(config)#access-list 10 permit 59.215.45.0 0.0.0.127  控制这个端口下59.215.45.0网段的上传流量  Switch(config)#access-list 100 permit any 59.215.45.0 0.0.0.127  控制这个端口下59.215.45.0网段的下载流量  3.定义类,并和上面定义的访问控制列表绑定  Switch(config)# class-map rate-limit-uplink         /定义上行的类。并绑定访问列表10  Switch(config-cmap)# match access-group 10  Switch(config-cmap)# exit  Switch(config)# class-map rate-limit-downlink      /定义下行的类。并绑定访问列表100  Switch(config-cmap)# match access-group 100  Switch(config-cmap)# exit  4.定义策略,把定义的类绑定到该策略  Switch(config)# policy-map rate-limit-uplink        //定......Read More

本文摘录于互联网 目录树: 流量相关概念 正常流量定义 网络定义的cir、bc、be 网络流量控制机制 流量整形和流量监管特点 流量整形内容: 一、 GTS 1、 基于接口 int s0 traffic-shape rate 256000 //出口流量以256Kbit/s进行整形 tafffic-shape adaptive 64000 //收到BECN后CIR被降低为64kbit/s show traffic s0 show traffic queue 2、 基于流的GTS Acess-list 101 traffic-shape group 101 xx xx xx 3、 CB shaping class-map myclass match any policy-map mypolicy class myclass shape average 256000 16384 0 //以配置的CIR 256Kbit/s发送通信,而不传送任何过量的突发位。bc=16384 shape adaptive 64000 ////收到BECN后CIR被降低为64kbit/s int s0 service-policy output mypolicy show interface shape 二、 FRTS 1、 FRTS 基于接口的GTS Encapsulation fram-relay Frame-relay adp 2000 定义BECN,拥塞的时候最小的流量为这个,适合TCP 当为UDP的时候 Traffic-shap fecn-adptive 发送一个测试帧。 : 2、 DE位 access-list 100 permit ip host 1.1.1.1 host 2.2.2.2 frame-relay de-list 3 protoc......Read More

本文转自:http://kanghestef.blog.51cto.com/77886/191164 shape peak、shape average和police 以下是相关配置:     环境:Dynamips、FlashFXP、IOS 12.4T ! ftp-server enable ftp-server topdir disk0: ! …….. ! class-map match-all shape match access-group 100 ! ! policy-map shape class shape police cir 80000 bc 15000 be 30000 conform-action transmit exceed-action drop ! ….. access-list 100 permit tcp any host 192.168.1.200 access-list 100 deny   tcp any any R1#sh run int f0/0 Building configuration… Current configuration : 166 bytes ! interface FastEthernet0/0 ip address 192.168.1.221 255.255.255.0 duplex full rmon native rmon collection stats 1 owner config service-policy output shape end R1# R1#sh policy-map int f0/0 FastEthernet0/0   Service-policy output: shape     Class-map: shape (match-all) 7593 packets, 10691055 bytes 5 minute offered rate 36000 bps, drop rate 3000 bps Match: access-group 100 police: cir 80000 bps, bc 15000 bytes conformed 268......Read More

本文转自:http://zhengyin0211.blog.sohu.com/168115611.html 下面以Cisco1800路由器为例,介绍一下常用的查看端口和通道状况的命令。 在MS-DOS窗口里敲入命令telnet+IP地址,回车,即可远程登录路由器。一般用路由器局域网口地址。 1,用R1#sh ip int b命令查看端口状态 R1#sh ip int b Interface IP-Address OK? Method Status Protocol FastEthernet0/0 100.100.100.226 YES NVRAM up up FastEthernet0/1 200.200.200.226 YES NVRAM up up Serial0/0/0 72.22.81.102 YES NVRAM up up Serial0/0/1 72.22.81.109 YES NVRAM up up 正常情况下,思科1800路由器四个端口的Status和protocol都是up的。 2,用R1#sh int s0/0/0查看链路状态和通道情况 Serial0/0/0 is up, line protocol is up //接口与协议都已启动(正常) Serial0/0/0 is up, line protocol is down //接口启动,协议没有匹配成功(端口无物理故障,但通道不通) Serial0/0/0 is down, line protocol is down //接口与协议都DOWN掉(协转没有工作) Serial0/0/0 is down,line protocol is down(disable)//端口出现物理性故障,需更换端口。 Serial0/0/0 is administratively down,line protocol is down ......Read More

本文转自:http://www.edify.com.cn/html/article/162.html 使用MQC分类使用MQC对数据分类需要3个步骤,分别使用3个命令,如下所示。(1)使用class-map命令生成数据类。(2)使用policy-map命令标记数据(DSCP,CoS等),标记后的数据才能区分出不同的类别。(3)把第2步设置的策略应用在入口上,使用的命令是service-policy input。当数据从接口进入时,应按照策略进行标记。 class-map 命令命令语法如下:Border_A(config)# class-map [match-all | match-any] class-map-name  Border_A(config-cmap)# match {match- criteria} 其中,class-map-name–名字。match-all–当设定多个match条件时,满足所有条件的数据才是匹配的。match-any–当设定多个match条件时,数据满足一个条件即可。match-criteria–设定的匹配条件。如果在命令里既没有使用match-all,也没有使用match-any,系统默认使用的是match-all class- map 示例(1)当设定匹配条件时,可以使用以下参数。(1)ACL(名称或代码)。Border_A (config-cmap)# match access-group access-group access-group–访问列表名称或代码。例3-10:把两个ACL(subnet-a和subnet-b)定义的......Read More

本文转自:http://chenbin.blog.51cto.com/945033/362769/ APACHE服务的配置。 APACHE的简介. APACHE是世界上最流行的Web服务器软件之一,当然,提供WWW服务的还有微软的IIS,它是由微软开发的,只能用在微软的操作系统上,而APACHE是一个自由软件。说到APACHE,还要联想到LAMP,这个近年来也是应用得非常广泛,LAMP就是:linux+apache+mysql+php。Apache的特点是简单、速度快、性能稳定。 APACHE的安装。 配置IP地址: [root@rhel ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0 IPADDR=192.168.100.101 NETMASK=255.255.255.0   [root@rhel ~]# service network restart 安装apache: 首先安装下面这两个软件: [root@rhel ~]# rpm -ivh /misc/cd/Server/apr-1.2.7-11.el5_3.1.i386.rpm [root@rhel ~]# rpm -ivh /misc/cd/Server/apr-util-1.2.7-11.el5.i386.rpm 现在才能安装httpd。 [root@rhel ~]# rpm -ivh /misc/cd/Server/httpd-2.2.3-43.el5.i386.rpm APACHE简单的配置。 [root@rhel ~]# service httpd start        //启动服务。 现在就可以测试一下了。如图,如下在地址栏输入http://192.168.100.101,出现如下画面,就说明httpd正常运行了。 如果......Read More

本文转自:http://hi.baidu.com/xiaoli3006/item/16d211256bd6961876272c94 tar tar命令可以用来压缩打包单文件、多个文件、单个目录、多个目录。 常用格式: 单个文件压缩打包 tar czvf my.tar file1 多个文件压缩打包 tar czvf my.tar file1 file2,… 单个目录压缩打包 tar czvf my.tar dir1 多个目录压缩打包 tar czvf my.tar dir1 dir2 解包至当前目录:tar xzvf my.tar cpio 含子目录find x* | cpio -o > /y/z.cpio 不含子目录ls x* | cpio -o > /y/z.cpio 解包: cpio -i < /y/z.cpio [root@linux ~]# tar [-cxtzjvfpPN] 文件与目录 …. 参数: -c :建立一个压缩文件的参数指令(create 的意思); -x :解开一个压缩文件的参数指令! -t :查看 tarfile 里面的文件! 特别注意,在参数的下达中, c/x/t 仅能存在一个!不可同时存在! 因为不可能同时压缩与解压缩。 -z :是否同时具有 gzip 的属性?亦即是否需要用 gzip 压缩? -j :是否同时具有 bzip2 的属性?亦即是否需要用 bzip2 压缩? -v :压缩的过程中显示文件!这个常用,但不建议用在背景执行过程! -f :使用档名,请留意,在 f 之后要立即接档名喔!不要再加参数! 例如使用『 tar......Read More

linux定时备份mysql数据库

6 月 27
未分类

本文转自:http://blog.163.com/chen98_2006@126/blog/static/1585842720079293453456/ 利用crontab,系统每天定时备份mysql数据库 利用系统crontab来定时执行备份文件,按日期对备份结果进行保存,达到备份的目的。 1、创建保存备份文件的路径/mysqldata #mkdir /mysqldata 2、创建/usr/sbin/bakmysql文件 #vi /usr/sbin/bakmysql 输入 rq=` date +%Y%m%d ` tar zcvf /mysqldata/mysql$rq.tar.gz /var/lib/mysql 或者写成 rq=` date +%Y%m%d ` mysqldump –all-databases -u root -p密码 > /mysqldata/mysql$rq.sql /var/lib/mysql是你数据库文件的目录,部分用户是/usr/local/mysql/data,每个人可能不同 /mysqldata/表示保存备份文件的目录,这个每个人也可以根据自己的要求来做。 3、修改文件属性,使其可执行 # chmod +x /usr/sbin/bakmysql 4、修改/etc/crontab #vi /etc/crontab 在下面添加 01 3 * * * root /usr/sbin/bakmysql 表示每天3点钟执行备份 5、重新启动crond # /etc/rc.d/init.d/crond restart 完成。 这样每天你在/mysqldata可以看到这样的文件 mysql20040619.tar.gz 你直接下载就可以了。 基本格式 : *  *  *  *  *  command 分 ......Read More

备案信息