Sorry, you need to enable JavaScript to visit this website.

change default ipaddr of MicroZed

5 posts / 0 new
change default ipaddr of MicroZed

The default IP address of MicroZed is, I know this could be changed by typing command: ifconfig eth0 ***.***.***.***. but I don't want this kind of configuration work every time i start my board!
I'm wondering is there any method to set my board a certain ip, say for example, To make sure it won't go back to the every time i restart it.
At first, I thought the ipaddr is set by U-boot.elf, so I rebuild it with modification in directory "/include/configs/zynq_common.h" where there is a Macro defination "CONFIG_IPADDR", however the change I made here is not helpful, after I loaded u-boot.elf into my board's SD card, and let my os ran again, the ifconfig still showed me ""
What should I do? .>_<.

Did you check the interfaces file ?

You should be able to set your IP once and for all by modifying the content of your interfaces file </etc/network/interfaces>
the syntax is really easy.
You will just have to unpack the image, make your change then pack it once again.

Checked, but really strange, there's no such a file originally

Thank you for your reply :)
I've checked the interfaces file in my system and found there's no such a file!
This time, for I'm using "uramdisk.image.gz" on my board, I striped it, unzipped it, added interfaces file under the path, then build it back again. However, when I ran the board again with the rebuilt file system, still no such a file! why? Where the "" comes from?

I'm a freshman in this field, and really need you guys' help. Thank you in advance!

My solution


I am new to the microzed as well and needed the default netmask to be

My somewhat hacked-up solution was to create a file /mnt/ This is the last thing executed in the boot up process. This file has only one line:

"ifconfig eth0 netmask"

There is probably a better way but this seemed to work for me.


Thank you, that works, is the file provided for customized initialization I guess. Just as what you put, this is the last thing executed in the boot up process, triggered by the last line "source /mnt/" in rcS file. I made changes by adding "ifconfig eth0 ***" in /etc/init.d/rcS, also works.
Best regards