Skip to main content

Set the static IP for fedora or redhat


I believe friends who have used Linux Fedora/redhat know that it is easy to set a fixed network in the GUI, but they don't know how to modify it in the text mode. 
Setting a static IP for the Fedora system has the advantage of not using DHCP to assign an IP. 
It is easier to find the computer you want, especially in a large network. It is most convenient to set a static IP for the computer. 
The static IP network address is the most suitable setting for SERVER.
The method as below:
1. open terminal,and input su - switch to root privileges

2. input ifconfigCheck which port is currently being used(port), and remember the HWaddr address for next step: 


3. Modify with this command
vi /etc/sysconfig/network-scripts/ifcfg-eth0

4. mainly modify the content as below:
DEVICE = eth2  <-- STEP2 mentioned PORT NUMBER
HWADDR = 00:0C:29:1D:00:00  <-- STEP2 motioned LAN card address
ONBOOT = yes 
IPADDR = 192.168.1.2
BOOTPROTO = none
NETMASK = 255.255.255.0
GATEWAY = 192.168.1.1
TYPE = Ethernet
DNS1 = 192.168.1.10
DNS2 = 192.168.1.11

5. save the file with this command:
:wp

6. and then restart the computer or input the command /etc/init.d/network reload to reload the network configuration to finish the job.

Done

Comments

Popular posts from this blog

5 methods to improve the performance of Windows

I believe that many people will feel faster when using a newly bought computer or a computer after reinstalling the operating system, but after using it for a period of time, it will feel much slower. In fact, this situation is mainly due to the fact that the system generates a lot of junk files during the use of the computer, and after installing many different software, the system will automatically start some unnecessary programs in the system's service items when booting. So you will feel the system is getting slower and slower. But just use the following methods to improve the speed of your computer a lot: 1. Msconfig (System Settings) The main function of Msconfig.exe is to automatically activate some programs when the system is turned on so that you can get a quick response when using its programs or software.   But sometimes some programs or software are not used frequently, so you can close some programs or software in the boot option to increase the boot speed....

Reset or initialize Microsoft Word setting

I believe that many people will set certain settings when using Microsoft Word but forget them.   It may cause inconvenience in use, so I want to restore the original settings.   Some people may choose to reinstall Microsoft Word, but this is quite time-consuming.

Recover your language bar in Windows XP

Have you tried to accidentally remove the language input method in the lower right corner of the computer?   Recently I received this question "I accidentally deleted the language bar on the desktop, how can I get it back?"   I  believes that many people will also have this problem, so I wrote this article.