Difference between revisions of "Training:Router"

From IPitomy Wiki
Jump to navigation Jump to search
(13 intermediate revisions by 3 users not shown)
Line 1: Line 1:
Router
+
<ul style="margin-left: 40px;">
 +
<li>'''Introduction to Routers'''
 +
<li>A router is a crucial component of any network. It serves as the digital 'postmaster,' managing the data traffic between your local network (LAN) and the vast expanse of the Internet. It performs this complex task through mechanisms like Network Address Translation (NAT), Port Forwarding, and by assigning IP addresses using Dynamic Host Configuration Protocol (DHCP). These features ensure a seamless, secure, and efficient routing of information from your devices to the Internet and back.
  
&nbsp;
+
</li></li>
 
+
<li>'''Network Address Translation (NAT)'''
The router is your gateway to the internet.&nbsp; It is responsible for routing packets from devices on your LAN to the internet, and ensuring that packets from the internet are routed to the correct devices on the LAN.&nbsp; This is accomplished through Network Address Translation (NAT) and port forwarding.&nbsp; The router is also typically responsible for assigning IP addresses to devices on the network via DHCP when not using a separate DHCP server.
+
<li>In the digital world, IP addresses are a finite resource. Therefore, not every device connected to the Internet can have a unique public IP address. Instead, your local network has a distinct private subnet of IP addresses with a single public IP representing it online. Here's where NAT comes in handy.
 
 
&nbsp;
 
  
*Network Address Translation – Since there are a limited number of IP addresses it is not feasible for every device that communicates to the internet to have its own public IP address.&nbsp; Because of this your network will have its own private subnet of IP addresses and a single public IP.&nbsp; When a device communicates out to the internet, the router will NAT a certain port for that device so that it knows where to send responding packets.&nbsp;
+
When a device on your network wants to communicate with the Internet, the router uses NAT to map a unique port number to that device. The router then 'remembers' this mapping, ensuring that it knows where to direct any responses. Problems with NAT, such as inconsistent NAT, can often lead to connectivity issues. For instance, with remote phones, inconsistent NAT could lead to the device appearing unreachable or failing to receive calls.
 +
</li></li>
 +
<li>'''Dynamic Host Configuration Protocol (DHCP)'''
 +
<li>Typically, routers also perform the role of a DHCP server. This means they're responsible for assigning IP addresses to devices on the network. In certain situations, a dedicated server on the network might handle DHCP instead. Understanding the configuration of DHCP during a site survey is crucial to prevent IP conflicts. You need to know how DHCP will be managed, the DHCP range, and a list of available static IP addresses for setting devices like PBX systems.
  
&nbsp;
+
</li></li>
 +
<li>'''Port Forwarding'''
 +
<li>Port forwarding is how a router makes sure that incoming packets to specific ports are routed to the correct device on the LAN. For instance, remote phones initiate their communication by sending packets to port 5060. Hence, this port must be forwarded in the router to the PBX's internal static IP address.
  
Inconsistent NAT is the number one reason we see remote phones failing.&nbsp; Symptoms would be showing as unreachable on the Monitoring page in the PBX, unable to receive calls, but able to make calls.
+
</li></li>
 +
<li>'''There are three main types of port forwarding:'''
 +
* Single Port Forwarding: All incoming WAN traffic on a certain port is directed to a specific LAN IP via that port. For example, port 5060 externally can be forwarded to the PBX IP on port 5060.
 +
* Port Range Forwarding: All incoming WAN traffic on a range of ports is directed to a specific LAN IP via that range of ports. For example, ports 10000 to 20000 externally can be forwarded to the PBX IP on ports 10000 to 20000.
 +
* 1 to 1 NAT: All incoming WAN traffic on a certain port is directed to a specific LAN IP via a different port. This is usually employed when the required port is already in use. For example, if a user hosts their own webpage and port 80 is used, you can forward port 8080 externally to the PBX IP on port 80.
  
*Eg: You have a remote phone with a local IP address of 192.168.1.112 at your house.&nbsp; The public IP at your house is 78.16.54.98.&nbsp; If you look at the monitoring page in the PBX, it shows the remote phone registered with the 78.16.54.98 IP address.&nbsp; When the PBX sends packets to your phone, it sends them &#x5B;&#x5B;|to &lt;78.16.54.98:Port#&gt;. &#x5D;&#x5D;When your home router receives the packets, it knows that the Port# was reserved for the local IP 192.168.1.112 and therefore routes the packets to your phone, allowing you to communicate.&nbsp;
+
Proper router configuration is key to maintaining a stable and secure network. Misconfigurations can lead to unreachable devices, security vulnerabilities, or even complete network failure. So, understanding and managing these core router functions are essential skills for any network professional.
 
