解决方法:对比法
由于这两台机器属于同一网段,机型完全一样,可以将两台机器的网络设置进行细致的对比,看看有何差异,然后改之。
使用netstat -v ent0 | grep -p "Specific Statistics"命令分别查看两台机器
应用: netstat -v ent0 | grep -p "Specific Statistics" 10/100 Mbps Ethernet PCI Adapter II (1410ff01) Specific Statistics: -------------------------------------------------------------------- Link Status: Up Media Speed Selected: Auto negotiation Media Speed Running: 100 Mbps Full Duplex Receive Pool Buffer Size: 1024 Free Receive Pool Buffers: 1024 No Receive Pool Buffer Errors: 0 Receive Buffer Too Small Errors: 0 Entries to transmit timeout routine: 0 Transmit IPsec packets: 0 Transmit IPsec packets dropped: 0 Receive IPsec packets: 0 Receive IPsec packets dropped: 0 Inbound IPsec SA offload count: 0 Transmit Large Send packets: 0 Transmit Large Send packets dropped: 0 Packets with Transmit collisions: 1 collisions: 0 6 collisions: 0 11 collisions: 0 2 collisions: 0 7 collisions: 0 12 collisions: 0 3 collisions: 0 8 collisions: 0 13 collisions: 0 4 collisions: 0 9 collisions: 0 14 collisions: 0 5 collisions: 0 10 collisions: 0 15 collisions: 0数据库:
netstat -v ent0 | grep -p "Specific Statistics" 10/100 Mbps Ethernet PCI Adapter II (1410ff01) Specific Statistics: -------------------------------------------------------------------- Link Status: Up Media Speed Selected: 100 Mbps Half Duplex Media Speed Running: 100 Mbps Half Duplex Receive Pool Buffer Size: 1024 Free Receive Pool Buffers: 1024 No Receive Pool Buffer Errors: 0 Receive Buffer Too Small Errors: 0 Entries to transmit timeout routine: 0 Transmit IPsec packets: 0 Transmit IPsec packets dropped: 0 Receive IPsec packets: 0 Receive IPsec packets dropped: 0 Inbound IPsec SA offload count: 0 Transmit Large Send packets: 0 Transmit Large Send packets dropped: 0 Packets with Transmit collisions: 1 collisions: 233543413 6 collisions: 0 11 collisions: 0 2 collisions: 0 7 collisions: 0 12 collisions: 0 3 collisions: 0 8 collisions: 0 13 collisions: 0 4 collisions: 0 9 collisions: 0 14 collisions: 0 5 collisions: 0 10 collisions: 0 15 collisions: 0仔细对比发现数据库这台显然是双工模式与应用这台不同,应用的机器是自适应的,运行时是100M全双工模式,而数据库的机器限制为100M半双工模式,现在就是要将数据库这台改成与应用一样
更改双工模式的命令为smitty chgenet 但是在此之前要将需要更改的网卡down掉,以及所有经过此网卡的服务停止。 步骤如下:
ifconfig -a 输出: en0: flags=5e080863,80inet 10.100.10.6 netmask 0xffffff00 broadcast 10.100.10.255 再输入: ifconfig en0 down ifconfig en0 detach smitty chgennt 输出: [Entry Fields] Ethernet Adapter ent0 Description 10/100 Mbps Ethernet PCI Adapter II (1410ff01) Status Available Location 1L-08 Transmit descriptor queue size [512] Receive descriptor queue size [512] Software transmit queue size [8192] Receive buffer pool size [1024] Media Speed Auto_Negotiation IPsec Offload no Enable hardware transmit and receive checksum yes Enable TCP Large Send Offload no Enable Link Polling no Time interval for Link Polling [500] Enable ALTERNATE ETHERNET address no ALTERNATE ETHERNET address [0x000000000000] Apply change to DATABASE only no 更改之后需要重新设置默认网关(原来的会丢失) smitty tcpip Minimum Configuration & Startup 输出: [Entry Fields] * HOSTNAME [TEST1-CRM-DB-CLS] * Internet ADDRESS (dotted decimal) [10.100.10.8] Network MASK (dotted decimal) [255.255.255.0] * Network INTERFACE en0 NAMESERVER Internet ADDRESS (dotted decimal) [] DOMAIN Name [] Default Gateway Address (dotted decimal or symbolic name) [10.100.10.1] Cost [0] Do Active Dead Gateway Detection? no Your CABLE Type N/A START TCP/IP daemons Now no 最后将网卡启用 ifconfig en0 up 问题得到解决!!!