Configuring IP Address Settings on a Catalyst 1900 or 2820

By default, a Cisco 1900 switch will not have any IP address settings configured. When you do configure an IP address, subnet mask, and default gateway on a switch, you are not configuring a specific port, but rather a management address for the entire switch. This will ultimately allow you to access the switch via telnet, or one of the various web-based applications mentioned earlier. IP address settings are configured from global configuration mode using the ip address and ip default-gateway commands. I have also added the address of a DNS server, using the ip name-server command.

Cisco1912#config t
Enter configuration commands, one per line. End with CNTL/Z
Cisco1912(config)#ip address
Cisco1912(config)#ip default-gateway
Cisco1912(config)#ip name-server

To view the IP address configuration of the switch, use the show ip command from the privileged mode prompt. To get back to that prompt from global configuration mode, use either the exit command, or press Ctrl+Z. When entered on our Cisco 1900 switch, the Ctrl+Z command will not display ^Z.

Cisco1912#show ip
IP Address:
Subnet Mask:
Default Gateway:
Management VLAN: 1
Domain name:
Name server 1:
Name server 2:
HTTP server : Enabled
HTTP port : 80
RIP : Enabled

From the configuration shown above, notice that the switch is running an HTTP server for the purpose of allowing configuration via a web browser. The port number on which the HTTP server responds can be changed using the ip http port command, while the no ip http server command will disable the HTTP server completely.

Cisco1912(config)#ip http ?
port port
server Enable HTTP server
Cisco1912(config)#ip http port ?
<0-65535> HTTP port
Cisco1912(config)#no ip http server

Author: Dan DiNicolo

Dan DiNicolo is a freelance author, consultant, trainer, and the managing editor of He is the author of the CCNA Study Guide found on this site, as well as many books including the PC Magazine titles Windows XP Security Solutions and Windows Vista Security Solutions. Click here to contact Dan.