We are utilizing the AGX Orin SOM in our custom board configuration. We have integrated a 5G LTE network module, but we’re encountering an issue. When we set the default route to the 5G LTE network interface using the “ip route default” command, the onboard Ethernet (eth0) remains the default interface. Can you assist us in configuring the default network device to be the 5G LTE interface? Additionally, we need a solution so that when we disconnect the 5G LTE network, the default interface reverts back to eth0. Below is the command we used to set the 5G LTE network as the default route.
sudo ip addr add 100.67.67.* dev mhi_netdev0
sudo ip addr add 2605:8d80:480:494d:687a:727d:2b6e:2bc3/64 dev mhi_netdev0
sudo ifconfig mhi_netdev0 mtu 1460
sudo ip link set mhi_netdev0 up
sudo ip route add default dev mhi_netdev0
ifconfig
sudo systemctl restart systemd-resolved.service
ip rout
orin@orin-desktop:~$ ip rout
default dev mhi_netdev0 scope link
default via 10.120.17.* dev eth0 proto dhcp metric 20100
This is not specific to the 5G interface. We have already accessed the 5G interface networks and they are functioning. Our question pertains to prioritizing the network devices. Here, I attempted to add the default network as the 5G interface, but even after adding the default network, it’s not functioning until the eth0 network interface is removed.
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.120.17.115 netmask 255.255.255.0 broadcast 10.120.17.255
inet6 fe80::ecb7:33cb:69a0:602d prefixlen 64 scopeid 0x20<link>
ether 48:b0:2d:95:6c:12 txqueuelen 1000 (Ethernet)
RX packets 64538 bytes 12560469 (12.5 MB)
RX errors 0 dropped 28 overruns 0 frame 0
TX packets 3005 bytes 267424 (267.4 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
mhi_netdev0: flags=4291<UP,BROADCAST,RUNNING,NOARP,MULTICAST> mtu 1460
inet 100.77.184.76 netmask 255.255.255.0 broadcast 0.0.0.0
inet6 2605:8d80:480:494d:687a:727d:2b6e:2bc3 prefixlen 64 scopeid 0x0<global>
inet6 fe80::2a0:d5ff:feff:f0b0 prefixlen 64 scopeid 0x20<link>
ether 00:a0:d5:ff:f0:b0 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1 bytes 60 (60.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
sudo ip link set mhi_netdev0 mtu 1460
sudo ip link set mhi_netdev0 up
sudo ip route add default dev mhi_netdev0
sudo systemctl restart systemd-resolved.service
default dev mhi_netdev0 scope link
default via 10.120.17.254 dev eth0 proto dhcp metric 100
10.120.17.0/24 dev eth0 proto kernel scope link src 10.120.17.115 metric 100
100.77.184.0/24 dev mhi_netdev0 proto kernel scope link src 100.77.184.76
169.254.0.0/16 dev eth0 scope link metric 1000
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=56 time=149 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=56 time=35.4 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=56 time=53.0 ms
64 bytes from 8.8.8.8: icmp_seq=4 ttl=56 time=53.0 ms
64 bytes from 8.8.8.8: icmp_seq=5 ttl=56 time=55.5 ms
--- 8.8.8.8 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4006ms
rtt min/avg/max/mdev = 35.376/69.097/148.694/40.443 ms
orin@orin-desktop:~$ ip route
default dev mhi_netdev0 scope link
default via 10.120.17.254 dev eth0 proto dhcp metric 100
10.120.17.0/24 dev eth0 proto kernel scope link src 10.120.17.115 metric 100
100.77.184.0/24 dev mhi_netdev0 proto kernel scope link src 100.77.184.76
169.254.0.0/16 dev eth0 scope link metric 1000
orin@orin-desktop:~$ sudo ip route del default
orin@orin-desktop:~$ ip route
default via 10.120.17.254 dev eth0 proto dhcp metric 100
10.120.17.0/24 dev eth0 proto kernel scope link src 10.120.17.115 metric 100
100.77.184.0/24 dev mhi_netdev0 proto kernel scope link src 100.77.184.76
169.254.0.0/16 dev eth0 scope link metric 1000
orin@orin-desktop:~$ sudo ip route del default
orin@orin-desktop:~$ ip route
10.120.17.0/24 dev eth0 proto kernel scope link src 10.120.17.115 metric 100
100.77.184.0/24 dev mhi_netdev0 proto kernel scope link src 100.77.184.76
169.254.0.0/16 dev eth0 scope link metric 1000
orin@orin-desktop:~$ sudo ip route add default dev mhi_netdev0
orin@orin-desktop:~$ ip route
default dev mhi_netdev0 scope link
10.120.17.0/24 dev eth0 proto kernel scope link src 10.120.17.115 metric 100
100.77.184.0/24 dev mhi_netdev0 proto kernel scope link src 100.77.184.76
169.254.0.0/16 dev eth0 scope link metric 1000
orin@orin-desktop:~$ ping google.com
ping: google.com: Temporary failure in name resolution
We want to access the internet through the 5G network interface along with eth0 or any other network interface, similar to how the system prioritizes multiple LANs. When the default connection is removed, it should move to the next network interface automatically.
Let’s put aside 5G/LTE. How can I configure IP routing for other network interfaces? For instance, if we have multiple LAN ports for networks such as 1G, 10G, and Wi-Fi, how can we establish the default network? Could you assist me with assigning the default network?
Thanks for the suggestion. I’ve attempted the network configurations mentioned, but unfortunately, they haven’t resolved the issue. That’s why I’ve turned to seeking assistance here. I’ve noticed that some files in /etc/network are missing in Jetson Linux compared to the generic Linux versions available on the internet.
I hope this clarifies the issue.