See VLAN Naming Format.
Include the IP address in the command you type. For example, if the IP address is 126.96.36.199, type:
# ifconfig igb123002 plumb 188.8.131.52 up
This example shows the output of ifconfig -a on a system having VLAN devices igb123002 and igb224002:
igb123002: flags=201000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,CoS>\ mtu 1500 index 4 inet 184.108.40.206 netmask ffffff00 broadcast 220.127.116.11 ether 0:13:20:f5:f6:dc igb224002: flags=201000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,CoS>\ mtu 1500 index 5 inet 0.0.0.0 netmask ffffff00 ether 0:13:20:f5:f6:dc
Note - In the preceding examples, the second NIC output for igb224002 was plumbed and enabled (that is, used the up option), but had no IP address. By default, the netmask and broadcast addresses are set by the system, which uses IP class C to make that setting 255.255.255.0. When the address is set, the ifconfig(1M) command by default does not display the broadcast address if the explicit IP address is not set.
Refer to the documentation that came with your switch for specific instructions for setting VLAN tagging and ports.