On a router, if a physical interface is configured with many VLANs, then sub-interfaces have to be used. Additionally, the switchport port must be a trunk. An access port will not work, I tested this.
Router(config)# interface g0/0.100
Router(config-subif)# encapsulation dot1q 100
Router(config-subif)# ip address 100.1.1.1 255.255.255.0