Академический Документы
Профессиональный Документы
Культура Документы
Configuration
Siemens
Industry
Industrial Network
Online
https://support.industry.siemens.com/cs/ww/en/view/10975534 Support
4
Legal information
Legal information
Use of application examples
Application examples illustrate the solution of automation tasks through an interaction of several
components in the form of text, graphics and/or software modules. The application examples are
a free service by Siemens AG and/or a subsidiary of Siemens AG (“Siemens”). They are non-
binding and make no claim to completeness or functionality regarding configuration and
equipment. The application examples merely offer help with typical tasks; they do not constitute
customer-specific solutions. You yourself are responsible for the proper and safe operation of the
products in accordance with applicable regulations and must also check the function of the
respective application example and customize it for your system.
Siemens grants you the non-exclusive, non-sublicensable and non-transferable right to have the
application examples used by technically trained personnel. Any change to the application
examples is your responsibility. Sharing the application examples with third parties or copying the
application examples or excerpts thereof is permitted only in combination with your own products.
The application examples are not required to undergo the customary tests and quality inspections
of a chargeable product; they may have functional and performance defects as well as errors. It is
your responsibility to use them in such a manner that any malfunctions that may occur do not
result in property damage or injury to persons.
Disclaimer of liability
Siemens shall not assume any liability, for any legal reason whatsoever, including, without
limitation, liability for the usability, availability, completeness and freedom from defects of the
application examples as well as for related information, configuration and performance data and
any damage caused thereby. This shall not apply in cases of mandatory liability, for example
under the German Product Liability Act, or in cases of intent, gross negligence, or culpable loss of
life, bodily injury or damage to health, non-compliance with a guarantee, fraudulent
non-disclosure of a defect, or culpable breach of material contractual obligations. Claims for
damages arising from a breach of material contractual obligations shall however be limited to the
Siemens AG 2018 All rights reserved
foreseeable damage typical of the type of agreement, unless liability arises from intent or gross
negligence or is based on loss of life, bodily injury or damage to health. The foregoing provisions
do not imply any change in the burden of proof to your detriment. You shall indemnify Siemens
against existing or future claims of third parties in this connection except where Siemens is
mandatorily liable.
By using the application examples you acknowledge that Siemens cannot be held liable for any
damage beyond the liability provisions described.
Other information
Siemens reserves the right to make changes to the application examples at any time without
notice. In case of discrepancies between the suggestions in the application examples and other
Siemens publications such as catalogs, the content of the other documentation shall have
precedence.
The Siemens terms of use (https://support.industry.siemens.com ) shall also apply.
Security information
Siemens provides products and solutions with industrial security functions that support the secure
operation of plants, systems, machines and networks.
In order to protect plants, systems, machines and networks against cyber threats, it is necessary
to implement – and continuously maintain – a holistic, state-of-the-art industrial security concept.
Siemens’ products and solutions constitute one element of such a concept.
Customers are responsible for preventing unauthorized access to their plants, systems, machines
and networks. Such systems, machines and components should only be connected to an
enterprise network or the Internet if and to the extent such a connection is necessary and only
when appropriate security measures (e.g. firewalls and/or network segmentation) are in place.
For additional information on industrial security measures that may be implemented, please visit
https://www.siemens.com/industrialsecurity.
Siemens’ products and solutions undergo continuous development to make them more secure.
Siemens strongly recommends that product updates are applied as soon as they are available
and that the latest product versions are used. Use of product versions that are no longer
supported, and failure to apply the latest updates may increase customer’s exposure to cyber
threats.
To stay informed about product updates, subscribe to the Siemens Industrial Security RSS Feed
at: https://www.siemens.com/industrialsecurity.
Static_Routing
Entry ID: 109755344, V1.0, 03/2018 2
Table of contents
Table of contents
Legal information ......................................................................................................... 2
1 Introduction ........................................................................................................ 4
1.1 Overview............................................................................................... 4
1.2 Mode of operation ................................................................................ 6
1.2.1 Concepts .............................................................................................. 6
1.2.2 The router ............................................................................................. 6
1.2.3 The routing table .................................................................................. 7
1.2.4 The IP routing ....................................................................................... 9
1.3 Components used .............................................................................. 11
2 Engineering ...................................................................................................... 12
2.1 Hardware structure ............................................................................. 12
2.2 Configuration ...................................................................................... 13
2.2.1 Preparation ......................................................................................... 15
2.2.2 Configuration of the PCs .................................................................... 18
2.2.3 SCALANCE XM408 Configuration ..................................................... 22
2.3 Operation ............................................................................................ 32
3 Useful information ........................................................................................... 33
3.1 Network basics ................................................................................... 33
3.1.1 Internet protocol ................................................................................. 33
3.1.2 IP address .......................................................................................... 33
Siemens AG 2018 All rights reserved
Static_Routing
Entry ID: 109755344, V1.0, 03/2018 3
1 Introduction
1 Introduction
1.1 Overview
Requirement
A stable and securely functioning network is an important fundamental requirement
in a company or automation system.
In order to separate individual areas for security reasons or to stabilize the network,
the local network is to be segmented into many smaller networks and the individual
areas are to be clearly separated from each other.
However, cross-network communication must still be ensured for the participants, if
it is necessary. The data must therefore be routed beyond the network boundaries.
Measure
To increase the network's stability, a larger physical network is split into several
smaller network segments, each with its own broadcast domains.
For this, the network is physically segmented into several subnets at IP level (Layer
3 in the OSI reference model) with the help of Layer 3 network components.
Special settings in the devices and protocols at Layer 3 level enable data
exchange between the subnets.
Benefits
Siemens AG 2018 All rights reserved
If you separate a large network into several smaller subnets, the following benefits
result for you:
Different company divisions receive their own, smaller networks.
The network load is reduced because, for example, broadcast requests remain
within a segment.
In small networks it is possible to quickly perform network diagnostics in case
of network malfunction, which greatly accelerates troubleshooting.
Layer 3 network traffic can be almost completely controlled.
All the participants can communicate with each other despite different networks
and thus different broadcast domains.
Static_Routing
Entry ID: 109755344, V1.0, 03/2018 4
1 Introduction
Dividing your network according to this technological concept gives you the
following advantages:
You can implement it both in small and in very large networks.
The idea of security is reinforced because you can control the data traffic on
Layer 3 between the subnets or connect or disconnect subnets at port level.
You can use suitable filter rules in the IP routers to prevent data from
corresponding protocols or subscribers from reaching other subnets.
You can increase the performance in your network. Subnets connected by an
IP router do not influence each other by a broadcast storm.
Applicative implementation
This Application example shows you the operating principle of Static Routing.
Note You can find an application example that shows you how dynamic routing works
on the same HTML page.
Network A Network B
Siemens AG 2018 All rights reserved
PC PC
Network A Network B
PC PC
Network C
Network D
PC
Static_Routing
Entry ID: 109755344, V1.0, 03/2018 5
1 Introduction
All devices can communicate with each other within their own network. If data
exchange is to take place across network boundaries, special Layer 3 network
components are required to forward the data packet in the direction of the
destination subnet.
This process, i.e. the forwarding of the data packet, is called "routing". The Layer 3
network component that performs the task is called the "router".
Description
The router is a Layer 3 network component and it connects subnets with each
other.
The router has an interface ("IP interface") of its own and at least one IP address
for each connected subnet.
Note The subnets connected to the IP router must be different. Each connected
subnet must have a unique network address.
The task of the router is to accept IP packets addressed to an external subnet and
forward them to their destination.
Siemens AG 2018 All rights reserved
The following figure shows a router that connects two subnets to each other. The
router has its own IP interface and IP address for each adjacent subnet. This
allows it to send IP packets from one subnet to another subnet.
Figure 1-1
192.168.0.1/24 192.168.1.1/24
SCALANCE XM408
Default router
To ensure that the terminal devices know where to send the data packets for cross-
network communication, the IP router must be configured as a "default router" or
"default gateway" in each end device.
Note For more information on the router and its tasks, please refer to Chapter 3.3
Unrestricted
Static_Routing
Entry ID: 109755344, V1.0, 03/2018 6
1 Introduction
Description
Every IP-capable device administrates a routing table. The routing table contains
information on known networks and how (route) these networks can be accessed.
The routing table is divided into several columns.
The most important columns in the routing table are:
Destination network address: Identifies the subnet that is to be accessed.
Gateway: IP address of the next router. All the IP packets intended for the
destination network are forwarded to this router.
The router must have an entry in its routing table for each subnet to which it is to
forward the IP packets.
The routers can learn the routes and fill their table in three different ways:
Directly connected sub-nets: Each IP interface is automatically entered in the
table with the corresponding subnet.
Note:
The route of an IP interface will only be visible in the table if the corresponding
physical IP interface is active.
Static routing: These routes are configured manually by an administrator.
Dynamic routing: In this case, the routers automatically learn all accessible
networks through one or more configured routing protocols.
Note In this application example the routers learn the routes as follows:
Static_Routing
Entry ID: 109755344, V1.0, 03/2018 7
1 Introduction
From what the routing table shows, the following statements can be made:
Lines 1 to 3 are create automatically through the configured IP interfaces.
Line 4 is a static route created by the administrator.
Line 5 is the network address of the SCALANCE Agent IP address.
Note For more information on the routing table, please refer to Chapter 3.3.2.
Siemens AG 2018 All rights reserved
Static_Routing
Entry ID: 109755344, V1.0, 03/2018 8
1 Introduction
Description
When a terminal (sender) sends an IP data packet, a check is made to determine
whether the IP data packet is for its own subnet or not.
If the intended recipient is located in its own subnet the data packet is handed over
to the two lower layers of the OSI reference model. The lower layers register the IP
address from the data package and send the data package.
If the recipient is not in the same subnet, the sender cannot access the recipient
directly. The sender needs to use the detour via the IP router and forward the IP
data packet to the router. To do this, it passes the data package to the lower two
layers of the OSI reference model. The lower layers use the IP address of the
default router to determine the MAC address of the router and send the data
packet to the IP router.
The router uses its routing table to check whether it is possible to forward the data
packet to the other subnet. If it is possible, the router sends the data to the other
subnet. If it does not find a suitable entry in its routing table, the IP data packet is
discarded.
Note If IP routing is used in a network, all subnets must be unique and may only be
used at one location.
Siemens AG 2018 All rights reserved
Sequence
The following figure shows you the function of "IP routing" using a simple structure
to illustrate.
192.168.0.1/24 192.168.1.1/24
3
1 5
4
2
PC 1 PC 2
192.168.0.100 192.168.1.100
255.255.255.0 SCALANCE XM408 255.255.255.0
Router: 192.168.0.1 Router: 192.168.1.1
Static_Routing
Entry ID: 109755344, V1.0, 03/2018 9
Frei verwendbar
1 Introduction
Note In Chapter 3 you will find more detailed information on the following topics:
Static_Routing
Entry ID: 109755344, V1.0, 03/2018 10
1 Introduction
Note The devices of the SCALANCE XM-400 series and the devices of the
SCALANCE XR-500 series are offered in two variants:
When choosing your device, please note whether the routing function is already
included in the device or whether you need an additional KEY-PLUG with
license.
PCs
Commercially available Windows PCs are used to test and examine the IP routing.
You can test the router functionality with a PING command from the Windows
command line.
In this example, three PCs with a Windows 7 operating system are used.
An additional engineering PC is used to configure the SCALANCE XM-400
devices.
Alternative components
Devices of the SCALANCE SC serie and the SCALANCE S615 support static
routing with an additional firewall. The project planning of these devices is largely
analogous to the project planning presented here.
Static_Routing
Entry ID: 109755344, V1.0, 03/2018 11
2 Engineering
2 Engineering
2.1 Hardware structure
Configuration of static routing is explained for a specific application case.
The following figure shows you the hardware structure selected for this:
Figure 2-1
PC 2
PC 1
SCALANCE XM408
Engineering-
Siemens AG 2018 All rights reserved
PC
PC 3
SCALANCE XM408
Static_Routing
Entry ID: 109755344, V1.0, 03/2018 12
2 Engineering
2.2 Configuration
Physical network diagram
The following figure shows you the physical network diagram of the example.
You can read all essential physical properties from the figure.
These are the properties:
The network components used
The cabling of the network components to one another
The port connections of the network components
Figure 2-2
XM408-hall1
P1.1 P1.2
PC 2
PC 1
Siemens AG 2018 All rights reserved
P1.3
P1.3
Engineering- P1.2
PC
PC 3
XM408-hall2
Static_Routing
Entry ID: 109755344, V1.0, 03/2018 13
2 Engineering
Figure 2-3
PC 1 PC 2
XM408 hall1
.100 .150
192.168.0.0/25 192.168.0.128/25
.1 .129
.1
Siemens AG 2018 All rights reserved
172.16.0.0/30
.2
192.168.1.0/24
.2
.100 XM408 hall2
Note The sample network is subdivided into several IP subnets by “subnetting”. Each
subnet is unique and is only used at one location.
For more information on “subnetting”, please refer to Chapter 3.2.2.
Note The next chapters show you the necessary configuration steps for the PCs and
for the SCALANCE XM-400 devices.
Static_Routing
Entry ID: 109755344, V1.0, 03/2018 14
2 Engineering
2.2.1 Preparation
Overview
Before you can configure the SCALANCE XM-400 devices as IP routers, various
preparations must be made.
You must prepare the following points in advance:
Set up an Engineering PC
Reset SCALANCE to factory setting (if necessary)
Assign a management IP address
Starting Web Based management
Setting up an engineering PC
The engineering PC is used to configure the SCALANCE devices using web-based
management.
Assign the following IP address to the engineering PC:
Figure 2-4
Siemens AG 2018 All rights reserved
Resetting SCALANCE
If you are not using brand-new SCALANCE devices, it is recommended to reset
both devices to factory settings.
That way you can be sure that no old configuration is stored in the SCALANCE.
For instructions on how to reset the SCALANCE please refer to the manual of the
device (see Chapter 4.2).
Static_Routing
Entry ID: 109755344, V1.0, 03/2018 15
2 Engineering
The Primary Setup Tool and PRONETA are available for immediate free download
from Industry Online Support. You will find the links for this in Chapter 4.2.
Assign to the two SCALANCE the following IP address using one of the tools
mentioned:
For the SCALANCE “X408-hall1”: 192.168.55.1/29
For the SCALANCE “X408-hall2”: 192.168.55.2/29
The following image shows you the configuration with the Primary Setup Tool:
Figure 2-5
Siemens AG 2018 All rights reserved
Static_Routing
Entry ID: 109755344, V1.0, 03/2018 16
2 Engineering
2. When you log in for the first time or after a "Reset to factory settings and
restart", enter the password of the factory-set user "admin":
Name and password: “admin”.
Siemens AG 2018 All rights reserved
3. Then, click on the Log-in button or confirm your input with “Enter”.
4. When you log in for the first time or after a “Reset to factory settings and
restart” using the pre-set user, you will be prompted to change the password.
Change the password.
Static_Routing
Entry ID: 109755344, V1.0, 03/2018 17
2 Engineering
5. To complete the process and activate the new password, click on the "Set
Values" button.
If you have successfully logged in, the start page appears.
Siemens AG 2018 All rights reserved
Description
To test the IP routing between the networks, three PCs are used in this application
example.
You must enter a default router in all PCs. Only with this entry can the PC
communicate with devices that are not in its own subnet.
The IP packets intended for a remote subnet are forwarded by the PC to the
default router for further processing.
Static_Routing
Entry ID: 109755344, V1.0, 03/2018 18
2 Engineering
2. The “Network and Sharing Center” opens. Click on “Change adapter settings”
which appears in the left-hand sector of the window.
Static_Routing
Entry ID: 109755344, V1.0, 03/2018 19
2 Engineering
3. The “Network Connections” window opens. You will see all available network
adapters / network cards.
With the left mouse button, select the entry you are using from the list. Open
the context menu with the right mouse button and click on "Properties".
Siemens AG 2018 All rights reserved
4. The window for the properties of the corresponding network adapter, network
card or connection opens.
Double-click on the entry "Internet Protocol Version 4 (TCP/IPv4)" or select this
entry with the left mouse button. Then click on the “Properties” button.
Static_Routing
Entry ID: 109755344, V1.0, 03/2018 20
2 Engineering
5. The Properties window for Internet protocol version 4 opens. Configure the
properties as follows:
a. Set the option to "Use the following IP address:"
b. Enter the IP address that is intended for the PC.
c. Enter the subnet mask intended for the PC.
d. Enter the standard gateway.
Siemens AG 2018 All rights reserved
6. When you have made all the settings, click on the "OK" button in this and the
next dialog box.
Result
You have entered the IP address and the corresponding standard gateway in all
the PCs. The PCs need these settings to communicate with remote subnets.
Note If the PC has several network adapters, a standard gateway may be assigned on
one network adapter only. Deactivate any additional adapters for this example or
remove the standard gateway there.
Static_Routing
Entry ID: 109755344, V1.0, 03/2018 21
2 Engineering
Description
A SCALANCE XM408 is used as IP router in this application example.
If you are using the SCALANCE XM408 as an IP router, perform all the following
steps in both devices:
Activate routing
Create router ports
Create subnets
Enter static routes
With these configuration steps, the SCALANCE can work as an IP router and
connect subnets to each other.
Note You can also work with VLANs instead of router ports. You can find examples for
VLAN in the Industrial Online Support (see Chapter 4.2).
Table 2-2
SCALANCE Management of IP Interface1 IP Interface2 IP Interface3
IP addresses
X408-hall1 192.168.55.1/29 192.168.0.1/25 172.16.0.1/30 192.168.0.129/25
X408-hall2 192.168.55.2/29 192.168.1.2/24 172.16.0.2/30 -
Static_Routing
Entry ID: 109755344, V1.0, 03/2018 22
2 Engineering
Activating routing
Proceed as follows to activate routing:
1. Open the "Layer 3 (IPv4)" menu and then the "Configuration" submenu.
This page provides an overview of the device's Layer 3 features for IPv4. You
can activate or deactivate the desired Layer 3 function here.
2. Activate the "Routing" option box and click on the "Set Values" button.
Siemens AG 2018 All rights reserved
Static_Routing
Entry ID: 109755344, V1.0, 03/2018 23
2 Engineering
Static_Routing
Entry ID: 109755344, V1.0, 03/2018 24
2 Engineering
2. Select the port to be configured from the drop-down menu in the “Ports”
submenu.
Siemens AG 2018 All rights reserved
Static_Routing
Entry ID: 109755344, V1.0, 03/2018 25
2 Engineering
6. Repeat steps 2 to 5 with all the other ports that are to operate as router ports.
Static_Routing
Entry ID: 109755344, V1.0, 03/2018 26
2 Engineering
7. Once you have set all the “router ports” you need, switch to the “Overview” tab.
Here you can see and check the port configuration.
The following figure shows the port configuration of the SCALANCE “X408-
hall1”.
Siemens AG 2018 All rights reserved
Result
You have configured the IP interfaces to the adjacent subnets in all SCALANCE
devices.
Static_Routing
Entry ID: 109755344, V1.0, 03/2018 27
2 Engineering
Creating subnets
In its function as IP router, SCALANCE requires a separate IP interface ("router
port") and IP address for each adjacent subnet. This is the only way it can send IP
packets from one subnet to another subnet.
You have already configured the router port in SCALANCE. In the next step, you
must assign an IP address from the adjacent subnet to the "router ports".
The following table shows the IP addresses with which the router ports are
configured.
Table 2-4
SCALANCE Router port IP address Network ID Subnet mask
X408-hall1 P1.1 192.168.0.1 192.168.0.0 255.255.255.128
P1.2 192.168.0.129 192.168.0.128 255.255.255.128
P1.3 172.16.0.1 172.16.0.0 255.255.255.252
X408-hall2 P1.2 192.168.1.2 192.168.1.0 255.255.255.0
P1.3 172.16.0.2 172.16.0.0 255.255.255.252
Static_Routing
Entry ID: 109755344, V1.0, 03/2018 28
2 Engineering
2. Select the port to be configured from the drop-down menu in the “Interface
(Name)” submenu.
5. Once you have assigned an IP address to all the router ports, switch to the
“Overview” tab. In this tab you can see and check the IP configuration.
The following figure shows the port configuration of the SCALANCE “X408-
hall1”.
Note Configure the IP address for all the router ports in both SCALANCE devices.
Static_Routing
Entry ID: 109755344, V1.0, 03/2018 29
2 Engineering
Result
You have configured the IP address for the router ports in all the SCALANCE
devices.
Note Subnets directly connected to the router do not require a manual entry in the
routing table. These subnets are automatically entered in the table.
Note If two subnets are contiguous to one another and the gateway is identical, the
routing entries can also be put together (see “X408-hall2”).
Static_Routing
Entry ID: 109755344, V1.0, 03/2018 30
2 Engineering
1. Open the "Layer 3 (IPv4)" menu and then the “Static routes” submenu.
2. Enter the destination network and corresponding subnet mask. Determine the
IP address of the next router (gateway). This is the IP address to which
SCALANCE sends the IP data packets intended for the destination network.
In order to create the entry click on the “Create” button.
Siemens AG 2018 All rights reserved
4. Repeat steps 2 and 3 for all the other, manually entered router entries.
Result
You have created static routes in all the SCALANCE devices. With this information
SCALANCE can forward the IP data packets to subnets not directly adjacent to
SCALANCE.
Static_Routing
Entry ID: 109755344, V1.0, 03/2018 31
2 Engineering
2.3 Operation
You can test the router functionality with a PING command from the Windows
command line. With a PING test you can check whether other PCs in the subnet
are accessible.
Note You can check the router functionality from all PCs. In the following instructions
PC 2 is used as test PC.
2. Confirm the file that is found and the command prompt will open.
was successful.
Note For diagnostic purposes, a PING request can also be sent directly from the
router in the Web-based management of the SCALANCE components under
"System > Ping".
Static_Routing
Entry ID: 109755344, V1.0, 03/2018 32
3 Useful information
3 Useful information
3.1 Network basics
3.1.1 Internet protocol
Description
The Internet protocol (for short: IP) is a widely-used network protocol and works on
the switching layer (layer 3 of the OSI reference model).
The task of the Internet Protocol is to transport data packages from a sender
across several subnets to a receiver. To do this, it packs the information to be
transmitted into IP data packets and regulates the transmission of the data packets
to their respective destinations. The IP packet is basically routable.
3.1.2 IP address
What is an IP address
To unequivocally identify and address a device in a subnet, each device in the
subnet or the Internet has an IP address.
A distinction is drawn between Ipv4 and Ipv6 addresses:
An IP address is always given in combination with a subnet mask.
Static_Routing
Entry ID: 109755344, V1.0, 03/2018 33
3 Useful information
The following areas are reserved for private IP addresses and can only be used in
own networks or company networks:
10.0.0.0 to 10.255.255.255
172.16.0.0 to 172.31.255.255
192.168.0.0 to 192.168.255.255
Public IP addresses are used on the Internet. A public IP address is usually
assigned automatically by the Internet provider as soon as the device establishes a
connection to the Internet. However, it is also possible to obtain a static, public IP
address from the Internet provider.
blocks of numbers separated by dots. Each number block occupies one byte (8
bits). Unlike the IP address, the numerical values cannot take any value between 0
and 255. The 32-bit subnet mask must consist of a concatenated bit sequence of
"1" bits and "0" bits.
The subnet mask consists of an uninterrupted series of ones (read from the left),
when read in binary format. The missing bits of the 32-bit subnet mask are filled
with "0" bits.
Example of a standard subnet mask:
255.255.255.0 (decimal notation)
11111111 11111111 11111111 00000000 (binary notation)
The subnet mask, too, consists of a network part and a host part.
Static_Routing
Entry ID: 109755344, V1.0, 03/2018 34
3 Useful information
Network address
If a larger network is segmented into several subnets, each subnet must be unique.
Each subnet is identified by a network address. The logical AND combination of an
IP address with the subnet mask results in the network address. The network
address always occupies the smallest device address in a network.
Note All devices that have the same network component belong to a subnet.
Device address
Each device in a subnet must be addressable via a unique device address. The
host part of the IP address determines the device address.
Broadcast address
All the devices of a network are addressed using the broadcast address. The
broadcast address is always the last address in a network.
Note The network address and broadcast address are not valid device addresses.
As a result, there are two addresses in each subnet that cannot be used for a
terminal device.
Siemens AG 2018 All rights reserved
The Classless Inter Domain Routing (“CIDR” for short) introduces a notation that
abbreviates the subnet mask.
With CIDR a so-called suffix is defined that is tagged on to the IP address. This
suffix consists of a “/” and a number.
Example: 192.168.0.1/24
The suffix specifies the number of 1-bits in the network mask. The number after the
“/” makes it possible to see how many bits are employed for the network
component. In this case, it is 24 bits.
Example:
The conventional notation combines IP address and subnet mask:
IP address: 192.168.0.1
Subnet mask: 255.255.255.0
(The subnet mask has a network component of 24 bits).
The CIDR notation only gives the IP address with the suffix:
IP address: 192.168.0.1/24
Static_Routing
Entry ID: 109755344, V1.0, 03/2018 35
3 Useful information
The IP address and the subnet mask always occur in combination. With the subnet
mask, the network address and the number of devices in a subnet can be
calculated from the IP address.
3. Combine the two bit sequences (IP address and subnet mask) in binary form
with the AND operator. The result is the combination of the network address.
11000000 10101000 00000000 00000001 (IP address)
11111111 11111111 11111111 00000000 (subnet mask)
---------------------------------------------------------
11000000 10101000 00000000 00000000 (result of the AND combination)
192 168 0 0
Static_Routing
Entry ID: 109755344, V1.0, 03/2018 36
3 Useful information
3.2.2 Subnetting
Procedure
If a large network is segmented into several subnets, this process is called
"subnetting".
To disconnect a network, you must increase the network portion of the subnet
mask and thus automatically reduce the host portion.
If you add a "1" to the network portion of the subnet mask, you halve the number of
devices. Two subnets are created. Each additional "1" in the network component
halves the networks in turn.
CIDR notation is ideal for subnetting. If you want to segment the network, simply
increment the number after the"/".
This increases the number of bits for the network portion by one bit and in turn
reduces the host portion by one bit.
Note If you are planning subnetting for your network, you should make sure that you
have sufficient reserves of IP addresses in the subnets for possible extensions.
Especially in larger networks, you should select the subnets as small as
possible, since the number of private IP address ranges is limited.
Example
Siemens AG 2018 All rights reserved
The network with the network address 192.168.0.0/24 has a capacity of (256-2)
device addresses. The network is to be halved.
To halve the network, increase the network portion of the subnet mask by one bit.
This results in the following subnets:
192.168.0.0/25 with (128-2) device addresses
192.168.0.128/25 with (128-2) device addresses
Static_Routing
Entry ID: 109755344, V1.0, 03/2018 37
3 Useful information
Calculation
The following figure illustrates the calculation that leads to this result:
Figure 3-2
Creating subnets
Static_Routing
Entry ID: 109755344, V1.0, 03/2018 38
3 Useful information
What is a router?
A router is a network component on Layer 3 of the OSI reference model and
connects two subnets to each other.
The router must have an IP address in each network that it is to connect to others.
This is also referred to as an IP interface.
Note The subnets connected to the IP router must be different. Each connected
subnet must have a unique network address.
The following figure shows a router that connects two subnets to each other. The
router has its own IP interface for each adjacent subnet.
Figure 3-3
192.168.0.1/24 192.168.1.1/24
Tasks of a router
When a terminal (sender) sends an IP data packet, the Internet Protocol checks
whether the IP data packet is for its own subnet or not.
If the intended recipient is located in its own subnet the data packet is handed over
to the two lower layers of the OSI reference model. The lower layers register the IP
address from the data package and send the data package.
If the recipient is not in the same subnet, the sender cannot access the recipient
directly. The sender needs to use the detour via the IP router and forward the IP
data packet to the router.
To do this, it passes the data package to the lower two layers of the OSI reference
model. The lower layers use the IP address of the default router to determine the
MAC address of the router and send the data packet to the IP router.
The IP router has an IP interface with one IP address for each of the two networks.
It uses its routing table to check whether it is possible to forward the data packet to
the other subnet. If this is possible, the router sends the data to the other network.
Static_Routing
Entry ID: 109755344, V1.0, 03/2018 39
3 Useful information
Figure 3-4
Siemens AG 2018 All rights reserved
Static_Routing
Entry ID: 109755344, V1.0, 03/2018 40
3 Useful information
General information
Every IP-capable device administrates a routing table. These tables contain
information on known networks and their accessibility (i.e.: the route).
Column 6 ("Routing Protocol") shows from which routing protocol the entry
originates. The following contents are possible:
Connected: Connected routes
Static: Static routing:
RIP, OSPF: Dynamic routing
Other: Other routing
If several routes exist for the same destination, these two columns determine
which route is taken.
Static_Routing
Entry ID: 109755344, V1.0, 03/2018 41
3 Useful information
Note A route that was automatically generated by the IP interface is deleted from the
routing table as soon as the IP interface is inactive (link-down).
Siemens AG 2018 All rights reserved
If you work with VLANs instead of router ports, the router only deletes the
corresponding entry from its routing table when all ports of the associated VLAN
have a link-down.
172.16.0.2/30
192.168.0.1/24 192.168.1.1/24
172.16.0.1/30
Static_Routing
Entry ID: 109755344, V1.0, 03/2018 42
3 Useful information
Routing decision
When the IP router receives a data packet, it searches its routing table for a
suitable entry for the destination network. It can forward the data packet with the
information from the routing entry.
If the router finds several entries for this destination network, it then decides
following this sequence:
A locally-accessible subnet is preferred to a manually entered route.
Siemens AG 2018 All rights reserved
If all the entries have been made manually, the router decides according to the
“best match”. The destination network with the longest subnet mask is
considered the best route.
If all the entries have been made manually and with identical subnet mask, the
route with the smallest metric is always preferred.
Static_Routing
Entry ID: 109755344, V1.0, 03/2018 43
3 Useful information
Note If you work with VLANs instead of router ports, the router only deletes the
corresponding entry from its routing table when all ports of the associated VLAN
have a link-down.
Figure 3-6
Network A Network B
Network A 0.0.0.0
If you use a switch between the IP interface of the router and the terminal or the
subsequent router, the IP interface will not register a failure of the connection
partner. Despite failure of the terminal device or the subsequent router, the
connection between the IP interface and the switch will then still remain active (link
up). The entry in the routing table will not be deleted and will still be used for IP
routing.
In that case, if this entry is chosen for IP routing, the IP packets will be lost
("BlackHole").
Figure 3-7
Network A Network B
Static_Routing
Entry ID: 109755344, V1.0, 03/2018 44
4 Appendix
4 Appendix
4.1 Service and Support
Industry Online Support
Do you have any questions or need assistance?
Siemens Industry Online Support offers round the clock access to our entire
service and support know-how and portfolio.
The Industry Online Support is the central address for information about our
products, solutions and services.
Product information, manuals, downloads, FAQs, application examples and videos
– all information is accessible with just a few mouse clicks:
https://support.industry.siemens.com
Technical Support
The Technical Support of Siemens Industry provides you fast and competent
support regarding all technical queries with numerous tailor-made offers
– ranging from basic support to individual support contracts. Please send queries
to Technical Support via Web form:
www.siemens.com/industry/supportrequest
Siemens AG 2018 All rights reserved
Service offer
Our range of services includes the following:
Plant data services
Spare parts services
Repair services
On-site and maintenance services
Retrofitting and modernization services
Service programs and contracts
You can find detailed information on our range of services in the service catalog
web page:
https://support.industry.siemens.com/cs/sc
Static_Routing
Entry ID: 109755344, V1.0, 03/2018 45
4 Appendix
https://support.industry.siemens.com/cs/ww/en/sc/2067Links and
Literature
Table 4-1
No. Topic
\1\ Siemens Industry Online Support
https://support.industry.siemens.com
\2\ Link to the entry page for the application example
https://support.industry.siemens.com/cs/ww/en/view/109755344
\3\ PRONETA download
https://support.industry.siemens.com/cs/ww/en/view/67460624
\4\ Primary Setup Tool
https://support.industry.siemens.com/cs/ww/en/view/19440762
\5\ Industrial Ethernet Switches SCALANCE XM-400/XR-500 Web-based management
(WBM)
https://support.industry.siemens.com/cs/ww/en/view/109748693
\6\ Segmenting a Network Using VLANs
https://support.industry.siemens.com/cs/ww/en/view/109749844
Table 4-2
Version Date Change
V1.0 03/2018 First edition
Static_Routing
Entry ID: 109755344, V1.0, 03/2018 46