welcome: please sign in
location: NetReg

Moved To: https://osmium.morningside.edu/confluence/x/BAAhAQ

NetReg

About NetReg

netreg.morningside.edu serves as DHCP server for Morningside College Network.

On wired, it also enforces a mandatory "registration" before clients can receive a valid IP address.

Typical Subnet schema

A typical subnet on campus is a class-c (192.168.x.0) where x is in the range 1-255 and typically corresponds to the assigned VLAN. A typical subnet is broken out as follows:

192.168.x.1

Default gateway for the subnet

192.168.x.2-52

Jailed dhcp range

192.168.x.53-62

Guest dhcp range

192.168.x.64-128

Static (non-dhcp) range (printers, projectors, etc)

192.168.x.129-253

Registered dhcp range

Registering a Device

If the device you're attempting to register has a web browser, simply visit http://netreg.morningside.edu.

If the device does not have a web browser, email help@morningside.edu and they can register the device. Be sure to include your username and the wired MAC address of your device.

Batch Registering Devices

Requirements:

SSH access to netreg to copy csv files and access to execute batch_add.py

For the yearly purchase of notebook computers (which typically come with a spreadsheet of MAC Addresses + Hardware) a batch add program has been written at netreg:/usr/local/bin/batch_add.py:

To add a set of computers, take the spreadsheet as delivered from purchasing and massage it a bit to make it NetReg-friendly. It should have the following headers (though alternates can be specified on the command line.): HOSTNAME, WIRELESS, STUDENTS. Hostname is typically the serial number field, wireless is the MAC address of the wireless card, and STUDENTS is the MAC Address of the ethernet card (the batch-add program adds the hardware as a student registration.)

The CSV should only contain these three columns saved as "windows csv". Example:

Once a CSV file is created from each spreadsheet (typically one from each bulk order), they will be uploaded to NetReg in /root/batch_registrations/YYYY where YYYY is the current calendar year.

To actually register computers in batch, the batch_add.py program is called with specifying the csv file for a given order along with a comment to give to each one (which is visible from the NetReg admin interface):

Comments should be named in a way that identifies the batch a computer came from, Marcie consistently specifies the batch size and date so I use those fields in my comment.

If everything goes well and there are no formatting or duplication errors, the script will (unless stopped) immediately install the entries into NetReg.

NetReg Errors

If you have to assign a loaner to a faculty, be sure the NetReg for wireless AND wired have been deleted. A student NetReg'd computer cannot access the internet on the admin subnets. It will have Limited or No Connectivity

How DHCPD is managed by Refresh DHCPD Script

Netreg uses a fail-safe system to ensure that "bad" addresses don't get added. The system goes like this:

  1. A new hardware address is registered. This registration goes into dynamic.reg.new (there is also permanent.reg.new and manual.reg.new, if you wonder)

  2. At the top of the minute (or when you click the manual "Refresh" link at the top of most Admin NetReg pages) a program is run. It moves all of the current files (dynamic.reg and friends) to dynamic.reg.bak and moves dynamic.reg.new to dynamic.reg.

  3. The server then runs a self-test;
    • if the files are OK the service is reset and the new settings take affect.
    • If the files are NOT OK, the files are all renamed dynamic.reg.bad and the old/bak files are put back


CategorySTAProgram

NetReg (last edited 2017-02-26 17:28:47 by meyersh)