This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
hello,
I used J721 EVM board,i set eth0 ip is 192.168.1.100,When I connect to the device through SSH, the network card restarts automatically,the ssh client Disconnection
this is board's error mesage
this is ssh client's mesage
As a result, I can only connect the device through serial port, which is very inconvenient. I wonder if there is any way to solve the problem.
Looking forward to your reply
Thanks!
Now I have solved this problem. Before, I added "/etc/init.d/networking restart" to the end of the /etc/profile file. Now I comment out this sentence and I can connect to the device through the ssh client.
But how can I automatically set the IP address of eth0 to be static when booting up?
Hi,
this is board's error mesage
This does not seem to be error as the link is up afterwards.
But how can I automatically set the IP address of eth0 to be static when booting up?
To assign stattic ip after logging in, change the file "/etc/network/interface". Comment out the iface eth0 inet dhcp
block and add in its place the following lines -
iface eth0 inet static
address 192.168.1.200
netmask 255.255.255.0
and then add at the end of "/etc/profile" file, ifup eth0.
This will assign a static ip to eth0 at login.
Not sure about assigning static ip before logging in. I will look into it and will let you know.
Regards,
Tanmay
Hi Tanmay,
I tried the method you said, adding "ifup eth0" to the /etc/profile file, but it will only take effect after logging in from the serial port, otherwise I ping the IP addresses of different devices.
Then i created a file ,name is "01-eth-static.network" , in the /etc/systemd/network/ directory and add the following content:
[Match]
Name=eth0
[Network]
Address=192.168.1.100
Broadcast=192.168.1.255
Netmask=255.255.255.0
Gateway 192.168.1.1
That it's OK