首页 > 学技术 > 技术网文 > AIX > 正文

[原创] AIX网络诊断及解决现场实例


来源 chinaunix.net 酷勤网整理

问题:有两台aix的测试机器,一台做应用,一台做数据库,都在同一个网段下(无双机),其中应用网络没有问题,而数据库这台网络有问题,内网下载只有30几K。
解决方法:对比法
由于这两台机器属于同一网段,机型完全一样,可以将两台机器的网络设置进行细致的对比,看看有何差异,然后改之。



使用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,80<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD,PSEG,CHAIN>;
        inet 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
问题得到解决!!!!



 yanbing 回复于:2004-05-12 21:02:55

支持,就是需要楼主这样的奉献精神!!!


 365ice 回复于:2004-05-13 07:50:43

支持,楼主就是楼主,,,,拿出来的东西真能解决问题。。。。


 huayua 回复于:2004-05-13 09:38:08

好,够详细。支持


 liugr3988 回复于:2004-05-13 09:53:14

好文章v


 aixnewer 回复于:2004-05-13 09:54:34

好文,收藏


 viperonline 回复于:2004-05-13 10:16:55

多谢各位支持,还请各位大虾多多指点,我也只是个初学者,有一点心得就想记录下来,以备大家参考!!!


 congrd 回复于:2004-05-14 14:40:28

aix是4.3.3吗?
我的机器中怎么没有 smitty chgennt?


 handsun 回复于:2004-05-16 20:24:17

支持一下


 SongHz 回复于:2004-05-16 20:44:51

好啊,以后就有参考了。


 *Daemon* 回复于:2004-05-17 10:14:32

强.............
支持.......
称赞学习...............


 viperonline 回复于:2004-05-17 15:43:12

我这边的是aix5。2


 mantt 回复于:2004-10-13 22:52:16

我有两块,一块是D-link的D-Link DFE-530TX PCI Fast Ethernet Adapter (rev.C),另一块是Intel(R) PRO/100+ PCI Adapter 
系统自己启动时是100M,我要设置成10M,请问:在linux下怎样设置网卡的速度?我该怎么做?


 banker 回复于:2004-10-13 23:12:03

引用:原帖由 "congrd" 发表:
aix是4.3.3吗?
我的机器中怎么没有 smitty chgennt?



smitty chinet


 ulimit 回复于:2004-10-14 09:49:19

支持一下,不过“可以将两台机器的网络设置进行细致的对比“这种方式不建议,碰到复杂点的问题,这样比较会把人逼疯的,还是要从本质入手。


 ecloud 回复于:2004-10-14 13:27:10

最根本的问题是
为什么那个端口会变成Half Duplex的?
要么是硬件问题(包括交换机之类的网络上的硬件),要么就是被那个吃饱了撑得给乱改了,这些都是该细调查一下的
另外,即便是变成了Half Duplex,速度也不应该会降低得那么厉害
因此我认为是某个方向的单向广播包阻塞了网络,就算你启动了Full Duplex也只是靠打开了双工而缓解了流量。并没有解决本质问题
我建议你仔细检查一下网络环境,对各个网段进行2、3层抓包,然后分析一下
我曾经就遇到过一台垃圾防火墙,内网段口不停的发2层广播包,影响了HA无法正常启动




原文链接:http://bbs.chinaunix.net/viewthread.php?tid=323538
转载请注明作者名及原文出处



收藏本页到: