Quantcast
Channel: All SRX Services Gateway posts
Viewing all articles
Browse latest Browse all 17645

Re: How to add huge list of ips to prefix-list using CLI

$
0
0

Hi,

 

You can edit the prefix-list and do a load merge.

Before that you may need to use some scripting or editors to append the ';'  to the prefix list.

 

I normally use sed on *NIX to append the ';'

Example:

> sed -e 's/$/;/' prefix.txt

Then, edit policy prefix-list xxx, load merge relative terminal. Example below:

[edit policy-options prefix-list TEST]
root@PE2# load merge relative terminal
[Type ^D at a new line to end input]
94.38.108.24;
94.54.42.82;
94.61.171.253;
94.62.98.162;
95.128.34.171;
95.139.161.113;
95.141.27.91;
95.141.31.16;
95.141.31.19;
load complete

[edit policy-options prefix-list TEST]
root@PE2# show
94.38.108.24/32;
94.54.42.82/32;
94.61.171.253/32;
94.62.98.162/32;
95.128.34.171/32;
95.139.161.113/32;
95.141.27.91/32;
95.141.31.16/32;
95.141.31.19/32;

There might be other ways of doing this, network automation using Ansible or Junos space for instance, but those do not involve the JUNOS CLI.


Viewing all articles
Browse latest Browse all 17645

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>