linux双网卡绑定和防漂移
问题:四川Greenplum服务器双网卡绑定,重启后网卡组IP漂移到另一网卡组,掉包率严重,导致gp数据库无法正常使用。
处理办法:在/etc/sysconfig/network-scripts/ ifcfg-ethx中添加网卡mac地址,使其无论先后启动都不会发生IP漂移。
结果:服务器正常工作。
处理过程如下:
[root@master ~]# ifconfig -a
bond0 Link encap:Ethernet HWaddr 00:15:17:A7:F8:BB
inet addr:192.168.16.101 Bcast:192.168.16.255 Mask:255.255.255.0
inet6 addr: fe80::215:17ff:fea7:f8bb/64 Scope:Link
UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
RX packets:278192 errors:0 dropped:0 overruns:0 frame:0
TX packets:5290 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes(29.7 MiB) TX bytes:556330 (543.2 KiB)
bond1 Link encap:Ethernet HWaddr 00:15:17:A7:F8:BA
inet addr:133.37.253.108 Bcast:133.37.253.255 Mask:255.255.255.0
inet6 addr: fe80::215:17ff:fea7:f8ba/64 Scope:Link
UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
RX packets:297026 errors:0 dropped:0 overruns:0 frame:0
TX packets:21969 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes(30.1 MiB) TX bytes:3147058 (3.0 MiB)
eth0 Link encap:Ethernet HWaddr 00:15:17:A7:F8:BA
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:297025 errors:0 dropped:0 overruns:0 frame:0
TX packets:21670 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes(30.1 MiB) TX bytes:3107804 (2.9 MiB)
Memory:fdfa0000-fdfc0000
eth1 Link encap:Ethernet HWaddr 00:15:17:A7:F8:BA
UP BROADCAST SLAVE MULTICAST MTU:1500 Metric:1
RX packets:1 errors:0 dropped:0 overruns:0 frame:0
TX packets:299 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:60 (60.0 b) TX bytes:39254 (38.3 KiB)
Memory:fd960000-fd980000
eth2 Link encap:Ethernet