Friday 16 November 2018

ip - I don't want my DHCP to be a default gateway


I have a device which runs a DHCP server. When I connect it with USB to my computer, the PC gets an IP address and the device becomes the default gateway. I just want the device to agree on IP addresses and not default gateway. Is this possible?


I was using udhcpd but I got problems with authoritative mode so I switched to dnsmasq.


The PC is already connected to another network witch should contain the default gateway.


EDIT :


Here is a little diagram of how it is setup


[ Embedded Network #1 ] ----- [ PC ] ----- [ Corporate Network #2 ]


What is important here is that Net#1 has no knowledge of Net#2, its dhcp server and its default gateway


EDIT 2 :


Ok, the parameter in /etc/dnsmasq.conf should be about dhcp-option=3
If I don't specify this parameter well, there is no effect. According to this example config.


# Disable default gateway
#dhcp-option=3

This does not disable the gateway, this has no effect


EDIT 3 :


ok dhcp-option=3 DOES have an effect (Silly me). However just renewing ip is not enough for windows xp to forget about the old one



Answer



Certainly possible - just reconfigure the device to not hand out a gateway over DHCP.


You probably need to provide more information to get a useful response.


add to the conf file


dhcp-option=3
dhcp-option=6

3 disables default router (gateway) and 6 disables DNS


No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...