router>en
router#conf t
router(config)#int fa0/0.1
router(config-subif)#encaps dot1q 1
router(config-subif)#ip add x.x.x.x y.y.y.y
router(config-subif)#exit
router(config)#int fa0/0
router(config-if)#no shut
router(config-if)#end
router#wr
That is configuring the fa0/0 with the subinterface of fa0/0.1 with 802.1q vlan trunking encapsulation for vlan 1, and x.x.x.x=ip address, y.y.y.y=mask. Fopr different vlans (I.E. vlan 20), it would be fa0/0.23, encaps dot1q 23
None of this will work if you have IP Base IOS, so if you have trouble (like "% Invalid input detected at '^' marker.), then post a sh ver.
Burt
Burt