IP Scan
IP Scan
Section titled âIP ScanâTL;DR (Quick Start)
Section titled âTL;DR (Quick Start)âScan your local network:
/tool ip-scan address-range=192.168.88.0/24Listen for devices on an interface:
/tool ip-scan interface=bridge1Scan with time limit:
/tool ip-scan address-range=192.168.88.0/24 duration=30sPress q or Ctrl+C to stop the scan.
Overview
Section titled âOverviewâThe IP Scan tool discovers devices on your network by actively probing an IP address range or passively listening to traffic on an interface. It collects device information including IP addresses, MAC addresses, response times, and identification data from DNS, SNMP, and NetBIOS.
Use IP Scan when you need to inventory devices on a network segment, find devices with unknown IP addresses, identify rogue devices, or troubleshoot connectivity by confirming which hosts are online.
How IP Scan Works
Section titled âHow IP Scan WorksâIP Scan operates in two modes:
-
Active Scanning (Address Range): Sends probe packets to each IP in the specified range and listens for responses. This method actively queries the network.
-
Passive Listening (Interface): Monitors packets passing through an interface and compiles information about observed devices. This method does not generate additional traffic.
Note: Using both methods simultaneously may produce inconclusive results. Choose one method based on your needs.
Basic Usage
Section titled âBasic UsageâScan a Network Range
Section titled âScan a Network Rangeâ/tool ip-scan address-range=192.168.88.1-192.168.88.254Example Output:
ADDRESS MAC-ADDRESS TIME DNS-NAME SNMP192.168.88.1 E4:8D:8C:12:34:56 1ms router.lan MikroTik192.168.88.10 DC:A6:32:AB:CD:EF 2ms nas.lan192.168.88.25 00:11:22:33:44:55 1ms HP LaserJet192.168.88.100 B8:27:EB:11:22:33 3ms pi.lan192.168.88.150 F0:18:98:AA:BB:CC 2ms laptop.lanOutput columns:
ADDRESS- Discovered IP addressMAC-ADDRESS- Device MAC address (if on same broadcast domain)TIME- Response time in millisecondsDNS-NAME- Hostname from reverse DNS lookupSNMP- SNMP system name (if device responds to SNMP)
Scan Using Interface
Section titled âScan Using InterfaceâListen for devices on a specific interface:
/tool ip-scan interface=ether2This passively monitors traffic on the interface and reports devices it observes.
Scan a Subnet with CIDR Notation
Section titled âScan a Subnet with CIDR Notationâ/tool ip-scan address-range=10.0.0.0/24This scans all 254 usable addresses in the subnet.
Scan with Duration Limit
Section titled âScan with Duration LimitâRun the scan for a specific duration:
/tool ip-scan address-range=192.168.1.0/24 duration=30sCommon Parameters
Section titled âCommon Parametersâ| Parameter | Default | Description |
|---|---|---|
address-range | - | IP range to scan (required if interface not set) |
interface | - | Interface to listen on for passive discovery |
duration | unlimited | How long to run the scan |
Practical Examples
Section titled âPractical ExamplesâExample 1: Quick Network Inventory
Section titled âExample 1: Quick Network InventoryâScan your LAN to see all active devices:
/tool ip-scan address-range=192.168.88.0/24Press q or Ctrl+C to stop the scan when complete.
Example 2: Find Devices in a Specific Range
Section titled âExample 2: Find Devices in a Specific RangeâScan a limited range to find a specific device:
/tool ip-scan address-range=10.0.0.100-10.0.0.150Example 3: Monitor Guest Network
Section titled âExample 3: Monitor Guest NetworkâPassively observe devices on a guest VLAN interface:
/tool ip-scan interface=vlan-guestExample 4: Discover Devices on Remote Subnet
Section titled âExample 4: Discover Devices on Remote SubnetâScan a subnet accessible through routing (MAC addresses wonât be visible):
/tool ip-scan address-range=172.16.0.0/24Note: MAC addresses are only visible for devices on the same Layer 2 segment. Routed devices will show only IP address, response time, and identification data.
Understanding the Results
Section titled âUnderstanding the ResultsâMAC Address Present
Section titled âMAC Address Presentâ192.168.88.50 AA:BB:CC:DD:EE:FF 1ms printer.lanDevice is on the same broadcast domain as the scanning interface. Full Layer 2 visibility.
MAC Address Missing
Section titled âMAC Address Missingâ10.20.30.40 5ms server.remoteDevice is on a different subnet (routed path). Only Layer 3 information available.
No Response Time
Section titled âNo Response Timeâ192.168.88.99 11:22:33:44:55:66 workstationDevice discovered through passive listening or ARP, but did not respond to active probes. May have ICMP blocked.
SNMP Name Shown
Section titled âSNMP Name Shownâ192.168.88.1 E4:8D:8C:12:34:56 1ms MikroTikDevice responded to SNMP queries. This is the SNMP system name, often the device hostname or model.
Scripting with IP Scan
Section titled âScripting with IP ScanâExport Scan Results
Section titled âExport Scan ResultsâIP Scan runs interactively and doesnât directly support file export. To capture results, use the following approach:
:local output "":foreach i in=[/tool ip-scan address-range=192.168.88.0/24 duration=10s as-value] do={ :set output ($output . ($i->"address") . "\n")}:log info $outputNote: Scripting support for IP Scan is limited. For automated inventory tasks, consider using ARP table exports or DHCP leases instead.
Alternative: ARP Table Export
Section titled âAlternative: ARP Table ExportâFor a quick inventory of devices the router has communicated with:
/ip arp printAlternative: DHCP Leases
Section titled âAlternative: DHCP LeasesâFor devices that obtained addresses via DHCP:
/ip dhcp-server lease printVerification Examples
Section titled âVerification ExamplesâCheck 1: Confirm Devices Are Online
Section titled âCheck 1: Confirm Devices Are Onlineâ/tool ip-scan address-range=192.168.88.1-192.168.88.10Expected: Devices that are online appear with response times.
Check 2: Verify Device MAC Address
Section titled âCheck 2: Verify Device MAC Addressâ/tool ip-scan address-range=192.168.88.50-192.168.88.50Expected: Single device result with MAC address (if on same L2 segment).
Check 3: Find SNMP-Enabled Devices
Section titled âCheck 3: Find SNMP-Enabled Devicesâ/tool ip-scan address-range=10.0.0.0/24Expected: Devices with SNMP enabled show their system name in the SNMP column.
Troubleshooting
Section titled âTroubleshootingâProblem: âNo devices foundâ
Section titled âProblem: âNo devices foundââCauses:
- Wrong address range specified
- Devices blocking ICMP/ping
- Network not reachable from router
- Firewall blocking probe traffic
Solution:
- Verify the address range matches your network
- Check that you can ping at least one known device
- Verify routing to the target network exists
- Try using interface mode for passive discovery
Problem: âMAC addresses not showingâ
Section titled âProblem: âMAC addresses not showingââCause: Target devices are on a different subnet (routed, not bridged).
Solution: This is expected behavior. MAC addresses are only visible for devices on the same Layer 2 segment. The router only sees its next-hop MAC for routed traffic.
Problem: âSNMP names not appearingâ
Section titled âProblem: âSNMP names not appearingââCauses:
- Device doesnât have SNMP enabled
- SNMP community string mismatch
- Device firewall blocking SNMP (UDP 161)
Solution: SNMP name detection requires the device to respond to SNMP queries. Not all devices support or enable SNMP by default.
Problem: âScan takes too longâ
Section titled âProblem: âScan takes too longââCause: Large address range with many non-responsive addresses.
Solution:
- Narrow the address range
- Use the
durationparameter to limit scan time - Scan smaller subnets sequentially
Problem: âInconsistent resultsâ
Section titled âProblem: âInconsistent resultsââCause: Using both address-range and interface simultaneously.
Solution: Use one method at a time. For active discovery, use address-range. For passive monitoring, use interface.
Common Pitfalls
Section titled âCommon Pitfallsâ1. Expecting MAC Addresses from Routed Networks
Section titled â1. Expecting MAC Addresses from Routed NetworksâWrong expectation: âI scanned 172.16.0.0/24 but no MAC addresses appearâ
Right understanding: MAC addresses are Layer 2. The router only sees the MAC of its gateway for routed destinations, not the end devices.
2. Scanning Too Large a Range
Section titled â2. Scanning Too Large a RangeâWrong:
/tool ip-scan address-range=10.0.0.0/8 # 16 million addresses!Right:
/tool ip-scan address-range=10.0.0.0/24 # 254 addressesScan subnets individually rather than large blocks.
3. Relying on SNMP Names for All Devices
Section titled â3. Relying on SNMP Names for All DevicesâWrong expectation: âIP Scan will identify all my devices by nameâ
Right understanding: SNMP names only appear for devices that have SNMP enabled and respond to queries. Many consumer devices donât support SNMP.
4. Using IP Scan for Security Auditing
Section titled â4. Using IP Scan for Security AuditingâWrong: Using IP Scan as the sole method to find rogue devices.
Right: IP Scan is a helpful tool but not comprehensive. Combine with:
- DHCP lease monitoring
- ARP table inspection
- Bridge host table (
/interface bridge host print) - 802.1X port security
5. Confusing Active and Passive Modes
Section titled â5. Confusing Active and Passive ModesâWrong:
/tool ip-scan address-range=192.168.88.0/24 interface=bridge1Right: Choose one mode:
# Active scanning/tool ip-scan address-range=192.168.88.0/24
# OR passive listening/tool ip-scan interface=bridge1When to Use Other Tools
Section titled âWhen to Use Other Toolsâ| Need | Recommended Tool |
|---|---|
| Quick connectivity test | /ping |
| See known devices (L2) | /interface bridge host print |
| Check ARP entries | /ip arp print |
| View DHCP clients | /ip dhcp-server lease print |
| Port scanning | Use external tools (nmap) |
| Continuous monitoring | /tool netwatch |
| Bandwidth testing | /tool bandwidth-test |
Related Tools
Section titled âRelated Toolsâ- Ping (
/ping) - Test connectivity to specific hosts - Neighbor Discovery (
/ip neighbor print) - Discover MikroTik and LLDP/CDP devices - ARP (
/ip arp print) - View known IP-to-MAC mappings - DHCP Leases (
/ip dhcp-server lease print) - View DHCP client assignments - Bridge Hosts (
/interface bridge host print) - View MAC address table - Torch (
/tool torch) - Real-time traffic analysis
References
Section titled âReferencesâRelated Topics
Section titled âRelated TopicsâNetwork Discovery
Section titled âNetwork Discoveryâ- IP Neighbors - discover MikroTik and LLDP/CDP devices
- Ping Tool - test connectivity to specific hosts
Device Information
Section titled âDevice Informationâ- DHCP Server - view DHCP client assignments
- Bridge Hosts - view MAC address table