04-13-2018 03:03 AM - edited 03-08-2019 02:38 PM
Hi,
I want to set a default gateway on a layer 3 switch for VLAN 100.
If I give an IP for interface VLAN 100 does it work or do I need to set it on an actual interface (port - example: int g1/0/1)?
Thanks
04-13-2018 03:36 AM - edited 04-13-2018 03:38 AM
Hi there,
Creating a Layer3 interface (int vlan100) would create an SVI for that VLAN. Applying an IP address to that SVI would provide a default gateway for the VLAN/ subnet. You would make this SVI available by using switchports in access or trunk mode.
Applying an IP address to a interface would create a routed interface.
cheers,
Seb.
04-13-2018 03:38 AM
Hi Seb,
Thanks for your reply. So if I want to do routing to this subnet/vlan I need to do it on the interface, right?
Thanks.
04-13-2018 03:40 AM - edited 04-13-2018 03:43 AM
Depends on the device.
Routers typically only support routed interfaces, whereas Layer3 switches support both routed interfaces and also SVIs.
What hardware are you using?
cheers,
Seb.
04-13-2018 06:36 AM
Thanks for your reply.
I am using Cisco 3750X.
04-13-2018 06:44 AM
A layer3 switch. In which case, follow the configuration which @Deepak Kumar mentioned in his post below.
Likewise as @Joseph W. Doherty noted, you will also need a way to route traffic to other subnets/ the internet.
cheers,
Seb.
04-13-2018 03:41 AM
Hi,
You didn't write the error message and switch model number.
I hope your configuration as below
Vlan 100
exit
!
interface vlan 100
ip add 192.168.1.1 255.255.255.0 !----> Example only, you can use available subnet.
no shut
!
!
interface gig1/0/1
switchport mode access
switchport access vlan 100
spanningtree portfast
no shut
!
!
Now configure the IP address in the system which is connected to Gi1/0/1
IP address: 192.168.1.100 / 255.255.255.0
default Gateway: 192.168.1.1
Now ping to the default gateway and share the output.
Regards,
Deepak Kumar
04-13-2018 04:47 AM
04-13-2018 06:44 AM
I want to create a new subnet 192.168.1.0/24 and set 192.168.1.1 as the default gateway of the VLAN.
My question is does the 192.168.1.1 need to be set on the int VLAN 100 or the g1/0/1?
Thanks.
04-13-2018 06:54 AM
Hi,
It will under the VLAN 100.
Regards,
Deepak Kumar
04-13-2018 07:23 AM
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: