10-17-2024 04:46 AM
Hello, I'm trying to add a default static route from a 2811 router called main branch to a 3560 layer 3 switch. The 2811 router is connected via a console cable. I have no idea how to do IP routing. Please help.
Solved! Go to Solution.
10-17-2024 05:46 AM
when you create the static route on the router, you need to advertise it on the OSPF.
Here is a working file.
10-17-2024 06:30 AM
Or, an alternative to redistribution of statics into OSPF on main branch router, have that router generate a default route, always.
10-17-2024 08:59 AM - edited 10-17-2024 09:01 AM
Thanks for the help again. These are the commands I added:
L3 switch: ip route 0.0.0.0 0.0.0.0 10.10.1.1
Main Branch Router: 0.0.0.0 0.0.0.0 10.10.1.2 (I tried 172.16.0.0 255.255.0.0 10.10.1.2 but branch 1 and 2 does not detect it in the routing table when I enter default-information originate in the main branch ospf settings)
Now I can ping 10.10.1.2 and 172.16.144.6 from the computers. However, I can't ping 172.16.144.1 even when I try your file. Any idea what's wrong?
10-17-2024 09:41 AM
"Main Branch Router: 0.0.0.0 0.0.0.0 10.10.1.2 (I tried 172.16.0.0 255.255.0.0 10.10.1.2 but branch 1 and 2 does not detect it in the routing table when I enter default-information originate in the main branch ospf settings)"
OSPF default originate needs either a default route or the "always" option. I suspect lack of the latter is why your other devices failed without a default route.
10-17-2024 01:07 PM
@Joseph W. Doherty wrote:
OSPF default originate needs either a default route or the "always" option. I suspect lack of the latter is why your other devices failed without a default route.
Ah, it appears PT doesn't provide the "always" option.
BTW, some hints on your configs.
When logically having p2p across Ethernet (if you were to use OSPF on the L3 switch), you can tell OSPF, with interface command to treat it as p2p. OSPF will establish neighbor faster and with some less internal overhead.
When you have OSPF edge interfaces, it's a good idea to make them passive.
When using OSPF network statements, the network statement's mask doesn't need to correspond with interface's mask. The OSPF network statement acts like an ACL ACE, i.e. the IP and mask match the interface's IP, the interface's IP mask has nothing to do with the network statement's mask.
For example, to match:
interface FastEthernet0/0
ip address 10.10.10.22 255.255.255.248
!
interface FastEthernet0/1
ip address 10.10.1.1 255.255.255.252
!
interface Serial0/3/0
ip address 192.168.3.1 255.255.255.252
!
interface Serial0/3/1
ip address 192.168.4.2 255.255.255.252
you could also use (as just two examples):
router ospf 12
network 10.10.10.22 0.0.0.0 area 21
network 10.10.1.1 0.0.0.0 area 21
network 192.168.3.1 0.0.0.0 area 21
network 192.168.4.1 0.0.0.0 area 21
or
router ospf 12
network 0.0.0.0 255.255.255.255 area 21
or
you can use the newer interface inclusion into OSPF:
interface FastEthernet0/0
ip address 10.10.10.22 255.255.255.248
ip ospf 12 area 21
!
interface FastEthernet0/1
ip address 10.10.1.1 255.255.255.252
ip ospf 12 area 21
!
interface Serial0/3/0
ip address 192.168.3.1 255.255.255.252
ip ospf 12 area 21
!
interface Serial0/3/1
ip address 192.168.4.2 255.255.255.252
ip ospf 12 area 21
10-17-2024 09:42 AM - edited 10-17-2024 09:44 AM
10-17-2024 10:03 AM
Oh, okay. I did not know about that... Thank you for the help.
10-17-2024 10:08 AM
Yeah, this is true for real device also. You need to enable routing on Cisco switches L3.
10-17-2024 11:39 AM
@Flavio Miranda wrote:
Yeah, this is true for real device also. You need to enable routing on Cisco switches L3.
NB: BTW, not true on all Cisco L3 switches. Often the larger chassis L3 switches had IP routing enabled by default (or at least they used to).
10-17-2024 07:00 AM
I believe it would be possible if you make the port on the L3 switch a routed port using the "no switchport" command, assign an IP to the port and then perform the default route configuration.
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