Enable routing on the switch with the ip routing command.
Switch(config)#ip routing
Create Vlans:
Switch#vlan database
Switch(vlan)#vlan 2
Switch(vlan)#vlan 3
Switch(vlan)#vlan 10
give IP address to Vlans, for example vlan 2:
Switch(config)#interface Vlan2
Switch(config-if)#ip address 10.1.2.1 255.255.255.0
Switch(config-if)#no shutdown
Configure the interface to the default router. In this scenario you have a Layer 3 FastEthernet port.
Switch(config)#interface FastEthernet 0/1
Switch(config-if)#no switchport
Switch(config-if)#ip address 200.1.1.1 255.255.255.0
Switch(config-if)#no shutdown
Switch(config)#ip route 0.0.0.0 0.0.0.0 200.1.1.2
config client GW to relative vlan IP Address
Switch(config)#ip routing
Create Vlans:
Switch#vlan database
Switch(vlan)#vlan 2
Switch(vlan)#vlan 3
Switch(vlan)#vlan 10
give IP address to Vlans, for example vlan 2:
Switch(config)#interface Vlan2
Switch(config-if)#ip address 10.1.2.1 255.255.255.0
Switch(config-if)#no shutdown
Configure the interface to the default router. In this scenario you have a Layer 3 FastEthernet port.
Switch(config)#interface FastEthernet 0/1
Switch(config-if)#no switchport
Switch(config-if)#ip address 200.1.1.1 255.255.255.0
Switch(config-if)#no shutdown
Switch(config)#ip route 0.0.0.0 0.0.0.0 200.1.1.2
config client GW to relative vlan IP Address