Reference tables

CIDR masks, port and protocol numbers, and RouterOS, Cisco and Linux commands.

CIDR masks

PrefixMaskWildcardAddressesHosts
/16255.255.0.00.0.255.25565 53665 534
/17255.255.128.00.0.127.25532 76832 766
/18255.255.192.00.0.63.25516 38416 382
/19255.255.224.00.0.31.2558 1928 190
/20255.255.240.00.0.15.2554 0964 094
/21255.255.248.00.0.7.2552 0482 046
/22255.255.252.00.0.3.2551 0241 022
/23255.255.254.00.0.1.255512510
/24255.255.255.00.0.0.255256254
/25255.255.255.1280.0.0.127128126
/26255.255.255.1920.0.0.636462
/27255.255.255.2240.0.0.313230
/28255.255.255.2400.0.0.151614
/29255.255.255.2480.0.0.786
/30255.255.255.2520.0.0.342
/31255.255.255.2540.0.0.122
/32255.255.255.2550.0.0.011

A /31 has two point-to-point endpoints (RFC 3021). A /32 represents a single host or loopback route. To calculate a specific network, use the IPv4 calculator.

Ports

PortProtocolService
20–21TCPFTP
22TCPSSH
23TCPTelnet
25TCPSMTP
53TCP/UDPDNS
67–68UDPDHCP
69UDPTFTP
80TCPHTTP
123UDPNTP
161–162UDPSNMP / trap
179TCPBGP
389TCPLDAP
443TCPHTTPS
514UDPSyslog
636TCPLDAPS
830TCPNETCONF
1812–1813UDPRADIUS
3389TCPRDP
8291TCPMikroTik Winbox
8728/8729TCPRouterOS API / API-SSL

Protocol numbers IP

NumberProtocol
1ICMP
6TCP
17UDP
47GRE
50ESP
51AH
88EIGRP
89OSPF
103PIM
112VRRP

Use these numbers in firewall rules. For example, to allow OSPF: ip protocol 89 accept.

RouterOS

/export terse                          # print one command per line
/export file=backup-2026-11            # save to a file
/system backup save name=full          # binary backup for the same model
/interface print stats                 # counters and errors
/interface bridge host print where !local
/ip route print where active
/ip firewall connection print count-only
/tool torch interface=ether1           # inspect current traffic
/tool sniffer quick interface=ether1 ip-protocol=icmp
/log print where topics~"error"
/system reset-configuration no-defaults=yes   # erases the configuration

Press Ctrl+X for Safe Mode. Changes roll back if the session is interrupted.

Cisco ↔ Linux

TaskCisco IOSLinux (iproute2)
Interface addressesshow ip interface briefip -br addr
Routing tableshow ip routeip route
Route to an addressshow ip route 192.0.2.1ip route get 192.0.2.1
ARP tableshow ip arpip neigh
MAC tableshow mac address-tablebridge fdb show
Port VLANsshow vlan briefbridge vlan show
Counters and errorsshow interfaces counters errorsip -s link, ethtool -S eth0
LLDP neighborsshow lldp neighborslldpctl
Active connectionsshow ip nat translationsconntrack -L, ss -tunap
Packet capturemonitor capturetcpdump -ni eth0