Opened 4 months ago

Last modified 4 months ago

#1016 assigned task

Setup non-VBox DHCP server

Reported by: skylar Owned by: skylar
Priority: major Milestone:
Component: Both Version:
Keywords: Cc:
Blocked By: Blocking: #1001
Estimated Hours: 1 Total Hours: 0

Description


Change History (5)

comment:1 Changed 4 months ago by skylar

  • Status changed from new to assigned
  1. Create VM:
    [skylar@bigfe /mnt/disk0/iso]$ VBoxManage createvm --name dhcp --ostype NetBSD_64 --register
    Virtual machine 'dhcp' is created and registered.
    UUID: d439305f-4c32-4b66-93f1-1faab89443cb
    Settings file: '/cluster/home2/skylar/VirtualBox VMs/dhcp/dhcp.vbox'
    
  2. Set hardware parameters:
    [skylar@bigfe /mnt/disk0/iso]$ VBoxManage modifyvm dhcp --hwvirtex on --apic on --x2apic on --acpi on --ioapic on --nic1 intnet --nic2 intnet --intnet1 bccd-ng0 --intnet2 bccd-ng2 --vrde on --vrdeport 3915 --vrdeaddress 127.0.0.1 --vrdeauthtype null 
    
  3. Create disk:
    [skylar@bigfe /mnt/disk0/iso]$ VBoxManage createmedium disk --filename /mnt/disk0/vbox/netbsd_dhcp.vdi --size 20000 
    0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
    Medium created. UUID: 69e1b0c7-ea4a-4fb2-a092-fe3ed35b2924
    
  4. Add SATA controller:
    [skylar@bigfe /mnt/disk0/iso]$ VBoxManage storagectl dhcp --name sata0 --add sata --portcount 4 --bootable on 
    
  5. Attach media:
    [skylar@bigfe /mnt/disk0/iso]$ VBoxManage storageattach dhcp --storagectl sata0 --port 0 --device 0 --type hdd --medium /mnt/disk0/vbox/netbsd_dhcp.vdi 
    [skylar@bigfe /mnt/disk0/iso]$ VBoxManage storageattach dhcp --storagectl sata0 --port 1 --device 0 --type dvddrive --medium /mnt/disk0/iso/NetBSD-8.1-amd64.iso 
    
Version 0, edited 4 months ago by skylar (next)

comment:2 Changed 4 months ago by skylar

Setup SSH forwarding:

[skylar@bigfe /mnt/disk0/iso]$ VBoxManage modifyvm dhcp --natpf1 ssh,tcp,,3914,,22

comment:3 Changed 4 months ago by skylar

Fix network names:

VBoxManage modifyvm dhcp --nic2 intnet --nic3 intnet --intnet2 bccd-ng0-net --intnet3 bccd-ng2-net

comment:4 Changed 4 months ago by skylar

bog simple dhcpd.conf:

authoritative;
default-lease-time 3600;
max-lease-time 86400;

subnet 192.168.11.0 netmask 255.255.255.0 {
        range 192.168.11.10 192.168.11.250;
}

subnet 192.168.12.0 netmask 255.255.255.0 {
        range 192.168.12.10 192.168.12.250;
}

comment:5 Changed 4 months ago by skylar

rc.conf configs (one interface each on NAT, bccd-ng0, bccd-ng2):

dhcpcd=YES
dhcpcd_flags="wm0"
hostname="dhcp"
ifconfig_wm1="192.168.11.1 netmask 0xffffff00"
ifconfig_wm2="192.168.12.1 netmask 0xffffff00"
dhcpd=YES
Last edited 4 months ago by skylar (previous) (diff)
Note: See TracTickets for help on using tickets.