+
</li>
&nbsp;
+
</ul>
 
 
*Dynamic Host Configuration Protocol (DHCP) – In most installs the router will serve the function of DHCP, meaning the router is responsible for handing out IP addresses to devices on the network.&nbsp; In a few instances the user will have a server onsite that handles DHCP instead of the router.&nbsp; During your site survey it is important to find out how DHCP will be handled, what the DHCP range is, and a list of unused static IP addresses so you can set the PBX (and possibly other devices) to a static IP and not have to worry about an IP conflict.&nbsp; Unless the network has advanced configuration (vLAN) there should only be one device handing out DHCP.
 
 
 
&nbsp;
 
 
 
*Port Forwarding – This is how the router ensures that inbound packets to particular ports are routed to the right device on the LAN.&nbsp; For example, remote phones always initiate their communication by sending packets to port 5060.&nbsp; Because of this, you must forward port 5060 in the router to the internal static IP address of the PBX.&nbsp; If this port forwarding is not configured, the router will not know what to do with a packet received on 5060 and a remote phone will not register.
 
 
 
&nbsp;
 
 
 
*Single Port Forwarding: This instructs the router to take all WAN traffic to a certain port and route those packets to a LAN IP via that single port. Eg: forward port 5080 externally to the PBX IP on port 5060.
 
*Port Range Forwarding: This instructs the router to take all WAN traffic to a range of ports and route those packets to a LAN IP via that range of ports.&nbsp; Eg: forward ports 10000 thru 20000 externally to the PBX IP on ports 10000 thru 20000.
 
 
 
&nbsp;
 
 
 
*1 to 1 NAT: This instructs the router to take all WAN traffic to a certain port and route those packets to a LAN IP via a different port.&nbsp; This would typically be used when the port needed is already being used.&nbsp; Eg:&nbsp; The end user hosts their own webpage and 80 is used, so instead you can forward port 8080 externally to the PBX IP on port 80.
 
  
 
&nbsp;
 
&nbsp;
Line 36: Line 30:
 
Table 1: Single Port Forwarding
 
Table 1: Single Port Forwarding
  
{| border="1" cellpadding="0" cellspacing="0"
+
{| border="1" cellpadding="0" cellspacing="0" width="345"
 
|-
 
|-
|  
+
| <p style="text-align: center">Application Name</p>
Application Name
+
| <p style="text-align: center">Port</p>
 
+
| <p style="text-align: center">Protocol</p>
|  
+
| <p style="text-align: center">To IP Address</p>
Port
 
 
 
|  
 
Protocol
 
 
 
|  
 
To IP Address
 
 
 
 
|-
 
|-
|  
+
| <p style="text-align: center">Remote Administration</p>
Remote Administration
+
| <p style="text-align: center">80</p>
 
+
| <p style="text-align: center">TCP</p>
|  
+
| <p style="text-align: center">PBX Internal IP</p>
80
 
 
 
|  
 
TCP
 
 
 
|  
 
PBX Internal IP
 
 
 
 
|-
 
|-
|  
+
| <p style="text-align: center">SSH Support</p>
SSH Support
+
| <p style="text-align: center">22</p>
 
+
| <p style="text-align: center">TCP</p>
|  
+
| <p style="text-align: center">PBX Internal IP</p>
22
 
 
 
|  
 
TCP
 
 
 
|  
 
PBX Internal IP
 
 
 
 
|-
 
|-
|  
+
| <p style="text-align: center">SIP</p>
SIP
+
| <p style="text-align: center">5060</p>
 
+
| <p style="text-align: center">UDP</p>
|  
+
| <p style="text-align: center">PBX Internal IP</p>
5060
 
 
 
|  
 
UDP
 
 
 
|  
 
PBX Internal IP
 
 
 
 
|-
 
|-
|  
+
| <p style="text-align: center">Branch Office</p>
Branch Office
+
| <p style="text-align: center">4569</p>
 
+
| <p style="text-align: center">UDP</p>
|  
+
| <p style="text-align: center">PBX Internal IP</p>
4569
 
 
 
|  
 
UDP
 
 
 
|  
 
PBX Internal IP
 
 
 
 
|}
 
|}
  
Line 108: Line 62:
 
Table 2: Port Range Forwarding
 
Table 2: Port Range Forwarding
  
{| border="1" cellpadding="0" cellspacing="0"
+
{| border="1" cellpadding="0" cellspacing="0" width="364"
 
|-
 
|-
|  
+
| <p style="text-align: center">Application Name</p>
Application Name
+
| <p style="text-align: center">Port</p>
 
+
| <p style="text-align: center">Protocol</p>
|  
+
| <p style="text-align: center">To IP Address</p>
Port
 
 
 
|  
 
Protocol
 
 
 
|  
 
To IP Address
 
 
 
 
|-
 
|-
|  
+
| <p style="text-align: center">RTP</p>
RTP
+
| <p style="text-align: center">10000-20000</p>
 
+
| <p style="text-align: center">TCP & UDP</p>
|  
+
| <p style="text-align: center">PBX Internal IP</p>
10000-20000
 
 
 
|  
 
TCP & UDP
 
 
 
|  
 
PBX Internal IP
 
 
 
 
|}
 
|}
  
