Description:

This article describes how to set up routing between a switch of the GS-3xxx series and a LANCOM router.


Requirements:


Scenario:

  • A switch of the GS-3xxx series is configured with the VLANs 1 – 3.
  • On the GS-3xxx the VLANs 1 - 3 should be assigned the following networks and IP addresses so that the switch can route between the networks:
    • VLAN 1: Network 192.168.45.0/24, IP address 192.168.45.100
    • VLAN 2: Network 192.168.50.0/24, IP address 192.168.50.100
    • VLAN 3: Network 192.168.55.0/24, IP address 192.168.55.100
  • The following networks are configured on a LANCOM router:
    • Network 192.168.45.0/24, IP address 192.168.45.254
    • Network 192.168.0.0/24, IP address 192.168.0.254
  • The networks connected to the switch and the router should be able to communicate with one another.



Procedure:

1) Configuring the routing features of the GS-3xxx series switch:

1.1) In your browser, open the configuration for the GS-3xxx and navigate to the menu item System → IP Address → Advanced Settings.

1.2) In the Advanced Settings, modify the following parameters:

  • Mode: From the drop-down menu, select the option Router.
  • DNS server 1: From the drop-down menu, select the option Configured IPv4 or IPv6 and enter the IP address of a DNS server that the switch can reach (in this example the IP address of a router on the same network).

You can add additional DNS servers if required.

1.3) For the IP Interfaces, modify the following parameters:

  • For the first entry (VLAN 1) remove the Enable checkmark for IPv4 DHCP, and under IPv4 set the Address to an IP address and set the Mask Length as the subnet mask.
  • Create a second entry for VLAN 2, and under IPv4 set the Address to an IP address and set the Mask Length as the subnet mask.
  • Create a third entry for the VLAN 3, and under IPv4 set the Address to an IP address and set the Mask Length as the subnet mask.

1.4) If the DHCP client is enabled (the default ex-factory setting), the switch automatically creates a default route (network 0.0.0.0, mask length 0) to the standard gateway (in this example 192.168.45.254). The entry is retained when changing to a fixed IP address.

This scenario does not require a separate routing entry to be created for the network 192.168.0.0/24 because the packets are sent to the LANCOM router via the default route.

If there is no default route, it has to be created manually.

If the destination network 192.168.0.0/24 is reached behind a router that is not the standard gateway, a separate routing entry needs to be created using the button Add Route.

  • Network: Enter the network address of the destination network (in this example 192.168.0.0).
  • Mask Length: Enter the subnet mask as a prefix length (in this example 24).
  • Gateway : Enter the IP address of the router used to reach the destination network (in this example 192.168.50.254 ).

1.5) Click on Apply so that the switch activates your changes. 

The switch will now change its IP address and can be reached at the IP addresses stored in step 1.3

1.6) Save the configuration as the startup configuration by clicking the red floppy disk icon at top-right.

Alternatively, you can save the configuration as the startup configuration in the menu Maintenance → Configuration → Save Startup-config under File name by marking the item startup-config and then clicking Save Configuration.

When the switch is started, it will load the startup configuration. If none is available, the default configuration will be loaded and the switch starts in its factory state.

1.7) The GS-3xxx has now been configured.



2) Configuring the routing entries on the LANCOM router:

The LANCOM router needs to be able to send packets to the networks 192.168.50.0/24 and 192.168.55.0/24 on the GS-3xxx switch, and these are made known by means of routing entries.

2.1) Open the configuration of the router in LANconfig and switch to the menu item IP router → Routing → IPv4 routing table.

2.2) Click on Add to create a new routing entry for the destination network 192.168.50.0/24.

2.3) Change the following parameters:

  • IP address: Enter the network address of the destination network (in this example 192.168.50.0).
  • Netmask: Enter the subnet mask of the destination network (in this example 255.255.255.0).
  • Router: Enter the IP address of the GS-3xxx in VLAN 1 as specified in step 1.3 (in this example 192.168.45.100).
  • Select the option IP masquerading switched off .

2.4) Create another routing entry for the network 192.168.55.0/24.

2.5) The routing entries should then look like this.

2.6) This concludes the configuration of the RADIUS server on the router. Write the configuration back to the router.



3) Preventing communications between the different networks on GS-3xxx series switches (optional): 

If necessary, you can prevent communication between the different networks on the GS-3xxx.