1. set the IP address debian :~ # Vi/etc/network/interfaces // obtain dynamic DHCP # start the system to activate the device. # Loop address. autoloifaceloinetloopback # start the system to activate the device. # set eth0 to DHCP. autoeth0ifaceeth0inetdhcp -----------
1. ip address settings
Debian :~ # Vi/etc/network/interfaces
// Obtain dynamic DHCP
# Start the system to activate the device.
# Loop address.
Auto lo
Iface lo inet loopback
# Start the system to activate the device.
# Set eth0 to DHCP.
Auto eth0
Iface eth0 inet dhcp
------------------------------------
// Obtain the Static data
# Start the system to activate the device.
# Loop address.
Auto lo
Iface lo inet loopback
# Start the system to activate the device.
# Set eth0 to Static.
Auto eth0
Iface eth0 inet static
# Specify IP address. subnet mask. Broadcast. Gateway.
Address 192.168.1.10
Netmask 255.255.255.0
Gateway 192.168.1.1
2. DNS address settings
Debian :~ # Vi/etc/resolv. conf
// It must be set. otherwise, no URL can be accessed.
Nameserver x. x
Nameserver x. x
3. restart the network after the configuration is complete.
Debian :~ #/Etc/init. d/networking restart