from
Hi everyone!
Maybe someone faced such a problem:
I want to build a Layer 2 network topology, I have enough data for this. I am working with the Network Diagram Viz app. And I have a table of links, something like this:
from | to | local_int | remote_int | linkcolor | type | linktext | value |
AIC-switch-2960.aic.kz | SW9300test.aic.kz | Gi0/1 | Gi1/0/23 | green | deployment-server | Gi0/1 to Gi1/0/23 | AIC-switch-2960.aic.kz |
SW9300test.aic.kz | AIC-switch-2960.aic.kz | Gi1/0/23 | Gi0/1 | green | deployment-server | Gi1/0/23 to Gi0/1 | SW9300test.aic.kz |
SW9300test.aic.kz | SW3850test.aic.kz | Gi1/0/9 | Gi1/0/9 | green | deployment-server | Gi1/0/9 to Gi1/0/9 | SW9300test.aic.kz |
SW9300test.aic.kz | SW3850test.aic.kz | Gi1/0/10 | Gi1/0/10 | green | deployment-server | Gi1/0/10 to Gi1/0/10 | SW9300test.aic.kz |
SW3850test.aic.kz | SW9300test.aic.kz | Gi1/0/9 | Gi1/0/9 | green | deployment-server | Gi1/0/9 to Gi1/0/9 | SW3850test.aic.kz |
SW3850test.aic.kz | SW9300test.aic.kz | Gi1/0/10 | Gi1/0/10 | green | deployment-server | Gi1/0/10 to Gi1/0/10 | SW3850test.aic.kz |
AIC-switch-2960.aic.kz | SIP-W60B | Gi0/12 | WAN PORT | green | phone-square | Gi0/12 to WAN PORT | AIC-switch-2960.aic.kz |
And, accordingly, in the topology, this is:
I took information about connected devices from AIC-switch-2960.aic.kz, SW9300test.aic.kz and SW3850test.aic.kz.
I just need to remove non-redundant links from the table. What solution can you advise to delete such entries automatically or some other way?
Thanks!
Hi @Zhanali,
Please try adding below spl to the end of your search, it will dedup redundant links.
| eval ftlink=if(local_int>remote_int,local_int.remote_int,remote_int.local_int)
| eval ft=if(from>to,from.to.ftlink,to.from.ftlink)
| dedup ft
| fields - ft
Hi @Zhanali,
Please try adding below spl to the end of your search, it will dedup redundant links.
| eval ftlink=if(local_int>remote_int,local_int.remote_int,remote_int.local_int)
| eval ft=if(from>to,from.to.ftlink,to.from.ftlink)
| dedup ft
| fields - ft
Thank you! It really works.
In your terms, what is a redundant link and how do you determine this from your data?
Hi!
The first two lines describe such a connection between switches:
There is only one link between them. But each switch sees its neighbor and sends information about it, respectively, two records will appear in the table, and the Network Diagram Viz application builds two links between them. I need to somehow combine such records or just delete the second records.
This is what the actual topology looks like: