Table of contents

Introduction

The main task of switching is to ensure the connectivity of the nodes within a single network (see InfiLINK 2x2 and InfiMAN 2x2: Switching). In order to establish the communication between different networks, a new class of devices (called routers) must be used (see Figure 1). This article describes the application areas and the configuration of the Infinet devices when used as routers.

Terminology

Switching

Let's look at the differences in the processing of the service headers when performing switching compared to routing. The example in (Figure 1) will be used for this purpose.

When PC-1 sends data to PC-2 (Figure 1a), PC-1 fills in the service fields in the following way:

The switch receives the frame from PC-1 and redirects it to PC-2 according to the switching table. The data transmission is performed based on the Ethernet service header, since the transmission takes place at the data link level. This mechanism is called switching.

In the scenario where PC-1 sends data to PC-3 (Figure 1b), PC-1 fills in the frame's service fields in the following way:

The switch receives such a frame and transmits it to the router according to the switching table. The router receives the frame, decapsulates the IP packet and transmits it to LAN-2. In this case, the service headers will be set in the following way:

Note that the IP packet header is left unchanged, while the receiver and the sender MAC addresses in the Ethernet frame header are changed. This operation was performed because the MAC addresses are used to transfer data within the same local network, i.e. when transferring data between different local networks, the MAC addresses will always be replaced. This data transfer mechanism is called routing.

Figure 1a - Example of data transmission from PC-1 to PC-2

Figure 1b - Example of data transmission from PC-1 to PC-3

Routing

The main function of a network is the ability to establish the communication between any arbitrary nodes that are part of the network. Using only packet switching technologies associated with the Layer 2 (Link layer) of the network interaction model has a number of disadvantages:

The IP network layer protocol, which is widely used to provide connectivity in large and global networks, lacks these disadvantages. The IP protocol is not a replacement for Ethernet, these protocols work together and perform different functions: Ethernet provides data transfer within the devices in the same subnet, while the IP protocol is responsible for global addressing and the communication between the nodes belonging to different subnets.

Currently, two versions of the IP protocol have become widespread: IPv4 and IPv6. Since the InfiNet devices currently support only the IPv4 protocol, the current article will only detail the operation of the IPv4 protocol.

The IP protocol

IP addresses

The IP protocol provides 32 bits for addressing the nodes in the network, which are usually divided into four octets and written in decimal form, separating the octets with dots (Figure 2). Examples of IP addresses:

Figure 2 - Structure of the IP address

Network mask

The IP protocol allows to group the addresses in a network using network masks. A netmask is applied to an IP address, dividing it in two parts: a network ID and a host ID. The devices connected to the same network will have the same network ID and different host IDs. To ensure that the network ID matches on all the devices of a subnet, use the same network mask values when configuring the devices. The set of host IDs allows inferring the number of devices that can be connected to this network and specifies the IP addresses that can be used by the devices.

The network mask has 32 bits and is written in the same way as the IP address with one difference: the network mask consists of a sequence of ("1") bits followed by zero ("0") bits, i.e. the set of masks is preset and contains 33 values: from 0 to 32. The finite range of possible values allows to write the network mask in an abbreviated form, in which the number of single "1" bits in the mask is indicated after a slash (see the table below).

The "1" bits in the network mask define the network identifier: the bits of the IP address corresponding to the "1" bit values of the mask must be fixed and cannot be changed. The remaining bits of the IP address, corresponding to the zero bit values of the mask, can take arbitrary values and determine the host ID.

When configuring the devices connected to the network, the IP addresses are not used without a network mask, since the routing rules imply a different approach when transferring data to a device located in a different network, compared to sending data to a device in the same network (see Switching). Note that the network mask is set in the configuration of the device and it is not transmitted in the service header of the IP packet.

ExampleParameterDecimal formatBinary formatAbbreviated format


Example 1

IP address10.94.200.700001010.01011110.11001000.00000111-
Network mask255.255.255.011111111.11111111.11111111.00000000/24
First available IP address10.94.200.000001010.01011110.11001000.00000000-
Last available IP address10.94.200.25500001010.01011110.11001000.11111111-


