Linux Internet Settings

Source: Internet
Author: User
Tags nameserver

ifconfig command to view network settings

Step 1, configure the files in the/etc/sysconfig/network-scripts/ifcfg-eth0. Some (IFCFG-ENS33) files

Configuration details for the Ifcfg-eth0 under CentOS:

[Email protected] ~]# Vim/etc/sysconfig/network-scripts/ifcfg-eth0
Device= "Eth0"
Hwaddr= "00:0C:29:FD:FF:2A"
Nm_controlled= "Yes"
onboot= "Yes"
ipaddr=192.168.1.31
netmask=255.255.255.0
gateway=192.168.1.1
Bootproto=static

The previous three lines are the system Jairus, followed by manual additions.
So set the buckle, remember to restart the network card:
[[email protected] ~]#/etc/init.d/network stop
[[email protected] ~]#/etc/init.d/network start

OK, now you can ping through the gateway, if you have to surf the internet, do not have to set up DNS. Setting up DNS is described in step 2

Step 2, modify DNS
[Email protected] ~]# vi/etc/resolv.conf
Add two DNS to the inside:
NameServer 202.96.134.133
NameServer 8.8.8.8

OK, big attack Gaocheng, can surf the internet!!!

Linux Internet Settings

Related Article

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.