打印

求教:sun服务器双网卡如何配置双ip

求教:sun服务器双网卡如何配置双ip

请大家帮忙一下,sun服务双网卡如何配置双ip,以及掩码,网关,路由如何配置。谢谢!
^-^

TOP

1. Find your the device name of your network adapter. i.e. eri0,eri1

2.Use ifconfig
#ifconfig eri1 plumb
#ifconfig eri1192.168.0.1 netmask 255.255.255.0 up

3.edit /etc/hostname.eri1 /etc/defaultrouter
Email: [IMG]http://www.nhacks.com/email/image/UmF5cy5LYWk%3D/R01haWw%3D/image.png[/IMG] MSN: [IMG]http://www.nhacks.com/email/image/b21pdF9wYXN0/SG90bWFpbA%3D%3D/image.png[/IMG]

TOP

Solaris 下还可以用双网卡配同一个IP  方法如下: 并且这个包是免费的。

以一个简单的例子阐述Multipathing
其实与实际不一样的就是IP地址,以及网口类型,根据实际情况需要修改内容。

multipathing test IP  10.170.1.81
multipathing test IP  10.170.1.82
Logical  IP                10.170.1.80
Group Name              mswitch
Network Card            ge0,ge1
一:使用命令方式(机器重新启动将失效)
1:Become superuser.
2:如果ge0,ge1被配置了IP,请使用如下命令清除ge0,ge1上配置信息
ifconfig ge0 unplumb
ifconfig ge1 unplumb

3:使用如下命令配置multipathing
ifconfig ge0 plumb 10.17.1.80 group mswitch netmask + broadcast + up
(使ge0可用,配置ge0的IP为Loical IP 10.17.1.80、使ge0为mswitch组的一块网卡)
ifconfig ge0 addif 10.170.1.81 deprecated -failover netmask + broadcast + up
(配置ge0的test ip为10.170.1.81)
ifconfig ge1 plumb 10.170.1.82 group mswitch  netmask + broadcast + deprecated -failover standby up
(配置ge1为mswitch  组的另外一块网卡,它的test ip为10.170.1.82 并且这块网卡为standby)
4:以上为所有的配置命令,使用ifconfig –a命令将看到ge0、ge0:1、ge1的IP分别为10.17.1.80、10.17.1.81、10.17.1.82
5:测试。拔掉ge0的网线,使用ifconfig –a会发现10.170.1.80的地址failover到了ge1:1上。10.170.1.80这个地址可以正常使用。插回网线,会发现ge1:1没有了,10.17.1.80又回到了ge0上。

二:使用文件方式(机器重新启动后生效)
edit the /etc/hostname.ge0   file and add the following line.

10.170.1.80 netmask + broadcast + group mswitch up \
addif 10.170.1.81 deprecated -failover netmask + broadcast + up

edit the /etc/hostname.ge1  file and add the following line.

10.170.1.82 netmask + broadcast + group mswitch up deprecated -failover standby up

TOP

引用:
最初由 carob 发布
[B]Solaris 下还可以用双网卡配同一个IP  方法如下: 并且这个包是免费的。

以一个简单的例子阐述Multipathing
其实与实际不一样的就是IP地址,以及网口类型,根据实际情况需要修改内容。

multipathing test IP  10.170.1.81
multipathing test IP  10.170.1.82
Logical  IP                10.170.1.80
Group Name              mswitch
Network Card            ge0,ge1
一:使用命令方式(机器重新启动将失效)
1:Become superuser.
2:如果ge0,ge1被配置了IP,请使用如下命令清除ge0,ge1上配置信息
ifconfig ge0 unplumb
ifconfig ge1 unplumb

3:使用如下命令配置multipathing
ifconfig ge0 plumb 10.17.1.80 group mswitch netmask + broadcast + up
(使ge0可用,配置ge0的IP为Loical IP 10.17.1.80、使ge0为mswitch组的一块网卡)
ifconfig ge0 addif 10.170.1.81 deprecated -failover netmask + broadcast + up
(配置ge0的test ip为10.170.1.81)
ifconfig ge1 plumb 10.170.1.82 group mswitch  netmask + broadcast + deprecated -failover standby up
(配置ge1为mswitch  组的另外一块网卡,它的test ip为10.170.1.82 并且这块网卡为standby)
4:以上为所有的配置命令,使用ifconfig –a命令将看到ge0、ge0:1、ge1的IP分别为10.17.1.80、10.17.1.81、10.17.1.82
5:测试。拔掉ge0的网线,使用ifconfig –a会发现10.170.1.80的地址failover到了ge1:1上。10.170.1.80这个地址可以正常使用。插回网线,会发现ge1:1没有了,10.17.1.80又回到了ge0上。

二:使用文件方式(机器重新启动后生效)
edit the /etc/hostname.ge0   file and add the following line.

10.170.1.80 netmask + broadcast + group mswitch up \
addif 10.170.1.81 deprecated -failover netmask + broadcast + up

edit the /etc/hostname.ge1  file and add the following line.

10.170.1.82 netmask + broadcast + group mswitch up deprecated -failover standby up [/B]
Thanks for providing in detail. I've not test these. Configure two network adapter (perhaps one NA with two RJ-45 connector) with the same IP is mainly used for redundancy.RAS features...
Email: [IMG]http://www.nhacks.com/email/image/UmF5cy5LYWk%3D/R01haWw%3D/image.png[/IMG] MSN: [IMG]http://www.nhacks.com/email/image/b21pdF9wYXN0/SG90bWFpbA%3D%3D/image.png[/IMG]

TOP

引用:
最初由 carob 发布
[B]Solaris 下还可以用双网卡配同一个IP  方法如下: 并且这个包是免费的。

以一个简单的例子阐述Multipathing
其实与实际不一样的就是IP地址,以及网口类型,根据实际情况需要修改内容。

multipathing test IP  10.170.1.81
multipathing test IP  10.170.1.82
Logical  IP                10.170.1.80
Group Name              mswitch
Network Card            ge0,ge1
[/B]
有疑问:为什么先去掉了两个网卡的IP,然后就加上,什么问题?

谁有条件,验证一下这种方法好么,小弟用Vmware测试无结果.
========================================================= 人比海里沙,毋用多牵挂,君可见漫天落霞,名利息间似雾化。 (支持论坛的发展,请点击论坛的广告) =========================================================

TOP

能否介绍一下一块网卡绑定内外两个IP的方法?  多谢!
落日清风本无主 不惜清凉与子分

TOP


感谢一直以来您对我们的支持!
当前时区 GMT+8, 现在时间是 2008-10-13 14:28 京ICP证060528 号

Designed By 17DST