Forum Discussion
raduioncu_16351
Nimbostratus
Hi,
You can easily script a data group generation (even from Excel - use CONCATENATE() ) that contains the subnet as key and the pool name as data so you can more easily assign the pool - then just copy and paste the entries in TMSH.
create ltm data-group internal TEST-IP type ip
modify ltm data-group internal TEST-IP records add { 10.1.0.0/24 { data "STOREA-POOL" } }
modify ltm data-group internal TEST-IP records add { 10.2.0.0/24 { data "STOREB-POOL" } }
....
ltm data-group internal TEST-IP {
records {
10.1.0.0/24 {
data STOREA-POOL
}
10.2.0.0/24 {
data STOREB-POOL
}
}
type ip
}
Radu
rgordon_01
Mar 03, 2016Nimbostratus
I created a text file -here's few lines as example:
modify ltm data-group internal TEST-IP records add { 10.175.129.0/24 { data "silverlight" } }
modify ltm data-group internal TEST-IP records add { 10.175.132.0/24 { data "silverlight" } }
modify ltm data-group internal TEST-IP records add { 10.175.133.0/24 { data "silverlight" } }
modify ltm data-group internal TEST-IP records add { 10.175.139.0/24 { data "silverlight" } }
modify ltm data-group internal TEST-IP records add { 10.175.143.0/24 { data "silverlight" } }
executed the command from TMSH on our test f5. It created the new data group which is good but when you view the address records from the GUI it's not what I'm looking for. They showed up as:
10.175.129.0/24:=silverlight
10.175.132.0/24:=Silverlight
All the networks in my text file will go to the same pool which the iRule is already redirecting them to. So then I removed data "Silverlight from the command and ran this
modify ltm data-group internal TEST-IP records add { 10.175.129.0/24 }
modify ltm data-group internal TEST-IP records add { 10.175.132.0/24 }
modify ltm data-group internal TEST-IP records add { 10.175.133.0/24 }
modify ltm data-group internal TEST-IP records add { 10.175.139.0/24 }
modify ltm data-group internal TEST-IP records add { 10.175.143.0/24 }
the data looks more like I expected now EXCEPT the mask shows up as /24 instead of 255.255.255.0 like it's setup in our working production LTM. It may accept both ways but checking the help menu says it does not. So now I have to go back and redo excel to create a new text file with the correct mask format. Although this was easier than manually entering each network I've still had to do a lot of work to get the text file in the correct format. Can you confirm yes or no that the /24 does not work for the mask format?