Ubuntu Desktop14.04, in window7 of vmware14 virtual machine
cat /etc/network/interfaces
The default has lo: System given network loopback interface
eth0 configuration (Ubuntu Desktop14.04)
1. cd /etc/network
vim interfaces
2. Type the following command:
auto eth0
iface eth0 inet static
address 192.168.1.1
netmask 255.255.255.0
network 192.168.1.0
gateway 192.168.1.254
broadcast 192.168.1.255
3. Add another piece of card eth1
auto eth1
iface eth1 inet static
address 192.168.1.10
netmask 255.255.255.0
network 192.168.1.0
gateway 192.168.1.254
broadcast 192.168.1.255
: Wq Save and exit
4. Restart network services:
sudo /etc/init.d/networking restart
The so eth1 force, activate eth1
ifup eth1
6. Turn on access within the network:
sudo ufw allow from 192.168.1.250/24
Description: 192.168.1.250 to another ubuntu server IP addresses of 16.04
7. ubuntu server 16.04 switched to the virtual machine, enter the command:
sudo ufw allow from 192.168.1.10/24
Description: 192.168.1.10 network card on ubuntu desktop just add the IP address of eth1
8. The two virtual machines are restarted
9. ubuntu desktop ubuntu server from the client server ping
ping 192.168.1.10 communication
ubuntu server from ubuntu desktop client ping server
ping 192.168.1.250. communicates
10. The modified ubuntu desktop client IP address of eth0:
ifconfig eth0 192.168.1.100 netmask 255.255.255.0
Look at what is being modified
ifconfig -a
11. After the IP address changes to take effect:
ifconfig eth0 up
You can still ping ping each other