0

What are the differences between packet forwarding and network address translation in layer 3?

  1. Is packet forwarding done by a router between two networks that use public IP addresses?

    Is network address translation done by some other device (NAT or still router) between a network using public IP addresses and a network using private IP addresses?

  2. Is packet forwarding a many to many mapping?

    Is network address translation a many to one mapping (from many private IP addresses to a public IP address)?

  3. Is packet forwarding bidirectional?

    Is network address translation uni-directional (from a private network to a public network, but not the other way around)?

  4. Are they done by the same or different tables in the same or different devices (router or NAT)?

Thanks.

3

Packet forwarding is forwarding based on the network-layer address of a packet. Usually this is refered to as "routing".

  1. Network address translation (NAT or rather NAPT) is used when connecting a network using private IPv4 addresses to a network using public IPv4 addresses, or when the addressing schemes on both sides don't mix for other reasons. Most often, this is combined with forwarding, but not necessarily so.
  2. Packet forwarding doesn't map anything - on the network layer. On the data link layer, the encapsulating frame is directed (mapped if you like) to the next network-layer hop. Forwarding doesn't require NAT which doesn't even exist for IPv6.
  3. Packet forwarding aka routing is decided based on a routing table. NAPT uses a (session) translation table to enable packet flow in both directions.
  • Thanks. In "Packet forwarding doesn't map anything - on the network layer", what is the definition of "map"? – Tim Mar 19 at 14:51
  • For me, "to map" is to apply a parameter from one scope to another scope. ARP maps IPv4 to MAC. NAT maps private IP to public IP or vice versa. A switch maps MACs to ports. What's your definition? – Zac67 Mar 19 at 15:42
  • a function whose domain and range could be the same – Tim Mar 19 at 15:46
  • "On the data link layer, the encapsulating frame is directed (mapped if you like) to the next network-layer hop." Why is it on the data link layer not in the network layer? – Tim Mar 19 at 16:18
  • You mentioned only network address translation (NAT or rather NAPT). Is network address translation which is working only in layer 3 (i.e. without port translation) useful for some purpose? – Tim Mar 19 at 17:20

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.