11-19-2021 09:34 AM
Hey Y'all,
I'm configuring a new CBS350 and am just trying to add static routes via the command line, using the usb console. I set the route, but 'show ip route' doesn't show it:
cisco-peach(config)#ip route 192.168.13.0 255.255.255.0 192.168.7.5 metric 2 cisco-peach(config)#exit cisco-peach#show ip route Maximum Parallel Paths: 1 (1 after reset) IP Forwarding: enabled Codes: > - best, C - connected, S - static C 192.168.99.0/24 is directly connected, vlan 99 cisco-peach#
When I go to the gui, I can see the route. (see image attached)
I'm a noob to the cli and would appreciate any advise.
Thanks!
Solved! Go to Solution.
11-19-2021 10:14 AM - edited 11-19-2021 10:36 AM
Hi,
please post the config of the router.
you are pointing to next-hop of 192.168.7.5 for network 192.168.13.0 -
In order for the static route to show in routing table the IP address to which you point as next-hop (192.168.7.5 in this case) should be in the same network as one of the interfaces of your router, that interface should be in up state.
I guess that's not the case right now?
11-19-2021 12:11 PM - edited 11-19-2021 12:18 PM
it's looks like interface vlan is down because gi2 is down?
192.168.7.4/24 vlan 7 UP/DOWN Static disable No enable Valid
Flow Link Back Mdix Port Type Duplex Speed Neg ctrl State Pressure Mode -------- ------------ ------ ----- -------- ---- ----------- -------- ------- gi1 1G-Copper -- -- -- -- Down -- -- gi2 1G-Copper -- -- -- -- Down -- --
from your config:
interface vlan 7 name trusted ip address 192.168.7.4 255.255.255.0 ! interface GigabitEthernet2 switchport access vlan 7 ! ip route 192.168.13.0 /24 192.168.7.5 metric 2
11-19-2021 10:14 AM - edited 11-19-2021 10:36 AM
Hi,
please post the config of the router.
you are pointing to next-hop of 192.168.7.5 for network 192.168.13.0 -
In order for the static route to show in routing table the IP address to which you point as next-hop (192.168.7.5 in this case) should be in the same network as one of the interfaces of your router, that interface should be in up state.
I guess that's not the case right now?
11-19-2021 10:32 AM
Thank You pman!! I clicked on solved by mistake, but I do have that ip range on a vlan interface.
cisco-peach#show run config-file-header cisco-peach v3.0.0.69 / RCBS3.0_930_770_008 CLI v1.0 file SSD indicator encrypted @ ssd-control-start ssd config ssd file passphrase control unrestricted no ssd file integrity control ssd-control-end cb0a3fdb1f3a1af4e4430033719968c0 ! ! unit-type-control-start unit-type unit 1 network gi uplink none unit-type-control-end ! vlan database vlan 7,9,99 exit voice vlan oui-table add 0001e3 Siemens_AG_phone voice vlan oui-table add 00036b Cisco_phone voice vlan oui-table add 00096e Avaya voice vlan oui-table add 000fe2 H3C_Aolynk voice vlan oui-table add 0060b9 Philips_and_NEC_AG_phone voice vlan oui-table add 00d01e Pingtel_phone voice vlan oui-table add 00e075 Polycom/Veritel_phone voice vlan oui-table add 00e0bb 3Com_phone disable ports leds ip dhcp server ip dhcp pool network 42 address low 192.168.42.100 high 192.168.42.254 255.255.255.0 exit ip dhcp pool network mgmt address low 192.168.99.100 high 192.168.99.254 255.255.255.0 domain-name lucky.org dns-server 1.1.1.1 exit bonjour interface range vlan 1 hostname cisco-peach username admin password encrypted <edited> username hippie password encrypted <edited> ip ssh password-auth ip ssh pubkey-auth auto-login crypto key pubkey-chain ssh user-key hippie-marg rsa key-string row AAAAB3NzaC1yc2EAAAADAQABAAABAQDeuwwFfnEH key-string row Ooctt7h+7eLyGlO8+wQP0e38Uu3Y5Y2hVhve6lw6 key-string row hxm/gdaH3h8uRiVGSt2tvo9SV1I+r61P0ivQqGbA key-string row 8RINKcWqYYkrF0d1ZoiVM5NRVsArLFNo key-string row VDzjxcskJSPhtNMCDH6gbLM1ck8Vvhi7ftPBncSy key-string row hvOpxTNGDgHFfvuK2nqyvjDPO7dR1ekvae35/tUZ key-string row OLzcIeLgU2YUpKtwuFiLE2fZ1eB74cxsT8+9ZdiC key-string row T0IDwfvk9YIBlr//jflZewIc1XoOAkclHw5Pxfcv key-string row vbXOT97s0aqqdTT0TphhawMdaoCf2y0ZlV5OzYko key-string row Uu56+byGnKczTVihWG3N exit user-key hippie-sterling rsa key-string row AAAAB3NzaC1yc2EAAAABIwAAAQEA44qXiwkYCbzB key-string row U7bXNmIqsYPDdK8Mad43k6bSmXu76pyZ2TVB1e0H key-string row JkbCIzMUGg9gWDvehVo6tP0D7GDj3el8JVXZMz7c key-string row vBg76F6ZXHT3MqPfdgINx8nwlz5Kxglt key-string row aFuhWBtQ5aVolO+8BXGdxAV3rr485WUuvnwLxwWt key-string row fYUzywXpMk2parTzXBrJszafCKMLDYlVXozWraiV key-string row 0vs4Wvetfr/f6zd0CiclC/FSPwSQbf208kv+Fz1B key-string row OHrLjQ4AwcbBXnZy3sB/u+SKQaCuawI11AL6K6nN key-string row BUw08mApdFixEs8BkgI7MHldUc8hR56uD/vKsRPe key-string row 7G1iaBaUS/9oryKSnQ== exit exit snmp-server location parlor snmp-server contact hippiepete clock timezone EST -4 clock summer-time web recurring usa sntp server 192.168.42.1 clock dhcp timezone ! interface vlan 1 ip address 192.168.42.10 255.255.255.0 no ip address dhcp ! interface vlan 7 name trusted ip address 192.168.7.4 255.255.255.0 ! interface vlan 9 name voip ! interface vlan 99 name mgmt ip address 192.168.99.1 255.255.255.0 ! interface GigabitEthernet2 switchport access vlan 7 ! interface GigabitEthernet9 switchport access vlan 99 ! interface GigabitEthernet10 switchport access vlan 9 ! exit banner login ^C This is the Dude's network, please abide appropriately. ^C ip route 192.168.13.0 /24 192.168.7.5 metric 2
11-19-2021 10:39 AM - edited 11-19-2021 11:12 AM
please post output of "show ip interface" and "show interfaces status"
please add "ip routing" command: switch(config)# ip routing
11-19-2021 12:08 PM
I had set 'ip routing', but set it again. Here is the output.
cisco-peach#show ip int IP Address I/F I/F Status Type Directed Prec Redirect Status admin/oper Broadcast ------------------ --------- ---------- ------- --------- ---- -------- ------ 192.168.7.4/24 vlan 7 UP/DOWN Static disable No enable Valid 192.168.42.10/24 vlan 1 UP/DOWN Static disable No enable Valid 192.168.99.1/24 vlan 99 UP/DOWN Static disable No enable Valid cisco-peach#show int status Flow Link Back Mdix Port Type Duplex Speed Neg ctrl State Pressure Mode -------- ------------ ------ ----- -------- ---- ----------- -------- ------- gi1 1G-Copper -- -- -- -- Down -- -- gi2 1G-Copper -- -- -- -- Down -- -- gi3 1G-Copper -- -- -- -- Down -- -- gi4 1G-Copper -- -- -- -- Down -- -- gi5 1G-Copper -- -- -- -- Down -- -- gi6 1G-Copper -- -- -- -- Down -- -- gi7 1G-Copper -- -- -- -- Down -- -- gi8 1G-Copper -- -- -- -- Down -- -- gi9 1G-Combo-C -- -- -- -- Down -- -- gi10 1G-Combo-C -- -- -- -- Down -- -- Flow Link Ch Type Duplex Speed Neg control State -------- ------- ------ ----- -------- ------- ----------- Po1 -- -- -- -- -- Not Present Po2 -- -- -- -- -- Not Present Po3 -- -- -- -- -- Not Present Po4 -- -- -- -- -- Not Present Po5 -- -- -- -- -- Not Present Po6 -- -- -- -- -- Not Present Po7 -- -- -- -- -- Not Present Po8 -- -- -- -- -- Not Present
11-19-2021 12:11 PM - edited 11-19-2021 12:18 PM
it's looks like interface vlan is down because gi2 is down?
192.168.7.4/24 vlan 7 UP/DOWN Static disable No enable Valid
Flow Link Back Mdix Port Type Duplex Speed Neg ctrl State Pressure Mode -------- ------------ ------ ----- -------- ---- ----------- -------- ------- gi1 1G-Copper -- -- -- -- Down -- -- gi2 1G-Copper -- -- -- -- Down -- --
from your config:
interface vlan 7 name trusted ip address 192.168.7.4 255.255.255.0 ! interface GigabitEthernet2 switchport access vlan 7 ! ip route 192.168.13.0 /24 192.168.7.5 metric 2
11-19-2021 12:39 PM
All interfaces are down because I'm accessing via the usb console. Does an interface with an associated ip have to be plugged in to set static routes? Or would I need to bring it up from cli?
11-19-2021 12:42 PM - edited 11-19-2021 12:46 PM
As I mentioned above, the interface should be in the status up (gi2 in this case) from your output we can see that Link Status is Down (Link State = Down for Gi2)
Is a network cable currently connected to Port Gi2?
11-19-2021 12:43 PM
Ok, I plugged my laptop into gi2 and can see the route now! So, I guess the 'show ip route' command only shows routes that are active... but the gui showed it either way?
cisco-peach#19-Nov-2021 17:17:11 %LINK-I-Up: gi2 19-Nov-2021 17:17:11 %LINK-I-Up: Vlan 7 cisco-peach#shi19-Nov-2021 17:17:15 %STP-W-PORTSTATUS: gi2: STP status Forwarding cisco-peach#show ip route Maximum Parallel Paths: 1 (1 after reset) IP Forwarding: enabled Codes: > - best, C - connected, S - static C 192.168.7.0/24 is directly connected, vlan 7 S 192.168.13.0/24 [1/2] via 192.168.7.5, 03:21:35, vlan 7
11-19-2021 12:47 PM
Now I'm cooking with grease.
cisco-peach#show ip route static Maximum Parallel Paths: 1 (1 after reset) IP Forwarding: enabled Codes: A - active, I - inactive I 192.168.13.0/24 [1/2] via 192.168.7.5
11-19-2021 12:47 PM - edited 11-19-2021 12:52 PM
Excellent!
I was glad to help!
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide