---
layout: page
title: Script to determine which AS, do not filter ROA invalid prefixes, based on data from the GRC
permalink: /blog/dn42-grc-roa/
keywords: test,dn42,roa
description: A small shell command to determine which AS do not filter ROA invalid prefixes in dn42
lang: en
date: 2023-07-18 00:00:00 +0100
updated: 2024-07-09 00:00:00 +0100
---

Burble (AS4242422601) announces the prefix `fd42:4242:2601:ffff::/64` with ROA Invalid to test which AS filter ROA Invalid prefix and which do not. The following script identifies some ASs that do not filter. For this it asks the GRC via SSH which AS "pass" the invalid prefix to the GRC and do not filter it out. These and the ASs in the AS path are then output. The origin AS of burble is excluded.
```sh
ssh shell@collector.dn42 "show route for fd42:4242:2601:ffff::/64 where bgp_path.first != 4242422601 all" 2>/dev/null | grep -Po "BGP.as_path: (\d{1,20} ?)+" | grep -Po "\d+" | grep -v "4242422601" | sort | uniq
```