Open main menu

Wiki-Orange Pi β

Changes

Orange Pi Zero 3

413 bytes added, 09:52, 11 July 2023
Use the nmtui command to set a static IP address
<ol style="list-style-type: decimal;">
<li><p>First run the '''nmtui''' command</p>
{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''sudo nmtui'''</p>|}</li>
<li><p>Then select '''Edit a connection''' and press Enter</p>
<p>[[File:media/image125.png|227x247px]]</p></li>
<li><p>The display after selection is shown in the figure below</p>
<p>[[File:media/image130.png|575x240px]]</p></li>
<li><p>8) Then move the cursor to '''&lt;Show&gt;''' via the Tab key</p>
<p>[[File:media/image131.png|576x241px]]</p></li>
<li><p>Then press Enter, the following setting interface will pop up after entering</p>
<p>[[File:media/image132.png|575x450px]]</p></li>
<li><p>Then you can set the IP address (Addresses), gateway (Gateway) and DNS server address in the position shown in the figure below (there are many other setting options in it, please explore by yourself), '''<span style="color:#FF0000">please set according to your specific needs, The values set in the image below are just an example</span>'''</p>
<p>[[File:media/image133.png|576x233px]]</p></li>
<li><p>After setting, move the cursor to '''&lt;OK&gt;''' in the lower right corner, and press Enter to confirm</p>
<p>[[File:media/image139.png|300x253px]] [[File:media/image140.png|227x252px]]</p></li>
<li><p>Then through '''ip a s eth0''', you can see that the IP address of the network port has changed to the static IP address set earlier</p>
{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big><p>'''Note that in the following commands, Debian12 needs to change eth0 to end0.'''</p></big>|}{| class="wikitable" style="width:800px;" |-|
<p>orangepi@orangepi:~$ '''ip a s eth0'''</p>
<p>3: eth0: &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; mtu 1500 qdisc pfifo_fast state UP group default qlen 1000</p>
:<p>link/ether 5e:ac:14:a5:92:b3 brd ff:ff:ff:ff:ff:ff</p>:<p>inet '''<span style="color:#FF0000">192.168.1.177</span>'''/24 brd 192.168.1.255 scope global noprefixroute eth0</p>::<p>valid_lft forever preferred_lft forever</p>:<p>inet6 241e:3b8:3240:c3a0:e269:8305:dc08:135e/64 scope global dynamic noprefixroute</p>::<p>valid_lft 259149sec preferred_lft 172749sec</p>:<p>inet6 fe80::957d:bbbe:4928:3604/64 scope link noprefixroute</p>::<p>valid_lft forever preferred_lft forever</p>|}</li>
<li><p>Then you can test the connectivity of the network to check whether the IP address is configured OK, and the '''ping''' command can be interrupted through the shortcut key '''Ctrl+C'''</p>
{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big><p>'''Note that in the following commands, Debian12 needs to change eth0 to end0.'''</p></big>|}{| class="wikitable" style="width:800px;" |-|
<p>orangepi@orangepi:~$ '''ping 192.168.1.177 -I eth0'''</p>
<p>PING 192.168.1.47 (192.168.1.47) from 192.168.1.188 eth0: 56(84) bytes of data.</p>
<p>--- 192.168.1.47 ping statistics ---</p>
<p>5 packets transmitted, 5 received, 0% packet loss, time 4042ms</p>
<p>rtt min/avg/max/mdev = 0.233/0.262/0.275/0.015 ms</p>|}</li></ol>
<span id="use-the-nmcli-command-to-set-a-static-ip-address"></span>
 
==== Use the nmcli command to set a static IP address ====