单机情况下两块网卡使用一个IP?

发表于:2007-06-09来源:作者:点击数: 标签:
有双网卡的 服务器 的IP地址使用Multipathing技术 以一个简单的例子阐述Multipathing 其实与实际不一样的就是IP地址,以及网口类型,根据实际情况需要修改内容。 multipathingtestIP10.170.1.81 multipathingtestIP10.170.1.82 LogicalIP10.170.1.80 GroupNa

有双网卡的服务器的IP地址使用Multipathing 技术

以一个简单的例子阐述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



 windowsnt 回复于:2003-01-10 12:16:59
不错不错
能不能做binding啊?

 iricyan 回复于:2003-01-10 12:56:31
好文啊!

加入精华吧,m4n!!!

 johnlong 回复于:2003-01-10 14:01:42
不错,好文章!

 戈壁-胡杨 回复于:2003-01-10 14:57:56
这样做是否带宽就加大了,实实在在地加大

 unixsoft 回复于:2003-01-11 21:10:23
寻找樊宝贵同志。

 mrcenter 回复于:2003-01-11 22:38:56
噢。朋友,这样和compag的netrain技术,以及cisco的trunck技术一样了么?

谢谢。

 mrcenter 回复于:2003-01-11 23:42:07
比方说4口的sbus以太网卡,要是在全双工的情况下(当然交换机也要设置成全双工和auto模式了),是否可以跑800mb的数据流那?

同时也希望朋友们讨论一下slb的实现,我知道是在路由器上实现的,是否还有其他的实现方式那?

谢谢。

 云中飘 回复于:2003-01-12 10:51:12
还是这里高手多阿

 zhangk 回复于:2003-02-25 14:56:48
好文章,加入精华!!

 diag 回复于:2003-02-25 15:05:48
好像也要 SWITCH SUPPORT 吧。。

 johnyou 回复于:2003-02-25 16:40:56
用trunking软件就行。

[quote:4677ab46bb="mrcenter"]比方说4口的sbus以太网卡,要是在全双工的情况下(当然交换机也要设置成全双工和auto模式了),是否可以跑800mb的数据流那?

同时也希望朋友们讨论一下slb的实现,我知道是在路由器上实现的,是否还有其他的实现方?.........[/quote:4677ab46bb]

 jstruts 回复于:2003-03-10 22:36:50
Sorry that I have to use English, I can't input chinese from my terminal. IP multipathing is different than trunking. In order to do trunking, you need switch support and you practiacally increase the bandwidth. For multipathing, it is more like NAFO group in Sun Cluster or MultiNIC in Veritas cluster, it is merely a failover thing. So I don't think you increases the bandwith.

Thanks.

 sunmarmot 回复于:2003-03-14 20:05:47
具体怎么应用呢,4块网卡直接连接到一个HUB上面用吗???

 FreeFox 回复于:2003-03-14 21:10:32
感觉就是2路坏了一条还能用另一路“备用自动投入”。

 yelrihs 回复于:2003-03-15 14:45:07
可是在交换机那边是不是设成port-channel呢?(cisco)才行呢?

 sunmarmot 回复于:2003-03-22 15:12:59
嘿嘿!!偶现在搞明白怎么用了,你可以把两个网卡接到两个switch上面,当一个网卡挂了,可以从另一台交换出去.........偶现在在用

 yelrihs 回复于:2003-03-23 11:36:00
[quote:8eb87e492a="sunmarmot"]嘿嘿!!偶现在搞明白怎么用了,你可以把两个网卡接到两个switch上面,当一个网卡挂了,可以从另一台交换出去.........偶现在在用[/quote:8eb87e492a]

你为什么要接到2台交换机上呢?接到一台上,两个网卡其中的一个坏了,不是也照样用么?你是不是想说一台交换机坏了的问题,可是我想作的是两块网卡绑定作负载均衡,两台交换机可以么?

 78020281 回复于:2003-03-24 08:37:24
很不错的东西呀,我要支持一下。

 yelrihs 回复于:2003-03-24 12:24:55
[quote:9d5bdfada6="78020281"]很不错的东西呀,我要支持一下。[/quote:9d5bdfada6]

呵呵。可惜问题还没有解决呀^_^

原文转自:http://www.ltesting.net