Ubuntu intranet and extranet network IP address configuration

First switch to root user: sudo su 

Modify the network configuration file: vi /etc/network/interfaces

--- Configure an ip static ip address as follows:
auto lo
iface lo inet loopback
auto eth0
iface eth inet static
address 192.168.1.11
netmask 255.255.255.0
gateway 192.168.1.1

If eth0 is to obtain IP automatically, then the configuration is as follows

auto lo
iface lo inet loopback

auto eth0 iface eth0 inet
dhcp
--- configure two networks _ _








Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325131469&siteId=291194637