Debian: Set Static IP: Difference between revisions
From wiki.jacobjohns.com
jwiki>jjohns Created page with "center|frameless #Backup the interfaces file to desired backup location. #*<code>cp /etc/network/interfaces /usr/bu</code> #Edit the original file to the below setting desired static IP #*<code> # This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). source /etc/network/interfaces.d/* # The loopback network interface auto lo iface lo..." |
jwiki>jjohns No edit summary |
||
| Line 4: | Line 4: | ||
#*<code>cp /etc/network/interfaces /usr/bu</code> | #*<code>cp /etc/network/interfaces /usr/bu</code> | ||
#Edit the original file to the below setting desired static IP | #Edit the original file to the below setting desired static IP | ||
# This file describes the network interfaces available on your system | # This file describes the network interfaces available on your system | ||
# and how to activate them. For more information, see interfaces(5). | # and how to activate them. For more information, see interfaces(5). | ||
| Line 14: | Line 13: | ||
iface lo inet loopback | iface lo inet loopback | ||
#The primary network interface | # The primary network interface | ||
#allow-hotplug ens192 | # allow-hotplug ens192 | ||
#iface ens192 inet dhcp | # iface ens192 inet dhcp | ||
auto ens192 | auto ens192 | ||
| Line 24: | Line 23: | ||
gateway 192.168.11.1 | gateway 192.168.11.1 | ||
dns-nameservers 192.168.11.201 192.168.11.253 | dns-nameservers 192.168.11.201 192.168.11.253 | ||
Revision as of 01:32, 10 June 2023
- Backup the interfaces file to desired backup location.
cp /etc/network/interfaces /usr/bu
- Edit the original file to the below setting desired static IP
# This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). source /etc/network/interfaces.d/* # The loopback network interface auto lo iface lo inet loopback # The primary network interface # allow-hotplug ens192 # iface ens192 inet dhcp auto ens192 iface ens192 inet static address 192.168.11.248 netmask 255.255.255.0 gateway 192.168.11.1 dns-nameservers 192.168.11.201 192.168.11.253
