-1

I feel there may be a very simple term for what I trying to do, but I'm not sure what it is, and it is difficult to search for it in concise words.

The shortest description I can come up with: "I want to make the default gateway that is assigned to an interface via DHCP to be the default route/gateway for the entire device".

Longer description:

  • (Device A)------[InterfaceA]-[DeviceAB]-[InterfaceB]-------(GatewayB)-----(NetworkC)
  • DeviceAB is layer 3 switch/router. Digi WR44 RR
  • DeviceA has its default gateway as InterfaceA
  • DeviceA and InterfaceA are statically assigned
  • InterfaceB is dynamically assigned via DHCP. InterfaceB gets a DG of GatewayB
  • I want GatewayB to be the default route for DeviceAB

As-is, a packet from Device A, destined for Network C, stops at DeviceAB because DeviceAB does not have GatewayB set as the default route, even though GatewayB is the DG for InterfaceB. What I've had to do as a work-around was create a default route in DeviceAB such as 0.0.0.0/0 via GatewayB.

Doing the work around is "ok", but if the address of GatewayB changes, it would break. InterfaceB, which is on DeviceAB, would know of the change because of DHCP, but this wouldn't propogate to the default route of the device.

The terminology and method to do this may be device/vendor specific, but I feel like there's some common words that are used. A checkbox to make InterfaceB be an "uplink port" or something similar. Or perhaps "apply this interface's DG to be the default route for the device".

11
  • You could probably (I haven' read the manual) configure the default route based on the interface, rather than the next hop. that way, the router will use interface B regardless of its address/DG
    – Ron Trunk
    Oct 27 '21 at 14:24
  • A default gateway is simply the gateway of last resort. A gateway for a more specific route will be used for any packets that fit that route. Packets not matching a more specific tote will use a default gateway (if one is configured, otherwise dropped) because a default gateway is the least specific route.
    – Ron Maupin
    Oct 27 '21 at 14:26
  • In any case, host/server configurations are off-topic here. You could try to ask this question on Super User.
    – Ron Maupin
    Oct 27 '21 at 14:28
  • @RonMaupin Digi Wr44 is an on-topic device
    – Ron Trunk
    Oct 27 '21 at 14:30
  • @RonTrunk that sounds very close to what I'm trying to do if possible. Configuring the interface as the default route sounds like that would do it (if possible, of course)
    – bwat
    Oct 27 '21 at 14:30
0

All default routes and gateways are always for the entire device (exluding devices with separate routing domains/VRFs).

Which default route a device actually uses depends on interface metrics/priorities. These metrics may be influenced by DHCP options or not, depending on the device.

I want GatewayB to be the default route for DeviceAB

That's the point of a DHCP-provided default route. Note that some L3 switches and routers ignore DHCP-provided routes but require either manual settings or OSPF-/RIP-provided routes. Some L3 switches require explicit configuration for DHCP-provided routes to be accepted.

a packet from Device A, destined for Network C, stops at DeviceAB because DeviceAB does not have GatewayB set as the default route, even though GatewayB is the DG for InterfaceB.

If the default gateway from DHCP makes it to the local routing table (see above), that's a general malfunction in DeviceAB. You should contact the vendor. Of course, using DeviceAB as intermediate network device requires its routing function to be activated - it might not be by default.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.