How Perl/Python Scripts on Force10 S60 Switches Can Access the Internet

Force10 S60 Switch

Force10 S60 Switch

Let’s say you have a Force10 S60 switch [FTOS 8.3.3.4] hooked-up at a datacenter that currently has a console connection connected to a management switch that provides external Internet access. The natted IP address is 10.0.8.10/24 and the external IP address is 209.37.21.20/24. Other than the console, the switch is only connected to a local network of other switches and servers. You are running some advanced python scripts natively on the S60 switch (yes, the Force10 S60 switch can run python and perl natively); however, the scripts you’ve written need access to the external Internet. What needs to be done?

You need to connect another cable from the S60 switch to a port on the management switch that provides external Internet access and then you need to create a default route to the gateway. To accomplish this you can connect a 1 Gigabit Ethernet cable from an available port on the S60 to an available port on the management switch. Assign the available port on the S60 the natted IP address. Let’s assume the natted IP address given is 10.0.8.12/24 and the external IP address is 209.37.21.22/24.

Now, create a default route to the gateway. Assuming the gateway is 10.0.8.254/24, you would input the following command in config mode on the router:

ip route 0.0.0.0/0 10.0.8.254

You should still be able to console in to your S60 switch from outside the network as before with the external console IP of 209.37.21.20 and respective port number of the management switch. However, your scripts running on the switch will now also have access to the external Internet!

Some people may say, why not use the management interface of the S60 and setup a management route with “manage-route 0.0.0.0/0 10.0.8.254”? I can tell you this will not work. You can assign the natted IP to the management port but when you attempt to create a management route to the gateway, it won’t let you because the gateway is in the same subnet as the natted IP assigned to the management port.

This entry was posted in Force10 Networks, Labs, Networking, Perl, Programming Languages, Python, Technology and tagged , , , , , , , , , , , , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *


2 × = four