MikroTik Certified Network Associate (MTCNA)
1 Introduction to Networking
1-1 Basic Networking Concepts
1-2 OSI Model
1-3 TCPIP Model
1-4 IP Addressing
1-5 Subnetting
2 Introduction to MikroTik RouterOS
2-1 RouterOS Overview
2-2 RouterOS Installation
2-3 RouterOS Licensing
2-4 RouterOS Interface Overview
2-5 RouterOS Command Line Interface (CLI)
2-6 RouterOS Graphical User Interface (GUI)
3 Basic Router Configuration
3-1 Router Identification
3-2 Interface Configuration
3-3 IP Address Assignment
3-4 Default Gateway Configuration
3-5 DNS Configuration
3-6 Basic Firewall Configuration
4 Routing
4-1 Static Routing
4-2 Dynamic Routing Protocols
4-3 OSPF Configuration
4-4 BGP Configuration
4-5 Policy-Based Routing
5 Network Address Translation (NAT)
5-1 Introduction to NAT
5-2 Basic NAT Configuration
5-3 Port Address Translation (PAT)
5-4 One-to-One NAT
5-5 Hairpin NAT
6 Firewall and Security
6-1 Firewall Basics
6-2 Firewall Rules Configuration
6-3 NAT Rules Configuration
6-4 Traffic Shaping and QoS
6-5 VPN Basics
6-6 IPsec VPN Configuration
7 Wireless Networking
7-1 Wireless Basics
7-2 Wireless Interface Configuration
7-3 Wireless Security
7-4 Wireless Bridging
7-5 Wireless Access Point Configuration
8 Advanced Topics
8-1 VLAN Configuration
8-2 DHCP Server Configuration
8-3 DHCP Relay Configuration
8-4 PPPoE Server Configuration
8-5 PPPoE Client Configuration
8-6 Hotspot Configuration
8-7 Load Balancing
8-8 High Availability (Failover)
9 Troubleshooting and Maintenance
9-1 Basic Troubleshooting Techniques
9-2 Log Analysis
9-3 Backup and Restore
9-4 Firmware Updates
9-5 System Monitoring
10 Practical Exercises
10-1 Basic Router Configuration Exercise
10-2 Static Routing Exercise
10-3 NAT Configuration Exercise
10-4 Firewall Configuration Exercise
10-5 Wireless Configuration Exercise
10-6 Advanced Configuration Exercise
10-7 Troubleshooting Exercise
Port Address Translation (PAT) Explained

Port Address Translation (PAT) Explained

Port Address Translation (PAT) is a crucial technique used in network address translation (NAT) to allow multiple devices on a local network to access the internet using a single public IP address. PAT maps multiple private IP addresses to a single public IP address but uses different port numbers to distinguish between the devices.

Key Concepts

1. Network Address Translation (NAT)

NAT is a method used to modify the IP address information in IP packet headers while in transit across a traffic routing device. NAT is primarily used to conserve public IP addresses and to enhance security by hiding internal network details.

2. Port Address Translation (PAT)

PAT, also known as NAT overload, is a specific type of NAT that translates the source port number along with the source IP address. This allows multiple devices on a local network to share a single public IP address while still being uniquely identifiable by their source port numbers.

3. Source and Destination Ports

In the context of PAT, source ports are the ports used by devices on the local network to send data, while destination ports are the ports on the external network (e.g., the internet) that the data is sent to. PAT ensures that each device's traffic is uniquely identified by its source port number.

4. PAT Configuration

Configuring PAT involves setting up a NAT rule on the router that specifies the internal IP range and the external IP address. The router then dynamically assigns source port numbers to differentiate between the internal devices.

Detailed Explanation

Network Address Translation (NAT)

NAT allows multiple devices on a local network to share a single public IP address by translating their private IP addresses to the public IP address when sending data to the internet. This conserves public IP addresses and enhances security by hiding the internal network structure.

Port Address Translation (PAT)

PAT extends NAT by using different source port numbers to distinguish between multiple devices on the local network. When a device sends data, the router assigns a unique source port number to the packet, ensuring that the response from the external network is correctly routed back to the originating device.

Source and Destination Ports

Source ports are the ports used by devices on the local network to send data, while destination ports are the ports on the external network that the data is sent to. PAT ensures that each device's traffic is uniquely identified by its source port number, allowing multiple devices to share the same public IP address.

PAT Configuration

To configure PAT on a MikroTik router, you would typically use the following command:

    /ip firewall nat add chain=srcnat action=masquerade out-interface=ether1
    

This command sets up a NAT rule that translates the source IP address and port number for outgoing traffic on interface ether1, allowing multiple devices to share the public IP address.

Examples and Analogies

Example: Network Address Translation (NAT)

Think of NAT as a post office that receives letters from multiple houses (devices) in a neighborhood (local network) and sends them out using a single return address (public IP address). The post office ensures that the letters are correctly delivered to their destinations and returned to the correct house.

Example: Port Address Translation (PAT)

Consider PAT as a post office that not only uses a single return address but also assigns unique tracking numbers (source port numbers) to each letter. This allows the post office to distinguish between letters from different houses and ensure they are correctly delivered and returned.

Example: Source and Destination Ports

Imagine source ports as the addresses on letters sent from houses in a neighborhood, and destination ports as the addresses on letters sent to different destinations. PAT ensures that each letter is uniquely identified by its tracking number, allowing the post office to correctly route the letters.

Example: PAT Configuration

Think of configuring PAT as setting up a post office rule that assigns unique tracking numbers to letters sent from the neighborhood. The rule ensures that all letters are sent using the same return address but can be uniquely identified by their tracking numbers.

By mastering Port Address Translation (PAT), you can effectively manage network traffic and ensure that multiple devices on a local network can access the internet using a single public IP address.