#input the network name
if [ -n "$1" ]; then
eth_name=$1
else
eth_name="eth0"
fi
send_o=`ifconfig $eth_name | grep bytes | awk '{print $6}' | awk -F : '{print $2}'`
recv_o=`ifconfig $eth_n...
分类:
系统相关 时间:
2015-01-23 20:08:51
阅读次数:
257
eth0, eth1这些名称是怎么来的呢?
内核发现一个pci网卡设备,调用网卡驱动的probe函数。
probe函数在做完一定的初始化之后,会调用内核接口register_netdev向内核注册一个新的net_device设备。
这个设备的名字,网卡驱动程序往往只决定其中一部分。
就像下面这种方式,网卡驱动提供一个“eth%d”这样的名称,然后调用内核接口register_n...
分类:
系统相关 时间:
2015-01-23 14:45:15
阅读次数:
309
第一种:使用命令修改(直接即时生效,重启失效)#ifconfig eth0 192.168.0.1 netmask 255.255.255.0 up说明:eth0是第一个网卡,其他依次为eth1,eth*192.168.0.1是给网卡配置的第一个网卡配置的ip地址netmask 255.255.25...
分类:
系统相关 时间:
2015-01-21 22:12:11
阅读次数:
240
centos ip bonding 一个网卡多个ips,多个网口一个ip1,配置一个网卡多ips的情况cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth0:0DEVICE="eth...
分类:
其他好文 时间:
2015-01-19 19:00:33
阅读次数:
160
Ethtool是用于查询及设置网卡参数的命令。概要:ethtoolethX//查询ethX网口基本设置ethtool–h//显示ethtool的命令帮助(help)ethtool–iethX//查询ethX网口的相关信息ethtool–dethX//查询ethX网口注册性信息ethtool–rethX//重置ethX网口到自适应模式ethtool–SethX//查询eth..
分类:
系统相关 时间:
2015-01-14 09:55:59
阅读次数:
303
列的大小必须指定。正确 char eth[][8]={"p32p1","p33p1","p34p1","p35p1"};报错char eth[4][]={"p32p1","p33p1","p34p1","p35p1"}; char eth[][]={"p32p1","p33p1","p34p1",....
分类:
编程语言 时间:
2015-01-14 09:43:22
阅读次数:
176
在配置vmbox虚拟机的时候,为了方便,经常采用复制虚拟机的操作,但是复制后的虚拟机即便采用了桥接网络的方式,还是无法正常连接局域网后来网上查了一下,可以重新设置eth首先查看文件/etc/udev/rules.d/70-persistent-net.rules内容类似如下:#Thisfilewasautomaticallygener..
分类:
系统相关 时间:
2014-12-29 18:34:55
阅读次数:
424
【利用tc做简单的限速策略】tcqdisc.sh#!/bin/sh
#
#tcqdisc.sh[a|c|d|s]interface[delay|loss]N[ms|%]
#
#
action=$1
eth=$2
option=$3
value=$4
case$actionin
a)
tcqdiscadddev$ethrootnetem$option$value
;;
c)
tcqdiscchangedev$ethrootnetem$option$value
;;
d)
tcqdis..
分类:
其他好文 时间:
2014-12-24 18:20:42
阅读次数:
152
转自:http://blog.sina.com.cn/s/blog_5919b8b10100064e.htmlEthereal是一个很流行的开源sniffer,支持包括solaris在内的很多平台。2006年初,主导Ethereal源码的大牛Gerald Combs跳槽到了CACE公司。原来“Eth...
分类:
其他好文 时间:
2014-12-19 20:36:46
阅读次数:
170
由于网络环境的变动,IP地址发生了改变,但是今日重启网络的时候报错了,当运行servicenetworkrestart的时候,出现了/sbin/dhclient${DHCLIENTARGS}{DEVICE}failed/etc/sysconfig/network-scripts/ifup-eth:line292:2129Terminated这种错误,思来想去,看来和以前配置时使用的..
分类:
其他好文 时间:
2014-12-15 15:34:33
阅读次数:
167