Aquarium CB 21MHz Electronics Music Photos ZX Spectrum +2A Cooking Fishing Main page Aquarium CB 27MHz Electronics Music Fotos ZX Spectrum Cooking Fishing

Česká verze

Linux and routing

Generating of basic Calstats config files from ospf

Calstats is a script for viewing computer status in the network map.
At first we need an oasf database as *.txt file. We can use script ospfd_database.cgi
#!/bin/bash
echo Content-type: text/plain
echo
echo "ospfd database routeru `hostname`"
echo
password=password_ospfd
(echo $password; \
 echo show ip ospf database router; \
 echo exit) | nc localhost 2604
Then we place *.txt file to the same folder as scripts
gen_ospf_config.pl
gen_ospf_configs
and we can run gen_ospf_configs.
If you have a previous *.comp file you can rename it to *.comp.old and it will be used for computer names.
For our ospf cloud 10.32/15 it results in
cloud_severovychod.txt
cloud_severovychod.comp
cloud_severovychod.config
cloud_severovychod.legend
cloud_severovychod.link
and calstats produces this picture.
gen_ospf_config output

This map is not a real one but we can rearrange it by flash script CaLStats Editor.

Generating OSPF links for Calstats online

It is made by script gen_stats_ospf that is based on script gen_stats from Calstats but it is in addition a calling of gen_ospf_link.pl that grabs ospfd database using ospfd_database.cgi and produces just the list of links.
Actual version you can find at websvn.jablonka.cz.
Before calling Calstats we use *.basic file with persistent links and we add generated *.ospf to *.link file and then we call Calstats.
Calstats with ospf links online

NAT and ospf problem

When we use NAT for all router packets including multicast ones and conntrack table gets overcrowded we get in ospfd.log
OSPF: *** sendmsg in ospf_write to 224.0.0.5 failed with Operation not permitted
and ospfd makes crappy things from that time. All ospf routes are gone from routing table and hotsanic graph looks like this
Main page