在论坛里搜了一下,我这个问题前面也有兄弟遇到过,但没看到最终怎么解决的。
板上两个网口,物理上应该都是通的(分别连到交换机上时指示灯亮了),ifShow显示如下:
-> ifShow motfcc (unit number 0): Flags: (0x8063) UP BROADCAST MULTICAST ARP RUNNING Type: ETHERNET_CSMACD Internet address: 192.168.0.100 Broadcast address: 192.168.0.255 Netmask 0xffffff00 Subnetmask 0xffffff00 Ethernet address is 00:10:ec:00:54:7f Metric is 0 Maximum Transfer Unit size is 1500 0 octets received 0 octets sent 11 packets received 6 packets sent 5 unicast packets received 4 unicast packets sent 6 non-unicast packets received 2 non-unicast packets sent 0 input discards 0 input unknown protocols 0 input errors 0 output errors 0 collisions; 0 dropped lo (unit number 0): Flags: (0x8069) UP LOOPBACK MULTICAST ARP RUNNING Type: SOFTWARE_LOOPBACK Internet address: 127.0.0.1 Netmask 0xff000000 Subnetmask 0xff000000 Metric is 0 Maximum Transfer Unit size is 32768 0 packets received; 0 packets sent 0 multicast packets received 0 multicast packets sent 0 input errors; 0 output errors 0 collisions; 0 dropped motfcc (unit number 1): Flags: (0x8063) UP BROADCAST MULTICAST ARP RUNNING Type: ETHERNET_CSMACD
Internet address: 192.168.1.200 Broadcast address: 192.168.1.255 Netmask 0xffffff00 Subnetmask 0xffffff00 Ethernet address is 00:10:ec:80:54:7f Metric is 0 Maximum Transfer Unit size is 1500 0 octets received 0 octets sent 70 packets received 1 packets sent 0 unicast packets received 0 unicast packets sent 70 non-unicast packets received 1 non-unicast packets sent 0 input discards 0 input unknown protocols 0 input errors 0 output errors 0 collisions; 0 dropped
此后第一个网口可以ping通,第二个网口却不行。场景: (子网掩码均为255.255.255.0,采用对角网线或通过交换机的连接方式都试过)
host1 192.168.0.3 ping 第一个网口 192.168.0.100 ,OK。 host2 192.168.1.3 ping 第二个网口(192.168.1.200), 不通。 如果将host1的网关设为192.168.0.100, 则可以ping通 192.168.0.100, 但这个应该说明不了什么问题。
为第二网口设置IP的三个函数是ipAttach(1, "motfcc"); ifMaskSet("motfcc1", 0xffffff00); ifAddrSet("motfcc1", "192.168.1.200"); IP_MAX_UNITS也已经设为2了。
另外,BSP跑起来后,串口频繁地打印 0x3dbe748 (tNetTask): RX addr = 0x3c41dc0 Len = 0x60 Stat = 0x1c84, 如果采用对角网线连则不会打印。打印函数在驱动文件的motFccHandleRX()里,前面有人说是CRC校验错误,收到的bit数不能被8整除,但不知道怎么解决。
在这里学到过很多东西,还请各位老大指教,助小弟一臂之力,解决最后这几个问题。
[align=right][color=#000066][此贴子已经被作者于2005-3-22 17:28:33编辑过][/color][/align]