Skip to content

Instantly share code, notes, and snippets.

@thomascate
Created June 11, 2014 18:35
Show Gist options
  • Save thomascate/c411d7a7691b6b1031a7 to your computer and use it in GitHub Desktop.
Save thomascate/c411d7a7691b6b1031a7 to your computer and use it in GitHub Desktop.
#!/usr/bin/env perl
use NetAddr::IP;
my $ipObj = new NetAddr::IP('216.166.101.0/24');
$CurrentRserver = 14;
while ($ipObj < $ipObj->broadcast) {
print "slb server r" . $CurrentRserver . "-2.gc.dca1 " . $ipObj . "\n";
print " no health-check\n";
print " weight 3\n";
print " port 119 tcp\n";
print " no health-check\n";
print " port 80 tcp\n";
print " no health-check\n";
print " port 443 tcp\n";
print " no health-check\n";
print " port 23 tcp\n";
print " no health-check\n";
print " port 563 tcp\n";
print " no health-check\n";
$ipObj++;
$CurrentRserver++;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment