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 Syllabus
Part I Geting Familiar with Red Hat Enterprise Linux Chapter 1 Geting Started with Red Hat Enterprise Linux Linux, Open Source, and Red Hat Origins of Linux Distributions Fedora Red Hat Enterprise...

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

How To Start Shell Scripting?
Hi learners, I would like to share my knowledge in shell scripting: Every new Linux learners goal is to learn shell scripting. But only a few starts quickly writing the shell scripts.Why? The reasons...

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 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