免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1367 | 回复: 4
打印 上一主题 下一主题

请问如何将网卡绑定多个ip地址 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2004-10-13 14:58 |只看该作者 |倒序浏览

各位大侠,小弟的机器是Ultra60,请问在solaris 7下,如何将一块网卡绑定多个地址? 例如我的网卡是hme0。
急!拜求!

论坛徽章:
0
2 [报告]
发表于 2004-10-13 15:33 |只看该作者

请问如何将网卡绑定多个ip地址

举例说明,网卡名hme0:
# vi /etc/hosts
127.0.0.1 localhost
192.168.2.1 dbs loghost
192.168.9.15 dd
192.168.9.65 aa
# vi /etc/netmasks
192.168.2.0 255.255.255.0
192.168.9.0 255.255.255.192
192.168.9.64 255.255.255.252

#vi /etc/hostname.hme0
dbs
#vi /etc/hostname.hme0:1
dd
#vi /etc/hostname.hme0:2
aa
# ifconfig hme0 inet 192.168.2..1 netmask 255.255.255.0 up
# ifconf

论坛徽章:
0
3 [报告]
发表于 2004-10-13 22:14 |只看该作者

请问如何将网卡绑定多个ip地址

DING

论坛徽章:
0
4 [报告]
发表于 2004-10-14 08:58 |只看该作者

请问如何将网卡绑定多个ip地址

谢过各位!

论坛徽章:
0
5 [报告]
发表于 2004-10-14 09:16 |只看该作者

请问如何将网卡绑定多个ip地址

一块网卡帮定三个ip,并且子网掩码不同



搞定!如下:
/etc/hosts
127.0.0.1 localhost
210.xxx.xx1.xx dbs loghost
192.168.9.15 mytestip
192.168.9.65 mytestip2

/etc/netmasks
210.xx.xx.0 255.255.255.0
192.168.9.0 255.255.255.192
192.168.9.64 255.255.255.252

/etc/hme0
dbs
/etc/hme0:1
mytestip
/etc/hme0:2
mytestip2

#init 6

...

#ifconfig -a
lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4>; mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
hme0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4>; mtu 1500 index 2
inet 210.xxx0.2xx.xx netmask ffffff00 broadcast 210.82.31.255
hme0:1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4>; mtu 1500 index 2
inet 192.168.9.15 netmask ffffffc0 broadcast 192.168.9.63
hme0:2: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4>; mtu 1500 index 2
inet 192.168.9.65 netmask fffffffc broadcast 192.168.9.67
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP