The most basic network settings in the Ubuntu system

Source: Internet
Author: User
Keywords Network settings 8.15 this enable join
Tags .net aliyun basic basic network content dual network etc file

Http://www.aliyun.com/zixun/aggregation/13835.html ">ubuntu system under the network settings, including a variety of: Set dual network card, single card binding multiple IP, which we want to achieve is the most basic network settings.

sudo su

Gedit/etc/network/interfaces

File contents:

Auto Lo

Iface Lo inet Loopback

Auto Eth0 # #这个应该是决定是否启用这个端口

Iface eth0 inet Static # #静态设置IP

hwaddress ether 52:54:xx:51:xx:xx # #加入MAC地址, 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

# #通过dhcp动态设置

Iface eth1 inet DHCP

Setting the mapping relationship for MAC addresses

Gedit/etc/iftab

Join a line

Eth1 mac 52:54:xx:51:xx:xx

Setting up a DNS server

sudo vi/etc/resolv.conf

Content

NameServer 202.198.125.255

Reset the network to enable the 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.