The hosts must be interconnected by a gateway
(assuming their subnet mask is a /24
).
If the gateway exists, the two subnet can reach each other and you can use nmap normally (e.g. nmap -sP 192.168.1.1-254
)
Then if you wanna see only traffic toward the host 192.168.1.1
, put ip.addr == 192.168.1.1
as filter on wireshark