为一块网卡配置多ip可以通过命令行设置也可以通过配置文件设置,以下我分别通过这两种方式实现:
【程序编程相关:http://www.myfaq.com】 【推荐阅读:http://www.myfaq.com】1.用命令行设置 【扩展信息:无意中在一论坛看见这篇文章,觉得挺好玩的】 ifconfig命令格式:ifconfig 设备名 ip netmask 掩码 broadcast 广播地址 动作 [root@localhost root]# ifconfig eth0 link encap:ethernet hwaddr 00:0e:1f:01:6c:50 inet addr:192.168.16.108 bcast:192.168.16.255 mask:255.255.255.0 up broadcast running multicast mtu:1500 metric:1 rx packets:2 errors:0 dropped:0 overruns:0 frame:0 tx packets:6 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 rx bytes:224 (224.0 b) tx bytes:387 (387.0 b) interrupt:11 base address:0x2000 lo link encap:local loopback inet addr:127.0.0.1 mask:255.0.0.0 up loopback running mtu:16436 metric:1 ... 下一页