The most basic network setting method for NICs in Ubuntu

Source: Internet
Author: User
This article mainly introduces network settings in Ubuntu, including setting dual NICs and binding multiple IP addresses to a single NIC. here we want to implement the most basic network settings, for more information, see Ubuntu.

Network settings in the Ubuntu system, including setting dual NICs and binding multiple IP addresses to a single NIC. what we need to achieve here is the most basic network settings.

Sudo su

Gedit/etc/network/interfaces

File content:

Auto lo

Iface lo inet loopback

Auto eth0 # This should determine whether to enable this port

Iface eth0 inet static # static IP address setting

Hwaddress ether 52: 54: xx: 51: xx # add the MAC address. remember to put it before the IP address.

Address 202.198.151.17

Netmask 255.255.255.0

# Broadcast 202.198.151.255

Gateway 202.198.151.254

# Dynamic settings through dhcp

Iface eth1 inet dhcp

Set MAC address ing

Gedit/etc/iftab

Add a row

Eth1 mac 52: 54: xx: 51: xx

Set DNS server

Sudo vi/etc/resolv. conf

Content

Nameserver 202.198.125.255

Reset the network to enable new settings

Sudo/etc/init. d/networking restart

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.