background image
Cisco 1900 IOS Configuration Commands
605
By default, no IP address or default-gateway information is set. You
would set both the IP address and the default gateway on a layer-2 switch,
just like any host. By using the command show ip (or sh ip), you can see the
default IP configuration of the switch.
Todd1900EN#sh ip
IP Address: 0.0.0.0
Subnet Mask: 0.0.0.0
Default Gateway: 0.0.0.0
Management VLAN: 1
Domain name:
Name server 1: 0.0.0.0
Name server 2: 0.0.0.0
HTTP server : Enabled
HTTP port : 80
RIP : Enabled
Notice in the preceding switch output that no IP address, default gateway,
or other IP parameters are configured. To set the IP configuration on a 1900
switch, use the ip address command. The default gateway should also be
set using the ip default-gateway command.
The following switch output shows an example of how to set the IP
address and default gateway on a 1900 switch.
Todd1900EN#config t
Enter configuration commands, one per line. End with CNTL/Z
Todd1900EN(config)#ip address 172.16.10.16 255.255.255.0
Todd1900EN(config)#ip default-gateway 172.16.10.1
Todd1900EN(config)#
Once you have your IP information set, use the show ip command to
verify your changes.
Todd1900EN#sh ip
IP Address: 172.16.10.16
Subnet Mask: 255.255.255.0
Default Gateway: 172.16.10.1
Management VLAN: 1
Domain name:
Name server 1: 0.0.0.0
Spanning tree
Enabled
Console password
Not set
Copyright ©2002 SYBEX, Inc., Alameda, CA
www.sybex.com