Linux下永久修改MAC地址和ifconfig命令总结(转)
	
    
    
	
1. 固定一个MAC地址,特别是在使用多个虚拟机的时候
linux环境下:
用root身份登录,在/etc/rc.d/rc.local里加上这三句
ifconfig eth0 down
ifconfig eth0 hw ether 00:0C:18:EF:FF:ED
ifconfig eth0 up
这样重新reboot后就不怕MAC复原了。
2. ifconfig命令(转载http://www.cnblogs.com/taobataoma/archive/2007/12/27/1016689.html
)
ifconfig [Interface]
Interface是可选项,如果不加此项,则显示系统中所有网卡的信息。如果添加此选项则显示所指定的网卡信息
 
例如:ifconfig eth0
 
 
eth0 Link encap:Ethernet
            HWaddr 00:0C:29:F3:3B:F2
            inet addr:192.168.0.10 Bcast:192.168.0.255 Mask:255.255.255.0
            UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
            RX packets:78 errors:0 dropped:0 overruns:0 frame:0
            TX packets:104 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:100
            RX bytes:11679 (11.4 Kb)
            TX bytes:14077 (13.7 Kb)
            Interrupt:10 Base address:0x1080
 
我们可以看到
第一行:连接类型:Ethernet(以太网)HWaddr(硬件mac地址)
第二行:网卡的IP地址、子网、掩码
第三行:UP(代表网卡开启状态)RUNNING(代表网卡的网线被接上)MULTICAST(支持组播)MTU:1500(最大传输单元):1500字节
第四、五行:接收、发送数据包情况统计
第七行:接收、发送数据字节数统计信息。
 
2、ifconfig 配置网卡
 
配置网卡的IP地址
ifconfig eth0 192.168.0.1 netmask 255.255.255.0
 
在eth0上配置上192.168.0.1 的IP地址及24位掩码。若想再在eth0上在配置一个192.168.1.1/24 的IP地址怎么办?用下面的命令
 
ifconfig eth0:0 192.168.1.1 netmask 255.255.255.0
 
这时再用ifconifg命令查看,就可以看到两个网卡的信息了,分别为:eth0和eth0:0。若还想再增加IP,那网卡的命名就接着是:eth0:1、eth0:2...想要几个就填几个。ok!
 
配置网卡的硬件地址
ifconfig eth0 hw ether xx:xx:xx:xx:xx:xx
 
就将网卡的硬件地址更改了,此时你就可以骗过局域网内的IP地址邦定了。
 
将网卡禁用
ifconfig eth0 down
将网卡启用
ifconfig eth0 up
 
转自http://hi.baidu.com/
    
     
	
	
    
    
	相关文档:
        
    
    软实时和硬实时,软实时是说违反了程序执行的deadline也不会有致命的错误,而硬实时的deadline是写死的。
很多linux有硬实时的补丁,如MontaVista。
有源晶振和无源晶振,有源的叫osllicator,无源的叫crystal。
 uclinux是静态编译的,没有mmu机制。
x86的要选xterm...
serveu假设服务器 + linux用sftp(通过ssh ......
	
    
        
    
    
安装前准备好两个分区A 和B,分区 A 用来存放下载来的 Fedora 10 的ISO镜像文件,分区 B 用来安装 Fedora 10 .。
注意:存放镜像文件的分区必须为 Fat32 格式,否则无法进行安装。(本人已测试过)
解压 Fedora-10-i386-netinst.iso 此ISO 文件,将解压出来的 isolinux 和 images 两个文件夹与 Fedora 10 的 ISO 镜像文 ......
	
    
        
    
    转载  android sdk 1.5 安装与配置
参考  ubuntu 8.10 安装 Android
1.下载android sdk
下载地址如下:
http://dl.google.com/android/android-sdk-windows-1.5_r2.zip
http://dl.google.com/android/android-sdk-linux_x86-1.5_r2.zip
2.
下载eclipse 3.4.2
 按官方文档说,android sdk 可以运行在 ......
	
    
        
    
    /*
socket select模型,服务端
绝大多数注释自己写的,参考man
*/
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/wait.h>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <sys/un.h>
#include &l ......