VLAN configuration

To configure VLANs on a switch, you need to follow this configuration:

  • First VLAN:
switch#configure terminalswitch(config)#vlan 10switch(config-vlan)#exitswitch(config)#
  • Second VLAN:
switch#configure terminalswitch(config)#vlan 20switch(config-vlan)#exitswitch(config)#
  • Assign ports:
switch#configure terminalswitch(config)#interface FastEthernet 0/1switch(config-if)#switchport mode accessswitch(config-if)#switchport access vlan 10 switch#configure terminalswitch(config)#interface range FastEthernet 0/2 - 8switch(config-if-range)#switchport mode accessswitch(config-if-range)#switchport access vlan 10

Get Advanced Infrastructure Penetration Testing now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.