Ubuntu network settings, and configure the network bridge mode

Check whether the network connectivity

Use "ifconfig" command to view information about ip address

Use "ping www.baidu.com", to see if network connectivity

To NAT mode to configure the network:

Use the command " dhclient " after assigning addresses, use the command "ifconfig" to see ip address, use the ping command ping windows machine to test for connectivity.

Test whether the network connectivity

Bridge mode to configure the network:

View windows machine 1 ip outer configuration, consistent with the same network segment, subnet mask, and gateway in ubuntu windows and the windows in the ip ip configuration.

2 Use the "ifconfig -a" command to view the machines on the network interface name.

3 Use the command "vi / etc / network / interfaces" ubuntu open network configuration file, you can use "gedit / etc / network / interfaces" to open the configuration file.

The contents of FIG. 4 in the red frame to an appropriate value.

Use vi or gedit open the file "/etc/resolv.conf", add value "nameserver", the machine's DNS windows and consistent. (This file is a temporary modification, if you want to permanently modify, you need to modify the file "/etc/resolvconf/resolv.conf.d/base" file.

5 after the modification is completed, the network restart, or restart ubuntu.

Restart the network: "/ etc / init.d / networking restart"

Restart ubuntu: "init 1"

 

Use LAN users can also modify the ip address directly in the interface:

 Click Edit Connection Network

Click to increase

Select the connection type

Choose to automatically obtain ip or manually, then you need to change the ip increase

If wrong, please point out.

Guess you like

Origin blog.csdn.net/M82_A1/article/details/91049582