Example 2

IP address192.17.0.011000000.00010001.00000000.00000000-
Network mask255.255.255.25211111111.11111111.11111111.11111100/30
First available IP address
192.17.0.011000000.00010001.00000000.00000000-
Last available IP address
192.17.0.311000000.00010001.00000000.00000011-

Table 1 - Examples of network masks

Types of IP addresses

The IP address types can be divided according to several criteria:

Based on the application area, the IP addresses can be divided in two large groups: public and private addresses (Figure 3). Global connectivity can only be established between public addresses, i.e. private addressing is used inside the enterprise's local network and public addressing is used on the Internet. The public address is unique, while private addresses can be reused, i.e. the devices PC-2 and PC-6 may have the same address and this is not a problem, since there is no connectivity between LAN-1 and LAN-2. However, the addressing within the same local network must be unique, i.e. the addresses of PC-5 and PC-6 must be different.

In addition to the public and private ranges of addresses, several service ranges are allocated, for example for the multicast traffic transmission, for the loopback interface, etc.

Figure 3 - An example of various network connections

Based on the function or role, the following addresses can be distinguished:

The place of the router in the network

There is no element explicitly included in Figure 3 that can be used to connect different networks to each other and to transfer data between the networks using IP addressing. Such elements are called routers (Figure 4). Usually, a router connects several networks of an arbitrary type, not just public and private, as shown in the example.

The routers have the following key features:

Figure 4 - The place of the router in the network

Routing table

Let's look at the network diagram in (Figure 5), which includes the following elements:

Figure 5 - Network diagram example

The routing table is a collection of network addresses. The network address in the routing table that matches best with the destination IP address has an exit interface or a gateway IP address associated, that are used for transmitting the packet to the corresponding next hop in order to reach the destination. This logic is used by all routers along the traffic path, i.e. if there are 8 routers along the packet's path, then each of them only has information about the next router along the way, and this information is contained in the routing table.

The routing table includes the following columns (Table 2a-c):

Table 2a - R1's routing table example

Table 2b - R2's routing table example

Table 2c - R3's routing table example

Route sourceDistance
directly connected networks0
static route1
External BGP20
OSPF110
RIP120
ODR160

Table 3 - Distance values depending on the route source

Routing table management

Each router along the transmission path has a routing table management algorithm. The algorithm is the following:

Routing table management examples

Let's look at some examples of routing table management in various scenarios (Figure 6a-c).

Scenario 1 - connecting PC1 to an FTP server running on PC2 (source - 192.168.1.10, destination - 192.168.1.20)

Data is transmitted using switching technologies within the same network, so router R1 does not participate in this process.

Figure 6a - Packet transmission from PC1 to PC2


Scenario 2 - checking the availability of PC3 from PC1 (source - 192.168.1.10, destination - 172.16.3.2)

Figure 6b - Packet transmission from PC1 to PC3

Table 4a - Routing table example for R1

Table 4b - Routing table example for R2

Table 4c - Routing table example for R3

Scenario 3 - connection with the "infinetwireless.com" server from PC1 (source - 192.168.1.10, destination - 82.151.200.119)

Figure 6c - Packet transmission from PC1 to the infinetwireless.com server


Table 4a - Routing table example for R1

Table 4b - Routing table example for R2

Table 4c - Routing table example for R3

Routing table filling

Speaking about the mechanisms for filling the routing table, two terms must be added:

The routing information sources are:

Figure 7 - Routing information sources

The routing table of the Infinet Wireless devices

Depending on the product family, the Infinet Wireless devices support different sources of routing information:

Routing information sourcesInfiLINK 2x2InfiMAN 2x2InfiLINK EvolutionInfiMAN EvolutionInfiLINK XGInfiLINK XG 1000Quanta 5Quanta 6Quanta 70
Operating system routes

+

++++++++
Directly connected networksmanagement traffic+++++++++
data traffic++++-----
Static routesmanagement traffic+++++++++
data traffic++++-----