Line 141: Line 79:
 
Table 3: 1 to 1 NAT
 
Table 3: 1 to 1 NAT
  
{| border="1" cellpadding="0" cellspacing="0"
+
{| border="1" cellpadding="0" cellspacing="0" height="94" width="523"
 
|-
 
|-
|  
+
| <p style="text-align: center">Application Name</p>
Application Name
+
| <p style="text-align: center">External Port</p>
 
+
| <p style="text-align: center">Internal Port</p>
|  
+
| <p style="text-align: center">Protocol</p>
External Port
+
| <p style="text-align: center">To IP Address</p>
 
 
|  
 
Internal Port
 
 
 
|  
 
Protocol
 
 
 
|  
 
To IP Address
 
 
 
 
|-
 
|-
|  
+
| <p style="text-align: center">Alternate Remote Administration</p>
Alternate Remote Administration
+
| <p style="text-align: center">8080</p>
 
+
| <p style="text-align: center">80</p>
|  
+
| <p style="text-align: center">TCP</p>
8080
+
| <p style="text-align: center">PBX Internal IP</p>
 
 
|  
 
80
 
 
 
|  
 
TCP
 
 
 
|  
 
PBX Internal IP
 
 
 
 
|}
 
|}
  
Line 180: Line 98:
 
&nbsp;
 
&nbsp;
  
*Remote Access – With remote access to the PBX you can make configuration changes from your office.&nbsp; IPitomy Tech Support will also be able to troubleshoot with you more efficiently.&nbsp; In order to have the most visibility to the PBX, we recommend you forward port 80 (remote admin) and port 22 (SSH) to the PBX Internal IP address.&nbsp; Once this has been configured in the router you can enter &lt;publicIPaddress&gt;/ippbx from any PC that is connected to the internet and access the admin login for the PBX.&nbsp; If the end user is already using port 80 you will have to configure a 1 to 1 NAT of a different port (8080) to port 80 as the web access port on the PBX cannot be changed.
+
*'''Remote Access''' Remote access to devices like the PBX system enables network administrators or support staff to make configuration changes or troubleshoot issues from any location, not just on-site. This feature enhances the efficiency of network management and technical support services. To ensure maximum accessibility and visibility of the PBX system, it's recommended to forward port 80 (used for remote admin access) and port 22 (used for Secure Shell or SSH access) to the PBX's internal IP address. With this configuration, you can simply enter <code><publicIPaddress>/ippbx</code> in the browser of any internet-connected PC to reach the admin login for the PBX system. Note: If port 80 is already in use by the end user, you will need to use the 1 to 1 NAT port forwarding method to map a different external port (such as 8080) to the internal port 80. This is due to the inability to change the web access port on the PBX system.
 
+
*'''Example of Router Forwarding Interface: DDWRT'''  DDWRT is an open-source firmware that's compatible with a wide range of routers. It provides a user-friendly and fairly standard configuration interface for setting up port forwarding.  (Below would be a screenshot from a router interface loaded with DDWRT Open Source firmware showing the configuration screen for Port Forwarding.)  Understanding and navigating these interfaces is crucial to setting up and maintaining robust network configurations. Proper setup ensures smooth communication between your network devices and the broader internet, enhancing your network's overall performance and security.
&nbsp;
 
 
 
*Example Router Forwarding Interface: DDWRT Below is a screenshot from a router loaded with DDWRT Open Source firmware.&nbsp; The configuration screen for Port Forwarding is pretty standard.
 
 
 
&nbsp;
 
 
 
&lt;picture needed&gt;
 
 
 
&nbsp;
 
 
 
&nbsp;
 
 
 
&nbsp;
 
 
 
&nbsp;
 
 
 
&nbsp;
 
 
 
Questions:
 
 
 
&nbsp;
 
 
 
#What port is used to access the web interface for the PBX? (80, 8080, 5060, 4569)
 
 
 
&nbsp;
 
 
 
#What device on your network functions as a gateway to the Internet? (switch, router, PBX, server)
 
  
 
&nbsp;
 
&nbsp;
  
#Which term is used to describe a port forward that routes packets from one external port to a different internal port? (1 to 1 NAT, port triggering, SSH, DHCP)
+
[[File:Router-PortForward.gif|none|Router-PortForward.gif]]
  
&nbsp;
 
  
#How many devices on the network should typically be handing out DHCP? (2, 0, all, 1)
 
 
&nbsp;
 
  
#What ports must be forwarded for remote phones to function? (5060 & 10000-20000, 8080 & 22, 4569 & 5048, 5060 and 80)
+
[[File:Router-PortRangeForwarding.gif|none|Router-PortRangeForwarding.gif]]
 +
