免费注册 查看新帖 |

Chinaunix

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

[IRIX] 如何在IRIX 6.5 单网卡设置双IP??? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-05-16 11:50 |只看该作者 |倒序浏览
各位,请教一下,如何在一个网卡上设置两个IP地址(不同网段的)。非常感谢!!!!

论坛徽章:
0
2 [报告]
发表于 2008-05-16 14:23 |只看该作者
看看ifconfig的帮助,有个alias的功能

临时:
# ifconfig interface  alias address netmask [mask_num] broadcast [boardcase address]

永久:
Creating an IP Aliases File
You can save IP alias settings in the /etc/config/ipaliases.options file so they are automatically assigned during the network initialization process. The ipaliases.options file is read by the network script if the /etc/config/ipaliases file contains the value on. Use the procedure below to create an ipaliases.options file and assign IP aliases automatically during network initialization:

Edit ipaliases.options using your favorite editor:

# vi /etc/config/ipaliases.options


Your entries should look similar to the example below. In this example, broadcasting is performed on the Ethernet but not the FDDI network:

ec0  128.64.56.51 netmask 0xffffff00 broadcast 128.64.56.255
ec0  128.64.56.12 netmask 0xffffff00 broadcast 128.64.56.255
ipg0 190.111.79.16 netmask 0xffffff00
ipg0 190.111.79.10 netmask 0xffffff00

http://techpubs.sgi.com/library/ ... /sgi_html/ch03.html

[ 本帖最后由 sgi1991 于 2008-5-16 14:28 编辑 ]

论坛徽章:
0
3 [报告]
发表于 2008-05-16 15:56 |只看该作者
设置不同IP类的,如192.168.1.5和10.0.0.5,能设置吗。
是不是这样设置
ec0  192.168.1.5 netmask 0xffffff00 broadcast 192.168.1.255
ec0  10.0.0.5       netmask 0xffff0000 broadcast 10.0.0.255

论坛徽章:
0
4 [报告]
发表于 2008-05-16 18:27 |只看该作者
原来的那个IP就不用在/etc/config/ipaliases.options定义了,这个文件只定义你alias的IP,当然可以不同网段。

论坛徽章:
0
5 [报告]
发表于 2008-05-18 16:29 |只看该作者
设置了一下,设置两个IP,一个192.0.0.12网段的(255.255.255.0),这个是主IP,另外设定一个是129.1.4.129(255.255.0.0)。能ping通192.0.0.x的,但是129.1.4.x的却ping不通,然而外面能的129.1.4.x网段的,却能ping通刚设的主机。To force route advertising, enter the -s option in the routed.options file on the IP-aliased host.不知道这句话应该怎么做。routed.options怎么加-s

论坛徽章:
0
6 [报告]
发表于 2008-05-19 09:04 |只看该作者
我没有执行alaises-ip   start这个命令。但是很奇怪,为什么外面的能ping通,而主机往外ping的时候,却是不通的。(主IP可以通跟主IP同一网段的,副的IP的网段,Ping不通)版主帮忙看看,郁闷中啊。

论坛徽章:
0
7 [报告]
发表于 2008-05-19 09:08 |只看该作者
可能没有路由吧?看看netstat -ra 输出

论坛徽章:
0
8 [报告]
发表于 2008-05-19 09:28 |只看该作者
是啊。原来的主机没有路由,那要怎么设置?请指导一下。

论坛徽章:
0
9 [报告]
发表于 2008-05-19 13:49 |只看该作者
按理说,不用加路由啊。因为我ping的IP地址是129.1.4.201是跟副的IP(129.1.4.129)一个网段的,我的掩码是255.255.0.0 netmask 0xffff0000。哪位TX知道,能不能帮忙指导一下。

论坛徽章:
0
10 [报告]
发表于 2008-05-19 18:35 |只看该作者
你应该把129.1.4.129这个网络设置成主IP,把192的保留地址网段设置成alias的IP
叫你看看netstat -ra 怎么没有消息?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP