[GNU/Linux] Shell script to check ip conflicts in a network

| | 1 min read

This is a small shell script that will help to detect ip conflicts in a network. The notify-send command, used in the script, will enable a popup if any ip conflict is detected. You can run this script in cron. You will get a notification as pop up, if there is any ip conflict in the network.

 #!/bin/bash

# Script to check ipconflict
# Grep the word "Dup" and enable a pop up to show that there is ip conflict

sudo arp-scan -I eth2 -l | grep DUP

if [[ $? == 0 ]]; then
  notify-send "Ip-conflict detected"
fi