Skip to main content
added 17 characters in body
Source Link
Tom Yan
  • 10k
  • 2
  • 18
  • 37

what do I need the gateway for

In the context of Ethernet, typically you need it when the destination host is not in the a broadcast domain the host is directly attached to.

which is not in the same ip segment

More precisely, you need it when a (destination) IP address can't be "resolved" to a MAC address by the means of ARP (or NDP).

Instead of resolving the destination's IP address, the gateway's IP address would be resolved. The traffic would then be "L2 forwarded" to the corresponding router by the relevant switch(es) and be "L3/IP forwarded" by the router to (normally) another broadcast domain (or some non-Ethernet network). (To give a simple idea on what "IP forwarding" is, I suppose one can say it is "IP routing" that is performed by a host/router for traffics from another host.) These resolution are triggered by "hit(s)" on indirect routes, i.e., routes that consists of a gateway (IP) address.

With typical / normal configuration, your "local subnets" are the destination blocks that would be covered by direct routes, which consists of no (real) gateway IP address and would hence triggerresult in ARP resolution (in the case of Ethernet; via the respective route interface) for the destinationsdestination IPs themselves, and each broadcast domain would only use one IP subnet. However, technically you can add direct route for arbitrary destination, or use multiple IP subnets within a broadcast domain. (Not that it normally makes sense to though.)

