Commit 633a29b6 authored by Kirk Webb's avatar Kirk Webb

Initial commit.

# The ddns-updates-style parameter controls whether or not the server will
# attempt to do a DNS update when a lease is confirmed. We default to the
# behavior of the version 2 packages ('none', since DHCP v2 didn't
# have support for DDNS.)
ddns-update-style none;
# option definitions common to all supported networks...
#option domain-name "";
#option domain-name-servers,;
default-lease-time 86400;
max-lease-time 172800;
# If this DHCP server is the official DHCP server for the local
# network, the authoritative directive should be uncommented.
# Use this to send dhcp log messages to a different log file (you also
# have to hack syslog.conf to complete the redirection).
#log-facility local7;
# Allow booting
allow booting;
allow bootp;
log-facility local7;
#option subnet-mask ;
#option broadcast-address;
#option routers;
#option domain-name-servers;
#option time-servers;
subnet netmask {
subnet netmask {
IF1=`/usr/local/etc/emulab/findif -i`
IF2=`/usr/local/etc/emulab/findif -i`
MYWD=`dirname $0`
if [ -z $IF1 -o -z $IF2 ]
echo "Could not get interfaces for running dhcpd!"
exit 1
apt-get update && apt-get install isc-dhcp-server || \
{ echo "Failed to install ISC DHCP server!" && exit 1; }
cp -f $MYWD/dhcpd.conf /etc/dhcpd/dhcpd.conf || \
{ echo "Could not copy dhcp config file into place!" && exit 1; }
ed /etc/default/isc-dhcp-server << SNIP
if [ $? -ne 0 ]
echo "Failed to edit dhcp defaults file!"
exit 1
service isc-dhcp-server start
exit $?
"""A profile that instantiates a PC connected to two Iris radios. The latter connected via RF.
import geni.portal as portal
import geni.urn as urn
import as pg
import geni.rspec.emulab as elab
# Resource strings
PCIMG = ""
PCHWTYPE = "d430"
IRISHWTYPE = "iris030"
# Create a Request object to start building the RSpec.
request = portal.context.makeRequestRSpec()
# Request a PC
pc1 = request.RawPC("pc1")
pc1.hardware_type = PCHWTYPE
pc1.disk_image = PCIMG
ifpc1ir1 = pc1.addInterface("pc1ir1", pg.IPv4Address("", ""))
ifpc1ir2 = pc1.addInterface("pc1ir2", pg.IPv4Address("", ""))
# Request an Iris SDR
ir1 = request.RawPC("iris1")
ir1.hardware_type = IRISHWTYPE
#ir1.disk_image = IRISIMG
# Request a second Iris SDR
ir2 = request.RawPC("iris2")
ir2.hardware_type = IRISHWTYPE
#ir2.disk_image = IRISIMG
# Connect nuc1 to ir1 over the wired net
link1 = request.Link("l1", members=[ifpc1ir1,ir1])
# Connect nuc1 to ir2 over the wired net
link2 = request.Link("l2", members=[ifpc1ir2,ir2])
# Connect the two Iris radios over RF
rflink1 = request.RFLink("rf1")
# Print the RSpec to the enclosing page.
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment