I know this works on a router but not sure about a switch
On a router you need to add a secondary address to the interface i.e.
int <interface>
add ip address <address> <mask> secondary
********
Hi,
In a Cisco switch, you can't configure 2 ip addesses, it is only possible on a router in which you can configure sub interfaces. This is being used in intervlan routing and frame relay configuration.
*********************
This, of course, depends on the switch in question. Some of them have routing capabilities, in which case the switch can actually have secondary addresses on a port - either multiple (i.e. secondary) addresses on a VLAN definition, or by defining a port on the switch as
"no switchport", and configuring the switch interface port like you would a router
(4506, 6509, 3750, and presumably many more have this capability).
switches work at layer 2, ip addresses are layer 3.
switches will use vlans, to get more than one vlan on a port, you will need to set up a trunk.
the host will have to be able to have it’s port setup for a trunk (802.1q).
This depends on the Cisco switch model that you are using. Some Cisco switches are layer 2 only. You would not assign an IP address to a switchport.
If the Cisco switch model that you have supports IP routing, a switchport can be setup as a routed port which does support secondary IP addressing.
If the second vlan is for voice, you can configure an auxilary vlan for the voice network.