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

ip default-gateway

alsayed
Level 1
Level 1

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

ankbhasi
Cisco Employee
Cisco Employee

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

View solution in original post

Jon Marshall
Hall of Fame
Hall of Fame

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

View solution in original post

3 Replies 3

ankbhasi
Cisco Employee
Cisco Employee

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

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

Jon Marshall
Hall of Fame
Hall of Fame

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

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: