To configure the schema:
Configuration command:
Switch>enable
Switch#vlan Database
% Warning:it are recommended to configure VLANs from config mode,
As VLAN database mode is being deprecated. Please consult user
documentation for configuring Vtp/vlan in config mode.
Switch (VLAN) #vlan name test10
VLAN Ten Modified:
Name:test10
Switch (VLAN) #vlan name test20
VLAN Modified:
name:test20
Switch (VLAN) #
Switch (VLAN) #exit
APPLY completed.
Exiting ....
Switch#configure Terminal
Enter configuration commands, one per line. End with cntl/z.
Switch (config) #interface FASTETHERNET0/1
Switch (config-if) #switchport Access VLAN 10
Switch (config-if) #exit
Switch (config) #interface FASTETHERNET0/2
Switch (config-if) #switchport Access VLAN 20
Switch (config-if) #exit
Switch (config) #int VLAN 10
Switch (config-if) #
%link-5-changed:interface Vlan10, CHANGED state-to-up
%lineproto-5-updown:line protocol on Interface Vlan10, changed
Switch (config-if) #ip add 192.168.1.1 255.255.255.0
Switch (config-if) #int VLAN 20
Switch (config-if) #
%link-5-changed:interface Vlan20, CHANGED state-to-up
%lineproto-5-updown:line protocol on Interface Vlan20, changed
Switch (config-if) #ip add 192.168.2.1 255.255.255.0
Switch (config-if) #exit
Switch (config) #ip routing
Three layer switching VLAN communication configuration for different network segments