Posted: Sun Mar 14, 2021 7:18 Post subject: Force default gateway with automatic DHCP [SOLVED]
If I use "Automatic Configuration - DHCP", my ISP gives me a private WAN IP and a public IP behind cg-nat.
I asked to be out of cg-nat and the private WAN IP changed (the router connected to another gateway - DHCP server) and I got a public IP without cg-nat.
The problem is that in dd-wrt I only connect to the cg-nat gateway. I get to connect to the new gateway only with the ISP router. Both routers use automatic DHCP configuration.
I asked to be out of cg-nat again thinking they used a MAC address filter and that they needed to include my new MAC. I also tried to clone the old MAC (I'm 100% user I got it right, I even used wireshark to capture the traffic).
Nothing works. Any way to force "Automatic Configuration - DHCP" + custom gateway. I want both, the automatic IP without DHCP authentication but with the gateway of my choosing.
The ISP router was using Automatic DHCP but had a field called DHCP vendor class (or similar) called "nocgnat"). I'm not sure if it is a parameter or only an informative field.
Joined: 08 May 2018 Posts: 14249 Location: Texas, USA
Posted: Sun Mar 14, 2021 17:37 Post subject:
There is a gateway address entry on the main setup page in the webUI. Your ISP will have to give you what to enter there unless their network configuration won't allow that. _________________ "Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT Pogo - A minimal level of ability is expected and needed... DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)
----------------------
Linux User #377467 counter.li.org / linuxcounter.net
That does not work. I always though "Network Setup" was for the local net. "WAN Setup -> WAN Connection Type" is where I could change the default Gateway but I only have "DHCP Authentication" with no DHCP server option.
Gateway for "Local Network" -> Status_Lan.asp in web gui
Gateway for WAN -> Status_Internet.asp in web gui
Joined: 08 May 2018 Posts: 14249 Location: Texas, USA
Posted: Mon Mar 15, 2021 1:10 Post subject:
There must've been a code revision that I wasn't aware of, because the gateway setting on the main setup page is the router's upstream gateway IP address. News to me, but glad you got it sorted out. _________________ "Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT Pogo - A minimal level of ability is expected and needed... DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)
----------------------
Linux User #377467 counter.li.org / linuxcounter.net
Joined: 18 Mar 2014 Posts: 12923 Location: Netherlands
Posted: Mon Mar 15, 2021 7:14 Post subject:
kernel-panic69 wrote:
There must've been a code revision that I wasn't aware of, because the gateway setting on the main setup page is the router's upstream gateway IP address. News to me, but glad you got it sorted out.
Joined: 08 May 2018 Posts: 14249 Location: Texas, USA
Posted: Mon Mar 15, 2021 14:20 Post subject:
The gateway field applies to both the router itself and connected clients. It's the main reason why certain configurations *require* that field to be populated with an ip address so ntp will sync. Some configurations also require an entry elsewhere in the webUI so things work. So, *unless* something changed in the way this is handled within the firmware, there technically should be no need to intervene with this added instruction, but it wouldn't surprise me at the same time that it is required. _________________ "Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT Pogo - A minimal level of ability is expected and needed... DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)
----------------------
Linux User #377467 counter.li.org / linuxcounter.net
Posted: Mon Mar 15, 2021 14:36 Post subject: Re: Force default gateway with automatic DHCP
Veole wrote:
The ISP router was using Automatic DHCP but had a field called DHCP vendor class (or similar) called "nocgnat").
phuzi0n wrote:
The vendor class is something you define so that you can give your DHCP server parameters specific to the class. ie. you could use it to, say, give different DNS servers to a certain class.
The request IP option is pretty self explanatory, it specifies what IP address you want the router to ask for. DHCP servers have no obligation to honor your requested IP even if it is valid for their lease pool and available.
Joined: 08 May 2018 Posts: 14249 Location: Texas, USA
Posted: Mon Mar 15, 2021 15:03 Post subject:
Ok, so what is the vendor class that you use for each mode of operation to link routers, then...
since populating the gateway field on the main setup page is obviously wrong in all configurations...
obviously lol
The gateway field on the main setup page is not anything that is requested by the udhcpc client,
whatsoever. In other words, you're going off on a tangent that has nothing to do with the gateway
configuration field or how it works within the firmware, but hey, let's just keep hammering nails
after I already conceded _________________ "Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT Pogo - A minimal level of ability is expected and needed... DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)
----------------------
Linux User #377467 counter.li.org / linuxcounter.net
Sticking with OP, no tangent, DHCP vendor class is configured by ISP am I wrong?
Yes, I think "nocgnat" is a custom ISP parameter for their own DHCP server (run trough the ONT).
I asked to leave cgnat and they don't use MAC filters like other ISPs, so cloning the old MAC or trying to add my new router MAC did not work. They used remote configuration for their router and enabled a field called DHCP 60 with parameter "nocgnat".
DHCP is always automatic. The nocgnat parameter makes the DHCP server connect the router to another gateway (I get WAN IP from a different private server). And I also have a different public IP, without any proxy.