[LXLE] Adresse internet ipv4 statique avec Netplan.
Distribution de travail : LXLE 18.04
1/ Vérification.
util01@server:~$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether de:ad:be:ef:81:95 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.19/24 brd 192.168.1.255 scope global dynamic noprefixroute ens3
valid_lft 86069sec preferred_lft 86069sec
inet6 fe80::1275:b470:667e:b13a/64 scope link noprefixroute
valid_lft forever preferred_lft forever
2/ Configuration de Netplan.
Ouvrir :
/etc/netplan/01-netcfg.yaml
Ajouter :
network:
version: 2
renderer: networkd
ethernets:
ens3:
dhcp4: no
addresses:
- 192.168.1.200/24
gateway4: 192.168.1.1
nameservers:
addresses: [8.8.8.8, 1.1.1.1]
3/ Appliquer les modifications.
util01@server:~$ sudo netplan apply
4/ Vérification.
util01@server:~$ ip addr show dev ens3
2: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether de:ad:be:ef:81:95 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.200/24 brd 192.168.1.255 scope global ens3
valid_lft forever preferred_lft forever
inet6 fe80::1275:b470:667e:b13a/64 scope link noprefixroute
valid_lft forever preferred_lft forever
util01@server:~$
5/ Lien.
https://linuxize.com/post/how-to-configure-static-ip-address-on-ubuntu-18-04/
Comments are closed, but trackbacks and pingbacks are open.