Dynamic routing protocols

OSPF++++-----
ODR++++-----
RIP++++-----



Table 6 - Comparative analysis of the routing information sources for the Infinet devices

Routing table output

Further in this article we will present the tools for displaying and analyzing the routing information. These tools depend on the family of devices and will be shown below.

The routing tables of the InfiLINK 2x2, InfiMAN 2x2, InfiLINK Evolution, InfiMAN Evolution families of devices

The InfiLINK 2x2, InfiMAN 2x2, InfiLINK Evolution, InfiMAN Evolution families of devices support routing settings for the management traffic and for the user traffic, moreover, static routes and dynamic routing protocols are supported.

The routing information can be displayed in two ways:

Unknown node#1> netstat -r
Routing tables
Destination        Gateway            Flags     Refs     Use  Interface
10.10.10.0/24      link#6             UC          0        0  svi1
10.10.10.101       00:0c:29:40:72:d0  UHL         0        1  svi1
10.10.10.254       link#6             UHL         0        0  svi1
10.10.20.0/24      link#2             UC          0        0  eth0
10.10.20.101       00:0c:29:40:72:d0  UHL         1     1307  eth0
127.0.0.1          127.0.0.1          UH          1        0  lo0
224.0.0.0/8        127.0.0.1          UGS         0        0  lo0

Figure 8a - An example of routing information output for the InfiLINK 2x2, InfiMAN 2x2, InfiLINK Evolution, InfiMAN Evolution families of devices

The routing tables of the InfiLINK XG and InfiLINK XG 1000 families of devices

The InfiLINK XG and InfiLINK XG 1000 families of devices support routing configurations for the management traffic only. The default gateway and static routes can be set. The routing information can be displayed in two ways:

#1> netstat -r
Routing tables
Destination        Gateway            Flags     Refs     Use  Interface
10.10.10.0/24      link#2             UC          0        0  mgmt
10.10.10.101       00:0c:29:40:72:d0  UHL         1      512  mgmt
10.10.10.254       link#2             UHL         1        0  mgmt
10.10.20.0/24      10.10.10.254       UGS         0        0  mgmt
127.0.0.1          127.0.0.1          UH          0        0  lo0
224.0.0.0/8        127.0.0.1          UGS         0        0  lo0

Figure 8b - An example of routing information output for the InfiLINK XG/InfiLINK XG 1000 families of devices

The routing tables of the Quanta 5, Quanta 6 and Quanta 70 families of devices

The Quanta 5, Quanta 6 and Quanta 70 families of devices support only routing configurations for the management traffic, allowing to set a default gateway. The routing information can be displayed in two ways:

#1> netstat -r
Routing tables
Destination        Gateway            Flags     Refs     Use  Interface
10.10.10.0/24      link#2             UC          0        0  eth0
10.10.10.101       00:0c:29:40:72:d0  UHL         5     3222  eth0
127.0.0.1          127.0.0.1          UH          0        0  lo0
224.0.0.0/8        127.0.0.1          UGS         0        0  lo0

Figure 8c - An example of routing information output for the Quanta 5, Quanta 6, Quanta 70 families of devices

The article continues with: Static routing

Additional materials

Online courses 

  1. InfiLINK 2x2 / InfiMAN 2x2: Initial Link Configuration and Installation
  2. InfiLINK 2x2 and InfiMAN 2x2: Switching
  3. InfiLINK XG Family Product
  4. Quanta 5 / Quanta 6: Installation and Configuration

Webinars

  1. Typical scenario of routing setting using Infinet Wireless devices. Part I.
  2. Typical scenario of routing setting using Infinet Wireless devices. Part II

Other

  1. InfiNet Wireless R5000 - Web GUI - Technical User Manual
  2. InfiLINK Evolution / InfiMAN Evolution - Technical User Manual
  3. InfiLINK XG / InfiLINK XG 1000 - Technical User Manual
  4. Quanta 5 family - Technical User Manual
  5. netstat command