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

Initial commit.

parents
# 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 "apt.emulab.net";
#option domain-name-servers ns1.example.org, ns2.example.org;
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.
authoritative;
# 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 255.255.255.0 ;
#option broadcast-address 192.168.0.255;
#option routers 192.168.4.80;
#option domain-name-servers 192.168.4.80;
#option time-servers 192.168.4.80;
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.101 192.168.1.110;
}
subnet 192.168.2.0 netmask 255.255.255.0 {
range 192.168.2.101 192.168.2.110;
}
#!/bin/bash
IF1=`/usr/local/etc/emulab/findif -i 192.168.1.1`
IF2=`/usr/local/etc/emulab/findif -i 192.168.2.1`
MYWD=`dirname $0`
if [ -z $IF1 -o -z $IF2 ]
then
echo "Could not get interfaces for running dhcpd!"
exit 1
fi
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
/^INTERFACES/c
INTERFACES="$IF1 $IF2"
.
w
SNIP
if [ $? -ne 0 ]
then
echo "Failed to edit dhcp defaults file!"
exit 1
fi
service isc-dhcp-server start
exit $?
"""A profile that instantiates a PC connected to two Iris radios. The latter connected via RF.
Instructions:
None.
"""
import geni.portal as portal
import geni.urn as urn
import geni.rspec.pg as pg
import geni.rspec.emulab as elab
# Resource strings
PCIMG = "urn:publicid:IDN+emulab.net+image+argos-test:soapyuhd"
PCHWTYPE = "d430"
IRISHWTYPE = "iris030"
#IRISIMG = "urn:publicid:IDN+phantomnet.org+image+emulab-ops:GENERICDEV-NOVLANS"
# 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("192.168.1.1", "255.255.255.0"))
ifpc1ir2 = pc1.addInterface("pc1ir2", pg.IPv4Address("192.168.2.1", "255.255.255.0"))
# 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")
rflink1.addNode(ir1)
rflink1.addNode(ir2)
# Print the RSpec to the enclosing page.
portal.context.printRequestRSpec()
\ 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