Configure Ethernet Connection Manually on Linux for USRP Radio
After running the Hardware Setup steps of the installer, if the radio is still not detected, you can attempt to configure the network interface manually by running commands in a terminal window.
Configure Ethernet Connection Via Linux Command Prompt
To configure the network interface card (NIC) for your USRP™ radio via the Linux® command prompt, use these instructions.
Set the correct host computer network interface IP address. USRP radios have a factory default IP address of 192.168.10.2. Leave the subnet mask set to its default (
255.255.255.0
).If the USRP radio IP address is the default value of 192.168.10.2, run this shell command to set these values.
%sudo ifconfig ethX 192.168.10.Y netmask 255.255.255.0
eth
is the name of the host computer Ethernet port (usuallyX
eth0
,eth1
, etc.), andY
is any integer from 0 through 255 excluding 2. You might be required to enter a password to use thesudo
command.If your radio is on another subnet, meaning the first three octets of the IP address field are not 192.168.30, then enter the IP address values of your radio for the first three octets. See Check Subnet Values on Host and Radio.
This example shows this workflow in detail. Use these commands to determine the IP address of the radio. After determining the IP address for the radio, update the network interface IP address, and ping the radio to verify that the host-to-radio connection is working.
Run the
ipconfig
command to view the list of network interfaces. On Linux, some of the network interfaces shown byifconfig
might correspond to virtual network interfaces for virtual machines.$ ifconfig
docker0 Link encap:Ethernet HWaddr 02:42:0a:d0:14:e4 inet addr:192.168.0.10 Bcast:0.0.0.0 Mask:255.255.255.0 UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) eth0 Link encap:Ethernet HWaddr 6c:0b:84:65:8b:ab inet addr:172.21.152.206 Bcast:172.21.152.255 Mask:255.255.255.0 inet6 addr: fe80::6e0b:84ff:fe65:8bab/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:285108152 errors:0 dropped:0 overruns:0 frame:0 TX packets:153065910 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:240450151147 (223.9 GiB) TX bytes:44073818567 (41.0 GiB) Interrupt:20 Memory:fb100000-fb120000 eth1 Link encap:Ethernet HWaddr 8c:ae:4c:f4:f4:e5 UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:6091 errors:0 dropped:0 overruns:0 frame:0 TX packets:9345 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:459870 (449.0 KiB) TX bytes:1285142 (1.2 MiB) 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:6431593 errors:0 dropped:0 overruns:0 frame:0 TX packets:6431593 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1 RX bytes:8072498091 (7.5 GiB) TX bytes:8072498091 (7.5 GiB) vmnet1 Link encap:Ethernet HWaddr 00:50:56:c0:00:01 inet addr:172.16.37.1 Bcast:172.16.37.255 Mask:255.255.255.0 inet6 addr: fe80::250:56ff:fec0:1/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:24326 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) vmnet8 Link encap:Ethernet HWaddr 00:50:56:c0:00:08 inet addr:192.168.138.1 Bcast:192.168.138.255 Mask:255.255.255.0 inet6 addr: fe80::250:56ff:fec0:8/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:24326 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
In most Linux distributions, you can find the physical Ethernet interfaces by checking the presence of symbolic links. For example, run
ls -l
to view the symbolic links assigned to/sys/class/net/*/device/driver
.$ ls -l /sys/class/net/*/device/driver
lrwxrwxrwx 1 root root 0 Apr 23 16:41 /sys/class/net/eth0/device/driver -> ../../../bus/pci/drivers/e1000e/ lrwxrwxrwx 1 root root 0 Apr 24 14:31 /sys/class/net/eth1/device/driver -> ../../../../../../../bus/usb/drivers/ax88179_178a/
Run
modinfo
to get more information about the device driverse1000e
andax88179_178a
.$ modinfo -d e1000e
Intel(R) PRO/1000 Network Driver
$ modinfo -d ax88179_178a
ASIX AX88179/178A based USB 3.0/2.0 Gigabit Ethernet Devices
In this case,
eth0
andeth1
are real physical Ethernet interfaces. Ping these Ethernet interfaces using the broadcast address 255.255.255.255 to discover which interface the radio is attached to and to get the IP address of the radio.$ ping -I eth1 -c 5 -b 255.255.255.255
WARNING: pinging broadcast address ping: Warning: source address might be selected on device other than eth1. PING 255.255.255.255 (255.255.255.255) from 172.21.152.206 eth1: 56(84) bytes of data. 64 bytes from 192.168.30.7: icmp_seq=1 ttl=32 time=1.15 ms 64 bytes from 192.168.30.7: icmp_seq=2 ttl=32 time=1.22 ms 64 bytes from 192.168.30.7: icmp_seq=3 ttl=32 time=1.16 ms 64 bytes from 192.168.30.7: icmp_seq=4 ttl=32 time=1.15 ms 64 bytes from 192.168.30.7: icmp_seq=5 ttl=32 time=1.20 ms --- 255.255.255.255 ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 4004ms rtt min/avg/max/mdev = 1.154/1.181/1.227/0.028 ms
In Ubuntu and some other Linux systems, you might need to assign a static IP address and a subnet mask to a network interface before you can discover the IP address of the radio. Use the
sudo
command to assign a static IP address.View the network settings before and after running the
sudo
command.$ ifconfig eth1
eth1 Link encap:Ethernet HWaddr 8c:ae:4c:f4:f4:e5 UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:6091 errors:0 dropped:0 overruns:0 frame:0 TX packets:9345 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:459870 (449.0 KiB) TX bytes:1285142 (1.2 MiB)
Note
X3xx radios and N3xx radios provide 10GigE interface to communicate with the host computer. To use the 10GigE interface for these radios, set the MTU size to 9000 bytes by using this command.
$ sudo ifconfig eth1 mtu 9000
$ sudo ifconfig eth1 192.168.10.1 netmask 255.255.0.0
$ ifconfig eth1
eth1 Link encap:Ethernet HWaddr 8c:ae:4c:f4:f4:e5 inet addr:192.168.20.1 Bcast:192.168.255.255 Mask:255.255.0.0 inet6 addr: fe80::8eae:4cff:fef4:f4e5/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:10129 errors:0 dropped:0 overruns:0 frame:0 TX packets:13724 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:763398 (745.5 KiB) TX bytes:1733921 (1.6 MiB)
Ping
eth1
at the broadcast address 192.168.255.255 to discover the IP address of the radio.$ ping -I eth1 -c 5 -b 192.168.255.255
WARNING: pinging broadcast address PING 192.168.255.255 (192.168.255.255) from 192.168.10.1 eth1: 56(84) bytes of data. 64 bytes from 192.168.30.7: icmp_seq=1 ttl=32 time=1.18 ms 64 bytes from 192.168.30.7: icmp_seq=2 ttl=32 time=1.17 ms 64 bytes from 192.168.30.7: icmp_seq=3 ttl=32 time=1.17 ms 64 bytes from 192.168.30.7: icmp_seq=4 ttl=32 time=1.22 ms 64 bytes from 192.168.30.7: icmp_seq=5 ttl=32 time=1.15 ms --- 192.168.255.255 ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 4005ms rtt min/avg/max/mdev = 1.155/1.181/1.224/0.031 ms
If the static IP address of the network interface is the same as the IP address of the radio, ping does not reveal the IP address of the radio. Assign a different static IP address to the network interface, and then try the broadcast ping again.
For this example the radio and network interface both are assigned the IP address 192.168.10.1. Send a broadcast ping from
eth1
.$ ping -I eth1 -c 5 -b 192.168.255.255
WARNING: pinging broadcast address PING 192.168.255.255 (192.168.255.255) from 192.168.10.1 eth1: 56(84) bytes of data. --- 192.168.255.255 ping statistics --- 5 packets transmitted, 0 received, 100% packet loss, time 4031ms
Use the
sudo
command to update the IP address of the network interface to 192.168.20.1 with subnet mask 255.255.0.0, and then try the broadcast ping again.$ sudo ifconfig eth1 192.168.20.1 netmask 255.255.0.0 $ ifconfig eth1
eth1 Link encap:Ethernet HWaddr 8c:ae:4c:f4:f4:e5 inet addr:192.168.20.1 Bcast:192.168.255.255 Mask:255.255.0.0 inet6 addr: fe80::8eae:4cff:fef4:f4e5/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:10129 errors:0 dropped:0 overruns:0 frame:0 TX packets:13724 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:763398 (745.5 KiB) TX bytes:1733921 (1.6 MiB)
$ ping -I eth1 -c 5 -b 192.168.255.255
WARNING: pinging broadcast address PING 192.168.255.255 (192.168.255.255) from 192.168.20.1 eth1: 56(84) bytes of data. 64 bytes from 192.168.10.1: icmp_seq=1 ttl=32 time=1.18 ms 64 bytes from 192.168.10.1: icmp_seq=2 ttl=32 time=1.19 ms 64 bytes from 192.168.10.1: icmp_seq=3 ttl=32 time=1.17 ms 64 bytes from 192.168.10.1: icmp_seq=4 ttl=32 time=1.27 ms 64 bytes from 192.168.10.1: icmp_seq=5 ttl=32 time=1.16 ms --- 192.168.255.255 ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 4005ms rtt min/avg/max/mdev = 1.164/1.197/1.272/0.058 ms
Choose a static IP address in the same subnet of your radio (192.168.30.1 in this example), and use a subnet mask 255.255.255.0. Use the
sudo
command to update the network interface IP address, use theipconfig
command to check the configuration, and ping the radio at 192.168.30.7 to verify the host-to-radio connection. In this example the ping was successful.$ sudo ifconfig eth1 192.168.30.1 netmask 255.255.255.0 $ ifconfig eth1
eth1 Link encap:Ethernet HWaddr 8c:ae:4c:f4:f4:e5 inet addr:192.168.30.1 Bcast:192.168.30.255 Mask:255.255.255.0 inet6 addr: fe80::8eae:4cff:fef4:f4e5/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:6123 errors:0 dropped:0 overruns:0 frame:0 TX packets:9463 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:462584 (451.7 KiB) TX bytes:1303558 (1.2 MiB)
ping -c 5 192.168.30.7
PING 192.168.30.7 (192.168.30.7) 56(84) bytes of data. 64 bytes from 192.168.30.7: icmp_seq=1 ttl=32 time=1.11 ms 64 bytes from 192.168.30.7: icmp_seq=2 ttl=32 time=1.25 ms 64 bytes from 192.168.30.7: icmp_seq=3 ttl=32 time=1.20 ms 64 bytes from 192.168.30.7: icmp_seq=4 ttl=32 time=1.19 ms 64 bytes from 192.168.30.7: icmp_seq=5 ttl=32 time=1.15 ms --- 192.168.30.7 ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 4004ms rtt min/avg/max/mdev = 1.119/1.183/1.251/0.063 ms
Run these shell commands to configure the network connection, and then check that the changes took effect.
%sudo ifconfig eth X 192.168.Y.Z ifconfig ethX
For 192.168.
Y
.Z
use the actual IP address to be assigned to the host computer, and foreth
use the name of the host Ethernet port (usuallyX
eth0
,eth1
, etc.).On Linux systems, unless you make network connection changes persistent, a system reboot resets network connection changes, and the host-to-radio connection is lost. To retain the host-to-radio connection after a computer reboot, see Make Changes Persistent on Linux.
The host computer configuration is complete. Continue to Verify USRP Hardware Connection.