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

ip default-gateway

Hello!

wen we created the L3 interface on the distribution switch;

int vlan 10

ip address 10.10.10.3 255.255.255.0

1)now on the access switch do i need to configure the ip default-gateway 10.10.10.3

2)now from the pc side do need to configure the Gateway as 10.10.10.3?

10xs

2 ACCEPTED SOLUTIONS

Accepted Solutions
Cisco Employee

Re: ip default-gateway

Hi Ali,

Yes on your pc side which are in vlan 10 you need to define your gateway as layer 3 interface ip address which is 10.10.10.3 in your case.

On your access switch it depends if you want your access switch reachable from other part of your network then yes so that if you try to access from any other device which exist on any other subnet and when it reaches your access switch your access switch should know how to reach that device back so it will send it back to the default gateway which is your layer 3 switch and your layer 3 switch will route it ahead.

Also from your access switch if you want to access some other device which is in other subnet then it must know where to fwd as it is a layer 2 switch it will not route so it will send the packet to default gateway which will be 10.10.10.3 in your case.

HTH

Ankur

Hall of Fame Super Blue

Re: ip default-gateway

Hi Ali

Agree with what Ankur has said about the PC. As far as the access switch goes if you want it to be in the same vlan (10) then yes you should set the default-gateway to be 10.10.10.3.

However it is best practice to have a separate vlan for management of your switches and not to use a vlan that contains user ports.

You create a separate vlan on your distribution switch plus the layer 3 interface for that vlan and then allocate an IP address for the access switch from that subnet. Set the default-gateway of the access-switch to be the layer 3 SVI of your management vlan on the distribution switch.

The connection between your access-switch and your distribution switch would need to be a trunk.

HTH

Jon

3 REPLIES
Cisco Employee

Re: ip default-gateway

Hi Ali,

Yes on your pc side which are in vlan 10 you need to define your gateway as layer 3 interface ip address which is 10.10.10.3 in your case.

On your access switch it depends if you want your access switch reachable from other part of your network then yes so that if you try to access from any other device which exist on any other subnet and when it reaches your access switch your access switch should know how to reach that device back so it will send it back to the default gateway which is your layer 3 switch and your layer 3 switch will route it ahead.

Also from your access switch if you want to access some other device which is in other subnet then it must know where to fwd as it is a layer 2 switch it will not route so it will send the packet to default gateway which will be 10.10.10.3 in your case.

HTH

Ankur

New Member

Re: ip default-gateway

Hi Ankur!

Hi Jon!

How r you 10xs 10xs a lot for ur replys;appreciate ur replys as well as all Peoples Who have been helping me to improve my skills with cisco product

Regards

Ali

Hall of Fame Super Blue

Re: ip default-gateway

Hi Ali

Agree with what Ankur has said about the PC. As far as the access switch goes if you want it to be in the same vlan (10) then yes you should set the default-gateway to be 10.10.10.3.

However it is best practice to have a separate vlan for management of your switches and not to use a vlan that contains user ports.

You create a separate vlan on your distribution switch plus the layer 3 interface for that vlan and then allocate an IP address for the access switch from that subnet. Set the default-gateway of the access-switch to be the layer 3 SVI of your management vlan on the distribution switch.

The connection between your access-switch and your distribution switch would need to be a trunk.

HTH

Jon

227
Views
0
Helpful
3
Replies
CreatePlease to create content