Есть сервер, с ОС Centos 6.4. У провайдера иногда пропадает интернет, и сервер не обновляет параметры сети, не получает IP и т.д, и по этому его приходится постоянно перезагружать. Может есть какой-нибудь скрипт, который будет при появлении интернета, обновлять параметры. Так как не обновляется сеть при повторном появлении интернета 
Имеются 2 сетевые карты, объединённые в BOND-инг (4) + имеется коммутатор
Коммутатор стоит в режиме:
Link Aggregation Algorithm = IP-DestinationНа нём есть доступные алгоритмы:
На коммутаторе есть алгоритмы:
mac_source
mac_destination
mac_source_dest
ip_source
ip_destination
ip_source_dest
l4_src_port
l4_dest_port
l4_src_dest_port
ifcfg-eth0
DEVICE=eth0
TYPE=Ethernet
UUID=0aa4aba2-e45c-4d1d-ba90-ca93cbaf071a
ONBOOT=yes
NM_CONTROLLED=yes
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System eth0"
HWADDR=00:15:17:44:FF:48
PEERDNS=yes
PEERROUTES=yes
USERCTL=no
MASTER=bond0
SLAVE=yes
BOOTPROTO=dhcpifcfg-eth1
DEVICE=eth1
TYPE=Ethernet
UUID=e427aa5a-7e1c-44c0-8a2e-d5d7856e7142
ONBOOT=yes
NM_CONTROLLED=yes
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System eth1"
HWADDR=00:15:17:44:FF:49
PEERDNS=yes
PEERROUTES=yes
USERCTL=no
MASTER=bond0
SLAVE=yes
BOOTPROTO=dhcpifcfg-bond0
DEVICE=bond0
ONBOOT=yes
BOOTPROTO=dhcp
USERCTL=no
BONDING_MASTER="yes"
BONDING_OPTS="mode=4 updelay=100 downdelay=100 miimon=100 use_carrier=0 xmit_hash_policy=layer2"
TYPE=Bonding
NOZEROCONF=yes
NM_CONTROLLED=noКаждый день, примерно в 6 утра отваливается сеть! Причём до 6 утра всё нормально!
Nov 8 05:52:17 GameServers dhclient[16448]: DHCPACK from 172.23.127.253 (xid=0x163b00c)
Nov 8 05:52:18 GameServers dhclient[16448]: bound to xxx.xxx.xxx.xxx -- renewal in 462 seconds.
Nov 8 06:00:00 GameServers dhclient[16448]: DHCPREQUEST on bond0 to 172.23.127.253 port 67 (xid=0x163b00c)
Nov 8 06:00:00 GameServers dhclient[16448]: DHCPACK from 172.23.127.253 (xid=0x163b00c)
Nov 8 06:00:01 GameServers dhclient[16448]: bound to xxx.xxx.xxx.xxx -- renewal in 492 seconds.
Nov 8 06:08:13 GameServers dhclient[16448]: DHCPREQUEST on bond0 to 172.23.127.253 port 67 (xid=0x163b00c)
Nov 8 06:08:21 GameServers dhclient[16448]: DHCPREQUEST on bond0 to 172.23.127.253 port 67 (xid=0x163b00c)
Nov 8 06:08:33 GameServers dhclient[16448]: DHCPREQUEST on bond0 to 172.23.127.253 port 67 (xid=0x163b00c)
Nov 8 06:08:42 GameServers dhclient[16448]: DHCPREQUEST on bond0 to 172.23.127.253 port 67 (xid=0x163b00c)
Nov 8 06:08:49 GameServers dhclient[16448]: DHCPREQUEST on bond0 to 172.23.127.253 port 67 (xid=0x163b00c)
Nov 8 06:08:56 GameServers dhclient[16448]: DHCPREQUEST on bond0 to 172.23.127.253 port 67 (xid=0x163b00c)
Nov 8 06:09:08 GameServers dhclient[16448]: DHCPREQUEST on bond0 to 172.23.127.253 port 67 (xid=0x163b00c)
Nov 8 06:09:19 GameServers dhclient[16448]: DHCPREQUEST on bond0 to 172.23.127.253 port 67 (xid=0x163b00c)
Nov 8 06:09:33 GameServers dhclient[16448]: DHCPREQUEST on bond0 to 172.23.127.253 port 67 (xid=0x163b00c)
Nov 8 06:09:47 GameServers dhclient[16448]: DHCPREQUEST on bond0 to 172.23.127.253 port 67 (xid=0x163b00c)
Nov 8 06:10:06 GameServers dhclient[16448]: DHCPREQUEST on bond0 to 172.23.127.253 port 67 (xid=0x163b00c)
Nov 8 06:10:22 GameServers dhclient[16448]: DHCPREQUEST on bond0 to 172.23.127.253 port 67 (xid=0x163b00c)
Nov 8 06:10:42 GameServers dhclient[16448]: DHCPREQUEST on bond0 to 255.255.255.255 port 67 (xid=0x163b00c)
Nov 8 06:11:02 GameServers dhclient[16448]: DHCPREQUEST on bond0 to 255.255.255.255 port 67 (xid=0x163b00c)
Nov 8 06:11:14 GameServers dhclient[16448]: DHCPREQUEST on bond0 to 255.255.255.255 port 67 (xid=0x163b00c)
Nov 8 06:11:33 GameServers dhclient[16448]: DHCPREQUEST on bond0 to 255.255.255.255 port 67 (xid=0x163b00c)
Nov 8 06:11:50 GameServers dhclient[16448]: DHCPREQUEST on bond0 to 255.255.255.255 port 67 (xid=0x163b00c)
Nov 8 06:11:58 GameServers dhclient[16448]: DHCPREQUEST on bond0 to 255.255.255.255 port 67 (xid=0x163b00c)
Nov 8 06:12:09 GameServers dhclient[16448]: DHCPREQUEST on bond0 to 255.255.255.255 port 67 (xid=0x163b00c)
Nov 8 06:12:30 GameServers dhclient[16448]: DHCPREQUEST on bond0 to 255.255.255.255 port 67 (xid=0x163b00c)
Nov 8 06:12:38 GameServers dhclient[16448]: DHCPREQUEST on bond0 to 255.255.255.255 port 67 (xid=0x163b00c)
Nov 8 06:12:51 GameServers dhclient[16448]: DHCPREQUEST on bond0 to 255.255.255.255 port 67 (xid=0x163b00c)
Nov 8 06:13:06 GameServers dhclient[16448]: DHCPREQUEST on bond0 to 255.255.255.255 port 67 (xid=0x163b00c)
Nov 8 06:13:16 GameServers dhclient[16448]: DHCPREQUEST on bond0 to 255.255.255.255 port 67 (xid=0x163b00c)
Nov 8 06:13:30 GameServers dhclient[16448]: DHCPREQUEST on bond0 to 255.255.255.255 port 67 (xid=0x163b00c)
Nov 8 06:13:43 GameServers dhclient[16448]: DHCPREQUEST on bond0 to 255.255.255.255 port 67 (xid=0x163b00c)
Nov 8 06:13:55 GameServers dhclient[16448]: DHCPREQUEST on bond0 to 255.255.255.255 port 67 (xid=0x163b00c)
Nov 8 06:14:12 GameServers dhclient[16448]: DHCPREQUEST on bond0 to 255.255.255.255 port 67 (xid=0x163b00c)
Nov 8 06:14:26 GameServers dhclient[16448]: DHCPREQUEST on bond0 to 255.255.255.255 port 67 (xid=0x163b00c)
Nov 8 06:14:44 GameServers dhclient[16448]: DHCPREQUEST on bond0 to 255.255.255.255 port 67 (xid=0x163b00c)
Nov 8 06:14:56 GameServers dhclient[16448]: DHCPREQUEST on bond0 to 255.255.255.255 port 67 (xid=0x163b00c)
Nov 8 06:15:04 GameServers dhclient[16448]: DHCPREQUEST on bond0 to 255.255.255.255 port 67 (xid=0x163b00c)
Nov 8 06:15:22 GameServers dhclient[16448]: DHCPREQUEST on bond0 to 255.255.255.255 port 67 (xid=0x163b00c)
Nov 8 06:15:32 GameServers dhclient[16448]: DHCPREQUEST on bond0 to 255.255.255.255 port 67 (xid=0x163b00c)
Nov 8 06:15:52 GameServers dhclient[16448]: DHCPREQUEST on bond0 to 255.255.255.255 port 67 (xid=0x163b00c)
Nov 8 06:16:09 GameServers dhclient[16448]: DHCPREQUEST on bond0 to 255.255.255.255 port 67 (xid=0x163b00c)
Nov 8 06:16:18 GameServers dhclient[16448]: DHCPREQUEST on bond0 to 255.255.255.255 port 67 (xid=0x163b00c)
Nov 8 06:16:31 GameServers dhclient[16448]: DHCPREQUEST on bond0 to 255.255.255.255 port 67 (xid=0x163b00c)
Nov 8 06:16:41 GameServers ntpd[16446]: ntpd exiting on signal 15
Nov 8 06:16:41 GameServers ntpd[7756]: ntpd 4.2.4p8@1.1612-o Fri Feb 22 11:23:27 UTC 2013 (1)
Nov 8 06:16:41 GameServers ntpd[7757]: precision = 0.558 usec
Nov 8 06:16:41 GameServers ntpd[7757]: Listening on interface #0 wildcard, 0.0.0.0#123 Disabled
Nov 8 06:16:41 GameServers ntpd[7757]: Listening on interface #1 wildcard, ::#123 Disabled
Nov 8 06:16:41 GameServers ntpd[7757]: Listening on interface #2 lo, ::1#123 Enabled
Nov 8 06:16:41 GameServers ntpd[7757]: Listening on interface #3 bond0, fe80::215:17ff:fe44:ff48#123 Enabled
Nov 8 06:16:41 GameServers ntpd[7757]: Listening on interface #4 lo, 127.0.0.1#123 Enabled
Nov 8 06:16:41 GameServers ntpd[7757]: Listening on interface #5 bond0, xxx.xxx.xxx.xxx#123 Enabled
Nov 8 06:16:41 GameServers ntpd[7757]: Listening on routing socket on fd #22 for interface updates
Nov 8 06:16:41 GameServers ntpd[7757]: kernel time sync status 2040
Nov 8 06:16:41 GameServers ntpd[7757]: frequency initialized 48.685 PPM from /var/lib/ntp/drift
Nov 8 06:16:41 GameServers dhclient[16448]: DHCPDISCOVER on bond0 to 255.255.255.255 port 67 interval 8 (xid=0x2c703230)
Nov 8 06:16:46 GameServers ntpd[7757]: Deleting interface #5 bond0, xxx.xxx.xxx.xxx#123, interface stats: received=0, sent=0, dropped=0, active_time=5 secs
Nov 8 06:16:48 GameServers ntpd_initres[7773]: host name not found: 0.centos.pool.ntp.org
Nov 8 06:16:48 GameServers ntpd_initres[7773]: host name not found: 1.centos.pool.ntp.org
Nov 8 06:16:48 GameServers ntpd_initres[7773]: host name not found: 2.centos.pool.ntp.org
Nov 8 06:16:49 GameServers dhclient[16448]: DHCPDISCOVER on bond0 to 255.255.255.255 port 67 interval 11 (xid=0x2c703230)
Nov 8 06:17:00 GameServers dhclient[16448]: DHCPDISCOVER on bond0 to 255.255.255.255 port 67 interval 17 (xid=0x2c703230)
Nov 8 06:17:17 GameServers dhclient[16448]: DHCPDISCOVER on bond0 to 255.255.255.255 port 67 interval 9 (xid=0x2c703230)
Nov 8 06:17:26 GameServers dhclient[16448]: DHCPDISCOVER on bond0 to 255.255.255.255 port 67 interval 10 (xid=0x2c703230)
Nov 8 06:17:36 GameServers dhclient[16448]: DHCPDISCOVER on bond0 to 255.255.255.255 port 67 interval 6 (xid=0x2c703230)
Nov 8 06:17:42 GameServers dhclient[16448]: No DHCPOFFERS received.А после перезапуска сети, начинает ругаться:
Nov 8 15:11:57 GameServers kernel: input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input3
Nov 8 15:12:25 GameServers kernel: bonding: bond0: Removing slave eth0.
Nov 8 15:12:25 GameServers kernel: bonding: bond0: Warning: the permanent HWaddr of eth0 - 00:15:17:44:ff:48 - is still in use by bond0. Set the HWaddr of eth0 to a different address to avoid conflicts.
Nov 8 15:12:25 GameServers kernel: bonding: bond0: releasing active interface eth0
Nov 8 15:12:25 GameServers kernel: bonding: bond0: Removing slave eth1.
Nov 8 15:12:25 GameServers kernel: bonding: bond0: Removing an active aggregator
Nov 8 15:12:25 GameServers kernel: bonding: bond0: releasing active interface eth1
Nov 8 15:12:26 GameServers kernel: bonding: bond0: setting mode to 802.3ad (4).
Nov 8 15:12:26 GameServers kernel: bonding: bond0: Setting up delay to 100.
Nov 8 15:12:26 GameServers kernel: bonding: bond0: Setting down delay to 100.
Nov 8 15:12:26 GameServers kernel: bonding: bond0: Setting MII monitoring interval to 100.
Nov 8 15:12:26 GameServers kernel: bonding: bond0: Note: Updating updelay (to 100) since it is a multiple of the miimon value.
Nov 8 15:12:26 GameServers kernel: bonding: bond0: Note: Updating downdelay (to 100) since it is a multiple of the miimon value.
Nov 8 15:12:26 GameServers kernel: bonding: bond0: Setting use_carrier to 0.
Nov 8 15:12:26 GameServers kernel: bonding: bond0: setting xmit hash policy to layer2 (0).
Nov 8 15:12:26 GameServers kernel: IPv6: ADDRCONF(NETDEV_UP): bond0: link is not ready
Nov 8 15:12:27 GameServers kernel: bonding: bond0: setting mode to 802.3ad (4).
Nov 8 15:12:27 GameServers kernel: bonding: bond0: Setting up delay to 100.
Nov 8 15:12:27 GameServers kernel: bonding: bond0: Setting down delay to 100.
Nov 8 15:12:27 GameServers kernel: bonding: bond0: Setting MII monitoring interval to 100.
Nov 8 15:12:27 GameServers kernel: bonding: bond0: Note: Updating updelay (to 100) since it is a multiple of the miimon value.
Nov 8 15:12:27 GameServers kernel: bonding: bond0: Note: Updating downdelay (to 100) since it is a multiple of the miimon value.
Nov 8 15:12:27 GameServers kernel: bonding: bond0: Setting use_carrier to 0.
Nov 8 15:12:27 GameServers kernel: bonding: bond0: setting xmit hash policy to layer2 (0).
Nov 8 15:12:27 GameServers kernel: bonding: bond0: Adding slave eth0.
Nov 8 15:12:27 GameServers kernel: bonding: bond0: enslaving eth0 as a backup interface with a down link.
Nov 8 15:12:27 GameServers kernel: bonding: bond0: Adding slave eth1.
Nov 8 15:12:27 GameServers kernel: bonding: bond0: enslaving eth1 as a backup interface with a down link.
Nov 8 15:12:27 GameServers kernel: IPv6: ADDRCONF(NETDEV_UP): bond0: link is not ready
Nov 8 15:12:28 GameServers ntpd[7757]: Deleting interface #3 bond0, fe80::215:17ff:fe44:ff48#123, interface stats: received=0, sent=0, dropped=0, active_time=32147 secs
Nov 8 15:12:29 GameServers kernel: e1000e: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None
Nov 8 15:12:29 GameServers kernel: bonding: bond0: link status up for interface eth0, enabling it in 0 ms.
Nov 8 15:12:29 GameServers kernel: bonding: bond0: link status definitely up for interface eth0, 1000 Mbps full duplex.
Nov 8 15:12:29 GameServers kernel: IPv6: ADDRCONF(NETDEV_CHANGE): bond0: link becomes ready
Nov 8 15:12:29 GameServers kernel: e1000e: eth1 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None
Nov 8 15:12:29 GameServers kernel: bonding: bond0: link status up for interface eth1, enabling it in 100 ms.
Nov 8 15:12:30 GameServers kernel: bonding: bond0: link status definitely up for interface eth1, 1000 Mbps full duplex.
Nov 8 15:12:31 GameServers dhclient[22661]: DHCPDISCOVER on bond0 to 255.255.255.255 port 67 interval 8 (xid=0x30f5a87)
Nov 8 15:12:31 GameServers ntpd[7757]: Listening on interface #6 bond0, fe80::215:17ff:fe44:ff48#123 Enabled
Nov 8 15:12:33 GameServers ntpd_initres[7773]: host name not found: 0.centos.pool.ntp.org
Nov 8 15:12:33 GameServers ntpd_initres[7773]: host name not found: 1.centos.pool.ntp.org
Nov 8 15:12:33 GameServers ntpd_initres[7773]: host name not found: 2.centos.pool.ntp.org
Nov 8 15:12:39 GameServers dhclient[22661]: DHCPDISCOVER on bond0 to 255.255.255.255 port 67 interval 18 (xid=0x30f5a87)
Nov 8 15:12:39 GameServers dhclient[22661]: DHCPOFFER from 46.32.64.4
Nov 8 15:12:39 GameServers dhclient[22661]: DHCPREQUEST on bond0 to 255.255.255.255 port 67 (xid=0x30f5a87)
Nov 8 15:12:39 GameServers dhclient[22661]: DHCPACK from 172.23.127.253 (xid=0x30f5a87)
Nov 8 15:12:40 GameServers NET[22702]: /sbin/dhclient-script : updated /etc/resolv.conf
Nov 8 15:12:40 GameServers ntpd[7757]: ntpd exiting on signal 15
Nov 8 15:12:40 GameServers ntpd[22728]: ntpd 4.2.4p8@1.1612-o Fri Feb 22 11:23:27 UTC 2013 (1)
Nov 8 15:12:40 GameServers ntpd[22729]: precision = 0.489 usec
Nov 8 15:12:40 GameServers ntpd[22729]: Listening on interface #0 wildcard, 0.0.0.0#123 Disabled
Nov 8 15:12:40 GameServers ntpd[22729]: Listening on interface #1 wildcard, ::#123 Disabled
Nov 8 15:12:40 GameServers ntpd[22729]: Listening on interface #2 lo, ::1#123 Enabled
Nov 8 15:12:40 GameServers ntpd[22729]: Listening on interface #3 bond0, fe80::215:17ff:fe44:ff48#123 Enabled
Nov 8 15:12:40 GameServers ntpd[22729]: Listening on interface #4 lo, 127.0.0.1#123 Enabled
Nov 8 15:12:40 GameServers ntpd[22729]: Listening on interface #5 bond0, xxx.xxx.xxx.xxx#123 Enabled
Nov 8 15:12:40 GameServers ntpd[22729]: Listening on routing socket on fd #22 for interface updates
Nov 8 15:12:40 GameServers ntpd[22729]: kernel time sync status 2040
Nov 8 15:12:40 GameServers dhclient[22661]: bound to xxx.xxx.xxx.xxx -- renewal in 429 seconds.
Nov 8 15:12:40 GameServers ntpd[22729]: frequency initialized 48.685 PPM from /var/lib/ntp/drift
Nov 8 15:12:42 GameServers ntpd_initres[7773]: parent died before we finished, exiting
Nov 8 15:12:42 GameServers init: tty (/dev/tty1) main process ended, respawning
Nov 8 15:15:56 GameServers ntpd[22729]: synchronized to 89.179.243.205, stratum 2
Nov 8 15:15:56 GameServers ntpd[22729]: kernel time sync status change 2001
Nov 8 15:19:49 GameServers dhclient[22731]: DHCPREQUEST on bond0 to 172.23.127.253 port 67 (xid=0x30f5a87)
Nov 8 15:19:49 GameServers dhclient[22731]: DHCPACK from 172.23.127.253 (xid=0x30f5a87)
Nov 8 15:19:50 GameServers dhclient[22731]: bound to xxx.xxx.xxx.xxx -- renewal in 422 seconds.cat /proc/net/bonding/bond0
[root@GameServers ~]# cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)
Bonding Mode: IEEE 802.3ad Dynamic link aggregation
Transmit Hash Policy: layer2 (0)
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 100
Down Delay (ms): 100
802.3ad info
LACP rate: slow
Min links: 0
Aggregator selection policy (ad_select): stable
Active Aggregator Info:
Aggregator ID: 7
Number of ports: 2
Actor Key: 17
Partner Key: 1
Partner Mac Address: 90:94:e4:23:64:40
Slave Interface: eth0
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:15:17:44:ff:48
Aggregator ID: 7
Slave queue ID: 0
Slave Interface: eth1
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:15:17:44:ff:49
Aggregator ID: 7
Slave queue ID: 0ifconfig
[root@GameServers ~]# ifconfig
bond0 Link encap:Ethernet HWaddr 00:15:17:44:FF:48
inet addr:xxx.xxx.xxx.xxx Bcast:46.32.68.255 Mask:255.255.255.0
inet6 addr: fe80::215:17ff:fe44:ff48/64 Scope:Link
UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
RX packets:7768192 errors:0 dropped:0 overruns:0 frame:0
TX packets:283671 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:505991208 (482.5 MiB) TX bytes:63000180 (60.0 MiB)
eth0 Link encap:Ethernet HWaddr 00:15:17:44:FF:48
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:97174 errors:0 dropped:0 overruns:0 frame:0
TX packets:92694 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:14038181 (13.3 MiB) TX bytes:11126144 (10.6 MiB)
Interrupt:18 Memory:b8820000-b8840000
eth1 Link encap:Ethernet HWaddr 00:15:17:44:FF:48
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:7671018 errors:0 dropped:0 overruns:0 frame:0
TX packets:190977 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:491953027 (469.1 MiB) TX bytes:51874036 (49.4 MiB)
Interrupt:19 Memory:b8800000-b8820000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:127672 errors:0 dropped:0 overruns:0 frame:0
TX packets:127672 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:101918164 (97.1 MiB) TX bytes:101918164 (97.1 MiB)P.S Как видно, разный трафик проходит через сетевые устройства. Не знаю что с этим делать.
