What is the purpose of NAT (Network Address Translation) in a network?
1 To convert domain names to IP addresses.
2 To assign IP addresses to devices dynamically.
3 To connect LANs in different buildings.
4 To translate private IP addresses to public IP addresses for internet communication.