Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 01-13-2022, 10:52 AM   #1
Registered: Jul 2015
Posts: 120

Rep: Reputation: Disabled
BIND Script

For Linux o/s where I assign a large quantity of IPv4 addresses, I use a simple bind script to quickly bind all IPs.


for i in $(seq 2 254);
        ip addr add xxx.142.100.$i/24 dev eth0
        ip addr add xxx.142.101.$i/24 dev eth0
        ip addr add xxx.142.102.$i/24 dev eth0
        ip addr add xxx.142.103.$i/24 dev eth0        

ip addr show
Is there an easier way to do a single line for whatever size subnet?

Say for example I want to bind a full straight /19 to the server. I cannot do for example...

ip addr add xxx.142.101.$i/19 dev eth0

...because of the sequence line.

Is there an alternative to this?

Last edited by Bashed; 01-13-2022 at 11:17 AM.
Old 01-14-2022, 02:27 PM   #2
Registered: Jul 2015
Posts: 120

Original Poster
Rep: Reputation: Disabled


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: DNS: The Bind Leading the Bind LXer Syndicated Linux News 0 06-15-2006 11:33 PM
How to update BIND ./etc/bind/db.coaxcables AndeAnderson Debian 0 03-03-2006 10:35 AM
Bind 8 and Bind 9 sierra Linux - Networking 2 03-16-2005 12:15 PM
How do I revert to Bind 8 from Bind 9? digging4roots Linux - Newbie 3 06-08-2002 05:40 PM
To 'Bind' or not to 'Bind' that is the question jsurgeson Linux - Newbie 2 03-24-2002 04:10 AM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:28 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration