{"id":1665,"date":"2018-08-29T15:40:11","date_gmt":"2018-08-29T22:40:11","guid":{"rendered":"http:\/\/jim-zimmerman.com\/?p=1665"},"modified":"2018-08-29T15:40:11","modified_gmt":"2018-08-29T22:40:11","slug":"manually-configure-ip-address-in-centos7-rhel7","status":"publish","type":"post","link":"https:\/\/jim-zimmerman.com\/?p=1665","title":{"rendered":"Manually Configure IP address in CentOS7\/RHEL7."},"content":{"rendered":"<p>Let me just preface this post by saying &#8220;This is not a persistent configuration.  If you boot the system, these settings will be lost unless you save them via the \/etc\/sysconfig\/network-scripts files or through NetworkManager.<\/p>\n<p>Here is how you can manually configure the IP address and gateway in CentOS\/RHEL7:<\/p>\n<p>Configure the IP address and subnet mask:<\/p>\n<blockquote><p># ip addr add <em>aaa.bbb.ccc.ddd\/ss<\/em> dev <em>interface<\/em><\/p><\/blockquote>\n<p>For example:<\/p>\n<blockquote><p># ip addr add 123.123.123.123\/24 dev eno1<\/p><\/blockquote>\n<p>Likewise, to remove the IP address:<\/p>\n<blockquote><p># ip addr <strong>del <\/strong>123.123.123.123\/24 dev eno1<\/p><\/blockquote>\n<p>To configure the default gateway:<\/p>\n<blockquote><p># ip route add default via <em>ddd.ccc.bbb.aaa<\/em> dev <em>interface<\/em><\/p><\/blockquote>\n<p>For example:<\/p>\n<blockquote><p># ip route add default via 123.123.123.254 dev eno1<\/p><\/blockquote>\n<p>Same kind of thing to remove the currently configured gateway:<\/p>\n<blockquote><p># ip route del default via 123.123.123.254 dev eno1<\/p><\/blockquote>\n<p>Once you have the interface configure, bring it up:<\/p>\n<blockquote><p># if link set eno1 up<\/p><\/blockquote>\n<p>And to take it down:<\/p>\n<blockquote><p># if link set eno1 down<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>Let me just preface this post by saying &#8220;This is not a persistent configuration. If you boot the system, these settings will be lost unless you save them via the \/etc\/sysconfig\/network-scripts files or through NetworkManager. Here is how you can manually configure the IP address and gateway in CentOS\/RHEL7: Configure the IP address and subnet [&#038;hellip<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[40,60,473,144,50,84],"class_list":["post-1665","post","type-post","status-publish","format-standard","hentry","category-documentation","tag-centos","tag-configuration","tag-interface","tag-network","tag-redhat","tag-rhel"],"share_on_mastodon":{"url":"","error":""},"_links":{"self":[{"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/posts\/1665","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1665"}],"version-history":[{"count":3,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/posts\/1665\/revisions"}],"predecessor-version":[{"id":1668,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/posts\/1665\/revisions\/1668"}],"wp:attachment":[{"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1665"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1665"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1665"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}