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

19,647

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.

Share:
19,647

Related videos on Youtube

Name
Author by

Name

Updated on September 18, 2022

Comments

  • Name
    Name over 1 year

    Can you have:

    Router LAN IP: 10.0.0.1 Gateway IP: 10.0.10.254

    To the clients connected?

    • MaQleod
      MaQleod about 7 years
      each network has but one gateway, the end-point on that network for which all off-network traffic must go through to get out. The network is defined by your subnet mask. If a host finds that the packet it must send is not on the local network, it passes it to the gateway and the gateway figures out where to send it from there. If your clients are on the 10.0.0.1 network and its subnet mask does not allow for 10.0.10.254 to be on the same local network, then clients won't be able to reach their configured gateway.
    • Name
      Name about 7 years
      Well the netmask is 10/8 (255.0.0.0) so the scope of the DCHP server is 10.0.0.1-10.255.255.254 usable...
    • MaQleod
      MaQleod about 7 years
      In that case, then yes, that is possible. A router can have multiple IPs, but as long as clients has hit the gateway assigned on that router, that is all that matters.
    • Ravindra Bawane
      Ravindra Bawane about 7 years
      If you would spell out WHY you have brought up this question, we could probably provide a more complete answer because as we have noted, the answer depends on a number of factors. In order to give more information than "sometimes and maybe", we need more information from you.
  • Name
    Name about 7 years
    So you can have different IP's on super expensive routers only, majority of times?
  • Ravindra Bawane
    Ravindra Bawane about 7 years
    Price is not the differentiator. The question is: Are you speaking of the routing address of the router or just any IP address that any service on that router could make use of? You haven't made that clear, and so my answer tries to account for both possibilities.