<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>How to Set a Static IP Address in RHEL 8 or Centos8 Archives - Linux Windows and android Tutorials</title>
	<atom:link href="https://www.osradar.com/tag/how-to-set-a-static-ip-address-in-rhel-8-or-centos8/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.osradar.com</link>
	<description>tutorials and news and Seurity</description>
	<lastBuildDate>Mon, 17 Dec 2018 18:18:44 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.8.12</generator>
	<item>
		<title>How to Set a Static IP Address in RHEL 8 or Centos8</title>
		<link>https://www.osradar.com/how-to-set-a-static-ip-address-in-rhel-8-or-centos8/</link>
					<comments>https://www.osradar.com/how-to-set-a-static-ip-address-in-rhel-8-or-centos8/#respond</comments>
		
		<dc:creator><![CDATA[Mel]]></dc:creator>
		<pubDate>Mon, 17 Dec 2018 18:18:44 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[How to Set a Static IP Address in RHEL 8 or Centos8]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=8432</guid>

					<description><![CDATA[<p>In entreprise Environemtns  you are  dedicated en uniq  IP addresses for every machine. i will show to today from my virtual test Server many ways how to set a static Ip adress to your Centos8 or RHEL8 Server. Lets begin about my system settings Hostname My hostnamne:  osradar-rhel8.local.domain network Setting My netwrok device is configured [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-set-a-static-ip-address-in-rhel-8-or-centos8/">How to Set a Static IP Address in RHEL 8 or Centos8</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>In entreprise Environemtns  you are  dedicated en uniq  IP addresses for every machine. i will show to today from my virtual test Server many ways how to set a static Ip adress to your Centos8 or RHEL8 Server.</p>
<p>Lets begin about my system settings</p>
<p><strong>Hostname</strong></p>
<p>My hostnamne:  osradar-rhel8.local.domain</p>
<p><strong>network Setting<br />
</strong></p>
<p>My netwrok device is configured to get autmaticaly Ip address from the rooter via DHCP protocol</p>
<p><img loading="lazy" class="alignnone size-full wp-image-8433" src="https://www.osradar.com/wp-content/uploads/2018/12/static11.png" alt="" width="1020" height="539" srcset="https://www.osradar.com/wp-content/uploads/2018/12/static11.png 1020w, https://www.osradar.com/wp-content/uploads/2018/12/static11-300x159.png 300w, https://www.osradar.com/wp-content/uploads/2018/12/static11-768x406.png 768w, https://www.osradar.com/wp-content/uploads/2018/12/static11-795x420.png 795w" sizes="(max-width: 1020px) 100vw, 1020px" /></p>
<p>Lets  say i want a static IP address  for this Server like 192.168.2.100 and my gateway (router is  192.168.2.254)   lets do it on this way</p>
<h3><strong>Method 1</strong></h3>
<p>This is the Manual methode</p>
<p>Edit  the Device configuration  file /etc/sysconfig/network-scripts/ifcfg-enp0s3</p>
<p>vi /etc/sysconfig/network-scripts/ifcfg-enp0s3</p>
<p><img loading="lazy" class="alignnone size-full wp-image-8437" src="https://www.osradar.com/wp-content/uploads/2018/12/static12.png" alt="" width="639" height="287" srcset="https://www.osradar.com/wp-content/uploads/2018/12/static12.png 639w, https://www.osradar.com/wp-content/uploads/2018/12/static12-300x135.png 300w" sizes="(max-width: 639px) 100vw, 639px" /></p>
<p>Please ignore or remove the IPV6 lines if you are not using IPV6 protocols.</p>
<p><strong>Restart  the  Device or just reboot the Server<br />
</strong></p>
<pre class="">ifdown enp0s3
ifup enp0s3</pre>
<p><strong>Check now</strong></p>
<p><img loading="lazy" class="alignnone size-full wp-image-8444" src="https://www.osradar.com/wp-content/uploads/2018/12/network-reboot.png" alt="" width="786" height="349" srcset="https://www.osradar.com/wp-content/uploads/2018/12/network-reboot.png 786w, https://www.osradar.com/wp-content/uploads/2018/12/network-reboot-300x133.png 300w, https://www.osradar.com/wp-content/uploads/2018/12/network-reboot-768x341.png 768w" sizes="(max-width: 786px) 100vw, 786px" /></p>
<p>Try login from other machine</p>
<p>ssh  to new Ip address on the  remote Server  192.168.2.100</p>
<p><img loading="lazy" class="alignnone size-full wp-image-8449" src="https://www.osradar.com/wp-content/uploads/2018/12/ssh.png" alt="" width="670" height="171" srcset="https://www.osradar.com/wp-content/uploads/2018/12/ssh.png 670w, https://www.osradar.com/wp-content/uploads/2018/12/ssh-300x77.png 300w" sizes="(max-width: 670px) 100vw, 670px" /></p>
<p>its wokring!</p>
<h3><strong>Method 2</strong></h3>
<p>This method is using nmcli tool ( Network Manager command tool)</p>
<p><strong>How to Set a Static IP Address in RHEL 8 or Centos8 using </strong>nmcli<strong> tool</strong></p>
<p>Before to start ,lets explain about some options to use with nmcli  tool</p>
<p>con  = connection</p>
<p>mod = modify</p>
<p>manual  =  Static ip Address</p>
<p>Set the IP address for interface enp0s3 on RHEL 8 or Centos8.</p>
<pre class=""># nmcli con mod enp0s3 ipv4.addresses 192.168.2.101/24</pre>
<p>Set the gateway on RHEL 8 or Centos8:</p>
<pre class=""># nmcli con mod enp0s3 ipv4.gateway 192.168.2.254</pre>
<p>Confirm to  the interface to use manual configuration  instead of  dhcp.</p>
<pre class=""># nmcli con mod enp0s3 ipv4.method manual</pre>
<p>Configure DNS:   (  8.8.8.8   is  google)</p>
<pre class=""># nmcli con mod enp0s3 ipv4.dns "8.8.8.8"</pre>
<p>Reload the interface configuration:</p>
<pre class=""># nmcli con up enp0s3</pre>
<p><img loading="lazy" class="alignnone size-full wp-image-8454" src="https://www.osradar.com/wp-content/uploads/2018/12/nmcli.png" alt="" width="879" height="152" srcset="https://www.osradar.com/wp-content/uploads/2018/12/nmcli.png 879w, https://www.osradar.com/wp-content/uploads/2018/12/nmcli-300x52.png 300w, https://www.osradar.com/wp-content/uploads/2018/12/nmcli-768x133.png 768w" sizes="(max-width: 879px) 100vw, 879px" /></p>
<p><strong>check</strong></p>
<p>Not that if  you are  doing these commands from an remote server via ssh connection , the connection will be dropped  🙂  because will get  new  IP address</p>
<p><img loading="lazy" class="alignnone size-full wp-image-8455" src="https://www.osradar.com/wp-content/uploads/2018/12/nmcli2.png" alt="" width="803" height="361" srcset="https://www.osradar.com/wp-content/uploads/2018/12/nmcli2.png 803w, https://www.osradar.com/wp-content/uploads/2018/12/nmcli2-300x135.png 300w, https://www.osradar.com/wp-content/uploads/2018/12/nmcli2-768x345.png 768w" sizes="(max-width: 803px) 100vw, 803px" /></p>
<p><img loading="lazy" class="alignnone size-full wp-image-8456" src="https://www.osradar.com/wp-content/uploads/2018/12/nmcli3.png" alt="" width="669" height="132" srcset="https://www.osradar.com/wp-content/uploads/2018/12/nmcli3.png 669w, https://www.osradar.com/wp-content/uploads/2018/12/nmcli3-300x59.png 300w" sizes="(max-width: 669px) 100vw, 669px" /></p>
<p>Its Working too</p>
<h3><strong>Method 3</strong></h3>
<p>Set Static IP Using Nmtui Tool</p>
<pre class="">nmtui</pre>
<p><strong>Edit Connection </strong></p>
<p><img loading="lazy" class="alignnone size-full wp-image-8531" src="https://www.osradar.com/wp-content/uploads/2018/12/nmtui11.png" alt="" width="714" height="395" srcset="https://www.osradar.com/wp-content/uploads/2018/12/nmtui11.png 714w, https://www.osradar.com/wp-content/uploads/2018/12/nmtui11-300x166.png 300w, https://www.osradar.com/wp-content/uploads/2018/12/nmtui11-696x385.png 696w" sizes="(max-width: 714px) 100vw, 714px" /></p>
<p><strong>Edit Device name </strong></p>
<p><img loading="lazy" class="alignnone size-full wp-image-8532" src="https://www.osradar.com/wp-content/uploads/2018/12/nmtui12.png" alt="" width="714" height="403" srcset="https://www.osradar.com/wp-content/uploads/2018/12/nmtui12.png 714w, https://www.osradar.com/wp-content/uploads/2018/12/nmtui12-300x169.png 300w" sizes="(max-width: 714px) 100vw, 714px" /></p>
<p><strong>Change IPv4  from automatic to  Static </strong></p>
<p><img loading="lazy" class="alignnone size-full wp-image-8533" src="https://www.osradar.com/wp-content/uploads/2018/12/nmtui13.png" alt="" width="715" height="399" srcset="https://www.osradar.com/wp-content/uploads/2018/12/nmtui13.png 715w, https://www.osradar.com/wp-content/uploads/2018/12/nmtui13-300x167.png 300w" sizes="(max-width: 715px) 100vw, 715px" /></p>
<p>under Show  you add the IP adderess GATEWAY  and  DNS   (  use  TAB to  move between the lines)</p>
<p><img loading="lazy" class="alignnone size-full wp-image-8535" src="https://www.osradar.com/wp-content/uploads/2018/12/nmtui14.png" alt="" width="707" height="395" srcset="https://www.osradar.com/wp-content/uploads/2018/12/nmtui14.png 707w, https://www.osradar.com/wp-content/uploads/2018/12/nmtui14-300x168.png 300w" sizes="(max-width: 707px) 100vw, 707px" /></p>
<p>Then Go to OK in The bellow page Config / then TAB  to  back</p>
<p><img loading="lazy" class="alignnone size-full wp-image-8536" src="https://www.osradar.com/wp-content/uploads/2018/12/nmtui15.png" alt="" width="718" height="401" srcset="https://www.osradar.com/wp-content/uploads/2018/12/nmtui15.png 718w, https://www.osradar.com/wp-content/uploads/2018/12/nmtui15-300x168.png 300w" sizes="(max-width: 718px) 100vw, 718px" /></p>
<p>Activate  The Connection  . or Reboot  your  Server <img loading="lazy" class="alignnone size-full wp-image-8537" src="https://www.osradar.com/wp-content/uploads/2018/12/nmtui16.png" alt="" width="719" height="398" srcset="https://www.osradar.com/wp-content/uploads/2018/12/nmtui16.png 719w, https://www.osradar.com/wp-content/uploads/2018/12/nmtui16-300x166.png 300w, https://www.osradar.com/wp-content/uploads/2018/12/nmtui16-696x385.png 696w" sizes="(max-width: 719px) 100vw, 719px" /></p>
<p>Enjoy and share</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-set-a-static-ip-address-in-rhel-8-or-centos8/">How to Set a Static IP Address in RHEL 8 or Centos8</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/how-to-set-a-static-ip-address-in-rhel-8-or-centos8/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
