# data group list import- invalid format

**URL:** <https://community.f5.com/t/data-group-list-import-invalid-format/5570>\
**Category:** Technical Forums\
**Tags:** irules, application-delivery, ltm\
**Created:** [May 6, 2016, 7:20pm UTC](https://community.f5.com/t/data-group-list-import-invalid-format/5570 "2016-05-06T19:20:55Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eddy\_161863](https://avatars.discourse-cdn.com/v4/letter/e/3d9bf3/32.png) [@Eddy\_161863](https://community.f5.com/u/Eddy_161863)\
**Post date:** [May 6, 2016, 7:20pm UTC](https://community.f5.com/t/data-group-list-import-invalid-format/5570/1 "2016-05-06T19:20:55Z")

</div>

I have a list of 100 IPs that I want to use in an irule. I have created a data group list and was trying to import it but keep getting the error message that “the data group external file has an invalid format, line 1”

so I have tried different formats:

network 10.0.0.0 mask 255.255.255.255,

network 20.0.0.0 mask 255.255.255.255, and so on…

and I have tried host 10.0.0.0, host 20.0.0.0

I have tried both with and without commas but nothing is working. what is the correct format?

any help would be appreciated.

---

<div class="post-metadata">

**Author:** ![Yann\_Desmarest](https://avatars.discourse-cdn.com/v4/letter/y/5fc32e/32.png) [@Yann\_Desmarest](https://community.f5.com/u/Yann_Desmarest)\
**Post date:** [May 6, 2016, 7:43pm UTC](https://community.f5.com/t/data-group-list-import-invalid-format/5570/2 "2016-05-06T19:43:00Z")

</div>

Hello,

Why not using a simple “address” Data-group ? you can then add 10.0.0.0/8 in the address field for example.

You can then use tmsh or iControl Rest API to update dynamically your data-group

---

<div class="post-metadata">

**Author:** ![Yann\_Desmarest\_1](https://avatars.discourse-cdn.com/v4/letter/y/65b543/32.png) [@Yann\_Desmarest\_1](https://community.f5.com/u/Yann_Desmarest_1)\
**Post date:** [May 6, 2016, 7:43pm UTC](https://community.f5.com/t/data-group-list-import-invalid-format/5570/3 "2016-05-06T19:43:00Z")

</div>

Hello,

Why not using a simple “address” Data-group ? you can then add 10.0.0.0/8 in the address field for example.

You can then use tmsh or iControl Rest API to update dynamically your data-group

---

<div class="post-metadata">

**Author:** ![Eddy\_161863](https://avatars.discourse-cdn.com/v4/letter/e/3d9bf3/32.png) [@Eddy\_161863](https://community.f5.com/u/Eddy_161863)\
**Post date:** [May 6, 2016, 7:47pm UTC](https://community.f5.com/t/data-group-list-import-invalid-format/5570/4 "2016-05-06T19:47:52Z")

</div>

Thanks. I used 10.0.0.0 and 20.0.0.0 as an example. but originally it is a list of 100 IPs which I cannot summarize. I have to add them individually. Do you know the format for that?

---

<div class="post-metadata">

**Author:** ![Eddy\_161863](https://avatars.discourse-cdn.com/v4/letter/e/3d9bf3/32.png) [@Eddy\_161863](https://community.f5.com/u/Eddy_161863)\
**Post date:** [May 6, 2016, 7:47pm UTC](https://community.f5.com/t/data-group-list-import-invalid-format/5570/5 "2016-05-06T19:47:52Z")

</div>

Thanks. I used 10.0.0.0 and 20.0.0.0 as an example. but originally it is a list of 100 IPs which I cannot summarize. I have to add them individually. Do you know the format for that?

---

<div class="post-metadata">

**Author:** ![Yann\_Desmarest](https://avatars.discourse-cdn.com/v4/letter/y/5fc32e/32.png) [@Yann\_Desmarest](https://community.f5.com/u/Yann_Desmarest)\
**Post date:** [May 6, 2016, 8:00pm UTC](https://community.f5.com/t/data-group-list-import-invalid-format/5570/6 "2016-05-06T20:00:19Z")

</div>

ok no problem, just check this article from Jason Rahm : You will find the exact syntax for external data-groups [v11: iRules Data Group Updates - F5 Technical Articles - DevCentral - An F5 Technical Community](https://devcentral.f5.com/s/articles/v11-irules-data-group-updates)

---

<div class="post-metadata">

**Author:** ![Yann\_Desmarest\_1](https://avatars.discourse-cdn.com/v4/letter/y/65b543/32.png) [@Yann\_Desmarest\_1](https://community.f5.com/u/Yann_Desmarest_1)\
**Post date:** [May 6, 2016, 8:00pm UTC](https://community.f5.com/t/data-group-list-import-invalid-format/5570/7 "2016-05-06T20:00:19Z")

</div>

ok no problem, just check this article from Jason Rahm : You will find the exact syntax for external data-groups [DevCentral - An F5 Technical Community](https://devcentral.f5.com/articles/v11-irules-data-group-updates)

---

<div class="post-metadata">

**Author:** ![Eddy\_161863](https://avatars.discourse-cdn.com/v4/letter/e/3d9bf3/32.png) [@Eddy\_161863](https://community.f5.com/u/Eddy_161863)\
**Post date:** [May 6, 2016, 8:10pm UTC](https://community.f5.com/t/data-group-list-import-invalid-format/5570/8 "2016-05-06T20:10:49Z")

</div>

thanks Yann. Below is what that article says about external IP data group. Do you know if I have to add this format to the external data group list I created? where will I add the IPs? External Data Group------------------------- ltm data-group external addr\_testclass\_ext { external-file-name addr\_testclass.class type ip }

---

<div class="post-metadata">

**Author:** ![Eddy\_161863](https://avatars.discourse-cdn.com/v4/letter/e/3d9bf3/32.png) [@Eddy\_161863](https://community.f5.com/u/Eddy_161863)\
**Post date:** [May 6, 2016, 8:10pm UTC](https://community.f5.com/t/data-group-list-import-invalid-format/5570/9 "2016-05-06T20:10:49Z")

</div>

thanks Yann. Below is what that article says about external IP data group. Do you know if I have to add this format to the external data group list I created? where will I add the IPs? External Data Group------------------------- ltm data-group external addr\_testclass\_ext { external-file-name addr\_testclass.class type ip }

---

<div class="post-metadata">

**Author:** ![Yann\_Desmarest](https://avatars.discourse-cdn.com/v4/letter/y/5fc32e/32.png) [@Yann\_Desmarest](https://community.f5.com/u/Yann_Desmarest)\
**Post date:** [May 6, 2016, 8:16pm UTC](https://community.f5.com/t/data-group-list-import-invalid-format/5570/10 "2016-05-06T20:16:13Z")

</div>

The lines you paste from the article explain how the configuration of an external data-group looks like. You specify the type and the name of the file

---

<div class="post-metadata">

**Author:** ![Yann\_Desmarest\_1](https://avatars.discourse-cdn.com/v4/letter/y/65b543/32.png) [@Yann\_Desmarest\_1](https://community.f5.com/u/Yann_Desmarest_1)\
**Post date:** [May 6, 2016, 8:16pm UTC](https://community.f5.com/t/data-group-list-import-invalid-format/5570/11 "2016-05-06T20:16:13Z")

</div>

The lines you paste from the article explain how the configuration of an external data-group looks like. You specify the type and the name of the file

---

<div class="post-metadata">

**Author:** ![Yann\_Desmarest](https://avatars.discourse-cdn.com/v4/letter/y/5fc32e/32.png) [@Yann\_Desmarest](https://community.f5.com/u/Yann_Desmarest)\
**Post date:** [May 6, 2016, 8:16pm UTC](https://community.f5.com/t/data-group-list-import-invalid-format/5570/12 "2016-05-06T20:16:54Z")

</div>

Follow this chapter, it works for me : Create a New External Datagroup from the CLI Non-Interactively

---

<div class="post-metadata">

**Author:** ![Yann\_Desmarest\_1](https://avatars.discourse-cdn.com/v4/letter/y/65b543/32.png) [@Yann\_Desmarest\_1](https://community.f5.com/u/Yann_Desmarest_1)\
**Post date:** [May 6, 2016, 8:16pm UTC](https://community.f5.com/t/data-group-list-import-invalid-format/5570/13 "2016-05-06T20:16:54Z")

</div>

Follow this chapter, it works for me : Create a New External Datagroup from the CLI Non-Interactively

---

<div class="post-metadata">

**Author:** ![Doug572\_317653](https://avatars.discourse-cdn.com/v4/letter/d/a5b964/32.png) [@Doug572\_317653](https://community.f5.com/u/Doug572_317653)\
**Post date:** [May 30, 2017, 1:13pm UTC](https://community.f5.com/t/data-group-list-import-invalid-format/5570/14 "2017-05-30T13:13:19Z")

</div>

Very frustrating. He simply wants to know the format of the file to be imported to create a datagroup of IP addresses. Will no one answer that question? I’m struggling to find the same information, which should be readily available.

---

<div class="post-metadata">

**Author:** ![cjunior](https://avatars.discourse-cdn.com/v4/letter/c/779978/32.png) [@cjunior](https://community.f5.com/u/cjunior)\
**Post date:** [May 30, 2017, 2:34pm UTC](https://community.f5.com/t/data-group-list-import-invalid-format/5570/15 "2017-05-30T14:34:12Z")

</div>

Please, don’t be frustated. I don’t know if in comments they mentioned the format, so you can use this way:

```tcl
network 10.0.0.0 prefixlen 8 := "Network1",
network 172.16.0.0 prefixlen 12 := "Network2",
network 192.168.0.0 prefixlen 16 := "Network3",
host 192.168.20.1 := "Host1",
host 172.16.1.1 := "Host2"

```

Regards.

---

<div class="post-metadata">

**Author:** ![Stan\_Ward](https://avatars.discourse-cdn.com/v4/letter/s/e95f7d/32.png) [@Stan\_Ward](https://community.f5.com/u/Stan_Ward)\
**Post date:** [May 30, 2017, 6:26pm UTC](https://community.f5.com/t/data-group-list-import-invalid-format/5570/16 "2017-05-30T18:26:09Z")

</div>

cjunior, Thank you for providing the info; it was the lead I needed.

But I share the frustration; I’ve been working on that exact problem for the last hour, and stumbled across this thread while trying to solve it. The external format does not match that of the internal data group ip type, and all of the references I saw to using the above format were in the context of v9, so I ignored them. Does anyone know where the definitive reference is? I only know of Jason Rahm’s article on external data groups, and it doesn’t show an example of ip type, just string and integer.

However, after experimenting, I found that these formats also work:

```tcl
host 172.31.140.222 := "Host A",

network 172.31.140.223/32 := "Host B",

network 172.31.140.0/24 := "Network C",

```

Cheers,

Stan

---

<div class="post-metadata">

**Author:** ![cjunior](https://avatars.discourse-cdn.com/v4/letter/c/779978/32.png) [@cjunior](https://community.f5.com/u/cjunior)\
**Post date:** [May 30, 2017, 6:42pm UTC](https://community.f5.com/t/data-group-list-import-invalid-format/5570/17 "2017-05-30T18:42:13Z")

</div>

Thank you Stan,

I inherit that syntax on past and this still keep works for today on new versions.

By the way, your example is very clean to use, nice job!
