2.6.8 IP Command
1. Set up an IP address of the Managed Switch or configure the Managed Switch to get an
IP address automatically from DHCP server.
Switch(config)# ip enable
Enable IPv4 address processing.
Switch(config)# ip
address [A.B.C.D]
[255.X.X.X] [A.B.C.D]
Enter the desired IP address for your Managed
Switch.
Enter subnet mask of your IP address.
Enter the default gateway IP address.
Switch(config)# ip
address dhcp
Switch(config)# no ip enable
Disable IPv4 address processing.
Switch(config)# no ip address
Reset the Managed Switch’s IP address back to
the default.(192.168.0.1)
Switch(config)# no ip address dhcp
Switch(config)# show ip address
Show the IP configuration and the current status
of the system.
Switch(config)# ip address
192.168.1.198 255.255.255.0
192.168.1.254
Set up the Managed Switch’s IP to
192.168.1.198, subnet mask to 255.255.255.0,
and default gateway IP address to
192.168.1.254.
Switch(config)# ip address dhcp
The Managed Switch will obtain an IP address
automatically.
2. Enable IPv4 DHCP Auto Recycle function.
Switch(config)# ip
address dhcp auto-
recycle [port-list]
Enable IPv4 DHCP Auto Recycle function on
the specified ports. Only when one of these
specific link-up port is switched from link-down
into link-up status, DHCP release packets and
Discover packets will be sent to DHCP server
automatically. And it will ask for IP address from
DHCP server again.
Switch(config)# ip
address dhcp auto-
recycle
Enable IPv4 DHCP Auto Recycle function
globally.
Switch(config)# no ip
address dhcp auto-
recycle
Disable IPv4 DHCP Auto Recycle function
globally.
Switch(config)# no ip
address dhcp auto-
recycle [port-list]
Disable IPv4 DHCP Auto Recycle function on
the specified ports.