Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Router vs Switch (Network Address Translation) [closed]

I understand that a router uses NAT to translate the public IP we get from the ISP to say 300 local IPs. Does a switch perform the same function? If not, how's it different?

like image 828
Vishnu Vivek Avatar asked Jul 22 '13 22:07

Vishnu Vivek


People also ask

What are the main differences between router and switch?

Just as a switch connects multiple devices to create a network, a router connects multiple switches, and their respective networks, to form an even larger network. These networks may be in a single location or across multiple locations. When building a small business network, you will need one or more routers.

Does NAT occur before or after routing?

Rules: – Traffic entering inside NAT interface is always routed 1st then NATted. – Traffic entering outside NAT interface is always NATted 1st then routed.

What is the benefit of enabling network address translation NAT on a router?

The main advantage of NAT (Network Address Translation) is that it can prevent the depletion of IPv4 addresses. NAT (Network Address Translation) can provide an additional layer of security by making the oringinal source and destination addresses hidden.


1 Answers

No, a switch cannot perform NAT and translate public(s) IP addresses into private addresses.

A switch is a network device that filters and forwards packets between LAN segments. Switches operate at the data link layer (layer 2). So, they are not aware of IP addresses which are network layer (layer 3). A switch keeps a record of the MAC addresses of all the devices connected to it. With this information, a switch can identify which system is sitting on which port. So when a frame is received, it knows exactly which port to send it to, without significantly increasing network response times.

Routers are network devices used to interconnect two different networks (with different IP addressing schemes).

like image 196
user2608557 Avatar answered Sep 21 '22 03:09

user2608557