{"id":988,"date":"2014-12-20T03:33:06","date_gmt":"2014-12-20T08:33:06","guid":{"rendered":"https:\/\/hostease.com\/blog\/?p=988"},"modified":"2024-11-27T03:01:05","modified_gmt":"2024-11-27T08:01:05","slug":"about-add-additional-ips-for-linux-server","status":"publish","type":"post","link":"https:\/\/www.hostease.com\/blog\/server\/about-add-additional-ips-for-linux-server\/","title":{"rendered":"About Add Additional IPs for Linux Server"},"content":{"rendered":"<p><span class=\"Text11Pt\">1. Determine if an existing range files exist:<br \/>\n<\/span><\/p>\n<blockquote><p># cd \/etc\/sysconfig\/network-scripts\/<\/p><\/blockquote>\n<blockquote><p># ls ifcfg-eth1-range*<\/p><\/blockquote>\n<p><span class=\"Text11Pt\"><span class=\"Text11Pt\"><strong>Note:<\/strong> If the server is using a bonded network, the files will be ifcfg-bond1-range*<\/span><\/span><\/p>\n<p><span class=\"Text11Pt\"><span class=\"Text11Pt\">You may see at least one file, though there may possibly be several. Find the highest number following the &#8220;range&#8221; and add one to it. This will be the new range number.<\/span><\/span><\/p>\n<p>For example, if you see ifcfg-eth1-range0 and ifcfg-eth1-range1, your new range number will be &#8220;2&#8221;.<\/p>\n<p>If there are not any range files already present, create one using your favorite text editor (i.e. vi, nano, ect.).<\/p>\n<p>2. Determine the next available interface number (clone number).<\/p>\n<blockquote><p># ifconfig | grep eth1<\/p>\n<p>You will see a list of interfaces that looks like this<br \/>\neth1 Link encap:Ethernet HWaddr 00:08:74:A3:29:70<br \/>\neth1:0 Link encap:Ethernet HWaddr 00:08:74:A3:29:70<br \/>\neth1:1 Link encap:Ethernet HWaddr 00:08:74:A3:29:70<br \/>\n.<br \/>\n.<br \/>\n.<br \/>\neth1:8 Link encap:Ethernet HWaddr 00:08:74:A3:29:70<\/p><\/blockquote>\n<p><span class=\"Text11Pt\"><span class=\"Text11Pt\">Find the highest number after the &#8220;eth1:&#8221;. Add one to it and this your new clone number. In this case it would be 9. In case this is a new file, the clone number will be 0.<\/span><\/span><\/p>\n<p>3. Create a range file for the new range number. (for this example, we will use range2)<\/p>\n<blockquote><p># vi ifcfg-eth1-range2<\/p><\/blockquote>\n<p><span class=\"Text11Pt\"><span class=\"Text11Pt\">4. Write the following lines to the range file. (replace the dummy ip information with your desired ip range and the CLONENUM_START value with the one calculated above [please also note that this procedure\/example is being outlined under the assumption that this is a standard secondary subnet])<br \/>\n<\/span><\/span><\/p>\n<blockquote><p>IPADDR_START=&#8217;123.0.0.1&#8242;<br \/>\nIPADDR_END=&#8217;123.0.0.10&#8242;<br \/>\nNETMASK=255.255.255.255<br \/>\nCLONENUM_START=&#8217;9&#8242;<\/p><\/blockquote>\n<p><span class=\"Text11Pt\"><span class=\"Text11Pt\"><strong>Note:<\/strong> If the range only has one IP, use the same IP for the \u201cSTART\u201d and \u201cEND\u201d IPs.<\/span><\/span><\/p>\n<p><span class=\"Text11Pt\"><span class=\"Text11Pt\">5. Write and quit the range file, and restart your network.<br \/>\n<\/span><\/span><\/p>\n<blockquote><p># \/etc\/init.d\/network restart<\/p><\/blockquote>\n<p><span class=\"Text11Pt\"><span class=\"Text11Pt\">6. Your new ips should now be visible by running:<br \/>\n<\/span><\/span><\/p>\n<blockquote><p># ifconfig<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>Learn how to add additional IPs to your Linux server with step-by-step instructions. This guide covers range file creation, IP configuration, and verifying new IPs with ifconfig. Perfect for network management!<\/p>\n","protected":false},"author":8,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[527,299,528],"class_list":["post-988","post","type-post","status-publish","format-standard","hentry","category-server","tag-ip-configuration","tag-linux-server","tag-networking"],"aioseo_notices":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.hostease.com\/blog\/wp-json\/wp\/v2\/posts\/988","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostease.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostease.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostease.com\/blog\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostease.com\/blog\/wp-json\/wp\/v2\/comments?post=988"}],"version-history":[{"count":1,"href":"https:\/\/www.hostease.com\/blog\/wp-json\/wp\/v2\/posts\/988\/revisions"}],"predecessor-version":[{"id":2151,"href":"https:\/\/www.hostease.com\/blog\/wp-json\/wp\/v2\/posts\/988\/revisions\/2151"}],"wp:attachment":[{"href":"https:\/\/www.hostease.com\/blog\/wp-json\/wp\/v2\/media?parent=988"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostease.com\/blog\/wp-json\/wp\/v2\/categories?post=988"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostease.com\/blog\/wp-json\/wp\/v2\/tags?post=988"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}