Linux Configuration IP

Source: Internet
Author: User

Oracle Linux R5

configuration: IP, subnet mask

Vi/etc/sysconfig/network-scripts/ifcfg-eth0

Device=eth0//NIC Interface nameBootproto=none//(none | static (Specify address manually) | DHCP (dynamic acquisition) | BOOTP)Onboot=yes//Whether the system is loaded at startupHwaddr=00:0c:29:5e:90:12//Network card Physical AddressType=ethernet//network card typeUserctl=no//Whether to allow normal users to enable and disable network devicesIpv6init=no Peerdns=yes//If you use DHCP to get the address, the server assigns an IP address, whether to modify the default point of Server DNS (the default is YES)netmask=255.255.255.0//Subnet maskipaddr=192.168.1.118//IP Addressgateway=192.168.1.1//gateway address (routed IP address) Save and exit/sbin/service Network restart//restart networking to make the configured IP address effective
Configuration: Gatewayvi/etc/sysconfig/networkNetworking=yesnetworking_ipv6=no Hostname=huayan_linux//Host namegateway=192.168.1.1//Gateway Configuration: DNSvi/etc/resolv.conf nameserver 192.168.1.1nameserver 192.168.0.1search local domain Immediate effect ConfigurationModify Ip:ifconfig eth0 192.168.0.20 netmask 255.255.255.0
To Modify the gateway:Route add default GW 192.168.0.254Modify hostname:Hostname Webcenter

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.