05-05-2022 10:00 AM - edited 05-05-2022 10:36 AM
Below is a lab topology where I've define OSPF on all except R2 router, top right edge. Everything has connectivity except to R2.
I want to have D1 and D2 ping R2 by using a default route. I will post the configurations, For switches: ip routing is turned on, D1 D2 interfaces are defined 'no switchport'
and A1 has a default gateway to R1
ip default-gateway 10.10.0.1
When I run a traceroute from the D1 and D2 Switches they arrive at R1 and get dropped
Can someone help me define a statric route on R1 to forward traffic to R2
Here is addressing table, with configurations to follow
R1 f0/0 10.10.0.1
f1/0 192.168.55.1
R2 f0/0 192.168.5.2
A1 Int Vlan 1: 10.10.0.4
ip default-gateway 10.10.0.1
D1 G0/1 10.10.0.3
no switchport
D2 g0/2 10.10.0.2
no switchport
R1 Router Config
hostname R1
!
boot-start-marker
boot-end-marker
!
logging message-counter syslog
!
no aaa new-model
clock timezone EXT -5
ip source-route
no ip icmp rate-limit unreachable
ip cef
!
!
!
!
no ip domain lookup
no ipv6 cef
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
archive
log config
hidekeys
!
!
!
!
!
ip tcp synwait-time 5
!
!
!
!
interface FastEthernet0/0
ip address 10.10.0.1 255.255.255.0
duplex half
!
interface FastEthernet1/0
ip address 192.168.55.1 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet1/1
no ip address
shutdown
duplex auto
speed auto
!
router ospf 123
log-adjacency-changes
network 10.10.0.0 0.0.0.255 area 0
network 192.168.55.0 0.0.0.255 area 0
!
ip forward-protocol nd
ip route 0.0.0.0 0.0.0.0 192.168.55.2
no ip http server
no ip http secure-server
!
!
!
no cdp log mismatch duplex
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
gatekeeper
shutdown
!
!
line con 0
exec-timeout 0 0
privilege level 15
logging synchronous
stopbits 1
line aux 0
exec-timeout 0 0
privilege level 15
logging synchronous
stopbits 1
line vty 0 4
login
!
ntp server 10.10.0.1 key 12556
end
A1 Switch Config
urrent configuration : 3184 bytes
!
! Last configuration change at 11:46:13 EST Thu May 5 2022
!
version 15.2
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
service compress-config
!
hostname Switch
!
boot-start-marker
boot-end-marker
!
!
!
no aaa new-model
clock timezone EST -5 0
!
!
!
!
!
!
!
!
ip cef
no ipv6 cef
!
!
!
spanning-tree mode rapid-pvst
spanning-tree extend system-id
!
vlan internal allocation policy ascending
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface GigabitEthernet0/0
media-type rj45
negotiation auto
!
interface GigabitEthernet0/1
media-type rj45
negotiation auto
!
interface GigabitEthernet0/2
media-type rj45
negotiation auto
!
interface GigabitEthernet0/3
media-type rj45
negotiation auto
!
interface GigabitEthernet1/0
media-type rj45
negotiation auto
!
interface GigabitEthernet1/1
media-type rj45
negotiation auto
!
interface GigabitEthernet1/2
media-type rj45
negotiation auto
!
interface Vlan1
ip address 10.10.0.4 255.255.255.0
ntp broadcast
!
router ospf 123
network 10.10.0.0 0.0.0.255 area 0
!
ip default-gateway 10.10.0.1
ip forward-protocol nd
!
no ip http server
no ip http secure-server
!
ip route 192.168.55.0 255.255.255.0 10.10.0.1
!
!
!
!
!
control-plane
!
line con 0
exec-timeout 0 0
line aux 0
line vty 0 4
!
ntp server 10.10.0.1 key 12556
!'
D1 Switch Config
Current configuration : 3184 bytes
!
! Last configuration change at 11:46:13 EST Thu May 5 2022
!
version 15.2
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
service compress-config
!
hostname Switch
!
boot-start-marker
boot-end-marker
!
!
!
no aaa new-model
clock timezone EST -5 0
!
!
!
!
!
!
!
!
ip cef
no ipv6 cef
!
!
!
spanning-tree mode rapid-pvst
spanning-tree extend system-id
!
vlan internal allocation policy ascending
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface GigabitEthernet0/0
media-type rj45
negotiation auto
!
interface GigabitEthernet0/1
media-type rj45
negotiation auto
!
interface GigabitEthernet0/2
media-type rj45
negotiation auto
!
interface GigabitEthernet0/3
media-type rj45
negotiation auto
!
interface GigabitEthernet1/0
media-type rj45
negotiation auto
!
interface GigabitEthernet1/1
media-type rj45
negotiation auto
!
interface GigabitEthernet1/2
media-type rj45
negotiation auto
!
interface Vlan1
ip address 10.10.0.4 255.255.255.0
ntp broadcast
!
router ospf 123
network 10.10.0.0 0.0.0.255 area 0
!
ip default-gateway 10.10.0.1
ip forward-protocol nd
!
no ip http server
no ip http secure-server
!
ip route 192.168.55.0 255.255.255.0 10.10.0.1
!
control-plane
!
!
line con 0
exec-timeout 0 0
line aux 0
line vty 0 4
!
ntp server 10.10.0.1 key 12556
!
My Switch D2 configuration uses
ip route 0.0.0.0 0.0.0.0 10.10.0.1 in place of the D1 ip route, and has same results of connectivity up until 192.168.55.1 f1/0 of router R1 and cannot reach Router R2
So I am assuming a static route in R1 is what is needed for me to direct traffic to R2
Basic static routing is not something I've active practiced and I would like help with thsi
Any suggestions?
Solved! Go to Solution.
05-05-2022 10:52 AM
R1 have
static route toward R2
R1 is ASBR and redistribute this static route into OSPF
this make ALL router in OSPF know how reach R2
in R2
config default route toward R1
05-05-2022 10:07 AM
No topology attach ?
05-05-2022 10:22 AM - edited 05-05-2022 10:22 AM
Hello,
Yes @MHM Cisco World stated a topology diagram would be good.
Another thing to note:
Understanding terminology will also help you when it comes to configuring routes out for getting to network devices.
A Default route states if you don't know where to send it, use the default route I have configured. It is usually configured like 0.0.0.0 0.0.0.0 <exit interface/next hop IP>
A static route a manually configured route that points you in the right direction to get to a specific route. A static route can be a default route but doesn't always have to be.
Without seeing a diagram what I would suggest is on every router that needs to reach R2 a static route of 192.168.55.0 255.255.255.0 <next hop of neighbor router>
Doing this with the next hop of each router of the link pointing to R2 (a diagram could help explain this better)
On R2 is where you would need the default route of 0.0.0.0 0.0.0.0 <R2s next hop into the network>
Hope that helps
-David
05-05-2022 12:20 PM
I hadn't even thought of this
Without seeing a diagram what I would suggest is on every router that needs to reach R2 a static route of 192.168.55.0 255.255.255.0 <next hop of neighbor router>
I may try it now and see what happens.
Thank you for the help.
05-05-2022 10:47 AM - edited 05-05-2022 10:47 AM
as per the cnfig every router running OSPF, they learn the routes from each other
Make sure ip routing enabled - Make sure R2 have static route towards R1
ip route 0.0.0.0 0.0.0.0 192.168.55.1
post below output from all devices :
show ip route
show IP interface brief
show ip ospf neigh
from R2 are you able to ping - 192.168.55.1
can you post R2 config also.
05-05-2022 12:06 PM - edited 05-05-2022 12:15 PM
I am able to ping R1 from R2
I've enable IP routing on all switches
here is the topology
I can ping to f1/0 interface of R1 from A1, and not to f0/0 interface of R2
A1
Switch(config)#do ping 192.168.55.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.55.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 3/6/8 ms
Switch(config)#do ping 192.168.55.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.55.2, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
I want to accomplish this without OSPF and by defining default/static routes
The traceroute from A1 reaches 10.10.0.1 as it is the default gateway and gets dropped
*May 5 18:57:16.825: %SYS-5-CONFIG_I: Configured from console by console
Switch#traceroute 192.168.55.2
Type escape sequence to abort.
Tracing the route to 192.168.55.2
VRF info: (vrf in name/id, vrf out name/id)
1 10.10.0.1 16 msec 5 msec 5 msec
2 * * *
3 * * *
here is A1 Running Config
Switch#show running-config
Building configuration...
Current configuration : 3216 bytes
!
! Last configuration change at 13:57:16 EST Thu May 5 2022
!
version 15.2
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
service compress-config
!
hostname Switch
!
boot-start-marker
boot-end-marker
!
!
!
no aaa new-model
clock timezone EST -5 0
!
!
!
!
!
!
!
!
ip cef
no ipv6 cef
!
!
!
spanning-tree mode rapid-pvst
spanning-tree extend system-id
!
vlan internal allocation policy ascending
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface GigabitEthernet0/0
media-type rj45
negotiation auto
!
interface GigabitEthernet0/1
media-type rj45
negotiation auto
!
interface GigabitEthernet0/2
media-type rj45
negotiation auto
!
interface GigabitEthernet0/3
media-type rj45
negotiation auto
!
interface GigabitEthernet1/0
media-type rj45
negotiation auto
!
interface GigabitEthernet1/1
media-type rj45
negotiation auto
!
interface GigabitEthernet1/2
media-type rj45
negotiation auto
!
interface Vlan1
ip address 10.10.0.4 255.255.255.0
ntp broadcast
!
router ospf 123
network 10.10.0.0 0.0.0.255 area 0
!
ip default-gateway 10.10.0.1
ip forward-protocol nd
!
no ip http server
no ip http secure-server
!
ip route 192.168.55.0 255.255.255.0 10.10.0.1
!
!
!
!
!
control-plane
I believe I need a route defined on R1 and I don't know how to do that to get traffic to go to R2
here is R1's configuration
with:
ip route 0.0.0.0 0.0.0.0 192.168.55.2
R1#show running-config
Building configuration...
Current configuration : 1289 bytes
!
upgrade fpd auto
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R1
!
boot-start-marker
boot-end-marker
!
logging message-counter syslog
!
no aaa new-model
clock timezone EXT -5
ip source-route
no ip icmp rate-limit unreachable
ip cef
!
!
!
!
no ip domain lookup
no ipv6 cef
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
archive
log config
hidekeys
!
!
!
!
!
ip tcp synwait-time 5
!
!
!
!
interface FastEthernet0/0
ip address 10.10.0.1 255.255.255.0
duplex half
!
interface FastEthernet1/0
ip address 192.168.55.1 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet1/1
no ip address
shutdown
duplex auto
speed auto
!
router ospf 123
log-adjacency-changes
network 10.10.0.0 0.0.0.255 area 0
network 192.168.55.0 0.0.0.255 area 0
!
ip forward-protocol nd
ip route 0.0.0.0 0.0.0.0 192.168.55.2
no ip http server
no ip http secure-server
!
!
!
no cdp log mismatch duplex
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
gatekeeper
shutdown
!
!
line con 0
exec-timeout 0 0
privilege level 15
logging synchronous
stopbits 1
line aux 0
exec-timeout 0 0
privilege level 15
logging synchronous
stopbits 1
line vty 0 4
login
!
ntp server 10.10.0.1 key 12556
here is R1 routing table
Switch A1 Routing Table
And Configuration for R2
And Configuration of R2 Router
2#sh running-conf
Building configuration...
Current configuration : 1103 bytes
!
upgrade fpd auto
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R2
!
boot-start-marker
boot-end-marker
!
logging message-counter syslog
!
no aaa new-model
ip source-route
no ip icmp rate-limit unreachable
ip cef
!
!
!
!
no ip domain lookup
no ipv6 cef
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
archive
log config
hidekeys
!
!
!
!
!
ip tcp synwait-time 5
!
!
!
!
interface FastEthernet0/0
ip address 192.168.55.2 255.255.255.0
duplex half
!
interface FastEthernet1/0
no ip address
shutdown
duplex auto
speed auto
!
interface FastEthernet1/1
no ip address
shutdown
duplex auto
speed auto
!
ip default-gateway 192.168.55.1
ip forward-protocol nd
no ip http server
no ip http secure-server
!
!
!
no cdp log mismatch duplex
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
gatekeeper
shutdown
!
!
line con 0
exec-timeout 0 0
privilege level 15
logging synchronous
stopbits 1
line aux 0
exec-timeout 0 0
privilege level 15
logging synchronous
stopbits 1
line vty 0 4
login
!
end
I just recognized R1 configuration includes :
gatekeeper
shutdown
05-05-2022 10:52 AM
R1 have
static route toward R2
R1 is ASBR and redistribute this static route into OSPF
this make ALL router in OSPF know how reach R2
in R2
config default route toward R1
05-05-2022 12:18 PM
in R2
config default route toward R1
Thank you this worked perfectly. I will try redistributing into OSPF and removing this route to see if it has same results.
05-05-2022 01:23 PM
""for ICMP echo""
R1 have
static route toward R2
R1 is ASBR and redistribute this static route into OSPF
this make ALL router in OSPF know how reach R2
""for ICMP echo reply""
in R2
config default route toward R1
05-05-2022 11:27 AM
If you HAVE to use static routes try the following:
It looks like you only need a static route on R2 to "get out to the network"
R2: ip route 0.0.0.0 0.0.0.0 192.168.55.1
everything else is connected to the 10.10.0.0 network
-David
05-05-2022 12:23 PM - edited 05-05-2022 12:24 PM
I have one last question
Would someone explain to me how having a default route defined from R2 to R1 helped map traffic from R1 to R2
I mean doesn't R1 already know how to get to R2?
I am missing the logic here of how this works.
05-05-2022 12:31 PM
R1 knows how to reach to R2, But R2 do not have any visibility of routes
remove that static route towards R1 and check show IP route
05-05-2022 12:49 PM
But I still don't understand how a route from R2 to R1 makes it possible to reach from R1 to R2 if R1 already has a route. Actually as I'm typing this maybe something to do with echo-reply?
05-05-2022 01:12 PM
This depends on the interface you are pinging. Plus you OSPF enabled for the 192.168.55.0 route and routes a dynamically learned. R2 doesn’t have this capability. So if you try to ping R2 you know how to get there but R2 has no idea how to get back. So I’m this case a default route configured on R2 saying go to R1 if you don’t know how to get somewhere and let him take care of it since he knows the routes.
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