Glam Prestige Journal

Bright entertainment trends with youth appeal.

I try to set a static IP address (192.168.2.1)

here the output of ifconfig

enp3s0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 ether c8:1f:66:06:94:a1 txqueuelen 1000 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host> loop txqueuelen 1000 (Local Loopback) RX packets 36920 bytes 133557122 (133.5 MB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 36920 bytes 133557122 (133.5 MB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlx4c0fc7f11daf: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.1.8 netmask 255.255.255.0 broadcast 192.168.1.255 inet6 fe80::8955:c94:4868:c112 prefixlen 64 scopeid 0x20<link> ether 4c:0f:c7:f1:1d:af txqueuelen 1000 (Ethernet) RX packets 21101 bytes 26754759 (26.7 MB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 11273 bytes 1150027 (1.1 MB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

I use the wifi dongle to connect :

wlx4c0fc7f11daf: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.1.8 netmask 255.255.255.0 broadcast 192.168.1.255 inet6 fe80::8955:c94:4868:c112 prefixlen 64 scopeid 0x20<link> ether 4c:0f:c7:f1:1d:af txqueuelen 1000 (Ethernet) RX packets 21101 bytes 26754759 (26.7 MB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 11273 bytes 1150027 (1.1 MB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

My question is : what should I add to ´etc/network/interfaces ´ ?

The actual content is :

# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
1

1 Answer

Append the following to /etc/network/interfaces to assign a static address to enp3s0 device:

auto enp3s0
iface enp3s0 inet static address 192.168.2.1 netmask 255.255.255.0 network 192.168.2.0 broadcast 192.168.2.255 gateway <your-router-ip-address-goes-here> dns-nameservers 1.1.1.1 8.8.8.8
2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy