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.

0

2 Answers 2

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.
7
  • Thanks. In "Packet forwarding doesn't map anything - on the network layer", what is the definition of "map"?
    – Tim
    Mar 19, 2019 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, 2019 at 15:42
  • a function whose domain and range could be the same
    – Tim
    Mar 19, 2019 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, 2019 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, 2019 at 17:20
1

Basically packet is forwarded towards destination based on routing decision made by layer3 device routing table is created in layer3 routing decisions is based on perimeter like

  1. Administrative value (AD)
  2. metric

**NATing **

NATing translation private ip address to public ip address . This kind of transportation is used for security purposes to hide our private iP ranges to avoid exposing to public

Private ip ranges are

10.0.0.0 - 10.255.255.255

172 .16.0.0 - 172.31.255.255

192.168.0.0 - 192.168.255.255

Other than above ip address are considered as public ip range .

NATing configuration are be done bidirectional natting public ip address with private address for both inbound and outbound session . Both source and destination nat can be done with single policies

Types of NAT

Static nat --> one to one mapping

Dynamic nat - many to many

PAT ----> one to many

Nat overload - one to many ( used for internet access)

A NAT table is created and maintained by layer3 devices based on this table natting descision is done ..

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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