AnsweredAssumed Answered

How to stop eth0 ip route allocation

Question asked by ma shaofeng on May 18, 2020
Latest reply on May 21, 2020 by jimmychan

when imx8 started , we can see it's route and ifconfig configuration is

 

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 br0

192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 br0

root@imx8qxpmek:~# ifconfig

br0       Link encap:Ethernet  HWaddr 1e:a3:e1:e8:c8:cd 

          inet addr:192.168.1.18  Bcast:192.168.1.255  Mask:255.255.255.0

          inet6 addr: fe80::d45f:9fff:fe62:de10/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:123 errors:0 dropped:0 overruns:0 frame:0

          TX packets:23 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:13012 (12.7 KiB)  TX bytes:1334 (1.3 KiB)

 

eth0      Link encap:Ethernet  HWaddr be:dc:ce:a6:21:3f 

          inet6 addr: fe80::bcdc:ceff:fea6:213f/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST DYNAMIC  MTU:1500  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:150 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:0 (0.0 B)  TX bytes:18518 (18.0 KiB)

 

lo        Link encap:Local Loopback 

          inet addr:127.0.0.1  Mask:255.0.0.0

          inet6 addr: ::1/128 Scope:Host

          UP LOOPBACK RUNNING  MTU:65536  Metric:1

          RX packets:119 errors:0 dropped:0 overruns:0 frame:0

          TX packets:119 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:11444 (11.1 KiB)  TX bytes:11444 (11.1 KiB)

 

usb0      Link encap:Ethernet  HWaddr 1e:a3:e1:e8:c8:cd 

          inet6 addr: fe80::1ca3:e1ff:fee8:c8cd/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:128 errors:0 dropped:4 overruns:0 frame:0

          TX packets:2 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:13339 (13.0 KiB)  TX bytes:268 (268.0 B)

 

 

but after few seconds (0 to 30 second),it  will change to follow status:

 

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

0.0.0.0         0.0.0.0         0.0.0.0         U     0      0        0 eth0

0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 br0

169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0 eth0

192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 br0

root@imx8qxpmek:~# ifconfig

br0       Link encap:Ethernet  HWaddr 1e:a3:e1:e8:c8:cd 

          inet addr:192.168.1.18  Bcast:192.168.1.255  Mask:255.255.255.0

          inet6 addr: fe80::d45f:9fff:fe62:de10/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:123 errors:0 dropped:0 overruns:0 frame:0

          TX packets:67 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:13012 (12.7 KiB)  TX bytes:3238 (3.1 KiB)

 

eth0      Link encap:Ethernet  HWaddr be:dc:ce:a6:21:3f 

          inet addr:169.254.97.105  Bcast:169.254.255.255  Mask:255.255.0.0

          inet6 addr: fe80::bcdc:ceff:fea6:213f/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST DYNAMIC  MTU:1500  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:203 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:0 (0.0 B)  TX bytes:21952 (21.4 KiB)

 

lo        Link encap:Local Loopback 

          inet addr:127.0.0.1  Mask:255.0.0.0

          inet6 addr: ::1/128 Scope:Host

          UP LOOPBACK RUNNING  MTU:65536  Metric:1

          RX packets:225 errors:0 dropped:0 overruns:0 frame:0

          TX packets:225 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:21078 (20.5 KiB)  TX bytes:21078 (20.5 KiB)

 

usb0      Link encap:Ethernet  HWaddr 1e:a3:e1:e8:c8:cd 

          inet6 addr: fe80::1ca3:e1ff:fee8:c8cd/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:128 errors:0 dropped:4 overruns:0 frame:0

          TX packets:2 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:13339 (13.0 KiB)  TX bytes:268 (268.0 B)

 

root@imx8qxpmek:~#

 

the follow route have bad influence to our product 

0.0.0.0         0.0.0.0         0.0.0.0         U     0      0        0 eth0

169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0 eth0

 

i try to delete the route    , but the first one can not be delelted;

 

 

how to stop route allocation for eth0 ?  

Outcomes