In Debian, the IP address configuration parameters are in the interface under the/etc/Network/directory, while the DNS configuration parameters are in the resolv. in Conf, the following describes the configuration parameters:
======================================
IP Address Settings:/etc/Network/interface
// Obtain Dynamic DHCP
# Start the system activation device
# Loop address
Auto Lo
Iface lo Inet loopback
# Start the system activation device
# Set eth0 to DHCP
Auto eth0
Iface eth0 Inet DHCP
// Obtain the static data
# Start the system activation device
# Loop address
Auto Lo
Iface lo Inet loopback
# Start the system activation device
# Set the network adapter eth0 to the static type
Auto eth0
Iface eth0 Inet static
# Specifying IP addresses, subnet masks, and gateways
Address 192.168.0.1
Netmask 255.255.255.0
Gateway 192.168.0.1
Note: When configuring IP address parameters, "// dynamic DHCP get" and "// static get" can only be one of them. The two cannot exist at the same time. Remember !!!
======================================
DNS Server Settings:/etc/resolv. conf
# It must be set. Otherwise, no URL can be accessed.
Nameserver 202.103.0.117
Nameserver 211.95.193.97
======================================
Restart Nic
/Etc/init. d/networking restart
Ifdown eth0
IFUP eth0