Set static IP addresses in Fedora or RedHatLinux

Source: Internet
Author: User
Sometimes we may need to build a server in the LAN and install Fedora or RedHatLinux, but the default DHCP is used to accept the IP allocated by the router. we need to change it. take Fedora12 as an example: edit/etc/sysconfig/network-scripts/ifcfg-eth0, the content is as follows (the Blue Word is added on the original file): # SiliconIntegratedSystems [SiS] SiS900

Sometimes we may need to build a server in the LAN and install Fedora or RedHat Linux, but the default IP address is DHCP, which accepts the IP address assigned by the router. We need to change it.

Take Fedora 12 as an example: edit/etc/sysconfig/network-scripts/ifcfg-eth0, the content is as follows (the Blue Word is added on the original file ):

# Silicon Integrated Systems [SiS] SiS900 PCI Fast Ethernet
DEVICE = eth0
HWADDR = 00: 1C: C0: 40: F4: 72
ONBOOT = yes
BOOTPROTO = static
NETMASK = 255.255.255.0
IPADDR = 192.168.0.200
DNS1 = 192.168.0.1
DNS2 = 202.102.134.68
GATEWAY = 192.168.0.1

Here, ONBOOT = yes, I guess it may mean that it runs automatically at startup.
BOOTPROTO = static indicates static IP Address Allocation, instead of DHCP or other
The others below are very clear. As long as you know the general network knowledge, it should be possible. Here we set the local IP address to 192.168.0.200
Okay, set it, and reboot.

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.