<?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>network configuration | Matt Crawford</title>
	<atom:link href="https://mattcrawford.me/tag/network-configuration/feed/" rel="self" type="application/rss+xml" />
	<link>https://mattcrawford.me</link>
	<description>Handyman &#124; Geek &#124; YouTuber</description>
	<lastBuildDate>Wed, 15 Jun 2022 00:08:13 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0</generator>
<site xmlns="com-wordpress:feed-additions:1">176948450</site>	<item>
		<title>How to setup network on Centos 7</title>
		<link>https://mattcrawford.me/how-to-setup-network-on-centos-7/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-setup-network-on-centos-7</link>
					<comments>https://mattcrawford.me/how-to-setup-network-on-centos-7/#respond</comments>
		
		<dc:creator><![CDATA[Matt Crawford]]></dc:creator>
		<pubDate>Wed, 23 Mar 2016 20:16:49 +0000</pubDate>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[Centos]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[network configuration]]></category>
		<guid isPermaLink="false">http://g3k.xyz/?p=2113</guid>

					<description><![CDATA[<p>After installing Centos 7, you might find that you can&#8217;t connect to the network on that machine. This happens because Ethernet interfaces are not enabled by default. This guide will help you setup network on Centos 7. This guide contains network configuration steps in both GUI and command mode. Setup Network on Centos 7 At [&#8230;]</p>
The post <a href="https://mattcrawford.me/how-to-setup-network-on-centos-7/">How to setup network on Centos 7</a> first appeared on <a href="https://mattcrawford.me">Matt Crawford</a>.]]></description>
										<content:encoded><![CDATA[<p>After installing Centos 7, you might find that you can&#8217;t connect to the network on that machine. This happens because Ethernet interfaces are not enabled by default. This guide will help you setup network on Centos 7.</p>
<p>This guide contains network configuration steps in both GUI and command mode.</p>
<h1>Setup Network on Centos 7</h1>
<p>At the command prompt type</p>
<pre>nmcli d</pre>
<p>which will give you a quick identification of Ethernet cards installed on your machine</p>
<p><img fetchpriority="high" decoding="async" class="alignnone size-full wp-image-2114" src="https://t3dus.com/wp-content/uploads/2016/03/Setup-network-on-centos-7-check.png" alt="Setup-network-on-centos-7-check" width="599" height="98" srcset="https://mattcrawford.me/wp-content/uploads/2016/03/Setup-network-on-centos-7-check.png 599w, https://mattcrawford.me/wp-content/uploads/2016/03/Setup-network-on-centos-7-check-300x49.png 300w" sizes="(max-width: 599px) 100vw, 599px" /></p>
<p>Here we have 2 interfaces named &#8220;<strong>enp0s17</strong>&#8221; and &#8220;<strong>enp0s18</strong>&#8220;. It might be different in your case however.</p>
<h1>Setup GUI Mode</h1>
<p>Recommended for beginners</p>
<h4>Step 1</h4>
<p>Type in this command</p>
<pre>nmtui</pre>
<p>to open network manager and press enter after choosing &#8220;edit  a connection&#8221; (use tab for choosing options)</p>
<p><img decoding="async" class="alignnone size-full wp-image-2115" src="https://t3dus.com/wp-content/uploads/2016/03/Setup-network-on-centos-7.png" alt="Setup-network-on-centos-7" width="236" height="223" /></p>
<h4>Step 2</h4>
<p>Now you can see all network interfaces, choose one and click &#8220;<strong>Edit</strong>&#8221;</p>
<p><img decoding="async" class="alignnone size-full wp-image-2116" src="https://t3dus.com/wp-content/uploads/2016/03/Setup-network-on-centos-7-1.png" alt="Setup-network-on-centos-7-1" width="259" height="177" /></p>
<p><strong>DHCP Configuration</strong></p>
<h4>Step 3</h4>
<p>for dhcp,</p>
<ol>
<li>Choose &#8220;<strong>Automatic</strong>&#8221; in IPv4 CONFIGURATION.</li>
<li>Choose Automatic connect check box.</li>
<li>Press Ok and quit Network manager.</li>
</ol>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-2117" src="https://t3dus.com/wp-content/uploads/2016/03/Setup-network-on-centos-7-2.png" alt="Setup-network-on-centos-7-2" width="599" height="314" srcset="https://mattcrawford.me/wp-content/uploads/2016/03/Setup-network-on-centos-7-2.png 599w, https://mattcrawford.me/wp-content/uploads/2016/03/Setup-network-on-centos-7-2-300x157.png 300w" sizes="(max-width: 599px) 100vw, 599px" /></p>
<p>Now restart network services by typing this command</p>
<pre>systemctl restart network</pre>
<p>Now your server will get an IP from DHCP</p>
<h4>Step 4</h4>
<p>For manual IP address,<br />
1. Choose “<strong>Manual</strong>” in IPv4 CONFIGURATION.<br />
2. Add IP Address with Subnet , Gateway and DNS server ( Refer below image ).<br />
3. Choose Automatic Connect check box.<br />
4. Press OK and quit Network manager.</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-2118" src="https://t3dus.com/wp-content/uploads/2016/03/Setup-network-on-centos-7-3.png" alt="Setup-network-on-centos-7-3" width="599" height="438" srcset="https://mattcrawford.me/wp-content/uploads/2016/03/Setup-network-on-centos-7-3.png 599w, https://mattcrawford.me/wp-content/uploads/2016/03/Setup-network-on-centos-7-3-300x219.png 300w" sizes="(max-width: 599px) 100vw, 599px" /></p>
<p>Now restart network services by typing this command</p>
<pre>systemctl restart network</pre>
<p>Now your server will have a static IP.</p>
<h1>Command Mode</h1>
<p><strong>Step 1 </strong></p>
<p>Network interface config files are located in <strong>/etc/sysconfig/network-scripts/</strong> directory. Open <strong>ifcfg-enp0s17</strong> file ( For interface enp0s17 ) and you can see the content like below.</p>
<pre>[root@krizna ~]# vi /etc/sysconfig/network-scripts/ifcfg-enp0s17
TYPE=Ethernet
BOOTPROTO=none
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
NAME=enp0s17
UUID=7f1aff2d-b154-4436-9497-e3a4dedddcef
ONBOOT=no
HWADDR=00:0C:29:A1:B5:D6
PEERDNS=yes
PEERROUTES=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes</pre>
<p>DHCP Configuration</p>
<p><strong>Step 2 </strong></p>
<p>For DHCP<br />
Find the below lines in config File.</p>
<pre><code>BOOTPROTO=none
ONBOOT=no</code></pre>
<p>and replace with</p>
<pre><code>BOOTPROTO=dhcp
ONBOOT=yes</code></pre>
<p>Now Restart network service by typing below command.</p>
<pre><code>systemctl restart network</code></pre>
<p>Now your server will get IP Address from DHCP</p>
<h4>» Static configuration</h4>
<p><strong>Step 3 »</strong> For Static IP.<br />
Find the below lines in config File.</p>
<pre><code>BOOTPROTO=none
ONBOOT=no</code></pre>
<p>and replace with</p>
<pre><code>BOOTPROTO=static
ONBOOT=yes</code></pre>
<p>And add the below lines at the end of the file.</p>
<pre><code>IPADDR=172.27.0.32
NETMASK=255.255.255.0
GATEWAY=172.27.0.1
DNS1=172.27.0.5</code></pre>
<p>File will look like below after changes.</p>
<pre><code>TYPE=Ethernet
BOOTPROTO=static
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
NAME=enp0s17
UUID=f0c5b37d-299a-43cb-b74b-618bb252d129
ONBOOT=yes
HWADDR=00:0C:29:A1:B5:CC
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPADDR=192.168.1.10
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
DNS1=192.168.1.5</code></pre>
<p>Now Restart network service by typing below command.</p>
<pre><code>systemctl restart network</code></pre>
<p>Now Interface will have static IP.<br />
Additionally you can use <strong>/etc/sysconfig/network</strong> file for hostname and DNS .</p>
<pre><code>HOSTNAME=server.krizna.com
DNS1=192.168.1.5
DNS2=8.8.8.8
SEARCH=krizna.com</code></pre>
<p>I hope this helps anybody reading. Have a great day!</p>The post <a href="https://mattcrawford.me/how-to-setup-network-on-centos-7/">How to setup network on Centos 7</a> first appeared on <a href="https://mattcrawford.me">Matt Crawford</a>.]]></content:encoded>
					
					<wfw:commentRss>https://mattcrawford.me/how-to-setup-network-on-centos-7/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">2113</post-id>	</item>
	</channel>
</rss>
