Difference between revisions of "RockpiS/network-management"
< RockpiS
(→Part 1: Set Ethernet static IP Address) |
|||
Line 13: | Line 13: | ||
root@rockpis:~# apt-get install netplan.io | root@rockpis:~# apt-get install netplan.io | ||
− | Create file, /etc/netplan/01- | + | Create file, /etc/netplan/01-ethernet.yaml. If there is no /etc/netplan folder, create it. |
− | root@rockpis:~# touch /etc/netplan/01- | + | root@rockpis:~# touch /etc/netplan/01-ethernet.yaml |
Add the following contents to the file, /etc/netplan/01-netcfg.yaml and save it. | Add the following contents to the file, /etc/netplan/01-netcfg.yaml and save it. | ||
− | + | <pre> | |
− | + | root@rockpis:~# cat /etc/netplan/01-ethernet.yaml | |
− | + | network: | |
− | + | version: 2 | |
− | + | renderer: networkd | |
− | + | ethernets: | |
− | + | eth0: | |
− | + | addresses: | |
− | + | - 192.168.1.200/24 | |
− | + | gateway4: 192.168.1.1 | |
− | + | nameservers: | |
− | + | addresses: | |
+ | - "192.168.1.1" | ||
+ | - "8.8.8.8" | ||
+ | </pre> | ||
Run the commands below to apply your changes. | Run the commands below to apply your changes. | ||
Line 45: | Line 48: | ||
root@rockpis:~# ip addr show dev eth0 | root@rockpis:~# ip addr show dev eth0 | ||
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN group default qlen 1000 | 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN group default qlen 1000 | ||
− | link/ether | + | link/ether c2:68:e0:7c:9b:09 brd ff:ff:ff:ff:ff:ff |
− | inet 192.168.1. | + | inet 192.168.1.200/24 brd 192.168.1.255 scope global eth0 |
valid_lft forever preferred_lft forever | valid_lft forever preferred_lft forever | ||
− | inet6 fe80:: | + | inet6 fe80::c068:e0ff:fe7c:9b09/64 scope link |
valid_lft forever preferred_lft forever | valid_lft forever preferred_lft forever | ||
</pre> | </pre> |
Revision as of 06:27, 12 August 2020
ROCK Pi S > Network Management
This guide describes how to manage the network on ROCK Pi S running Ubuntu system.
Part 1: Set Ethernet static IP Address
Install some dependency packages
root@rockpis:~# apt-get install netplan.io
Create file, /etc/netplan/01-ethernet.yaml. If there is no /etc/netplan folder, create it.
root@rockpis:~# touch /etc/netplan/01-ethernet.yaml
Add the following contents to the file, /etc/netplan/01-netcfg.yaml and save it.
root@rockpis:~# cat /etc/netplan/01-ethernet.yaml network: version: 2 renderer: networkd ethernets: eth0: addresses: - 192.168.1.200/24 gateway4: 192.168.1.1 nameservers: addresses: - "192.168.1.1" - "8.8.8.8"
Run the commands below to apply your changes.
root@rockpis:~# netplan apply
To validate that your changes are apply, run the commands below to view the IP address configuration detals.
root@rockpis:~# ip addr show dev eth0
It should display similar lines like the one below:
root@rockpis:~# ip addr show dev eth0 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN group default qlen 1000 link/ether c2:68:e0:7c:9b:09 brd ff:ff:ff:ff:ff:ff inet 192.168.1.200/24 brd 192.168.1.255 scope global eth0 valid_lft forever preferred_lft forever inet6 fe80::c068:e0ff:fe7c:9b09/64 scope link valid_lft forever preferred_lft forever
Troubleshooting
- Refer Troubleshooting page
- Post your issue on the forum: https://forum.radxa.com/c/rockpiS