Linux · Summary

Linux tc-how to work on different IPs

#!/bin/bash interface=eth0 ip1=192.168.1.1 ip2=172.16.1.1 delay1=100ms delay2=200ms tc qdisc add dev $interface root handle 1: prio tc qdisc add dev $interface parent 1:1 netem delay $delay1 10ms 25% tc filter add dev $interface parent 1: protocol ip prio 1 u32 match ip dst $ip1 flowid 1:1 tc qdisc add dev $interface parent 1:2 netem delay $delay2… Continue reading Linux tc-how to work on different IPs

Linux · Summary

Linux session number/timeout setting

在Cisco设备中可以通过: line vty 0 number 配置设备CLI(Telnet/SSH)登陆的session数 line vty下通过 exec–timeout minutes seconds 配置设备session的超时时间。 本文介绍在Linux中如何实现以上机制(1、2通过SUSE/CentOS 内核2.6.32:验证通过)。 1. Linux Telnet session数限制 借鉴:http://www.centos.org/docs/4/html/rhel-rg-en-4/s1-tcpwrappers-xinetd-config.html 的内容  使用文本编辑器配置xinetd.conf文件: vi /etc/xinetd.conf 修改instances参数完成配置 defaults { instances = 60 //修改此数字 log_type = SYSLOG authpriv log_on_success = HOST PID log_on_failure = HOST cps = 25 30 } 修改完成后,通过 service xinetd restart 或 /etc/init.d/xinetd restart 重启 xinetd服务使配置生效。 2. Linux… Continue reading Linux session number/timeout setting

CentOS · Dynagen · Linux

Fix Dynagen/dynamips error : netio_desc_create_udp: unable to connect to

OS: CentOS 6.5 x86_64 installed on vmware          Dynamips 0.2.10 There is an error when loading a .net file with 100 devices named test.net by Dynagen.0.11.0: netio_desc_create_udp: unable to connect to I searched on Internet about this error msg, most of posts shared a method: specified udp port of dynamips instance in .net file. But… Continue reading Fix Dynagen/dynamips error : netio_desc_create_udp: unable to connect to