Ubuntu Server Configuration Network

Source: Internet
Author: User

------------------

Ubuntu 14.04 x86_64

-----------------

Set static IP:
Vi/etc/network/interfaces.

And then edit

Auto Lo
Iface Lo inet Loopback

# The Primary network interface
Auto Em1 # #第一块网卡的名称, can be found by ifconfig command
Iface em1 inet Static # # is set to still IP
Address 192.xx.yy.zz #你的IP地址

netmask 255.255.255.0 # #子网掩码
Network 192.xx.yy.0 # # #
Broadcast 192.XX.YY.255 # Broadcast
Gateway 192.xx.yy.254 # # Default Gateways

# Dns-* Options is implemented by the RESOLVCONF package, if installed
Dns-nameservers 8.8.8.8 # #域名解析服务器地址

After editing in the format above, you can save the exit.

For example:

sudo/etc/init.d/networking restart

After this sentence is executed, it is best to check whether the execution succeeded: Echo $?

If the output value is not 0, the execution fails. Try using the following method:

To shut down the network:

Ifdown < nic name >

Open Network:

Ifup < nic name >

Not really. Restart the system:

sudo reboot–h now


Ubuntu Server Configuration Network

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.