A good way to detect IP of new headless FreeNAS

Status
Not open for further replies.

Herald.Yu

Dabbler
Joined
Mar 22, 2014
Messages
15
OK, I am a Chinese guy and my English is not good, please forgive me.
A few days ago, I posted an article:
How to detect FreeNAS's IP address if I have no Monitors?
In fact, the problem has not been fundamentally resolved.
The post does not aim to solve my problem, but I hope to find a good way to help more novice, let them easy to use FreeNAS .

Last day, I wrtie a tiny script by python2.7, it can detect FreeNAS IP.
QQ截图20140831114848.png


Code:
#!/usr/bin/env python
# coding:utf-8
# nasip.py
import socket

#FreeNAS hostname
hostname = 'freenas'

#Print IP address in English
print 'Your FreeNAS IP address is: ' + socket.gethostbyname(hostname) + '\n'
#Print IP address in Chinese
print '¾æÊ÷NAS IPµØÖ·: ' + socket.gethostbyname(hostname) + '\n'

raw_input('Press any key to close this windows...\n°´ÈÎÒâ¼ü¹Ø±Õ´°¿Ú...')


Problems:
If FreeNAS start CIFS services, this tools can detected IP address immediately, but if CIFS stop, it will can not be detected.

QUESTION:
How to modify the FreeNAS system‘s configuration, can automatically start the CIFS service after installation?


PS: I successfully compiled FreeNAS-9.2.1.6, but I don't konw how to modify the default configuration of the source code of FreeNAS.
 

Attachments

  • nasip.zip
    401 bytes · Views: 249
Last edited:

enemy85

Guru
Joined
Jun 10, 2011
Messages
757
This topic has already been covered few weeks ago. Have u searched in the forum?
My answer was to enter the router config pages and see for new ip address, other reply were IPMI, use third part programs on other pc to scan the network, try to point to freenas.local from a web broser to reach the GUI ecc.
There were 6-7ways to figure this out
 

enemy85

Guru
Joined
Jun 10, 2011
Messages
757
Ok, i figured out it was u on the other thread :)
 

Knowltey

Patron
Joined
Jul 21, 2013
Messages
430
Oh my god dude, just stop and think for a second.

If FreeNAS start CIFS services, this tools can detected IP address immediately, but if CIFS stop, it will can not be detected.

Well then your script isn't going to work for your fantasy user that has no monitors or ability to detect an IP, because CIFS isn't enabled by default. You have to already know the IP address of the FreeNAS box, go into the GUI and configure CIFS before your tool will even work.

You are sitting here wasting your time solving issues that do not and can not exist, and you are doing it by creating tools that only function to give you information that you already know, because you can't enable what it needs to work until you already know the information that it is going to give you.

I mean sure I can go make a batch script right now that lets me know if my computer is on. But nobody would ever use it because you have to already know that your computer is already on to use it. BTW here it is in case you want it, you may need it at the rate you're going.

Code:
@echo off
echo Yes, your computer is powered on.
pause


As I said in your other thread, if a user is so non-technical that they don't have the ability to detect the IP of a new device on their network then they have absolutely no business messing around with FreeNAS.
 
Last edited:

Whattteva

Wizard
Joined
Mar 5, 2013
Messages
1,824
Cut him some slack lol. He said he's not looking for help and just trying to help the few others that could potentially be in the same boat.
 

SirMaster

Patron
Joined
Mar 19, 2014
Messages
241
You should really just look at your router to see the IPs of your machines. It should list the computer name or at worst the MAC address in which case you can look up the MAC address online to find the manufacturer of the motherboard or pcie card that is providing the Ethernet port. Failing all that just try each IP listed in your router in the web gui. You probably don't have too many if it's a home environment.
 

Knowltey

Patron
Joined
Jul 21, 2013
Messages
430
You should really just look at your router to see the IPs of your machines. It should list the computer name or at worst the MAC address in which case you can look up the MAC address online to find the manufacturer of the motherboard or pcie card that is providing the Ethernet port. Failing all that just try each IP listed in your router in the web gui. You probably don't have too many if it's a home environment.

Nah, that was suggested in the other thread that he made and it wasn't sufficient because his fantasy user doesn't have a network.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Well if you have no network then you don't need a network address.
 

Knowltey

Patron
Joined
Jul 21, 2013
Messages
430
Well if you have no network then you don't need a network address.

Yeah, I really don't get what he is trying to get at. It's like he wants to teach his grandmother who has never touched a computer before how to run a FreeNAS...
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
I think it's just frustrating trying to negotiate a rendezvous blind. In a slightly more complex example, you might need to arrange a certain configuration on a switchport in order to place the server on a vlan, then also need to figure out what IP was assigned. I finally got tired of logging in to multiple things just to do basic stuff and put a web server running dhcpstatus on our DHCP servers, which eliminates logging into the DHCP server to rummage around trying to find out what it assigned.
 
Status
Not open for further replies.
Top