Configuring IP Address for VLAN
Beginning in privileged EXEC mode, follow these steps to configure IP address for the VLAN:
Procedure
Command or Action | Purpose | |
---|---|---|
Step 1 |
configure terminal |
Enter global configuration mode. |
Step 2 |
interface vlan vlan-id |
Enter interface configuration mode, and enter the VLAN to which the IP information is assigned. The VLAN range is 1 to 4094. |
Step 3 |
ip address {ip-address subnet-mask | dhcp } |
Configure the IP address. |
Step 4 |
exit |
Return to global configuration mode. |
Step 5 |
show interfaces vlan vlan-id |
Verify the configured IP address. |
Step 6 |
copy running-config startup-config |
(Optional) Save your entries in the configuration file. |