UDP port
Port 520: RIP
UDP port 520 is RIP: every 30 seconds a router sends its whole routing table to its neighbours on this port, at the multicast address 224.0.0.9.
- A neighbour adds one hop to each route it hears and keeps the lowest count; 16 hops means unreachable.
Check port 520 on Linux
Put the server's name or address in place of HOST.
ss -ulnp 'sport = :520'- On the server: is a program listening on UDP port 520, and which? How to read ss.
tcpdump -ni any udp port 520- On either end: the datagrams to and from UDP port 520. With UDP this is the sure test, since nothing is acknowledged. How to read tcpdump.
nmap -sU -p 520 HOST- From outside: a UDP scan of port 520. No answer reads open|filtered: UDP does not say which. How to read nmap.
What runs on it
- RIP
- A distance-vector routing protocol: each router tells its neighbours how many hops away every network is.
- Split horizon
- Never announce a route back on the card it was learned on; poisoned reverse announces it at infinity instead.
- Counting to infinity
- Routers in a loop each believe the next about a lost route, raising its metric one step at a time.
Use port 520 on real machines
Open RIP routing: routers that learn by rumor