02-28-2021 06:17 PM
do you need a ip address for the switches on a router on stick ?
sub-interface g0/0.10 192.168.1.1 255.255.255.0
and on switch is vlan 10 192.168.1.2 255.255.255.0
does it need a ip address on vlan 10 ?
02-28-2021 06:41 PM
If the Switch acting as Pure Layer 2 and Router handling all the routine then you do not need IP address VLAN10 (but you need to manage Switch remotely you need one of the VLAN should have a config to connect to switch), you just need VLANs to be created and allowed in the trunk interface, configure the switch interface which belongs to VLAN 10 (where you connect end device).
good example: if you like the switch to be Layer 3
02-28-2021 06:44 PM
but to have a management vlan you need a interface assigned to that vlan ?
02-28-2021 07:14 PM
yes, that is only for management(if you have vlan 10 only in the network) and setup default-gateway, so switch act as Layer 2.
03-01-2021 12:01 AM
Hello,
below is what the simplified config would have to look like on the router and the switch. On the switch, you will have to manually create Vlan 10 first:
Switch#conf t
Switch(config)#vlan 10
Switch (config)#end
Router
interface GigabitEthernet0/0
description Trunk to Switch
!
interface GigabitEthernet0/0.10
ip address 192.168.1.1 255.255.255.0
Switch
interface GigabitEthernet0/0
description Trunk to Router
switchport mode trunk
!
interface Vlan 10
ip address 192.168.1.2 255.255.255.0
!
ip default-gateway 192.168.1.1
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide