How to add a static IP route to communicate with a drive through another device?| Add static IP route

1.Introduction

This guides to add a route to communicate with a drive through another device.

2.How to add a static IP route to communicate with a drive through another device.

Example: The PC is connected to the Beckhoff PLC and the drives are connected to the Beckhoff PLC as shown in the below image.













Assumptions: 

IP settings of drives: 

Drive 1: 

IP address: 192.168.1.1 

Subnetmask: 255.255.255.0 

Drive 2: 

IP address: 192.168.1.2 

Subnetmask: 255.255.255.0 

Drive 3: 

IP address: 192.168.1.3 

Subnetmask: 255.255.255.0 

IP settings of the device (in this case Beckhoff PLC): 

IP address: 192.168.0.12 

Step 1: 

Ping to the device and make sure that it is able to communicate with PC











Step 2

Run command prompt with admin rights 

Step 3: 

Add route as described below: 

Since IP address of the drives are 192.168.1.1, 192.168.1.2 and 192.168.1.3, So add route to 192.168.1.0 so that it will be possible to communicate to all three drive. 








Format of the command: 

route add destination mask subnetmask gateway metric costmetric if interface













Note: In the above method, the added route is valid until rebooting the PC. So to 

make sure the route persistent, the below method needs to be followed: 

Execute the route add command with –p as shown in the below image 






Step 4:

Check whether now the drives are able to communicate or not:




























3. How to delete added Route

Step 1:

Run command prompt as administrator.

Step 2:

Execute route delete command in command prompt. Format of the delete command:

route delete destination