1 网络设置通过DHCP方式动态获取IP和netmaskifconfig e1000g0 auto-dhcpifconfig e1000g0 dhcp start | drop | status临时修改网卡IP和子网掩码设置:ifconfig e1000g1 inet 192.168.56.103 ...
分类:
其他好文 时间:
2015-01-31 00:17:45
阅读次数:
232
概述:
内核空间与用户空间经常需要进行交互。举个例子:当用户空间使用一些配置命令如ifconfig或route时,内核处理程序就要响应这些处理请求。
用户空间与内核有多种交互方式,最常用的有以下四种:通过/proc虚拟文件系统,通过/sys虚拟文件系统,通过ioctl系统调用,通过Netlink socket。 其中编写程序时最常使用ioctl,这四种方式中有两种是通过虚拟...
分类:
系统相关 时间:
2015-01-30 15:55:02
阅读次数:
407
netstat -rn sudo route -n top CPU 内存 进程 监控ps -auxcat /proc/net/dev 流量df -BM 磁盘使用量ifconfig 查看网络连接 与 使用流量情况ifconfig eth0 192.168.1.99 broadcast 192.168....
分类:
其他好文 时间:
2015-01-29 22:33:18
阅读次数:
135
#!/bin/sh# Find ipIP=`/sbin/ifconfig eth1 | grep 'inet addr' | awk '{ print substr($2, index($2, ":")+1)}'`#monitor procname scriptnamemonitor(){ proc...
分类:
Web程序 时间:
2015-01-28 21:18:44
阅读次数:
209
IP地址是属于内核的,不是属于网卡的。只要内核中有就能ping通。常见的网卡类型: lo(loopback):本地回环。 ethNUM:以太网网卡。CentOS7中为ensNUMs。 pppNUM:点对点。加载模块配置文件: /etc/modprobe.conf CentOS中默只有/etc/modprobe.conf/文件夹,可以手工创建。/et..
分类:
系统相关 时间:
2015-01-28 19:56:14
阅读次数:
341
IP别名设置: 首先我的电脑的eth0的IP已经配置过了:192.168.22.134? netmask 255.255.255.0 然后我还想为eth0这个网卡多配置几个IP地址,方法如下: ifconfig eth0:0 192.168.22.231 netmask 2...
分类:
其他好文 时间:
2015-01-28 10:03:16
阅读次数:
422
当在终端中输入ifcongfig后不出现eth0的任何信息或者是eth0中的inet地址没有,(所有设置都正常,使用桥接方式)这时候其实你只需要输入两条命令重新启动下网络接口即可。#ifdowneth0#ifupeth0此时找到ip地址就可以用Xshell远程登录了。若还是登录不上,则有可能是你的主机没有..
分类:
系统相关 时间:
2015-01-28 01:04:19
阅读次数:
838
1 ifconfig:
ifconfig eth0 192.168.1.123 netmask 255.255.255.0
2 setup:
redhat 系列专有
3 配置文件方式配置:
配置文件1---->网卡信息文件 vi /etc/sysconfig/network-scripts/ifcfg-eth0
...
分类:
系统相关 时间:
2015-01-24 13:11:09
阅读次数:
182
#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
Linux网络配置
1. 临时更改的网络配置
①设置ip地址和子网掩码
#ifconfig eth0 192.168.1.33 netmask 255.255.255.0 up
//eth0是要设置的网卡,192.168.1.33是要设置的IP,255.255.255.0是子网掩码
②设置网关
#route add default gw 192.168.1...
分类:
系统相关 时间:
2015-01-22 13:27:12
阅读次数:
240