Can the gateway IP be different then the IP of the router?

Can you have:

Router LAN IP: 10.0.0.1 Gateway IP: 10.0.10.254

To the clients connected?


Solution 1:

From the answer to this question: https://serverfault.com/questions/186645/does-default-gateway-ip-router-ip

The "default gateway" is simply the IP of the next hop for traffic that is not explicitly routed anywhere else. This will, almost certainly, be an IP address on an interface of a local router. However, it may not be an address on which you can manage the router.

So, I suppose the answer could be "Yes", but in most networks is most likely "No".

Also, some Routers could have a different IP for management, but for actual traffic if the Router is the next hop for that traffic, the Router and Gateway IP would be the same.

Solution 2:

In academic terms, a gateway is a network middle box that works at any layer from 1-7 of the 7-layer OSI model for describing networking protocols, whereas a router only works at layer 3, the Network layer. Most home gateway products, such as those we call "wireless routers" in layman's terms, are actually NAPT gateways, not just layer 3 routers. Some of them can be configured to act as simple layer 3 routers in some cases, but most of the time they act as NAPT gateways.

However, in the Internet Protocol world, "router" and "gateway" are generally used interchangeably. If it connects two different layer-3 networks (IP subnets) together, you can call it either a router or a gateway. Or even a "layer 3 switch"; a layer-3 switch is a layer-2 switch with a router built-in, so it can route at layer 3 and bridge/switch at layer 2, depending on how it's configured.

Any IP network (subnet) can have more than one router or gateway connected to it, so it's possible to have more than one router (gateway) IP address for a network. If you have endpoint devices on your network that don't participate in "routing protocols" (protocols by which routing tables are communicated and updated), it usually helps if those endpoint devices are configured to consider one of the routers to be the "default route". If an endpoint doesn't know how to route traffic to a certain destination IP address, that endpoint will send that traffic to the router designated as its default route.

If you have a specific home router/gateway box that you want to give two separate LAN-side IP addresses to, I suppose it may be possible to configure some devices that way. However, it might be hard to communicate to your client devices that there are multiple router IP addresses for this network. DHCP really only communicates one router IP address normally. So you'd either have to configure your clients with static routes for each router IP address, or configure your clients to participate in RIP or OSPF or some other routing protocol in order to learn of the secondary route.