Skip to content

Class Lab 3.1: Simple DHCP Relay Hardware Lab

Emma edited this page Sep 8, 2025 · 16 revisions

Overview

In this lab we are creating the environment from Week 1 but setting up the Skiff Server to be a DHCP server and setting up DHCP on the Foster Laptop.

image

Equipment

  • We used an 1841 router for the 1841 router
  • The 2960 switches are small Netgear switches
  • The Laptop and Server were Seraphim and my workstations booted to a Kali Linux thumbdrive

Lab Setup

Step 1: Cabling

  1. Plugged Ethernet cables into the Router
  • Cable from Emma's Workstation (Foster Laptop) 192.168.3.0 Network = FastEthernet 0/1
  • Cable from Seraphim's Workstation (Skiff Server) 192.168.1.0 Network = FastEthernet 0/0
  1. Console Cable from Luc's Workstation to the Console port on the router

Step 2: Connect to Router using Putty on Router Workstation

  1. Open Device Manager and see what COM port the Router is using
image
  1. Power on Switch
  2. Open Putty in Workstation
  3. Change "connection type" to serial and change the "serial line"
image
  1. Click Open

Configuring the Router

Step 1: Configure the appropriate IP's on the router FastEthernet Interfaces

This was already done for us

image

Step 2: Update Cisco router with "ip helper-address" on the Foster interface using the ip address of the DHCP server (e.g. 192.168.1.100)

  1. Router# conf t
  2. Router(config)#interface FastEthernet0/1
  3. Router(config-if)#ip helper-address 192.168.1.100
image

Configuring Skiff DHCP Server

Step 1: Set-up workstation for DHCP

  1. Keep the Skiff/Kali System on the Ireland Network to have internet access
  2. Open Terminal -> sudo apt update
  3. If there is a time discrepancy: sudo date --set="2024-09-09 14:23:00

Step 2: Install isc DHCP server

  1. wget -q -O -https://archive.kali.org/archive-key.asc | sudo apt-key add -
  2. '''sudo apt install isc-dhcp-server'''

Step 3: Configuring DHCP on Seraphim's Workstation / Skiff Server /Kali

  1. Disconnect from the Ireland Network
  2. We Assigned the manual IP address to 192.168.1.100
  3. edit /etc/default/isc-dhcp-server => update line to INTERFACESv4="eth0"
  4. edit /etc/dhcp/dhcpd.conf => add the following subnet definitions to the bottom of the file
subnet 192.168.1.0 netmask 255.255.255.0 {     
range 192.168.1.200 192.168.1.205;     
option routers 192.168.1.1;     
}     
subnet 192.168.3.0 netmask 255.255.255.0 {     
range 192.168.3.200 192.168.3.205;     
option routers 192.168.3.1;     
}      
  1. Start DHCP server -> sudo systemctl start isc-dhcp-server
  2. Check that its working with sudo systemctl start isc-dhcp-server -> should show that its active
  • Can also check with systemctl status isc-dhcp-server```

Setting up DHCP for Foster Laptop

Step 1: Set Foster Laptop to DHCP

  1. Open Root Terminal on Kali
  2. '''nmtui'''
  3. Edit a connection -> Make sure IPv4 is set to Automatic -> ok -> exit

Step 2: Obtain an address

  1. (If not in root terminal add sudo to the beginning of the next two commands) dhclient -r eth0 will release your IP
  2. dhclient etho will renew your IP from DHCP

Step 3: Check IP Config

  1. ifconfig

IMG_1553

Troubleshooting

DHCP wasn't working do we added a route on the Skiff Server.

sudo ip route add 192.168.3.0/24 via 192.168.1.1


New Cisco or Kali Commands

Kali

  • dhclient -r <interface> -> releases your IP address
  • dhclient <interface> -> renews your IP

Cisco

  • Updating a router with the IP address of the DHCP server
    • interface
    • ip helper-address

Booting Classroom NUCS into Kali Linux

  1. Power off the Workstation
  2. Plug the USB Thumbdrive into the powered off workstation
  3. Hit the F10 key during the NUC screen
  4. From the Boot Menu - Select "UEFI Vendor Product Code 2"
  5. Select "Live System (amd64)" (first option) from the menu
  6. If it prompts for a signin pass word use kali defaults
Clone this wiki locally