Networking

On Jetson Devkits we assume there are two network interfaces available for enabling camera based systems. The built-in RJ-45 is for internet connection, and another one (via USB Ethernet dongle) is used to communicate with camera devices through a connected PoE switch (see hardware setup for AI-NVR app). Jetson has a systemd service jetson-networking to setup these two interfaces. On Jetson AGX Orin and Orin Nx/Nano the RJ-45 interface is named eth0, and the usb ethernet interface is named eth1 as below.

eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
      inet 192.168.100.1  netmask 255.255.255.0  broadcast 192.168.100.255
      inet6 fe80::2e0:4cff:fe36:8f1f  prefixlen 64  scopeid 0x20<link>
      ether 00:e0:4c:36:8f:1f  txqueuelen 1000  (Ethernet)
      RX packets 156532  bytes 9721380 (9.7 MB)
      RX errors 0  dropped 0  overruns 0  frame 0
      TX packets 16287  bytes 707010 (707.0 KB)
      TX errors 0  dropped 0 overruns 0  carrier 0  collisions

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
      inet 192.168.0.33  netmask 255.255.255.0  broadcast 192.168.0.255
      inet6 fe80::4ab0:2dff:fe81:4ad8  prefixlen 64  scopeid 0x20<link>
      ether 48:b0:2d:81:4a:d8  txqueuelen 1000  (Ethernet)
      RX packets 332785  bytes 36237215 (36.2 MB)
      RX errors 0  dropped 0  overruns 0  frame 0
      TX packets 157048  bytes 11475164 (11.4 MB)
      TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Before enabling jetson-networking service you may need to edit /opt/nvidia/jetson-configs/jetson-camif.conf and replace the eth1 with the correct camera interface name on your system.

# Camerinterfaces
# List the camera interfaces as a Bash arrry, ex:
# CAMERA_INTERFACES=("PoE0" "PoE1" "PoE2")
CAMERA_INTERFACES=("eth1")

On Orin Nx/Nano devkits you may see that USB Ethernet interface is enumerated as eth0 instead of eth1 from time to time due to different driver probe order. To get a persistent interface name accross reboots you may copy the file /opt/nvidia/jetson/services/networking/orin_nx/70-jetson-camif.link to /etc/systemd/network on your device. It sets usb interface name to cam0 as below. Edit it if you want to use a different name for your camera interface. Then use your customized name in /opt/nvidia/jetson-configs/jetson-camif.conf.

[Match]
Path=*-usb-*

[Link]
Name=cam0

If you are using a 3rd party platform built with Jetson Orin module, the system might have multiple Ethernet interfaces for cameras. Please consult with the platform vendor for the camera interface names. Nvidia suggests platform vendor to rename camera interfaces through udev like below so the interface names will be persistent accross reboots.

ACTION=="add", SUBSYSTEM=="net", KERNELS=="0005:03:00.0", NAME:="PoE0"
ACTION=="add", SUBSYSTEM=="net", KERNELS=="0005:04:00.0", NAME:="PoE1"
ACTION=="add", SUBSYSTEM=="net", KERNELS=="0005:05:00.0", NAME:="PoE2"

In that case the jetson-camif.conf will look like:

CAMERA_INTERFACES=("PoE0" "PoE1" "PoE2")

Use the command below to enable jetson-networking service:

sudo systemctl enable jetson-networking

You will need to reboot the device so that related Network Manager configurations can be applied properly.

A DHCP server is running on the camera interface to provide IP addresses to the camera devices. The address pool starts from 192.168.100.150. You may check the IP address assignment by command dhcp-lease-list --lease /run/jetson/networking/jetson-dhcp-server.leases as shown below:

ubuntu@tegra-ubuntu:~$ dhcp-lease-list --lease /run/jetson/networking//jetson-dhcp-server.leases
To get manufacturer names please download http://standards.ieee.org/regauth/oui/oui.txt to /usr/local/etc/oui.txt
Reading leases from /run/jetson/networking//jetson-dhcp-server.leases
MAC                IP              hostname       valid until         manufacturer
===============================================================================================
00:00:1b:04:e5:13  192.168.100.151 -NA-           2023-11-27 05:49:46 -NA-
68:6d:bc:7d:7d:c7  192.168.100.150 DEFAULT        2023-11-27 05:45:29 -NA-

Note

On Jetson AGX Orin and Orin Nx it’s expected to use USB Ethernet adapter as the camera interface.

Note

Please make sure the camera interface’s link is up before starting jetson-networking service, otherwsie the service might not able able to set up DHCP server.