[Note] Ubuntu network configuration (IP Mac gateway nameserver)

Source: Internet
Author: User
Tags nameserver

Dual-system startup

1,

# Configure the network interface IP address acquisition method, IP address, gateway, netmask, and broadcast.

File:/etc/Network/interfaces

Auto eth0

Iface eth0 Inet static # iface is the interface, static IP configuration, DHCP dynamic

Address 192.168.0.88

Gateway 192.168.0.1

Netmask 255.255.255.0

2,

# Configure domain name files

File:/etc/resolv. conf

 

# Manually configured

Nameserver 192.168.0.1

Nameserver 202.117.112.3

Nameserver 218.30.19.40

 

# Use NetworkManager to automatically configure

Nameserver 218.30.19.40

Nameserver 202.117.112.3

3. Restart the network

/Etc/init. d/networking restart

4. Command Configuration

Frequently used:

Dhclient eth0

Ifconfig eth0 HW ether **: ** # configure Mac

 

Ifconfig eth0 down

...

Ifconfig eth0 up

5,

Possible causes of access failure:

(1) ip address acquisition method

(2) IP configuration (whether the IP address is in the same CIDR block at static time)

(3) Whether the gateway is correct

(4) is DNS correct?

(5) Whether to restart the network

(6) restart the PC

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.