You have to configure the other sub-interface, the one that will act as the default-gateway for the other VLAN (VLAN 20, network ID 192.168.20.0 255.255.255.0) interface GigabitEthernet0/0.20 encapsulation dot1Q 20 ip address 192.168.20.1 255.255.255.0