[[Category:Training]]

Revision as of 22:28, 17 May 2023

  • Introduction to Routers
  • A router is a crucial component of any network. It serves as the digital 'postmaster,' managing the data traffic between your local network (LAN) and the vast expanse of the Internet. It performs this complex task through mechanisms like Network Address Translation (NAT), Port Forwarding, and by assigning IP addresses using Dynamic Host Configuration Protocol (DHCP). These features ensure a seamless, secure, and efficient routing of information from your devices to the Internet and back.
  • Network Address Translation (NAT)
  • In the digital world, IP addresses are a finite resource. Therefore, not every device connected to the Internet can have a unique public IP address. Instead, your local network has a distinct private subnet of IP addresses with a single public IP representing it online. Here's where NAT comes in handy. When a device on your network wants to communicate with the Internet, the router uses NAT to map a unique port number to that device. The router then 'remembers' this mapping, ensuring that it knows where to direct any responses. Problems with NAT, such as inconsistent NAT, can often lead to connectivity issues. For instance, with remote phones, inconsistent NAT could lead to the device appearing unreachable or failing to receive calls.
  • Dynamic Host Configuration Protocol (DHCP)
  • Typically, routers also perform the role of a DHCP server. This means they're responsible for assigning IP addresses to devices on the network. In certain situations, a dedicated server on the network might handle DHCP instead. Understanding the configuration of DHCP during a site survey is crucial to prevent IP conflicts. You need to know how DHCP will be managed, the DHCP range, and a list of available static IP addresses for setting devices like PBX systems.
  • Port Forwarding
  • Port forwarding is how a router makes sure that incoming packets to specific ports are routed to the correct device on the LAN. For instance, remote phones initiate their communication by sending packets to port 5060. Hence, this port must be forwarded in the router to the PBX's internal static IP address.
  • There are three main types of port forwarding:
    • Single Port Forwarding: All incoming WAN traffic on a certain port is directed to a specific LAN IP via that port. For example, port 5060 externally can be forwarded to the PBX IP on port 5060.
    • Port Range Forwarding: All incoming WAN traffic on a range of ports is directed to a specific LAN IP via that range of ports. For example, ports 10000 to 20000 externally can be forwarded to the PBX IP on ports 10000 to 20000.
    • 1 to 1 NAT: All incoming WAN traffic on a certain port is directed to a specific LAN IP via a different port. This is usually employed when the required port is already in use. For example, if a user hosts their own webpage and port 80 is used, you can forward port 8080 externally to the PBX IP on port 80.
    Proper router configuration is key to maintaining a stable and secure network. Misconfigurations can lead to unreachable devices, security vulnerabilities, or even complete network failure. So, understanding and managing these core router functions are essential skills for any network professional.

 

Table 1: Single Port Forwarding

Application Name

Port

Protocol

To IP Address

Remote Administration

80

TCP

PBX Internal IP

SSH Support

22

TCP

PBX Internal IP

SIP

5060

UDP

PBX Internal IP

Branch Office

4569

UDP

PBX Internal IP

 

Table 2: Port Range Forwarding

Application Name

Port

Protocol

To IP Address

RTP

10000-20000

TCP & UDP

PBX Internal IP

 

Table 3: 1 to 1 NAT

Application Name

External Port

Internal Port

Protocol

To IP Address

Alternate Remote Administration

8080

80

TCP

PBX Internal IP

 

 

  • Remote Access Remote access to devices like the PBX system enables network administrators or support staff to make configuration changes or troubleshoot issues from any location, not just on-site. This feature enhances the efficiency of network management and technical support services. To ensure maximum accessibility and visibility of the PBX system, it's recommended to forward port 80 (used for remote admin access) and port 22 (used for Secure Shell or SSH access) to the PBX's internal IP address. With this configuration, you can simply enter <publicIPaddress>/ippbx in the browser of any internet-connected PC to reach the admin login for the PBX system. Note: If port 80 is already in use by the end user, you will need to use the 1 to 1 NAT port forwarding method to map a different external port (such as 8080) to the internal port 80. This is due to the inability to change the web access port on the PBX system.
  • Example of Router Forwarding Interface: DDWRT DDWRT is an open-source firmware that's compatible with a wide range of routers. It provides a user-friendly and fairly standard configuration interface for setting up port forwarding. (Below would be a screenshot from a router interface loaded with DDWRT Open Source firmware showing the configuration screen for Port Forwarding.) Understanding and navigating these interfaces is crucial to setting up and maintaining robust network configurations. Proper setup ensures smooth communication between your network devices and the broader internet, enhancing your network's overall performance and security.

 

Router-PortForward.gif


Router-PortRangeForwarding.gif