UrbanPro
true

Learn Linux from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

How to detect duplicate address manually in a network from Linux ?

Ansil H.
04/09/2016 0 0

 

Below script will help you to detect duplicate IP address in a subnet 

The key command is the arping command which will send out an ARP packet with DAD (duplicate address detection)

If the return value is zero indicates , everything is good and non-zero return value indicates duplicate IP

---------------------------------------------------------------

#!/bin/bash

DEVICE=eth0 # <-- Your device plugged to netowork

IPADDR="X.X.X.X" # <-- IP address to check for duplicates 

if [ ! arping -q -c 2 -w 3 -D -I ${DEVICE} ${IPADDR} ]

then

   echo $"Error, some other host already uses address ${IPADDR}."

   exit 1

fi

---------------------------------------------------------------

0 Dislike
Follow 0

Please Enter a comment

Submit

Other Lessons for You

Linux File System
Linux File system: Right click on Desktop and click open interminal Login to Linux system and run simple commands: Check present Working Directory: $pwd /home/cloudera/Desktop Change Directory: $cd...

Introduction to Programming Languages
What is a Programming Language? A programming language is a formal computer language or constructed language designed to communicate instructions to a machine, particularly a computer. Programming languages...

LINUX - SETTING UP YUM REPOSITORY
If we buy RHEL 7 the system by default will be connected to Red Hat Network (RHN). All packages and updates will be installed from RHN. So RHN will be our main source and repository. Since we have...
A

Aseem .

1 0
0

LINUX SERVER ADMINISTRATION
Permissions in Linux rwx|rwx|rwx =user | group | others R==4 W==2 X==1 what's the total? 421|421|421 777 So 7 has 4, 2,1==which means full. Permission (that is read write and execute) ...

Linux Introdution
Linux is a UNIX-base operating system. Its original creator was a Finnish student name Linus Torvalds, although being ‘open source’ it has change a great deal since its original conception....
X

Looking for Linux Classes?

The best tutors for Linux Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn Linux with the Best Tutors

The best Tutors for Linux Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more