Reference tables
CIDR masks, port and protocol numbers, and RouterOS, Cisco and Linux commands.
CIDR masks
| Prefix | Mask | Wildcard | Addresses | Hosts |
|---|---|---|---|---|
| /16 | 255.255.0.0 | 0.0.255.255 | 65 536 | 65 534 |
| /17 | 255.255.128.0 | 0.0.127.255 | 32 768 | 32 766 |
| /18 | 255.255.192.0 | 0.0.63.255 | 16 384 | 16 382 |
| /19 | 255.255.224.0 | 0.0.31.255 | 8 192 | 8 190 |
| /20 | 255.255.240.0 | 0.0.15.255 | 4 096 | 4 094 |
| /21 | 255.255.248.0 | 0.0.7.255 | 2 048 | 2 046 |
| /22 | 255.255.252.0 | 0.0.3.255 | 1 024 | 1 022 |
| /23 | 255.255.254.0 | 0.0.1.255 | 512 | 510 |
| /24 | 255.255.255.0 | 0.0.0.255 | 256 | 254 |
| /25 | 255.255.255.128 | 0.0.0.127 | 128 | 126 |
| /26 | 255.255.255.192 | 0.0.0.63 | 64 | 62 |
| /27 | 255.255.255.224 | 0.0.0.31 | 32 | 30 |
| /28 | 255.255.255.240 | 0.0.0.15 | 16 | 14 |
| /29 | 255.255.255.248 | 0.0.0.7 | 8 | 6 |
| /30 | 255.255.255.252 | 0.0.0.3 | 4 | 2 |
| /31 | 255.255.255.254 | 0.0.0.1 | 2 | 2 |
| /32 | 255.255.255.255 | 0.0.0.0 | 1 | 1 |
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
| Port | Protocol | Service |
|---|---|---|
| 20–21 | TCP | FTP |
| 22 | TCP | SSH |
| 23 | TCP | Telnet |
| 25 | TCP | SMTP |
| 53 | TCP/UDP | DNS |
| 67–68 | UDP | DHCP |
| 69 | UDP | TFTP |
| 80 | TCP | HTTP |
| 123 | UDP | NTP |
| 161–162 | UDP | SNMP / trap |
| 179 | TCP | BGP |
| 389 | TCP | LDAP |
| 443 | TCP | HTTPS |
| 514 | UDP | Syslog |
| 636 | TCP | LDAPS |
| 830 | TCP | NETCONF |
| 1812–1813 | UDP | RADIUS |
| 3389 | TCP | RDP |
| 8291 | TCP | MikroTik Winbox |
| 8728/8729 | TCP | RouterOS API / API-SSL |
Protocol numbers IP
| Number | Protocol |
|---|---|
| 1 | ICMP |
| 6 | TCP |
| 17 | UDP |
| 47 | GRE |
| 50 | ESP |
| 51 | AH |
| 88 | EIGRP |
| 89 | OSPF |
| 103 | PIM |
| 112 | VRRP |
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
| Task | Cisco IOS | Linux (iproute2) |
|---|---|---|
| Interface addresses | show ip interface brief | ip -br addr |
| Routing table | show ip route | ip route |
| Route to an address | show ip route 192.0.2.1 | ip route get 192.0.2.1 |
| ARP table | show ip arp | ip neigh |
| MAC table | show mac address-table | bridge fdb show |
| Port VLANs | show vlan brief | bridge vlan show |
| Counters and errors | show interfaces counters errors | ip -s link, ethtool -S eth0 |
| LLDP neighbors | show lldp neighbors | lldpctl |
| Active connections | show ip nat translations | conntrack -L, ss -tunap |
| Packet capture | monitor capture | tcpdump -ni eth0 |