Ubuntu Bulk Add IP

Source: Internet
Author: User

Ubuntu Bulk Add IP Script

#!/bin/bash


For ((i=0;i<=3;i=i+1))

Do

echo "Auto eth0: $i" >>/etc/network/interfaces

echo "Iface eth0: $i inet Static" >>/etc/network/interfaces

Let j= $i +179

echo "Address 45.41.89. $j" >>/etc/network/interfaces

echo "Netmask 255.255.255.248" >>/etc/network/interfaces

echo "Gateway 45.41.89.177" >>/etc/network/interfaces

echo "" >>/etc/network/interfaces

Done

# End







Auto Eth0:1

Iface eth0:1 inet Static

Address 104.237.51.90

Netmask 255.255.255.248

Gateway 104.237.51.89

Auto Eth0:2

Iface eth0:2 inet Static

Address 104.237.51.91

Netmask 255.255.255.248

Gateway 104.237.51.89


Auto Eth0:3

Iface Eth0:3 inet Static

Address 104.237.51.92

Netmask 255.255.255.248

Gateway 104.237.51.89


Auto Eth0:4

Iface Eth0:4 inet Static

Address 104.237.51.93

Netmask 255.255.255.248

Gateway 104.237.51.89




On a script (more IP time)

Lower number of IPs

Ubuntu Bulk Add IP

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.