ip route
C 1.0.0.0/8 is directly connected, Vlan10
C 2.0.0.0/8 is directly connected, Vlan20
interface FastEthernet0/1
switchport access vlan 10
interface Vlan10
ip address 1.1.1.10 255.0.0.0
no shutdown
C:\>ipconfig
IP Address......................: 1.1.1.1
Subnet Mask.....................: 255.0.0.0
Default Gateway.................: 1.1.1.10
C:\>ping 2.2.2.2
Reply from 2.2.2.2: bytes=32 time<1ms TTL=127
Reply from 2.2.2.2: bytes=32 time<1ms TTL=127
Reply from 2.2.2.2: bytes=32 time<1ms TTL=127
Reply from 2.2.2.2: bytes=32 time<1ms TTL=127
interface FastEthernet0/2
switchport access vlan 20
interface Vlan20
ip address 2.2.2.20 255.0.0.0
no shutdown