[RK356x] [Firefly-Ubuntu] 10min教你在Ubuntu系统配置静态IP
Posted Neutionwei
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了[RK356x] [Firefly-Ubuntu] 10min教你在Ubuntu系统配置静态IP相关的知识,希望对你有一定的参考价值。
一、01-network-manager-all.yaml文件
$ cd /etc/netplan/
没有netplan
目录就创建:
$ sudo mkdir /etc/netplan
修改01-network-manager-all.yaml
:
$ sudo vim 01-network-manager-all.yaml
内容修改如下:
#Let NetworkManager manage all devices on this system
network:
version: 2
# renderer: NetworkManager
ethernets:
eth0:
addresses: [168.168.100.111/16]
gateway4: 168.168.0.1
dhcp4: no
dhcp6: no
nameservers:
addresses: [127.0.0.53, 114.114.114.114, 114.114.115.115, 8.8.8.8, 8.8.4.4]
eth0
为网络设备接口名称(请按照实际设置)addressed
为需要配置的ip地址信息,后面的16
为子网掩码,代表255.255.0.0
,需要用命令ifconfig -a
查看自己的网络信息进行配置gateway4
为ip4
网关,不清楚网关可执行命令route -n
进行查看nameservers
下addresses
为DNS
地址,国内一般选择114.114.114.114
或者114.114.115.115
二、resolved.conf文件
$ cd /etc/systemd/
修改resolved.conf
:
$ sudo vim resolved.conf
内容修改如下:
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
#
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# Defaults can be restored by simply deleting this file.
#
# See resolved.conf(5) for details
[Resolve]
DNS=127.0.0.53 114.114.114.114 114.114.115.115 8.8.8.8 8.8.4.4
#FallbackDNS=
#Domains=
#LLMNR=no
#MulticastDNS=no
#DNSSEC=no
#Cache=yes
#DNSStubListener=yes
以上是关于[RK356x] [Firefly-Ubuntu] 10min教你在Ubuntu系统配置静态IP的主要内容,如果未能解决你的问题,请参考以下文章
[RK3399] [Firefly-Ubuntu] 1min教你搭建NFS服务实现共享目录
[RK3399] [Firefly-Ubuntu] 1min教你搭建远程桌面
[RK3399] [Firefly-Ubuntu] 1min教你搭建Samba共享服务器