-
Notifications
You must be signed in to change notification settings - Fork 0
Future Work
-
The current server configuration provides IP addresses to incoming clients from a single address pool.
-
This pool consists of IP addresses from only the server's subnet.
-
The function :
ApplicationContainer InstallDhcpServer (Ptr<NetDevice> netDevice, Ipv4Address serverAddr, Ipv4Address poolAddr, Ipv4Mask poolMask, Ipv4Address minAddr, Ipv4Address maxAddr, Ipv4Address gateway = Ipv4Address ())
in
src/internet-apps/helper/dhcp-helper.h
sets all the attributes of the server including its own IP address and starts the server application. -
This should be split into 2 separate functions :
-
ApplicationContainer InstallDhcpServer(Ptr<NetDevice> netDevice, Ipv4Address serverAddr, Ipv4Mask Mask)
This function allocates the server IP address to the Ptr argument passed, installs a default traffic control configuration, creates a DHCP server app and returns that pointer.
-
void AddAddressPool(ApplicationContainer dhcpServerApp, Ipv4Address minAddr, Ipv4Address maxAddr, Ipv4Address gateway)
This function adds the IP addresses in the given range i.e., between minAddr and maxAddr (both inclusive), as a pair along with the given gateway to m_availableAddresses (a map consisting of gateway and IP addresses allocatable in a subnet).
-
-
Our current implementation supports only two subnets - one having the DHCP server and the other for incoming clients.
-
We have two functions in
src/internet-apps/helper/dhcp-helper.h
to initialize client and server side :Ipv4InterfaceContainer InstallFixedAddress (Ptr<NetDevice> netDevice, Ipv4Address addr, Ipv4Mask mask)
ApplicationContainer InstallDhcpRelay (Ptr<NetDevice> netDevice, Ipv4Address relayAddr, Ipv4Mask subMask, Ipv4Address dhcps)
-
To support clients from multiple subnets :
- We need to modify
void SendDiscover(Ptr<NetDevice> iDev,DhcpHeader header)
function insrc/internet-apps/model/dhcp-relay.cc
. - This is done so that for each incoming packet header, we set the gateway IP address attribute (giaddr) to be the IP address of the incoming NetDevice (iDev).
- We need to modify