{"id":1465,"date":"2015-03-26T23:19:30","date_gmt":"2015-03-26T17:19:30","guid":{"rendered":"http:\/\/techsatwork.com\/blog\/?p=1465"},"modified":"2016-01-07T11:31:02","modified_gmt":"2016-01-07T05:31:02","slug":"configuring-network-redhat-enterprise-linux-server","status":"publish","type":"post","link":"https:\/\/techsatwork.com\/?p=1465","title":{"rendered":"Configuring network on RedHat Enterprise Linux Server"},"content":{"rendered":"<p>Here is\u00c2\u00a0 a quick snippet of how to configure network for Red Hat Enterpise Linux for a server.<\/p>\n<p>Here I am trying to configure <b>eth0\u00c2\u00a0 <\/b>to connect to the network.<br \/>\nFirst we need to ensure that network interface is turned on :<\/p>\n<p><strong>vi \/etc\/sysconfig\/network-scripts\/ifcfg-eth0<\/strong><\/p>\n<p>Find the line that says ONBOOT and ensure it says <b>ONBOOT=yes<\/b> \u00c2\u00a0 If its <b>no<\/b> then change it to <b>yes<\/b>\u00e2\u20ac\u00a6so it will come online when rebooted.<\/p>\n<p>Now lets start the configuration.<\/p>\n<p>Type <b>setup<\/b><\/p>\n<p>select network configuration<\/p>\n<p><a href=\"https:\/\/techsatwork.com\/blog\/wp-content\/uploads\/2015\/03\/Screen-Shot-2015-03-26-at-11.02.17-AM.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-1467 \" src=\"https:\/\/techsatwork.com\/blog\/wp-content\/uploads\/2015\/03\/Screen-Shot-2015-03-26-at-11.02.17-AM-300x230.png\" alt=\"Screen Shot 2015-03-26 at 11.02.17 AM\" width=\"331\" height=\"254\" srcset=\"https:\/\/techsatwork.com\/wp-content\/uploads\/2015\/03\/Screen-Shot-2015-03-26-at-11.02.17-AM-300x230.png 300w, https:\/\/techsatwork.com\/wp-content\/uploads\/2015\/03\/Screen-Shot-2015-03-26-at-11.02.17-AM.png 594w\" sizes=\"auto, (max-width: 331px) 100vw, 331px\" \/><\/a><\/p>\n<p><b>\u00c2\u00a0<\/b><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>select device configuration<\/p>\n<p><a href=\"https:\/\/techsatwork.com\/blog\/wp-content\/uploads\/2015\/03\/Screen-Shot-2015-03-26-at-11.02.26-AM.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft  wp-image-1468\" src=\"https:\/\/techsatwork.com\/blog\/wp-content\/uploads\/2015\/03\/Screen-Shot-2015-03-26-at-11.02.26-AM-300x246.png\" alt=\"Screen Shot 2015-03-26 at 11.02.26 AM\" width=\"383\" height=\"314\" srcset=\"https:\/\/techsatwork.com\/wp-content\/uploads\/2015\/03\/Screen-Shot-2015-03-26-at-11.02.26-AM-300x246.png 300w, https:\/\/techsatwork.com\/wp-content\/uploads\/2015\/03\/Screen-Shot-2015-03-26-at-11.02.26-AM.png 626w\" sizes=\"auto, (max-width: 383px) 100vw, 383px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>select eth0<\/p>\n<p>Normally servers get static ip addresses and if thats the case then remove DHCP .<br \/>\nFill in the gateway, net mask, DNS information<\/p>\n<p><a href=\"https:\/\/techsatwork.com\/blog\/wp-content\/uploads\/2015\/03\/Screen-Shot-2015-03-26-at-11.02.44-AM.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-medium wp-image-1469\" src=\"https:\/\/techsatwork.com\/blog\/wp-content\/uploads\/2015\/03\/Screen-Shot-2015-03-26-at-11.02.44-AM-300x240.png\" alt=\"Screen Shot 2015-03-26 at 11.02.44 AM\" width=\"300\" height=\"240\" srcset=\"https:\/\/techsatwork.com\/wp-content\/uploads\/2015\/03\/Screen-Shot-2015-03-26-at-11.02.44-AM-300x240.png 300w, https:\/\/techsatwork.com\/wp-content\/uploads\/2015\/03\/Screen-Shot-2015-03-26-at-11.02.44-AM-900x719.png 900w, https:\/\/techsatwork.com\/wp-content\/uploads\/2015\/03\/Screen-Shot-2015-03-26-at-11.02.44-AM.png 904w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>Click OK and Save. Then select DNS Configuration . Type in all your DNS information there:<\/p>\n<p><a href=\"https:\/\/techsatwork.com\/blog\/wp-content\/uploads\/2015\/03\/Screen-Shot-2015-03-26-at-11.03.05-AM.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft  wp-image-1470\" src=\"https:\/\/techsatwork.com\/blog\/wp-content\/uploads\/2015\/03\/Screen-Shot-2015-03-26-at-11.03.05-AM-300x246.png\" alt=\"Screen Shot 2015-03-26 at 11.03.05 AM\" width=\"350\" height=\"287\" srcset=\"https:\/\/techsatwork.com\/wp-content\/uploads\/2015\/03\/Screen-Shot-2015-03-26-at-11.03.05-AM-300x246.png 300w, https:\/\/techsatwork.com\/wp-content\/uploads\/2015\/03\/Screen-Shot-2015-03-26-at-11.03.05-AM.png 818w\" sizes=\"auto, (max-width: 350px) 100vw, 350px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>Click Save and Save &amp; Quit\u00c2\u00a0 and Quit.\u00c2\u00a0 This will exit the setup screen.<br \/>\nNow that we have configured the network, we got couple of more things to do.<br \/>\nLets now setup the host files<\/p>\n<p>type\u00c2\u00a0 <b>vi \/etc\/hosts<\/b><\/p>\n<p>add a line<\/p>\n<p><strong>&lt;ipaddress&gt; \u00c2\u00a0 &lt;hostname&gt;\u00c2\u00a0 &lt;hostname.domainname&gt;<\/strong><\/p>\n<p>eg:<\/p>\n<p>192.1.50.1\u00c2\u00a0 redhat1 \u00c2\u00a0 redhat1.techsatwork.com<\/p>\n<p>Save this file.<br \/>\nTime to restart the network services<\/p>\n<p>type \u00c2\u00a0<b>service network restart\u00c2\u00a0<\/b><\/p>\n<p>Ensure that all the services and network (eth0 in this case) started OK<br \/>\nNow lets see if the eth0 is all connected and a link is established<\/p>\n<p>type <strong>ethtool eth0<br \/>\n<\/strong><\/p>\n<p>and look for Link Detected\u00c2\u00a0: Yes<\/p>\n<p>If you see Yes then that means you are now connected to the network.<\/p>\n<p>Try pinging other servers on the network . Your server should now be connected to internet. One other thing you can optionally do is to stop the firewall. To do that:<\/p>\n<p>type <strong>\u00c2\u00a0service iptables save<\/strong><br \/>\ntype <strong>service iptables stop<\/strong><br \/>\ntype <strong>chkconfig iptables off<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>I hope this helps. \u00c2\u00a0Please test these steps on a non-prod environment first.<\/p>\n<p><sub>**I do not guarantee or accept any consequences from these steps in any circumstances<\/sub><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here is\u00c2\u00a0 a quick snippet of how to configure network for Red Hat Enterpise Linux for a server. Here I am trying to configure eth0\u00c2\u00a0 to connect to the network. First we need to ensure that network interface is turned on : vi \/etc\/sysconfig\/network-scripts\/ifcfg-eth0 Find the line that says ONBOOT and ensure it says ONBOOT=yes [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-container-style":"default","site-container-layout":"default","site-sidebar-layout":"default","site-transparent-header":"default","disable-article-header":"default","disable-site-header":"default","disable-site-footer":"default","disable-content-area-spacing":"default","footnotes":""},"categories":[3],"tags":[908,910,909,907],"class_list":["post-1465","post","type-post","status-publish","format-standard","hentry","category-db2","tag-configure-network","tag-linux-network","tag-redhat-network","tag-redhead-network"],"_links":{"self":[{"href":"https:\/\/techsatwork.com\/index.php?rest_route=\/wp\/v2\/posts\/1465","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techsatwork.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techsatwork.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techsatwork.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/techsatwork.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1465"}],"version-history":[{"count":3,"href":"https:\/\/techsatwork.com\/index.php?rest_route=\/wp\/v2\/posts\/1465\/revisions"}],"predecessor-version":[{"id":1472,"href":"https:\/\/techsatwork.com\/index.php?rest_route=\/wp\/v2\/posts\/1465\/revisions\/1472"}],"wp:attachment":[{"href":"https:\/\/techsatwork.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1465"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techsatwork.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1465"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techsatwork.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1465"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}