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

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

Be prepared to get trained--init
Before starting the training,students must be mentally prepared for acceptance of new knowledge. Students must attend training with open minded forgetting the position they are working.This will help...
S

Smartnub Softsolutions

0 0
0

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

UNDERSTANDING PROCESSES - RED HAT ENTERPRISE LINUX
What is a Process An instance of a program is called a Process. Any command that you give to your Linux machine starts a new process. It is possible that for the same program we have multiple processes. Types...
A

Aseem .

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