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**
—
Switch(config)#** interface g1/0/1**
Switch(config-if)#** switchport trunk encapsulation dot1q**
Switch(config-if)#** switchport mode trunk**
Switch(config-if)#** switchport trunk allowed vlan 100**