IP address losing even when eth0 up

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

IP address losing even when eth0 up

1,068 Views
Muthyam
Contributor I

Hello Community,

I am using SPEAR-MX8, I am losing IP even when the eth0 link is up.

imx8qm-var-som-lcd login:
imx8qm-var-som-lcd login: root
Last login: Sun Sep 20 10:44:03 UTC 2020
root@imx8qm-var-som-lcd:~#
root@imx8qm-var-som-lcd:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether f8:dc:7a:b4:f0:56 brd ff:ff:ff:ff:ff:ff
inet6 fe80::6550:e95b:67d5:4d08/64 scope link noprefixroute
valid_lft forever preferred_lft forever
root@imx8qm-var-som-lcd:~# ifconfig eth0 10.0.0.10
root@imx8qm-var-som-lcd:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether f8:dc:7a:b4:f0:56 brd ff:ff:ff:ff:ff:ff
inet 10.0.0.10/8 brd 10.255.255.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::6550:e95b:67d5:4d08/64 scope link noprefixroute
valid_lft forever preferred_lft forever
root@imx8qm-var-som-lcd:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether f8:dc:7a:b4:f0:56 brd ff:ff:ff:ff:ff:ff
inet6 fe80::6550:e95b:67d5:4d08/64 scope link noprefixroute
valid_lft forever preferred_lft forever
root@imx8qm-var-som-lcd:~# dmesg | grep eth0
[ 2.163732] fec 5b040000.ethernet eth0: registered PHC device 0
[ 10.931511] fec 5b040000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
[ 10.931553] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
root@imx8qm-var-som-lcd:~#

What is causing the issue.

Thank You,

Muthyam D.

0 Kudos
Reply
3 Replies

1,037 Views
JosephAtNXP
NXP TechSupport
NXP TechSupport

Hi,

Thank you for your interest in NXP Semiconductor products,

How is the network set? What cables are connected to what.

Try resetting the interface and then assign the IP.

$ ip link set eth0 down
$ ip link set eth0 up
$ ip addr add <address>

Regards

0 Kudos
Reply

1,026 Views
Muthyam
Contributor I

Hello,
We are using NetworkManager,
When assigning IP dynamically through a switch, no problem is occurring. But When trying assign static IP using "ifconfig eth0 10.0.0.10 up" the above mentioned problem occurred.

Same with your suggested commands also,

We have connected a four pin ethernet cable from laptop to SoM.

root@imx8qm-var-som:~#
root@imx8qm-var-som:~# ip link set eth0 down
root@imx8qm-var-som:~# ip link set eth0 up
root@imx8qm-var-som:~# ip addr add 10.0.0.10/24 dev eth0
root@imx8qm-var-som:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether f8:dc:7a:b4:f0:56 brd ff:ff:ff:ff:ff:ff
inet 10.0.0.10/24 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::fab9:5ef7:a8e:bb73/64 scope link noprefixroute
valid_lft forever preferred_lft forever
root@imx8qm-var-som:~# ping 10.0.0.5
PING 10.0.0.5 (10.0.0.5) 56(84) bytes of data.
64 bytes from 10.0.0.5: icmp_seq=1 ttl=64 time=3.88 ms
.....
64 bytes from 10.0.0.5: icmp_seq=29 ttl=64 time=2.02 ms
ping: sendmsg: Network is unreachable
ping: sendmsg: Network is unreachable
^C
--- 10.0.0.5 ping statistics ---
43 packets transmitted, 29 received, 32.5581% packet loss, time 42356ms
rtt min/avg/max/mdev = 1.705/2.023/3.881/0.362 ms
root@imx8qm-var-som:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether f8:dc:7a:b4:f0:56 brd ff:ff:ff:ff:ff:ff
inet6 fe80::fab9:5ef7:a8e:bb73/64 scope link noprefixroute
valid_lft forever preferred_lft forever
root@imx8qm-var-som:~# dmesg | grep eth0
[ 2.206788] fec 5b040000.ethernet eth0: registered PHC device 0
[ 10.546412] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 10.548625] fec 5b040000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
[ 49.682668] fec 5b040000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
[ 49.682721] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
root@imx8qm-var-som:~#

 

Thank You,

Muthyam D.

0 Kudos
Reply

1,006 Views
JosephAtNXP
NXP TechSupport
NXP TechSupport

Hi,

Do you router assign a 10.0.0 subnet address when an IP is dynamically given?

Have you tried to statically assign an IP within the subnet? It could be that there is no route for a 10.0.0 host.

Regards,

0 Kudos
Reply