Often the word gateway alone is used to refer to one of the IP addresses of a router -- the one that is configured on the interface that is attached to "our" broadcast domain (e.g. "LAN IP" of a home router is the "gateway" for the "WAN side" / Internet, from the perspective of a LAN host). Therefore, I would say that you can somewhat see it as a word that refers to "a piece" of the router (especially when the usual router symbols look like cakes) -- the piece that "belong" to "our" broadcast domain, whereas the word router is more often used to refer the device / host as a whole. (I'm sure a lot of people would say something like "that is not the (orthodox) definition of the word gateway", and I'm not saying it is either. What I'm saying is, often that seems to be why you would "see router here and gateway there", while at the same time some people just use the two words interchangeably.)

P.S. A router would have multiple interfaces and hence multiple IP addresses configured on it. Therefore, you can more or less say that a router "is composed of multiple gateways", but at the same time, each of the gateways (IP addresses) can be used to refer to the router (regardless of which broadcast domain is the "context").

what do I need the gateway for

In the context of Ethernet, typically you need it when the destination host is not in the a broadcast domain the host is directly attached to.

which is not in the same ip segment

More precisely, you need it when a (destination) IP address can't be "resolved" to a MAC address by the means of ARP (or NDP).

Instead of resolving the destination's IP address, the gateway's IP address would be resolved. The traffic would then be "L2 forwarded" to the corresponding router by the relevant switch(es) and be "L3/IP forwarded" by the router to (normally) another broadcast domain (or some non-Ethernet network). (To give a simple idea on what "IP forwarding" is, I suppose one can say it is "IP routing" that is performed by a host/router for traffics from another host.) These resolution are triggered by indirect routes, i.e., routes that consists of a gateway (IP) address.

With typical / normal configuration, your "local subnets" are the destination blocks that would be covered by direct routes, which consists of no (real) gateway IP address and would hence trigger ARP resolution (in the case of Ethernet; via the respective route interface) for the destinations themselves, and each broadcast domain would only use one IP subnet. However, technically you can add direct route for arbitrary destination, or use multiple IP subnets within a broadcast domain. (Not that it normally makes sense to though.)

Often the word gateway alone is used to refer to one of the IP addresses of a router -- the one that is configured on the interface that is attached to "our" broadcast domain (e.g. "LAN IP" of a home router is the "gateway" for the "WAN side" / Internet, from the perspective of a LAN host). Therefore, I would say that you can somewhat see it as a word that refers to "a piece" of the router (especially when the usual router symbols look like cakes) -- the piece that "belong" to "our" broadcast domain, whereas the word router is more often used to refer the device / host as a whole. (I'm sure a lot of people would say something like "that is not the (orthodox) definition of the word gateway", and I'm not saying it is either. What I'm saying is, often that seems to be why you would "see router here and gateway there", while at the same time some people just use the two words interchangeably.)

P.S. A router would have multiple interfaces and hence multiple IP addresses configured on it. Therefore, you can more or less say that a router "is composed of multiple gateways", but at the same time, each of the gateways (IP addresses) can be used to refer to the router (regardless of which broadcast domain is the "context").

what do I need the gateway for

In the context of Ethernet, typically you need it when the destination host is not in the a broadcast domain the host is directly attached to.

which is not in the same ip segment

More precisely, you need it when a (destination) IP address can't be "resolved" to a MAC address by the means of ARP (or NDP).

Instead of resolving the destination's IP address, the gateway's IP address would be resolved. The traffic would then be "L2 forwarded" to the corresponding router by the relevant switch(es) and be "L3/IP forwarded" by the router to (normally) another broadcast domain (or some non-Ethernet network). (To give a simple idea on what "IP forwarding" is, I suppose one can say it is "IP routing" that is performed by a host/router for traffics from another host.) These resolution are triggered by "hit(s)" on indirect routes, i.e., routes that consists of a gateway (IP) address.

With typical / normal configuration, your "local subnets" are the destination blocks that would be covered by direct routes, which consists of no (real) gateway IP address and would hence result in ARP resolution (in the case of Ethernet; via the respective route interface) for the destination IPs themselves, and each broadcast domain would only use one IP subnet. However, technically you can add direct route for arbitrary destination, or use multiple IP subnets within a broadcast domain. (Not that it normally makes sense to though.)

Often the word gateway alone is used to refer to one of the IP addresses of a router -- the one that is configured on the interface that is attached to "our" broadcast domain (e.g. "LAN IP" of a home router is the "gateway" for the "WAN side" / Internet, from the perspective of a LAN host). Therefore, I would say that you can somewhat see it as a word that refers to "a piece" of the router (especially when the usual router symbols look like cakes) -- the piece that "belong" to "our" broadcast domain, whereas the word router is more often used to refer the device / host as a whole. (I'm sure a lot of people would say something like "that is not the (orthodox) definition of the word gateway", and I'm not saying it is either. What I'm saying is, often that seems to be why you would "see router here and gateway there", while at the same time some people just use the two words interchangeably.)

P.S. A router would have multiple interfaces and hence multiple IP addresses configured on it. Therefore, you can more or less say that a router "is composed of multiple gateways", but at the same time, each of the gateways (IP addresses) can be used to refer to the router (regardless of which broadcast domain is the "context").

added 336 characters in body
Source Link
Tom Yan
  • 10k
  • 2
  • 18
  • 37

what do I need the gateway for

In the context of Ethernet, typically you need it when the destination host is not in the a broadcast domain the host is directly attached to.

which is not in the same ip segment

More precisely, you need it when a (destination) IP address can't be "resolved" to a MAC address by the means of ARP (or NDP).

Instead of resolving the destination's IP address, the gateway's IP address would be resolved. The traffic would then be "L2 forwarded" to the corresponding router by the relevant switch(es) and be "L3/IP forwarded" by the router to (normally) another broadcast domain (or some non-Ethernet network). (To give a simple idea on what "IP forwarding" is, I suppose one can say it is "IP routing" that is performed by a host/router for traffics from another host.) These resolution are triggered by indirect routes, i.e., routes that consists of a gateway (IP) address.

With typical / normal configuration, your "local subnets" are the destination blocks that would be covered by direct routes, which consists of no (real) gateway IP address and would hence trigger ARP resolution (in the case of Ethernet; via the respective route interface) for the destinations themselves, and each broadcast domain would only use one IP subnet. However, technically you can add direct route for arbitrary destination, or use multiple IP subnets within a broadcast domain. (Not that it normally makes sense to though.)

Often the word gateway alone is used to refer to one of the IP addresses of a router -- the one that is configured on the interface that is attached to "our" broadcast domain (e.g. "LAN IP" of a home router is the "gateway" for the "WAN side" / Internet, from the perspective of a LAN host). Therefore, I would say that you can somewhat see it as a word that refers to "a piece" of the router (especially when the usual router symbols look like cakes) -- the piece that "belong" to "our" broadcast domain, whereas the word router is more often used to refer the device / host as a whole. (I'm sure a lot of people would say something like "that is not the (orthodox) definition of the word gateway", and I'm not saying it is either. What I'm saying is, often that seems to be why you would "see router here and gateway there", while at the same time some people just use the two words interchangeably.)

P.S. A router would have multiple interfaces and hence multiple IP addresses configured on it. Therefore, you can more or less say that a router "is composed of multiple gateways", but at the same time, each of the gateways (IP addresses) can be used to refer to the router (regardless of which broadcast domain is the "context").

what do I need the gateway for

In the context of Ethernet, typically you need it when the destination host is not in the a broadcast domain the host is directly attached to.

which is not in the same ip segment

More precisely, you need it when a (destination) IP address can't be "resolved" to a MAC address by the means of ARP (or NDP).

Instead of resolving the destination's IP address, the gateway's IP address would be resolved. The traffic would then be "L2 forwarded" to the corresponding router by the relevant switch(es) and be "L3/IP forwarded" by the router to (normally) another broadcast domain (or some non-Ethernet network). (To give a simple idea on what "IP forwarding" is, I suppose one can say it is "IP routing" that is performed by a host/router for traffics from another host.) These resolution are triggered by indirect routes, i.e., routes that consists of a gateway (IP) address.

With typical / normal configuration, your "local subnets" are the destination blocks that would be covered by direct routes, which consists of no (real) gateway IP address and would hence trigger ARP resolution (in the case of Ethernet; via the respective route interface) for the destinations themselves, and each broadcast domain would only use one IP subnet. However, technically you can add direct route for arbitrary destination, or use multiple IP subnets within a broadcast domain. (Not that it normally makes sense to though.)

Often the word gateway alone is used to refer to one of the IP addresses of a router -- the one that is configured on the interface that is attached to "our" broadcast domain (e.g. "LAN IP" of a home router is the "gateway" for "WAN side" / Internet, from the perspective of a LAN host). Therefore, I would say that you can somewhat see it as a word that refers to "a piece" of the router (especially when the usual router symbols look like cakes) -- the piece that "belong" to "our" broadcast domain, whereas the word router is more often used to refer the device / host as a whole. (I'm sure a lot of people would say something like "that is not the (orthodox) definition of the word gateway", and I'm not saying it is either. What I'm saying is, often that seems to be why you would "see router here and gateway there", while at the same time some people just use the two words interchangeably.)

what do I need the gateway for

In the context of Ethernet, typically you need it when the destination host is not in the a broadcast domain the host is directly attached to.

which is not in the same ip segment

More precisely, you need it when a (destination) IP address can't be "resolved" to a MAC address by the means of ARP (or NDP).

Instead of resolving the destination's IP address, the gateway's IP address would be resolved. The traffic would then be "L2 forwarded" to the corresponding router by the relevant switch(es) and be "L3/IP forwarded" by the router to (normally) another broadcast domain (or some non-Ethernet network). (To give a simple idea on what "IP forwarding" is, I suppose one can say it is "IP routing" that is performed by a host/router for traffics from another host.) These resolution are triggered by indirect routes, i.e., routes that consists of a gateway (IP) address.

With typical / normal configuration, your "local subnets" are the destination blocks that would be covered by direct routes, which consists of no (real) gateway IP address and would hence trigger ARP resolution (in the case of Ethernet; via the respective route interface) for the destinations themselves, and each broadcast domain would only use one IP subnet. However, technically you can add direct route for arbitrary destination, or use multiple IP subnets within a broadcast domain. (Not that it normally makes sense to though.)

Often the word gateway alone is used to refer to one of the IP addresses of a router -- the one that is configured on the interface that is attached to "our" broadcast domain (e.g. "LAN IP" of a home router is the "gateway" for the "WAN side" / Internet, from the perspective of a LAN host). Therefore, I would say that you can somewhat see it as a word that refers to "a piece" of the router (especially when the usual router symbols look like cakes) -- the piece that "belong" to "our" broadcast domain, whereas the word router is more often used to refer the device / host as a whole. (I'm sure a lot of people would say something like "that is not the (orthodox) definition of the word gateway", and I'm not saying it is either. What I'm saying is, often that seems to be why you would "see router here and gateway there", while at the same time some people just use the two words interchangeably.)

P.S. A router would have multiple interfaces and hence multiple IP addresses configured on it. Therefore, you can more or less say that a router "is composed of multiple gateways", but at the same time, each of the gateways (IP addresses) can be used to refer to the router (regardless of which broadcast domain is the "context").

Source Link
Tom Yan
  • 10k
  • 2
  • 18
  • 37

what do I need the gateway for

In the context of Ethernet, typically you need it when the destination host is not in the a broadcast domain the host is directly attached to.

which is not in the same ip segment

More precisely, you need it when a (destination) IP address can't be "resolved" to a MAC address by the means of ARP (or NDP).

Instead of resolving the destination's IP address, the gateway's IP address would be resolved. The traffic would then be "L2 forwarded" to the corresponding router by the relevant switch(es) and be "L3/IP forwarded" by the router to (normally) another broadcast domain (or some non-Ethernet network). (To give a simple idea on what "IP forwarding" is, I suppose one can say it is "IP routing" that is performed by a host/router for traffics from another host.) These resolution are triggered by indirect routes, i.e., routes that consists of a gateway (IP) address.

With typical / normal configuration, your "local subnets" are the destination blocks that would be covered by direct routes, which consists of no (real) gateway IP address and would hence trigger ARP resolution (in the case of Ethernet; via the respective route interface) for the destinations themselves, and each broadcast domain would only use one IP subnet. However, technically you can add direct route for arbitrary destination, or use multiple IP subnets within a broadcast domain. (Not that it normally makes sense to though.)

Often the word gateway alone is used to refer to one of the IP addresses of a router -- the one that is configured on the interface that is attached to "our" broadcast domain (e.g. "LAN IP" of a home router is the "gateway" for "WAN side" / Internet, from the perspective of a LAN host). Therefore, I would say that you can somewhat see it as a word that refers to "a piece" of the router (especially when the usual router symbols look like cakes) -- the piece that "belong" to "our" broadcast domain, whereas the word router is more often used to refer the device / host as a whole. (I'm sure a lot of people would say something like "that is not the (orthodox) definition of the word gateway", and I'm not saying it is either. What I'm saying is, often that seems to be why you would "see router here and gateway there", while at the same time some people just use the two words interchangeably.)