cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2107
Views
5
Helpful
6
Replies

A questions on Layer 3 switches

graicar064
Level 1
Level 1

Hi all,

I have attaced a set up i was doing on packet tracer. I have everything sucessfully up and running. However i do not understand one thing.

I have set the default gateways of each PC to be their respective VLAN interface on the Layer 3 switch. I have also added static route on the router with the default route (0.0.0.0) to check if i can ping the router interface from my PC. I can ping, however i dont understand the following questions:

1) If the default gateway is set to the VLAN interface and not the routers port, how can i ping the router?

2) Why dont i need to make the routers port the default gateway instead of the VLAN interface?

All help is appreciated!

2 Accepted Solutions

Accepted Solutions

ohassairi
Level 5
Level 5

the default gateway must usually belong to PC subnet.

the router IP does not belong to the PC subnet.

you can ping the router IP because the packet is routed hop by hop: the PC sends the packet to the L3 switch, the switch will check the destination IP (router IP) and will try to route the packet according to its routing table. in switch routeing table there is a connected network to witch the router belongs. so the L3 sw will make and ARP request to find the router mac address, then the frame will be switched for the router.

View solution in original post

Julio Carvajal
VIP Alumni
VIP Alumni

Hello Gaurav,

Remember that the default-gateway must be on the same ethernet or LAN network than you. In this case the Default gateway will be the SVI on the Switch.

The router cannot be the Default-gateway because when you send an ARP request to for the MAC address of the IP address of the Router port no-one on the LAN will reply (cause none of them is the router).

You can ping the Router cause the Switch knows about the router so the packet goes from your PC to the DG and the Default Gateway (DG) knows that it has the router port directly connected to it.

As long as the Switch has layer 3 capability and knows where to send the packets it can be set as the DG with no problem at all.

Does it make sense?

For more information about Core and Security Networking follow my website at http://laguiadelnetworking.

Any question contact me at jcarvaja@laguiadelnetworking.com

Cheers,

Julio Carvajal Segura

Julio Carvajal
Senior Network Security and Core Specialist
CCIE #42930, 2xCCNP, JNCIP-SEC

View solution in original post

6 Replies 6

ohassairi
Level 5
Level 5

the default gateway must usually belong to PC subnet.

the router IP does not belong to the PC subnet.

you can ping the router IP because the packet is routed hop by hop: the PC sends the packet to the L3 switch, the switch will check the destination IP (router IP) and will try to route the packet according to its routing table. in switch routeing table there is a connected network to witch the router belongs. so the L3 sw will make and ARP request to find the router mac address, then the frame will be switched for the router.

Julio Carvajal
VIP Alumni
VIP Alumni

Hello Gaurav,

Remember that the default-gateway must be on the same ethernet or LAN network than you. In this case the Default gateway will be the SVI on the Switch.

The router cannot be the Default-gateway because when you send an ARP request to for the MAC address of the IP address of the Router port no-one on the LAN will reply (cause none of them is the router).

You can ping the Router cause the Switch knows about the router so the packet goes from your PC to the DG and the Default Gateway (DG) knows that it has the router port directly connected to it.

As long as the Switch has layer 3 capability and knows where to send the packets it can be set as the DG with no problem at all.

Does it make sense?

For more information about Core and Security Networking follow my website at http://laguiadelnetworking.

Any question contact me at jcarvaja@laguiadelnetworking.com

Cheers,

Julio Carvajal Segura

Julio Carvajal
Senior Network Security and Core Specialist
CCIE #42930, 2xCCNP, JNCIP-SEC

graicar064
Level 1
Level 1

Thanks guys to make the concept clear. So can i generalize it as follows?

1. A router port with an assigned Ip address = Switched virtual interface (SVI) = A port on a L3 switch with a 'no switchport' command and an assigned ip address.

2. Whenever one of the above mentioned interfaces gets a packet it checks its routing table to determine where to go next.

Thanks again for all the help!

Hello Gaurav,

1)Yes, you have the concept

2) Yeap as long as IP routing is enabled on the device.You have it now.

My man remember to always rate the helpful posts

For more information about Core and Security Networking follow my website at http://laguiadelnetworking.

Any question contact me at jcarvaja@laguiadelnetworking.com

Cheers,

Julio Carvajal Segura

Julio Carvajal
Senior Network Security and Core Specialist
CCIE #42930, 2xCCNP, JNCIP-SEC

The default gateway must usually belong to PC subnet.

the router IP does not belong to the PC subnet.

Rate it

graicar064
Level 1
Level 1

Thanks for the replies. Understand it now. Sorry Jcarvaja im new here still getting used to the functionalities provided