Linux-Network Configuration

Source: Internet
Author: User

Method 1. add IP Address: ifconfig eth0 192.168.1.3 netmask 255.255.255.02. add Default Gateway: Route add default GW 192.168.1.1 Dev eth0 prompt: delete default network management command is route del default GW 134.77.8.10 Dev eth0 second method: operate as root: 1. $ VI/etc/hosts127.0.0.1 localhost. localdomain localhost192.168.1.2 sipsir 2. $ VI/etc/sysconfig/network-scripts/ifcfg-eth0 device = eth0onboot = yesbootproto = staticipaddr = 192.168.1.2netmask = 255.255.255.0gateway = 192.168.1 . 13. CD/etc/rc. d/init. d $. /network restart4. run ifconfig eth0 192.168.1.2 again to solve the problem. The last number of netmask IP addresses allocated by DHCP is 255.255.255.0. the available range of ipaddr is 192.168.1.1 ~ 192.168.1254, where 192.168.1.0 is the network address and 192.168.1.255 is the broadcast address, which cannot be used.

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.