Router>en
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#int f0/0.2
Router(config-subif)#encapsulation dot1q 2
Router(config-subif)#ip address 182.168.1.254 255.255.255.0
Router(config-subif)#int f0/0.3
Router(config-subif)#encap dot1q 3
Router(config-subif)#ip address 192.168.3.254 255.255.255.0
Router(config-subif)#int f0/0.3
Router(config-subif)#int f0/0.4
Router(config-subif)#encap dot1
Router(config-subif)#encap dot1q 4
Router(config-subif)#ip address 192.168.4.254 255.255.255.0
Router(config-subif)#int f0/0
Router(config-if)#no shutdown

Router(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up

%LINK-5-CHANGED: Interface FastEthernet0/0.2, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0.2, changed state to up

%LINK-5-CHANGED: Interface FastEthernet0/0.3, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0.3, changed state to up

%LINK-5-CHANGED: Interface FastEthernet0/0.4, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0.4, changed state to up

Router(config-if)#exit
Router(config)#