OLT3610 Series DHCP-Snooping Configuration Commands
OLT3610 Series DHCP-Snooping Configuration Commands
OLT3610 Series DHCP-Snooping Configuration Commands
www.fs.com
OLT3610 Series DHCP-SNOOPING CONFIGURATION COMMANDS
Contents
www.fs.com
OLT3610 Series DHCP-SNOOPING CONFIGURATION COMMANDS
www.fs.com
OLT3610 Series DHCP-SNOOPING CONFIGURATION COMMANDS
ip dhcp-relay snooping
ip source binding
ip-source trust
www.fs.com 11
OLT3610 Series DHCP-SNOOPING CONFIGURATION COMMANDS
Syntax
ip dhcp-relay snooping
no ip dhcp-relay snooping
To enable or disable the DHCP-relay snooping function in a VLAN, run ip dhcp-relay snooping. To resume the corresponding default
Parameter None
Example The following example shows how to enable the DHCP-relay snooping function:
Syntax
Parameter
Parameter Description
Default None
Usage Guidelines This command is used to configure the VLAN of DHCP snooping.
Example The following example shows how to conduct the snooping inspection to the DHCP packets in VLAN2.
www.fs.com 21
OLT3610 Series DHCP-SNOOPING CONFIGURATION COMMANDS
Syntax
Parameter
Parameter Description
Usage Guidelines You can use this command to set the maximum users in a VLAN of DHCP snooping. During this settings, the principle
“first come and first be distributed” will be followed. When the number of users in the VLAN reaches the maximum value, new clients are
Example The following example shows how to set snooping detection for DHCP packets on VLAN 2 and the number of maximum users
is 3.
Syntax
To configure the TFTP server for backing up DHCP-snooping binding, run ip dhcp-relay snooping database-agent A.B.C.D.
Parameter
Parameter Description
www.fs.com 31
OLT3610 Series DHCP-SNOOPING CONFIGURATION COMMANDS
Usage Guidelines If the address of the TFTP server is not configured, the binding backup is not conducted.
Example The following example shows how to set the address of a server of backing up DHCP snooping binding to 192.168.1.1.
Syntax
Parameter
Parameter Description
Name File name which is saved during DHCP snooping binding backup.
Usage Guidelines If the file name is not configured, the binding backup is not conducted.
Example The following example shows how to set the file name of binding backup to dhcp_binding.txt.
Syntax
Parameter
Parameter Description
www.fs.com 41
OLT3610 Series DHCP-SNOOPING CONFIGURATION COMMANDS
Num Stands for the interval of backing up the DHCP snooping binding
(2-1440).
Usage Guidelines The binding update will be checked during interval configuration. If the binding is updated, the binding information
Example The following example shows how to set the interval of backing up the binding to 60 minutes.
Syntax
Parameter None
Default None
Usage Guidelines The command enables the item update is immediately written into the binding item database. It is recommended that
Example The following example shows how to back up the binding item immediately after its configuration item is updated.
Syntax
www.fs.com 51
OLT3610 Series DHCP-SNOOPING CONFIGURATION COMMANDS
Parameter None
Default None
Usage Guidelines After this function is enabled, if there are any packet of dhcp server in the untrust port, the syslog indicates that there
Example The following example shows how to enable the log function of dhcp snooping.
Syntax
To enable dhcp snooping rapid refresh item function, run the first one of the above commands. To return to the default setting, use the no
Parameter None
Default None
Usage Guidelines After this function is enabled, the DHCP attack of fake MAC will be closed; when the client is allowed to change the
access port, the IP address can be directly acquired without waiting for the expiration of the IP lease. After this function is enabled, if the
client changes its access port, the device with snooping enabled will take it as the dhcp packet attack of the fake mac and drop the dhcp
packets.
Example The following command shows how to enable dhcp snooping rapid refresh item function:
www.fs.com 61
OLT3610 Series DHCP-SNOOPING CONFIGURATION COMMANDS
Syntax
ip dhcp-relay snooping information option [format { snmp-ifindex | manual | hn-type [host] | cm-type } ]
no ip dhcp-relay snooping information option [format { snmp-ifindex | manual | hn-type [host] | cm-type } ]
Parameter
Parameter Description
Default Option 82 will not be added to or removed from the report by default.
Usage Guidelines This command is used to set whether DHCP option82 can be handled when a device is conducting DHCP snooping. If
format snmp-ifindex is designated, use SNMP ifindex to fill in option82; if format manual is designated, use the string configured with the
command "dhcp snooping information circuit-id string" on each port to fill in the circuit-id option of option82; if format cm-type is
designated, use cm-type to fill in option82; otherwise, fill in option82 according to RFC3046.
Example The following example shows how to fill in option 82 in SNMP ifindex mode:
Switch_config# ip dhcp-relay snooping vlan [WORD] //[WORD] is the vlan name that means need for enable snooping function
Syntax
Configure the function of detecting the port validity of uplink packets and whether the source port of thepacket is 67
www.fs.com 71
OLT3610 Series DHCP-SNOOPING CONFIGURATION COMMANDS
Parameter None
Default Disable
Usage Guidelines This command works on dhcp relay packet, but has no effect on snooping packet from server.
Example Configure the function of detecting the port validity of uplink packets:
Syntax
Parameter
Parameter Description
Default None
Usage Guidelines This command is used to configure a VLAN for monitoring the source IP address. The “no” form of this command is
used to cancel this VLAN. If the source IP and source MAC of the IP packet are not the legal client address assigned by the dhcp server
monitored by dhcp snooping, then such a packet is regarded as an illegal packet in the vlan with IP source address monitoring enabled,
Example The following example shows how to conduct source IP address monitoring to the packets from all physical interfaces (except
www.fs.com 81
OLT3610 Series DHCP-SNOOPING CONFIGURATION COMMANDS
Syntax
Parameter
Parameter Description
Default None
Usage Guidelines This command is used to configure a VLAN for monitoring the source address of the ARP packet. The “no” form of this
command is used to cancel this VLAN. Under the VLAN that enables ARP packet source address monitoring, ARP packets with SIP and
SMAC corresponding to the IP address and mac address assigned by the dhcp server to the client are discarded.
Example The following example shows how to conduct source address monitoring to the ARP packets from all physical interfaces
Syntax
To add MAC-to-IP binding to an interface, run ip source binding xx:xx:xx:xx:xx:xx A.B.C.D interface name vlan vlan-id.
Parameter
Parameter Description
A.B.C.D IP address
www.fs.com 91
OLT3610 Series DHCP-SNOOPING CONFIGURATION COMMANDS
Default None
Example The following example shows how to bind MAC address 08:00:3e:00:00:01 and IP address 192.168.1.2 on interface tg0/1.
Syntax
Parameter None
Usage Guidelines The ARP monitoring is not conducted to the ARP-trusted interface. The “no” form of this command is used to configure
Example The following example shows how to set interface tg0/1 to an ARP-trusted interface.
Syntax
Parameter None
www.fs.com 101
OLT3610 Series DHCP-SNOOPING CONFIGURATION COMMANDS
Usage Guidelines DHCP snooping is not conducted to the DHCP-trusted interface. The “no” form of this command is used to resume the
Example The following example shows how to set interface tg0/1 to a DHCP-trusted interface.
Syntax
Parameter None
Usage Guidelines After this command is configured, DHCP snooping trust, IP-sourcetrust and ARP inspection trust are automatically
enabled. The “no” form of this command is used to configure the Default of this interface.
Example The following example shows how to disable DHCP snooping on interface tg0/1.
Syntax
www.fs.com 111
OLT3610 Series DHCP-SNOOPING CONFIGURATION COMMANDS
Parameter
Parameter Description
string STRING Stands for the character string carried by the sub-option of
option82 circuit-id.
hex [xx-xx-xx-xx-xx-xx] Stands for the Hex system carried by option82 circuit-id.
Default None
Usage Guidelines This command can be set on each port that connects the client. This command is used to configure option82 of the
DHCP packet, which is sent by DHCP client to DHCP server and monitored by DHCP snooping. (The switch of manually set option82 need
be enabled. See the command, ip dhcp-relay snooping information option format manual)
Example The following example shows how to set option82 to group1 manually on interface tg1/3, which belongs to interface vlan 1.
Syntax
Parameter
Parameter Description
string STRING Stands for the character string carried by the sub-option of option82
remote-id.
Default None
www.fs.com 121
OLT3610 Series DHCP-SNOOPING CONFIGURATION COMMANDS
Usage Guidelines This command can be set on each port that connects the client. This command is used to configure option82 of the
DHCP packet, which is sent by DHCP client to DHCP server and monitored by DHCP snooping. (The switch of manually set option82 need
be enabled. See the command, ip dhcp-relay snooping information option format manual)
Example The following example shows how to set option82 to group1 manually on interface tg1/3, which belongs to interface vlan 1.
Syntax
Parameter
Parameter Description
STRING Stands for the character string carried by the sub-option of option82
verdor-specific.
Default None
Usage Guidelines This command can be set on each port that connects the client. This command is used to configure option82 of the
DHCP packet, which is sent by DHCP client to DHCP server and monitored by DHCP snooping. (The switch of manually set option82 need
be enabled. See the command, ip dhcp-relay snooping information option format manual)
www.fs.com 131
OLT3610 Series DHCP-SNOOPING CONFIGURATION COMMANDS
Example The following example shows how to set vendor-specific (suboption 9) of option 82 by the hex system
Syntax
Parameter
Parameter Description
first-subop9-param hex Stands for the Hex system of the first parameter carried by option82
second-subop9-param Stands for the Hex system of the second parameter carried by
(suboption9).
vlanip Stands for the IP address of the interface vlan carried by option82
vendor-specific (suboption9).
Default None
Usage Guidelines This command can be set on each port that connects the client. This command is used to configure option82 of the
DHCP packet, which is sent by DHCP client to DHCP server and monitored by DHCP snooping. This command without parameters acts as a
www.fs.com 141
OLT3610 Series DHCP-SNOOPING CONFIGURATION COMMANDS
switch command. When append is enabled, the information of this command will be added to suboption9 of option82. The added
Example The following example shows how to expand the packet with option82 on interface tg1/3 and add parameter 1 for suboption9
Syntax
Parameter None
Default None
Usage Guidelines This command can be set on each port that connects the client. After this command is set, the request packets that
Example The following example shows how to drop the dhcp packet with option82 on interface tg1/3.
Syntax
www.fs.com 151
OLT3610 Series DHCP-SNOOPING CONFIGURATION COMMANDS
Parameter None
Default None
Usage Guidelines This command can be configured on each port connected to the client. After this command is configured, the
option82 field of the dhcp request packet will be replaced on the specified port.
Example The following example shows how to replace the dhcp packet with option82 on interface tg1/3.
Syntax
Enable the port to transparently transmit DHCP messages with option 82 from the relay.
Disable the port to transparently transmit DHCP messages with option 82 from the relay.
Parameter None
Default None
Usage Guidelines This command can be configured on each port connected to the client. After this command is configured, the DHCP
message with option 82 from the relay will be transparently transmitted on the designated port.
Example The following example shows how to configure transparent transmission of dhcp packets with option 82 from the relay on port
tg1/3:
Syntax
ip-source trust
no ip-source trust
www.fs.com 161
OLT3610 Series DHCP-SNOOPING CONFIGURATION COMMANDS
Parameter None
Usage Guidelines Source IP address snooping is not conducted to the source-IP-trusted interface. The “no” form of this command is used
Example The following example shows how to set interface tg0/1 to a source-ip-trusted interface.
Syntax
Parameter None
Default None
Usage Guidelines This command is used to display the information about DHCP-relay snooping configuration.
Example The following example shows how to display the information about DHCP-relay snooping configuration.
tg0/1
www.fs.com 171
OLT3610 Series DHCP-SNOOPING CONFIGURATION COMMANDS
Syntax
Parameter None
Default None
Usage Guidelines This command is used to display the binding information about DHCP-relay snooping. If the all parameter is in the
command sentence, all binding information about DHCP-relay snooping will be displayed.
Example The following example shows how to display the binding information about DHCP-relay snooping.
Syntax
Parameter None
Default None
Usage Guidelines This command is used to display the dhcp-relay snooping statistics information. If the all parameter is in the command
Example The following example shows how to display the dhcp-relay snooping statistics information:
www.fs.com 181
OLT3610 Series DHCP-SNOOPING CONFIGURATION COMMANDS
Syntax
Parameter None
Default None
Usage Guidelines This command is used to enable or disable the debugging switch of DHCP-relay snooping.
Example The following example shows how to enable the debugging switch of DHCP-relay snooping.
Syntax
Parameter None
Default None
www.fs.com 191
OLT3610 Series DHCP-SNOOPING CONFIGURATION COMMANDS
Usage Guidelines This command is used to enable or disable the event debugging switch of DHCP-relay.
Example The following example shows how to enable the event debugging switch of DHCP-relay.
Syntax
Parameter None
Default None
Usage Guidelines This command is used to enable or disable the binding debugging switch of DHCP-relay snooping.
Example The following example shows how to enable the binding debugging switch of DHCP-relay snooping.
Syntax
Parameter None
Default None
www.fs.com 201
OLT3610 Series DHCP-SNOOPING CONFIGURATION COMMANDS
Example The following example shows how to turn on all Dhcp-relay debugging switches.
www.fs.com 211