{"id":8,"date":"2009-09-11T04:56:09","date_gmt":"2009-09-11T08:56:09","guid":{"rendered":"http:\/\/linuxhostingsupport.net\/blog\/?p=8"},"modified":"2013-03-20T08:39:00","modified_gmt":"2013-03-20T12:39:00","slug":"howto-add-additional-ips","status":"publish","type":"post","link":"https:\/\/linuxhostingsupport.net\/blog\/howto-add-additional-ips","title":{"rendered":"HowTo: Add Additional IPs"},"content":{"rendered":"<p><span style=\"color: #0000ff;\"><strong>How to add multiple IPs on an Ethernet network interface card i.e. eth0? OR<\/strong><\/span><\/p>\n<p><span style=\"color: #0000ff;\"><strong>How to add additional IPs on a Linux server?<br \/>\n<\/strong><\/span><\/p>\n<p>People find it rather hard to add the IPs manually on a Plain server. Following are the steps you can follow to add a range of IPs on a CentOS server:<\/p>\n<p><strong>1 )<\/strong> Change directory to \/etc\/sysconfig\/network-scripts\/  using the &#8216;cd&#8217; command:<\/p>\n<blockquote><p><span style=\"color: #0000ff;\"><strong>cd \/etc\/sysconfig\/network-scripts\/<\/strong><\/span> (this directory contains Interface configuration files)<\/p><\/blockquote>\n<p><strong>2)<\/strong> Create a file ifcfg-eth0-range0 using your favorite text editor like &#8216;pico&#8217;<\/p>\n<blockquote><p><strong><span style=\"color: #0000ff;\">pico ifcfg-eth0-range0<\/span><\/strong><\/p><\/blockquote>\n<p><strong>3)<\/strong> Add the following lines to the file:<\/p>\n<blockquote><p><span style=\"color: #0000ff;\"><strong>IPADDR_START=1.1.1.10<br \/>\nIPADDR_END=1.1.1.20<br \/>\nCLONENUM_START=1<\/strong><\/span><\/p><\/blockquote>\n<p><strong>where,<\/strong><\/p>\n<blockquote><p><strong>IPADDR_START is the first IP in the range.<br \/>\nIPADDR_END is the last IP in the range.<br \/>\nCLONENUM_START=1, where 1 will start adding IPs from eth0:1<\/strong><\/p><\/blockquote>\n<p><strong>4)<\/strong> <strong>Save and exit the file<\/strong>.<\/p>\n<p><strong>5)<\/strong> You now need to execute &#8220;ifup-aliases&#8221; script for the range of IPs to take affect. Execute the following command:<\/p>\n<blockquote><p><span style=\"color: #0000ff;\"><strong>.\/ifup-aliases eth0<\/strong><\/span><\/p><\/blockquote>\n<p>This will add the IPs on eth0 and will bring all the virtual interfaces up. You can view all the interfaces using the &#8220;<span style=\"color: #0000ff;\"><strong>ifconfig<\/strong><\/span>&#8221; command.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to add multiple IPs on an Ethernet network interface card i.e. eth0? OR<br \/>\nHow to add additional IPs on a Linux server?<\/p>\n<p>People find it rather hard to add the IPs manually on a Plain server. Following are the steps you can follow to add a range of IPs on a CentOS server:<br \/>\n1 ) Change directory to \/etc\/sysconfig\/network-scripts\/  using the &#8216;cd&#8217; command:<br \/>\ncd \/etc\/sysconfig\/network-scripts\/ (this directory contains Interface configuration files)<br \/>\n2) Create a file ifcfg-eth0-range0 using your favorite text editor like &#8216;pico&#8217;<br \/>\npico ifcfg-eth0-range0<br \/>\n3) Add the following lines to the file:<br \/>\nIPADDR_START=1.1.1.10<br \/>\nIPADDR_END=1.1.1.20<br \/>\nCLONENUM_START=1<br \/>\nwhere,<br \/>\nIPADDR_START [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[384,7,8,383,382,9,10],"_links":{"self":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts\/8"}],"collection":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/comments?post=8"}],"version-history":[{"count":5,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts\/8\/revisions"}],"predecessor-version":[{"id":2096,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts\/8\/revisions\/2096"}],"wp:attachment":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/media?parent=8"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/categories?post=8"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/tags?post=8"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}