IPSO Route Extract

From FrogspawnWiki

Jump to: navigation, search

I haven't tested this, but it makes sense.

awk -F":" '/gateway:address/ { arg=split($11,GW," "); print "set static-route "$6"/"$8" nexthop gateway address "GW[1]" on"}' /config/db/initial

from this CPUG post

What it should do is, given the routes from /config/db/initial, it'll print you out a block of text that can be pasted in to a clish session to reproduce the routing table.

I have found that extracting from IPSO 3.4.1 (I have some old firewalls) to produce a script to throw into voyager's static route quick add the following was correct

awk -F":" '/gateway:address/ { arg=split($9,GW," "); print $4"/"$6" "GW[1]}' /config/db/initial

For IPSO 3.7.1 the awk fields were correct from the CPUG post, so the following worked

awk -F":" '/gateway:address/ { arg=split($11,GW," "); print $6"/"$8" "GW[1]}' /config/db/initial

Both give output of the form network/cidr nexthop but did need a little pruning.

Personal tools