OK, so recently I had been setting up NSX in my lab and I wanted to create some static routes on my SG300-20 so I could access the VMs that were on my NSX network.
I added the VLAN I wanted to use and added a VLAN interface. All good.
I went ahead and added the static route as shown below.
As you can see it was applied successfully.
However looking at the static routes I could not see the route I had just added.
So I went ahead and re-added it thinking I had made a mistake or something had gone wrong. (pick a reason), it then told me the route already existed.
So I was stumped for a while, searched the web and then decided to login to the cli to see what I could find.
First of all I ran the command “show ip route”
Nope my route was not showing, however I was not convinced that was the whole picture so a little further digging I found I can append the same command with static.
So I ran the command “show ip route static”
And there it was, the route, but listed as inactive.
So I hit the web again and what it boils down to is that while I had created the VLAN 80 with an interface I had neglected to add the VLAN to any ports therefore this rendered the static route inactive.
So the bottom line is the Switch was perfectly fine, the user however needed to learn a new and valuable lesson.