Chinaunix首页 | 论坛 | 博客
  • 博客访问: 6761015
  • 博文数量: 1956
  • 博客积分: 10648
  • 博客等级: 上将
  • 技术积分: 23793
  • 用 户 组: 普通用户
  • 注册时间: 2006-03-22 09:38
个人简介

HI,movno1

文章分类

全部博文(1956)

文章存档

2022年(1)

2021年(8)

2020年(2)

2019年(12)

2018年(2)

2016年(2)

2015年(1)

2014年(2)

2013年(19)

2012年(8)

2011年(41)

2010年(388)

2009年(122)

2008年(385)

2007年(259)

2006年(704)

我的朋友

分类: LINUX

2007-10-29 19:05:45

linux下单网卡设双置IP
1.进入目录:
[root@dfxg root]# cd /etc/sysconfig/network-scripts/
2:ifcfg-eh0:0中的eh0:0是网卡的代号,当然你也可以用eh0:1之类的,随你喜欢怎么弄,但在eh0:X之前必须有ifcfg,也就是下面这种形式的,我们以eh0:0为例。
[root@dfxg root]#cp ifcfg-eth0 ifcfg-eth0:0
3,编辑ifcfg-eth0:0
[root@Linuxsir root]# vi ifcfg-eth0:0
ifcfg-eth0:0里面有这样的内容,你可以这样设置,然后IP可以自己设置了。象我这样设置也一样。
# Please read /usr/share/doc/initscripts-*/sysconfig.txt
# for the documentation of these parameters.
USERCTL='no'
NETMASK='255.255.255.0' -》子掩码
BOOTPROTO='static' -》协议
DEVICE='eth0:0' -》虚拟网卡的代号
IPADDR='192.168.0.9' -》我自己设定的IP
TYPE='Ethernet'
ONBOOT='yes' -》是否开机激活
NETWORK='192.168.0.0' -》网域
BROADcast='192.168.0.255' -》广播
4.保存退出,然后运行如下的命令,来激活虚拟的网卡。
[root@dfxg root]# ifup eh0:0
阅读(1629) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~