Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

Benefits of use static route with Default GW (OSPF)

Hi all!

A check out a network segment and want to know why SwA has a static route to SwB if SwA already has a Default GW to Core?

(SwA, SwB - Catalyst3560, Core - Catalyst4948)

!Note, there are distribute list on SwA - it does not has any OSPF route (exclude O*IA).

Does this mean when SwA send out packet with DA 10.5.64.0/26, Core will use only L2 switching (instead of L3)? Is this more effectively for Core Switch?

Screenshot-2.png

Pleace check my reasoning:

1. When use a static route: SwA receive packet from Vlan 20 with DA 10.5.64.0/26 it will strip out Dest. MAC and replace it with MAC of SwB.

Core will switch this packet to SwB based on mac add. table (l2 switching)

2. When SwA has only Default gateway and receive packet from Vlan20 with DA 10.5.64.0/26 it replace Dest. MAC with Core MAC. Core receive this packet, lookup route table for 10.5.64.0 entry and forward packet base on this.

It this right?

Thanks for help.

Everyone's tags (2)
1 ACCEPTED SOLUTION

Accepted Solutions
Hall of Fame Super Silver

Benefits of use static route with Default GW (OSPF)

Hello Maxim,

for Core Switch there is no great difference between performance of L2 switching and L3 switching,

CEF based multilayer switching is performed in HW either at OSI L2 either at OSI L3. L2 switching works also if SVI Vlan1012 (L3 interface)  is disabled by mistake on the core switch.

However, the number of routing entries on SwA and SwB can be of a few thousands without impact with appropriate SDM  (routing) template, so I would also consider to remove the distribute list and to leave OSPF to handle routing within area 10.

On the other hand building an access layer switch with a single O IA route for default route looks like attractive.

To be noted that the use of distribute list with OSPF does not influence OSPF LSAs processing just the capability to install routes derived from LSAs  in the IP routing table. If one client Vlan flaps on SwB, SwA receives an update of SwB Router LSA with the new state for the involved link and it should trigger a new OSPF SPF execution if needed even if the route is later fltered from IP routing table.

If this is true you are just saving on CEF table space on the access layer switches by using the distribute-list.

I would go for a total dynamic solution without those distribute-lists in access layer switches, but it is a matter of choice.

Hope to help

Giuseppe

6 REPLIES
Cisco Employee

Benefits of use static route with Default GW (OSPF)

Hi Maxim,

As per my understanding, the default gateway [Gateway of last resort] is used only when the routing is disabled on the switch. If you are having inter vlan routing happening in this switch, then you will need a default route [static route pointing to your default gateway].

Regards,

Hari

Benefits of use static route with Default GW (OSPF)

Maxim Alyakin wrote:

Hi all!

A check out a network segment and want to know why SwA has a static route to SwB if SwA already has a Default GW to Core?

(SwA, SwB - Catalyst3560, Core - Catalyst4948)

!Note, there are distribute list on SwA - it does not has any OSPF route.

Does this mean when SwA send out packet with DA 10.5.64.0/26, Core will use only L2 switching (instead of L3)? Is this more effectively for Core Switch?

Pleace check my reasoning:

1. When use a static route: SwA receive packet from Vlan 20 with DA 10.5.64.0/26 it will strip out Dest. MAC and replace it with MAC of SwB.

Core will switch this packet to SwB based on mac add. table (l2 switching)

2. When SwA has only Default gateway and receive packet from Vlan20 with DA 10.5.64.0/26 it replace Dest. MAC with Core MAC. Core receive this packet, lookup route table for 10.5.64.0 entry and forward packet base on this.

It this right?

Thanks for help.

Hello ,

Genrally the basic principle of static route and packet forwarding happend as per below process :-

Routers examine a packet’s destination IP address and determine the best path by enlisting the aid of a routing table.

Routers Operate at Layers 1, 2 & 3

Router receives a stream of encoded bits

Bits are decoded and passed to layer 2

Router de-encapsulates the frame

Remaining packet passed up to layer 3

Routing decision made at this layer by examining destination IP address

Packet is then re-encapsulated & sent out outbound interface

A default route is just a type of route that makes it to the routing table.  It can be inserted via static or by a routing protocol.  A default route is the gateway of last resort (nothing else in the routing matches).  This is the least specific possible match and would be represented in the route table as "gateway of last resort", "0.0.0.0", "0.0.0.0/0", or "0.0.0.0 0.0.0.0"

Hope it Helps

Regards

Ganeshh Iyer

Rate if it Helps....

Hall of Fame Super Silver

Re: Benefits of use static route with Default GW (OSPF)

Hello Maxim,

>> there are distribute list on SwA - it does not has any OSPF route (exclude O*IA).

This is the root cause without the distribute list SwA would install an OSPF route for subnet 10.5.64.0/26 because it receives SwB Router LSA by LSA flooding within area 10 ( even if it is totally stub they are in the same area and they should be OSPF neighbors in Vlan1012).

The static route has been introduced to optimize routing to the destination 10.5.64.0/26 as you have described avoiding the core switch as L3 next-hop and routing directly to SwB IP next-hop 10.15.254.75 with core switch used just as L2 LAN switch for broadcast domain VLAN 1012

An alternative approach could be that of tuning the ACL used in the distribute list to allow for installation of IP Prefix 10.5.64.0/26 in addition to default route 0.0.0.0

on SwA:

the current ACL should be something like

access-list 89 permit 0.0.0.0

by adding the line

access-list 89 permit 10.5.64.0 0.0.0.63

router ospf

distribute-list 89 in

this should allow an O route for 10.5.64.0/26 to be installed in SwA IP routing table

Hope to help

Giuseppe

New Member

Benefits of use static route with Default GW (OSPF)

Hi Giuseppe,

thanks for reply, it exactly what I've asked for,

(in reality Vlan10 is an array of 200 VLANS with /26 prefix lenght, so distribute list reduce route table for SwA)

but in this moment:

>Is this more effectively (l2 swithing instead of l3 routing) for Core Switch?

I cant find an information about perfomance L3 sw. in swithing vs. routing

Hall of Fame Super Silver

Benefits of use static route with Default GW (OSPF)

Hello Maxim,

for Core Switch there is no great difference between performance of L2 switching and L3 switching,

CEF based multilayer switching is performed in HW either at OSI L2 either at OSI L3. L2 switching works also if SVI Vlan1012 (L3 interface)  is disabled by mistake on the core switch.

However, the number of routing entries on SwA and SwB can be of a few thousands without impact with appropriate SDM  (routing) template, so I would also consider to remove the distribute list and to leave OSPF to handle routing within area 10.

On the other hand building an access layer switch with a single O IA route for default route looks like attractive.

To be noted that the use of distribute list with OSPF does not influence OSPF LSAs processing just the capability to install routes derived from LSAs  in the IP routing table. If one client Vlan flaps on SwB, SwA receives an update of SwB Router LSA with the new state for the involved link and it should trigger a new OSPF SPF execution if needed even if the route is later fltered from IP routing table.

If this is true you are just saving on CEF table space on the access layer switches by using the distribute-list.

I would go for a total dynamic solution without those distribute-lists in access layer switches, but it is a matter of choice.

Hope to help

Giuseppe

New Member

Benefits of use static route with Default GW (OSPF)

For storing a lot of MAC addresses SDM on this Switch is "default" and there are >400 prefixes on each Sw announced in Area (in real network topology number of Swithes more than 2).

Thanks a lot for detailed answer!

Best regards, Maxim.

1095
Views
0
Helpful
6
Replies
CreatePlease login to create content