Switch# configure terminal
Enter configuration commands,one per line.End with CNTL/Z.
Switch(config)# interface vlan 1
Switch(config-if)# ip address 10.7.7.34 255.255.255.0
Switch(config-if)# end
Switch# *Sep 15 14:12:06.309:%SYS-5-CONFIG_I:Configured from console by console
Switch# write memory
Building configuration...
Compressed configuration from 2474 bytes to 1066 bytes [OK ]
6.
(Optional) Disable the default IP routing setting, and configure the default gateway.
This step is required if IP routing is not used on the switch.
Switch#configure terminal
Enter configuration commands,one per line.End with CNTL/Z.
Switch(config)#no ip routing
Switch(config)#ip default-gateway 10.7.7.1
Switch(config)#end
*Sep 15 14:12:46.309:%SYS-5-CONFIG_I:Configured from console by console
Switch#write memory
Building configuration...
Compressed configuration from 2492 bytes to 1070 bytes [OK ]
Note:
If IP routing is required on the switch, then leave the IP routing setting as the
default, and configure the default gateway.
Switch#configure terminal
Enter configuration commands,one per line.End with CNTL/Z.
Switch(config)#ip route 0.0.0.0 0.0.0.0 10.7.7.1
Switch(config)#end
*Sep 15 14:13:26.013:%SYS-5-CONFIG_I:Configured from console by console
Switch#write memory
Building configuration...
Compressed configuration from 2502 bytes to 1085 bytes [OK ]
7.
Set the host name of the switch.
Switch#configure terminal
Enter configuration commands,one per line.End with CNTL/Z.
Switch(config)#hostname exa1sw-ip
exa1sw-ip(config)#end
exa1sw-ip#write memory
Building configuration...
Compressed configuration from 3789 bytes to 1469 bytes [OK ]
The system host name is used as the prompt name.
8.
Configure up to three DNS servers.
exa1sw-ip#configure terminal
Enter configuration commands,one per line.End with CNTL/Z.
exa1sw-ip(config)#ip domain-name example.com
exa1sw-ip(config)#ip name-server 10.7.7.3
exa1sw-ip(config)#ip name-server 198.51.100.5
exa1sw-ip(config)#ip name-server 10.8.160.1
exa1sw-ip(config)#end
*Sep 15 14:26:37.045:%SYS-5-CONFIG_I:Configured from console by console
exa1sw-ip#write memory
Chapter 5
Configuring the Cisco Ethernet Switch
5-8