Mapping Servers


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Mapping Servers
# 1  
Old 05-20-2013
Mapping Servers

Hi All,
I need an urgent assistance please .

My case below:
I have a list of 500 IP addresses.
All These ip addresses are mapped/connected to different machine kinds : NT, Linux, Switch, Router ,FW, and so on.

My Requirement is to filter from all this ip address only the Linux machines.
In other words,to create a mapping of all the Linux (Centos) Machines.

Now I do not sure what would be the best way to do it.

In order that operation will performed on a practical way,
i have an central linux server that can be consider as an SSH Server,Although he did not ,Since it still without an organized hosts list of all Linux servers in the organization, and of course it does not connect to all servers without a password.

But for the operation that will needs to perform, this server can communicates on the LAN with all the linux machine with Ping and SSH , with all this Linux servers that exist behind the ip addresses list .

i thought maybe build a bash script , that will runs from the central server, on all the IP Address , and during the action, it will sent the results into a text file , output from the 500 IP Address that it was able to open them session in SSH.
Is this the right way? Is there something else?

Please Assist.
# 2  
Old 05-20-2013
You should check out the output of:
Code:
nmap -O -v $hosname

# 3  
Old 05-20-2013
Do you guys not have a network diagram? We can tell by IP what switch something is connected to, and this tells us right away: desktop PC, unix box, windows server, etc.

I am assuming that the linux, NT, etc boxes have names like Server1 or whatever.
What you want to do requires some sort of human intervention.

Your first step would be to get the node names of things. Why? Because people tend to name things in such a way that you get meaning from the name. This will allow you to winnow the list down to something manageable.

Let's assume you have a file with 500 ip addresses in it. I'll call it ip.dat. This is a bash script example.

Code:
while read ip
do
  nslookup "$ip"
done < ip.dat > outputfile

The file called outputfile requires humans to read it. So get it into an editor.
You should be able to manually eliminate a lot of ip's from the list. From that point you will have to login via ssh to verify what each box is. If the name of the box does not tell you.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Many to many -- mapping

INPUT 13333--TEXT1 14444--TEXT2 13333--TEXT3 12233--TEXT5 14444--TEXT5 12233--TEXT1 12222--TEXT5 13333--TEXT09 what I'm looking for is something using awk arrays with below given output. 14444--TEXT2,TEXT5 13333--TEXT1,TEXT3,TEXT09 12233--TEXT5,TEXT1 12222--TEXT5 (6 Replies)
Discussion started by: busyboy
6 Replies

2. UNIX for Dummies Questions & Answers

Mapping drive

please forgive me. i know this is unix forum. CIFS can map to shared windows folder. i just wonder if windows can map to unix shared folder. if yes, please enlight me... (5 Replies)
Discussion started by: lawsongeek
5 Replies

3. Shell Programming and Scripting

Creating unique mapping from multiple mapping

Hello, I do not know if this is the right title to use. I have a large dictionary database which has the following structure: where a b c d e are in English and p q r s t are in a target language., the two separated by the delimiter =. What I am looking for is a perl script which will take... (5 Replies)
Discussion started by: gimley
5 Replies

4. UNIX for Dummies Questions & Answers

Re-Mapping Printers.

Hi we have a situation where some printers are on a server that sometimes has to be rebooted. If this happens the Unix boxes we have that are referencing the printers in the vfstab file fail to work even when the print server is brought back up. Does anyone know if it would be possible to put... (0 Replies)
Discussion started by: Hadleyshope
0 Replies

5. Shell Programming and Scripting

Bit Mapping

Hi All, I am working on the Scenario where i need compare the integer value with other using bit mapping. input file, 1,4,5,4 1,2,4,6 2,3,4,4 like i have many fields. Script : i need to filter hte field one value "1" and field 3 value "4" and Filed 4 i need to do the Bitwise... (5 Replies)
Discussion started by: readycpbala
5 Replies

6. Shell Programming and Scripting

Pattern mapping

Dear Friends, Please help me on this I have file A.txt containing text lines as below grectec; 30 ,50, 60, base_123 ; top09 grectec; 30 ,55, 60, base_123 ; top09 grectec; 10 ,53, 60, base_123 ; top09 grectec; 50 ,57, 60, base_123 ; top09 ... ... another file B.txt containing test... (4 Replies)
Discussion started by: Danish Shakil
4 Replies

7. UNIX for Dummies Questions & Answers

Mapping PF Keys in Vi

This is my first post and right off the bat, I want to let you know that my experience in UNIX is 2 days only backed up with over 20 years of IT working. So, if this is a dumb question or too stupid, please bear with me. I read somewhere on the web and also on these forums that you can map your... (7 Replies)
Discussion started by: sssccc
7 Replies

8. Shell Programming and Scripting

searching and mapping

Hi, I just started looking into various aspect of unix shell scripting. I am completely new to the world of UNIX. Could any one help me in solving the following requirement. I have a parameter file with some data e.g. sample.param ------------- Andrew=201 Bob=219 Shelly=239... (4 Replies)
Discussion started by: mamatabbsr
4 Replies

9. UNIX for Dummies Questions & Answers

Keyboard Mapping HP-UX

This is truly embarrassing but I have to know the answer anyway :p Can anyone share, how to assign keyboard mapping in hp-ux system? Every time I issue command which contain character "@", it'll go the next line. What I need is how to assign the character "@" to @ as it is supposed to be. ... (2 Replies)
Discussion started by: Olli.Lang
2 Replies

10. UNIX for Advanced & Expert Users

kernel mapping...

> how the sendmsg and recvmsg calls will know which kernel module to use (SCTP, RTP etc.) internally(kernel mapping: how kernel handle socket call) (1 Reply)
Discussion started by: prangin
1 Replies
Login or Register to Ask a Question