cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1316
Views
0
Helpful
3
Replies

Configuring default gateway on switch.

johnleeee
Level 1
Level 1

Hi all,

Q1:

I have trivial questions. Why I have to configure

ip default-gateway x.x.x.x on switch ?

Is there difference configuring default gateway on switch and router?

Q2:

What is difference configuring default gateway on router and static route?

many thanks

jl

3 Replies 3

aashish.c
Level 4
Level 4

Hi,

On switch, The default gateway receives IP packets with unresolved destination IP addresses from the switch.

When your switch is configured to route with IP, it does not need to have a default gateway set.

On router, you can use the ip default-gateway command when ip routing is disabled on a Cisco router.

Static routes are set to set the gateway of last resort on Cisco routers that have ip routing enabled, or to take some source data to a specific destination.

Here is the very good link to understand the usage of ip default-gateway command :

http://www.cisco.com/warp/public/105/default.html

http://www.cisco.com/univercd/cc/td/doc/product/lan/cat2950/12119ea1/2950scg/swipaddr.htm#1103834

Regards

aashish C

1. The ip default-gateway is only used for routing the management traffic. If you wanted to telnet to a switch from a PC in a different subnet, the switch would need a default gateway to send the replies to. If your management PC is in the same subnet as the switches management address, you don't need an ip default-gateway.

I assume you mean a default route on the router. This is where the router sends all traffic that it doesn't have a specific route for.

2. The default route is a type of static route, but as above, this is where is sends data that it doesn't have a specific route for (the specific route could be a static route that you have defined, or a route learned via a routing protocol such is OSPF, RIP, BGP etc.).

Pete

OK men,

thanks for advice. Now I clearly understand.

reg

jl