这些小活动你都参加了吗?快来围观一下吧!>>
电子产品世界 » 论坛首页 » 嵌入式开发 » MCU » 如何配置8260板上eth口的ip地址?

共5条 1/1 1 跳转至

如何配置8260板上eth口的ip地址?

菜鸟
2004-11-30 17:38:13     打赏

8260目标板,配置了两个eth口。

在config.h和configNet.h中已经把两个eth口打开。

问题是:

目标板引导成功VxWorks以后,板上的eth口只能使用一个。(可能是因为我在config.h中只配置了一个目标板地址?怎样配置多个呢?我的配置是:

#define DEFAULT_BOOT_LINE BOOT_DEV_NAME "(0,0)host:vxworks " "e=192.168.2.254 " "h=192.168.2.65 " "u=anonymous pw=user " "f=0x80 tn=mpc8260")

但是板上的eth口与网络连接后,显示灯能够正常亮,应该说明物理链路已经建立成功。

在VxWorks的shell下希望配置出另外一个ip地址。

曾经尝试过的命令:ipAttach( ), ifMaskSet( ) ,ifAddrSet( ), and hostAdd( )

但是ifAddrSet()的返回值是-1,不能成功。

哪位高手帮忙提示一下?

多谢。




关键词: 如何     配置     板上     口的     地址    

菜鸟
2004-11-30 20:47:00     打赏
2楼

首先,你需要修改confignet.h,使其包括第二个网口。

然后修改sysLib.c,定义第二个网口的mac地址以及获得mac地址的函数。然后才可以调用ipAttach( ), ifMaskSet( ) ,ifAddrSet。


菜鸟
2004-11-30 22:55:00     打赏
3楼

谢谢版主gem2000

不过在

“然后修改sysLib.c,定义第二个网口的mac地址以及获得mac地址的函数”

上能否多给些提示。


菜鸟
2004-11-30 23:16:00     打赏
4楼

我把原先我设置的方法和具体输出贴出来,gem2000帮忙看一下。

-> ipAttach(1,"mpcxx") value = 0 = 0x0 -> ifMaskSet("mpcxx1",0xffffff00) value = 0 = 0x0 -> muxShow Current mode: NORMAL Device: mpcxx Unit: 0 Description: Motorola FCC Ethernet Enhanced Network Driver Protocol: Wind Debug Agent Type: 257 Recv 0xc7f80 Shutdown 0x0 Protocol: IP 4.4 ARP Type: 2054 Recv 0x61048 Shutdown 0x614dc Protocol: IP 4.4 TCP/IP Type: 2048 Recv 0x61048 Shutdown 0x613fc Device: mpcxx Unit: 1 Description: Motorola FCC Ethernet Enhanced Network Driver Protocol: IP 4.4 ARP Type: 2054 Recv 0x61048 Shutdown 0x614dc Protocol: IP 4.4 TCP/IP Type: 2048 Recv 0x61048 Shutdown 0x613fc value = 0 = 0x0

-> ifShow mpcxx (unit number 0): Flags: (0x8063) UP BROADCAST MULTICAST ARP RUNNING Type: ETHERNET_CSMACD Internet address: 192.168.2.254 Broadcast address: 192.168.2.255 Netmask 0xffffff00 Subnetmask 0xffffff00 Ethernet address is 00:10:ec:00:5d:49 Metric is 0 Maximum Transfer Unit size is 1500 303 octets received 9 octets sent 303 packets received 9 packets sent 296 non-unicast packets received 0 non-unicast packets sent 7 unicast packets received 9 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 mpcxx (unit number 1): Flags: (0x8063) UP BROADCAST MULTICAST ARP RUNNING Type: ETHERNET_CSMACD Ethernet address is 00:10:ec:80:5d:49 Metric is 0 Maximum Transfer Unit size is 1500 0 octets received 0 octets sent 0 packets received 0 packets sent 0 non-unicast packets received 0 non-unicast packets sent 0 unicast packets received 0 unicast packets sent 0 input discards 0 input unknown protocols 0 input errors 0 output errors 0 collisions; 0 dropped value = 29 = 0x1d


菜鸟
2004-12-02 17:12:00     打赏
5楼
go on!

共5条 1/1 1 跳转至

回复

匿名不能发帖!请先 [ 登陆 注册 ]