When I am using Pynq z2 these days, I suddenly encounter the problem as @kumamon suffered many years ago. The link is here: Unable to access 192.168.2.99
I try to search the solution on the Internet but there is no certain way. Finally I find a way maybe can solve the problem to some extent.
Here is the problem I meet:
I connect the board with my pc. Yesterday, just after I reboot the board with the switch on the board, the eth0:1 which is used to be set as 192.168.2.99 disappeared using ifconfig command and I cannot access the board through this ip. Instead, a sit:0 device appeared when I use ifconfig -a command. I try to use sudo ifconfig eth0:1 192.168.2.99 up, the eth0:1 will appear for a few second and shutdown automatically as before. I think maybe it is caused by my pc, so I changed another pc. However, the problem still exists. I try to connect the board to the WIFI router directly and it works well. But the RPC module I am using do not allow this kind of connection so I decided to find a way.
After a day of trying, I finally find a way to solve the problem. Here is what I do:
The default eth0 file in /etc/network/interfaces.d is
auto eth0
iface eth0 inet dhcpauto eth0:1
iface eth0 inet static
address 192.168.2.99
netmask 255.255.255.0
I switch the eth0 and eth0:1:
auto eth0:1
iface eth0 inet dhcpauto eth0
iface eth0 inet static
address 192.168.2.99
netmask 255.255.255.0
After rebooting, I can connect the board with 192.168.2.99, but there is still no eth0:1 using ifconfig command. Anyway, I can continue my project.
The problem is really weird because the eth0:1 seems to shutdown every time I connect the board to the pc. But when I connect it to the router, it seems to work because it appears using ifconfig command.