1

Is the static route discover automatically or need run any command?

I have two router, and I have configured the IP address for the link port of them.

but the Router3's route is empty:

Router#show ip route 
Default gateway is not set

Host               Gateway           Last Use    Total Uses  Interface
ICMP redirect cache is empty

they are connect directly, why there is no the static route? is there need any command for discover it?


EDIT-1

this is my running-config of Router3:

Router#show running-config 
Building configuration...

Current configuration : 1113 bytes
!
version 15.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Router
!
!
boot system flash cgr1000-universalk9-mz.SPA.154-2.CG 
!
!
!
!
!
!
no ip cef
no ipv6 cef
!
!
!
!
!
!
!
!
!
!
!
!
!
spanning-tree mode pvst
!
!
!
!
!
!
interface GigabitEthernet0/1
 no ip address
 duplex auto
 speed auto
 shutdown
!
interface FastEthernet2/3
 switchport mode access
 switchport nonegotiate
!
interface FastEthernet2/4
 switchport mode access
 switchport nonegotiate
!
interface FastEthernet2/5
 switchport mode access
 switchport nonegotiate
!
interface FastEthernet2/6
 switchport mode access
 switchport nonegotiate
!
interface GigabitEthernet2/1
 no switchport
 ip address 12.12.12.1 255.255.255.0
 duplex auto
 speed auto
!
interface GigabitEthernet2/2
 switchport mode access
 switchport nonegotiate
!
interface Dot11Radio2/1
 no ip address
 shutdown
!
interface Vlan1
 no ip address
!
ip classless
!
ip flow-export version 9
!
!
!
!
!
!
!
!
line con 0
!
line 1/1 1/2
 stopbits 1
!
line 1/3 1/6
 stopbits 1
!
line vty 0 4
 login
!
!
!
!
end

EDIT-2

My cdp neighbors of Router3:

Router#show cdp neighbors 
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
                  S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone
Device ID    Local Intrfce   Holdtme    Capability   Platform    Port ID
Router       Gig 2/1          157                    CGR1000     Gig 2/1
  • When using only static routes you would at least need a default route. You should post the full configuration and remember to sanitize it removing passwords etc. – user36472 Oct 31 '18 at 9:27
  • I have edited my post. – 244boy Oct 31 '18 at 9:45
  • If you can see your neighbor via CDP show cdp nei, then you would at least need ip route 0.0.0.0 0.0.0.0 12.12.12.2 for it to work properly. This would send all traffic to Router4. – user36472 Oct 31 '18 at 9:51
  • I have tried add ip route 0.0.0.0 0.0.0.0 12.12.12.2 before your comment, but still there is no gateway. – 244boy Oct 31 '18 at 9:57
  • Can you ping Router4? – user36472 Oct 31 '18 at 10:00
2

Converting comment to an answer.

There was no gateway of last resort, because routing was not enabled on the switch. Using ip routing in global configuration fixed the problem and it's now possible to see the gateway of last resort.

2

Even though this is called a "router", it's more of a layer-3 switch. I think Cisco's marketing department doesn't care about technical consistency.

The reason you don't see anything in the routing table is because for older switches you first have to turn routing on with a "ip routing" command. Otherwise it stays in layer-2 mode and just uses the default-gateway to route layer-3 traffic.

0

For directly connected networks route entry will be Automatically created in layer3 devices .

For other networks static and dynamic route entries should be manually Configured to route the packet towards destination .

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.