这些小活动你都参加了吗?快来围观一下吧!>>
电子产品世界 » 论坛首页 » 嵌入式开发 » MCU » ip地址改了,MAC 也改了,可是这里去ping不通

共3条 1/1 1 跳转至

ip地址改了,MAC 也改了,可是这里去ping不通

菜鸟
2005-06-21 21:47:20     打赏

(ipmacset是自己写的修改ip\mac的函数)通过ipmacset命令后,ip地址改了,MAC 也改了,可是这里去ping不通, 并且bootline中的目标板的地址却还是原来的,启动时显示的mac还是原来的,奇怪!!

-> ipmacset

ixe0 MAC address: 00:02:b3:3c:16:68 ixe1 MAC address: 00:02:b3:3c:16:69

ixe0 IP address: 169.254.113.143 ixe1 IP address: 169.254.113.144

Any Changes (y/n)> y

Change a MAC address (y/n)> y ixe0 MAC address: 00:02:b3:3c:16:68 00:02:b3:3c:16:68 ixe1 MAC address: 00:02:b3:3c:16:69 00:02:b3:3c:16:64

Change ixe IP address (y/n)> y ixe0 IP address: 169.254.113.143 169.254.113.146 ixe1 IP address: 169.254.113.144 169.254.113.147

ixe0 MAC address: 00:02:b3:3c:16:68 ixe1 MAC address: 00:02:b3:3c:16:64

ixe0 IP address: 169.254.113.146 ixe1 IP address: 169.254.113.147

Any Changes (y/n)> y

Change a MAC address (y/n)> n

Change ixe IP address (y/n)> n

ixe0 MAC address: 00:02:b3:3c:16:68 ixe1 MAC address: 00:02:b3:3c:16:64

ixe0 IP address: 169.254.113.146 ixe1 IP address: 169.254.113.147

Any Changes (y/n)> n

Writing interface data to non-volatile storage... New configuration written, changes will take effect after a reboot value = 0 = 0x0 -> reboot 系统重新启动后。。。

-> ipmacset

ixe0 MAC address: 00:02:b3:3c:16:68 ixe1 MAC address: 00:02:b3:3c:16:64

ixe0 IP address: 169.254.113.146 ixe1 IP address: 169.254.113.147

Any Changes (y/n)> n value = 0 = 0x0 ->

-> ping "169.254.113.146",1,0 ping: timeout no answer from 169.254.113.146 value = -1 = 0xffffffff -> ping "169.254.113.147",1,0 ping: timeout no answer from 169.254.113.147 value = -1 = 0xffffffff -> ip地址从这里看是改了,MAC 也改了,可是这里去ping不通, 并且bootline中的目标板的地址却还是原来的,奇怪!! '.' = clear field; '-' = go to previous field; ^D = quit

boot device : ixe1 processor number : 0 host name : host file name : vxworks inet on ethernet (e) : 169.254.113.144 inet on backplane (b): host inet (h) : 169.254.113.140 gateway inet (g) : user (u) : xjb ftp password (pw) (blank = use rsh): 1 flags (f) : 0x0 target name (tn) : startup script (s) : other (o) : ixe0 value = 0 = 0x0




关键词: 地址     可是     这里     不通     address    

菜鸟
2005-06-23 17:23:00     打赏
2楼

在程序中修改ip地址,不会影响到bootline中的启动参数。

如果要达到你的目的,应该把ip mac地址保存起来,比如在nvram或flash中,在获取mac地址或ip地址的函数中,到这些地方来读保存值即可。


菜鸟
2005-07-11 18:28:00     打赏
3楼

请教大侠,你们修改ip和mac用的是什么linux的什么函数啊?我郁闷了没好长时间了!


共3条 1/1 1 跳转至

回复

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