Linux Internet Configuration

Source: Internet
Author: User
Tags ip number nameserver

In the terminal enter "Ifconfig eth0 IP netmask Mask" carriage return,
Then type "route add default GW gateway number".

For example, the IP number is 192.168.11.39, the gateway number is 192.168.11.254 friend should enter is: "Ifconfig eth0 192.168.11.39 netmask" carriage return,
Then enter "route add default GW 192.168.11.254".

In the input of these two words, the previous sentence is to the computer with IP and mask, the last sentence is a gateway.

Edit Startup Configuration Document: Add the following information to the/etc/sysconfig/network-scripts/ifcfg-eth0 document:
Device=eth0
Xonboot=yes
Bootproto=static
ipaddr=192.168.11.39
netmask=255.255.255.0
gateway=192.168.11.254


Configuration of DNS

In the terminal: vim/etc/resolv.conf

Add the following two words "NameServer 202.96.134.133", "NameServer 202.96.128.68".

Open the/etc/rc.d/rc.local file and modify the corresponding parameters.

Ifconfig eth0 up

/etc/init.d/network restart

Service Network restart

Note Ifcfg-eth0,resolv.conf,rc.local the owner of three files and whether it is an executable file.

System-config-network



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.