cancel
Showing results for 
Search instead for 
Did you mean: 

Help with CLI commands for setting up a static ip route

Help with CLI commands for setting up a static ip route

nsimons
New Contributor

I have an 2348 switch that is acting as a layer 3 switch. I have routing enabled in the CLI. Now I need to configure a static route to our firewall. Support sent me a book about CLI commands for my switch but it's over my head. I'm assuming it should be a global command and not an interface command.

3 REPLIES 3

samantha_lynn
Esteemed Contributor III

Our switches are L3-Lite, they can't replicate an Router 100%, but they should work fine for a smaller network. I would point the switch to the modem in that case, as that would be the next hop for it's traffic if I understand correctly.

nsimons
New Contributor

That is SUPER helpful and not something really explained well in the book I was sent. My question is what if I don't have anything else acting as a router on my network (we're a pretty small setup)?

samantha_lynn
Esteemed Contributor III

You'll need to enable routing on the interface level as well as the global level. To do enable routing on the interface level, use the following commands from global config (the commands below use interface 1/0/1 as an example, fill in your own interface as needed:

 

Enable

Config

Interface 1/0/1

routing

 

Now that routing is enabled for that interface, the command to create a static route would be:

ip route <IP of destination of the route>/<subnetmask> <IP of the next hop router in the network> <interface this is set for> <VLAN ID>.

 

So, for example, let's say the following information was true:

Destination IP: 10.10.10.60

Subnet: /24

Next hop Router IP: 10.10.10.9

Interface: 1/0/1

VLAN: 1

 

Then the command would look like this:

ip route 10.10.10.60/24 10.10.10.9 1/0/1 1

GTM-P2G8KFN