cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1456
Views
5
Helpful
24
Replies

Default static routes

w0463849
Level 1
Level 1

Hello, I'm trying to add a default static route from a 2811 router called main branchTopology_Today_2.png 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.

 

Topology_Today.png

24 Replies 24

@w0463849 

 when you create the static route on the router, you need to advertise it on the OSPF.

Here is a working file.

Or, an alternative to redistribution of statics into OSPF on main branch router, have that router generate a default route, always.

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?

"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.


@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

You are missing the command "ip routing" on the L3 switch.

I added and I can ping just fine

 

FlavioMiranda_0-1729183417950.png

 

 

Oh, okay. I did not know about that... Thank you for the help.

Yeah, this is true for real device also. You need to enable routing on Cisco switches L3.


@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).

kfourniqwd
Level 1
Level 1

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.