Sponsored Content
Top Forums Shell Programming and Scripting Bash script who maps IP with MAC address Post 303006408 by RudiC on Thursday 2nd of November 2017 05:07:04 AM
Old 11-02-2017
Without understanding what the request be, I'd be surprised if you could assign IPs amd MACs randomly reading from two independent files.
You should either read and use the DHCP config file, or the actual DHCP server's tables to find relations between the two.
 

10 More Discussions You Might Find Interesting

1. IP Networking

How to Achive IP address through MAC(Ethernet) address

Hi sir, i want to make such programe which takes MAC(Ethernet) address of any host & give me its IP address....... but i'm nt getting that how i can pass the MAC address to Frame........ Please give me an idea for making such program... Thanks & regards Krishna (3 Replies)
Discussion started by: krishnacins
3 Replies

2. Shell Programming and Scripting

script to compare two files of mac address

Hi I need to write a bash shell script. I have two separate text files. One file contains a list of MAC addresses taken from a network scan, the other contains a list of MAC addresses for our currently-managed devices. How can I compare these two files, and output a list of addresses that have... (6 Replies)
Discussion started by: borderblaster
6 Replies

3. Shell Programming and Scripting

trim last octate of ip address using bash script

Hi, i need to replace the last octate in ipaddress with 0 using bash shell for one of my applicatiom. googling i found the below link where they do the same thing but use long2 ip which i dont see in linux. trim ip address octet - Stack Overflow Plz can soemone guide how do i do this... (5 Replies)
Discussion started by: akshatha
5 Replies

4. Shell Programming and Scripting

bash: convert mac address to 16 character format

Hi there Im not quite sure how i can do this, but i am retrieving the mac address from boxes, which in some instances is arriving in its shortened format (i.e. dropping the leading zeros)... for example 0:3:BA:1:E:84 Im trying to figure out a way of converting the single character... (3 Replies)
Discussion started by: rethink
3 Replies

5. IP Networking

Tracing a MAC address to IP address: Solaris

Hi there I lost connectivity to one of our remote systems and when I checked the messages log I found the following: Aug 10 23:42:34 host xntpd: time reset (step) 1.681729 s Aug 16 13:20:51 host ip: WARNING: node "mac address" is using our IP address x.x.x.x on aggr1 Aug 16 13:20:51 host... (9 Replies)
Discussion started by: notreallyhere
9 Replies

6. OS X (Apple)

OpenStreetMap client (with offline maps) for Mac OS X

Hi I am searching for an OpenStreetMap client (with offline maps) for Mac OS X. Like Google Earth client, but with offline maps. (2 Replies)
Discussion started by: slashdotweenie
2 Replies

7. Shell Programming and Scripting

IP Address LookUp Bash Script

I am new to bash scripting. I want write a script that reads from the first argument file and run nslookup, then prints out each nslookup. Something like below: File name = ip 8.8.8.8 8.8.4.4 Bash shell script: nslookup.sh #!/bin/bash for i in $1 do nslookup $i done I... (7 Replies)
Discussion started by: boldnbeautiful
7 Replies

8. Shell Programming and Scripting

Script extracting ip address from MAC wifi card

Hi Everybody, Goal: From my backup box on my local network, knowing the Wifi MAC address of my laptop, I would like to dynamically identify which ip address is attributed to my laptop. The aim is to store this ip address in a local variable and that this information is retrieved by another... (11 Replies)
Discussion started by: freddie50
11 Replies

9. IP Networking

MAC Address - Four Interfaces with the same MAC Address

four interfaces with ifconfig all interfaces have the same mac. If is not set for unique. but it still works. what difference does it make to have all macs the same or different? (4 Replies)
Discussion started by: rrodgers
4 Replies

10. UNIX for Beginners Questions & Answers

How to write a value to a physical memory address in bash script?

How would I write a value to a physical memory address? I was able to read a physical memory address (for example, 0x400) using this line: dd if=/dev/mem count=4 bs=1 skip=$(( 0x400 )) But I get an error: dd: 'standard input': cannot skip to specified offset when I try to write using... (1 Reply)
Discussion started by: rabrandt
1 Replies
bptojdb(8)						      System Manager's Manual							bptojdb(8)

NAME
bptojdb - Converts bootptab entries into permanent, static IP entries for JOIN databases. SYNOPSIS
/usr/sbin/bptojdb [-m | -f] filename OPTIONS
Create client IDs for Microsoft DHCP clients. Microsoft does not use the client's MAC address by itself as the client identifier. Instead, it prepends a 01 (Ethernet) to the MAC address and changes the hardware type to 0 (generic). If the clients in your bootptab file are Microsoft clients, you will need to use the -m option. Create client IDs for FTP Software's DHCP clients. FTP Software does not use the client's MAC address by itself as the client identifier. Instead, it creates a 16-byte client identifier with the prefix "cid-". If the clients in your bootptab file are FTP Software DHCP clients, you will need to use the -f option. DESCRIPTION
The bptojdb program reads entries in a standard bootptab file and creates permanent, static IP entries for the JOIN databases. After read- ing the bootptab file, bptojdb displays to the standard output entries in a format suitable for the jdbmod utility. Each MAC address in the bootptab file is given a static IP address with a permanent lease. To store the information in the JOIN databases, run jdbmod with the converted data. For example: bptojdb bootptab | jdbmod FILES
SEE ALSO
Commands: jdbdump(8), jdbmod(8) bptojdb(8)
All times are GMT -4. The time now is 11:18 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy