Chinaunix首页 | 论坛 | 博客
  • 博客访问: 554893
  • 博文数量: 109
  • 博客积分: 2300
  • 博客等级: 大尉
  • 技术积分: 810
  • 用 户 组: 普通用户
  • 注册时间: 2009-10-02 13:11
文章分类

全部博文(109)

文章存档

2012年(1)

2011年(17)

2010年(62)

2009年(29)

我的朋友

分类: LINUX

2010-04-07 23:29:07

一、修改MAC地址方法

  linux环境下:

  需要用

  #ifconfig eth0 down

  先把网卡禁用

  再用ifconfig eth0 hw ether 1234567890ab

  这样就可以改成功了

  要想永久改就这样:

  在/etc/rc.d/rc.local里加上这三句(也可以在/etc/init.d/network里加下面三行)ifconfig eth0 down
ifconfig eth0 hw ether 1234567890ab
ifconfig eht0 up

  二、修改IP地址的方法

  #ifconfig ethe0 down

  #ifconfig ethe0 192.168.169.245 netmask 255.255.255.0

  以上的方法下次启动时就无效了

  如果要以后每次都生效则加入到以下文件里面

  在/etc/sysconfig/network-scripts/下修改ifcfg-eth0地址

  三、一块网卡添加两个ip地址

  ifconfig eth0:1 192.168.1.1 netmask 255.255.255.0

  ifconfig eth0:2 192.168.1.2 netmask 255.255.255.0

  以上是对网卡eth0修改了两个IP地址的方法

阅读(530) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~