Search code examples
amazon-web-servicesgatewaydhcpamazon-vpc

AWS VPC - DHCP Default Gateway Option


so, I'm working with a proprietary device in which I don't have direct control over the device's network gateway setting. I learned that it pulls the gateway setting from the DHCP options set on the network.

Our network is built on AWS, inside a VPC. I'm thinking of updating the DHCP options, but it doesn't seem to have a setting for Gateway (image shows all available options). Does anyone know if there's a way to specify the Gateway for AWS VPC?

The device is connected to our cloud through a virtual private gateway.

enter image description here


Solution

  • As far as I'm aware, this is simply not possible within an Amazon VPC, as they use DHCP for all of their IP assignments within a VPC subnet, static IP addresses are assigned by using Elastic Network Interfaces, which work in the same way as a DHCP reservation. Amazon Support will be able to confirm this though, so I'd suggest you contact them.

    But you can specify a gateway for a subnet in your AWS VPC.

    Your next-best solution is to create a virtual network on the Windows box, using the Loopback Adapter. You can then create a DHCP scope on this network, and essentially dual-home the box.

    To create a NIC using the loopback driver (from the link above):

    Start -> Computer -> Right-click, Properties -> Device Manager -> Computer Name, Right-click, Add Legacy Hardware -> Next -> Install the hardware I manually select from a list -> Next -> Network Adapters -> Microsoft on the right, Loopback adapter on the left -> Next

    If you are using a Linux box refer this guide this might also help.

    http://imsudo.com/how-to-configure-loopback-interface-in-linux-windows/

    Once you have two functioning networks, it should be relatively straightforward to configure your RRAS clients to receive a DHCP address from the virtual scope and route to the Internet via your Amazon VPC's default gateway.