50
2.6.10 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.
IP command
Parameter
Description
Switch(config)# ip
address [A.B.C.D]
[255.X.X.X] [A.B.C.D]
[A.B.C.D]
Enter the desired IP address for your Managed
Switch.
[255.X.X.X]
Enter subnet mask of your IP address.
[A.B.C.D]
Enter the default gateway address.
Switch(config)# ip
address dhcp
Enable DHCP mode.
No command
Switch(config)#no ip address
Remove the Managed
Switch‟s IP address.
Switch(config)# no ip address dhcp
Disable DHCP mode.
Show command
Switch(config)#show ip address
Show the current IP configurations or verify the
configured IP settings.
IP command example
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 to 192.168.1.254.
Switch(config)# ip address dhcp
Get an IP address automatically.
2. Enable DHCP server function.
IP DHCP Snooping Command
Parameter Description
Switch(config)# ip dhcp
snooping
Enable DHCP snooping function.
Switch(config)# ip dhcp
snooping dhcp-server [port_list]
[port_list]
Configure DHCP server trust ports.
Switch(config)# ip dhcp
snooping initiated [0-9999]
[1-9999]
Specify the time value (1~9999 Seconds)
that packets might be received.
Switch(config)# ip dhcp
snooping leased [180-259200]
[180-
259200]
Specify packets‟ expired time (180~259200
Seconds).
Switch(config)# ip dhcp
snooping option
Enable DHCP Option 82 Relay Agent.
No command
Switch(config)# no ip dhcp
snooping
Disable DHCP Snooping function.
Switch(config)# no ip dhcp
snooping dhcp-server
Remove DHCP server trust ports.
Switch(config)# no ip dhcp
snooping initiated
Reset the initiated value back to the default
setting.
Switch(config)# no ip dhcp
snooping leased
Reset the leased value back to the default
setting.
Switch(config)# no ip dhcp
snooping option
Disable DHCP Option 82 Relay Agent.
Summary of Contents for FOS-3124 SERIES
Page 202: ...202 Restart DHCP service ...