Code Monkey home page Code Monkey logo

vlandhcpd's Introduction

#vlandhcpd#

vlandhcpd is a VLAN-aware DHCP server. This means that you can configure it to run on a trunking device and assign network configuration to clients in different VLANs, as long as their DHCP requests are visible on the trunking device.

The server accomplishes this by directly parsing the tagged or untagged ethernet headers, as well as the headers of the IP, UDP and DHCP protocol layers. When sending back a response to a client the server sends the answer back over the trunking device with the same VLAN tag as the one used by the client request.

If you configure no VLANs or use vlandhcpd on a non-trunking interface it will act as a normal DHCP server.

##Dependencies##

  • cmake
  • glib 2.0
  • libpcap

##Usage##

When you start vlandhcpd you need to supply the path to the configuration file as well as the name of the trunking interface:

vlandhcpd dhcpd.conf eth0

##Configuration##

A valid dhcpd.conf configuration file for vlandhcpd looks like the following example:

serverip 192.168.1.155
lease 86400

nameserver 213.191.92.86
nameserver 45.191.92.86
nameserver 62.109.123.196
netmask 24

gateway 192.168.1.1

client 192.168.1.190 mac 00:24:54:5f:61:98
client 192.168.1.191 mac 00:15:17:ee:b6:f1
client 192.168.1.192 mac 00:15:17:ee:56:b5

VLAN 55

client 192.168.1.193 mac 00:26:0a:16:b3:99
client 192.168.1.194 mac c8:2a:14:09:54:5a

The file is devided into sections. A new section starts with the keyword VLAN followed by a VLAN tag number. If you don't specify a VLAN at the beginning of the file the section is assumed to configure DHCP for untagged packets.

Now you can specify network properties like, IP of the DHCP server (this will be spoofed by ARP spoofing to simulate a "real" DHCP server to clients), the lease time, a list of nameservers the netmask and the IP of the gateway.

After specifying those global netwide properties you can configure a list of static MAC address to client IP mappings.

Remember that all the netwide settings are reused in the all the following sections until you redefine them.

##Contact##

Andreas Heck <[email protected]>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.