H3C S5500-SI Series Ethernet Switches Command Manual(V1.01)

HomeSupportSwitchesH3C S5500 Switch SeriesReference GuidesCommand ReferencesH3C S5500-SI Series Ethernet Switches Command Manual(V1.01)
18-DHCP Commands
Title Size Download
18-DHCP Commands 111 KB

Table of Contents

Chapter 1 DHCP Relay Agent Configuration Commands. 1-1

1.1 DHCP Relay Agent Configuration Commands. 1-1

1.1.1 dhcp enable. 1-1

1.1.2 dhcp relay address-check. 1-2

1.1.3 dhcp relay information enable. 1-2

1.1.4 dhcp relay information format 1-3

1.1.5 dhcp relay information strategy. 1-4

1.1.6 dhcp relay release. 1-5

1.1.7 dhcp relay security static. 1-5

1.1.8 dhcp relay security tracker 1-6

1.1.9 dhcp relay server-detect 1-7

1.1.10 dhcp relay server-group. 1-8

1.1.11 dhcp relay server-select 1-9

1.1.12 dhcp select relay. 1-9

1.1.13 display dhcp relay. 1-10

1.1.14 display dhcp relay security. 1-11

1.1.15 display dhcp relay security statistics. 1-12

1.1.16 display dhcp relay security tracker 1-13

1.1.17 display dhcp relay server-group. 1-13

1.1.18 display dhcp relay statistics. 1-14

1.1.19 reset dhcp relay statistics. 1-16

Chapter 2 DHCP Client Configuration Commands. 2-1

2.1 DHCP Client Configuration Commands. 2-1

2.1.1 display dhcp client 2-1

2.1.2 ip address dhcp-alloc. 2-3

Chapter 3 DHCP Snooping Configuration Commands. 3-1

3.1 DHCP Snooping Configuration Commands. 3-1

3.1.1 dhcp-snooping. 3-1

3.1.2 dhcp-snooping information enable. 3-2

3.1.3 dhcp-snooping information format 3-2

3.1.4 dhcp-snooping information strategy. 3-3

3.1.5 dhcp-snooping trust 3-4

3.1.6 display dhcp-snooping. 3-5

3.1.7 display dhcp-snooping trust 3-6

3.1.8 reset dhcp-snooping. 3-7

Chapter 4 BOOTP Client Configuration Commands. 4-1

4.1 BOOTP Client Configuration Commands. 4-1

4.1.1 display bootp client 4-1

4.1.2 ip address bootp-alloc. 4-2

 


Chapter 1  DHCP Relay Agent Configuration Commands

 

l      The DHCP relay agent configuration is supported only on VLAN interfaces.

l      DHCP Snooping cannot be configured on the DHCP relay agent.

 

1.1  DHCP Relay Agent Configuration Commands

1.1.1  dhcp enable

Syntax

dhcp enable

undo dhcp enable

View

System view

Parameters

None

Description

Use the dhcp enable command to enable DHCP.

Use the undo dhcp enable command to disable DHCP.

By default, DHCP is disabled.

 

&  Note:

For both DHCP server and relay agent configuration, enabling DHCP first is necessary to make other configurations take effect.

 

Examples

# Enable DHCP.

<Sysname> system-view

[Sysname] dhcp enable

1.1.2  dhcp relay address-check

Syntax

dhcp relay address-check { disable | enable }

View

Interface view

Parameters

disable: Disables IP address match checking on the relay agent.

enable: Enables IP address match checking on the relay agent.

Description

Use the dhcp relay address-check enable command to enable IP address match check on the relay agent.

Use the dhcp relay address-check disable command to disable IP address match check on the relay agent.

By default, the function is disabled.

Examples

# Enable IP address match checking on the DHCP relay agent.

<Sysname> system-view

[Sysname] interface vlan-interface 1

[Sysname-Vlan-interface1] dhcp relay address-check enable

1.1.3  dhcp relay information enable

Syntax

dhcp relay information enable

undo dhcp relay information enable

View

Interface view

Parameters

None

Description

Use the dhcp relay information enable command to enable the relay agent to support Option 82.

Use the undo dhcp relay information enable command to disable Option 82 support.

By default, Option 82 support is disabled on DHCP relay agent.

Examples

# Enable Option 82 support on the relay agent.

<Sysname> system-view

[Sysname] interface vlan-interface 1

[Sysname-Vlan-interface1] dhcp relay information enable

1.1.4  dhcp relay information format

Syntax

dhcp relay information format { normal | verbose [ node-identifier { mac | sysname | user-defined node-identifier } ] }

undo dhcp relay information format [ verbose node-identifier ]

View

Interface view

Parameters

normal: Specifies the normal padding format.

verbose: Specifies the verbose padding format.

node-identifier { mac | sysname | user-defined node-identifier }: Specifies access node identifier. By default, the node MAC address is used as the node identifier.

l           mac indicates using MAC address as the node identifier.

l           sysname indicates using the device name of a node as the node identifier.

l           user-defined node-identifier indicates using a specified character string as the node identifier, in which node-identifier is a string with 1 to 50 characters.

Description

Use the dhcp relay information format command to specify a padding format for Option 82.

Use the undo dhcp relay information format command to restore the default padding format.

The Option 82 padding format defaults to normal.

 

&  Note:

l      Using the undo dhcp relay information format command without the keyword verbose node-identifier restores the default normal padding format, or with the keyword verbose node-identifier restores the mac mode of the verbose padding format.

l      If configuring the handling strategy of the DHCP relay agent as replace, you need to configure a padding format of Option 82. If the handling strategy is keep or drop, you need not configure any padding format.

l      If sub-option 1 (node identifier) of Option 82 is padded with the device name (sysname) of a node, the device name must contain no spaces. Otherwise, the DHCP relay agent will drop the message.

 

Examples

# Specify the verbose padding format for Option 82.

<Sysname> system-view

[Sysname] interface vlan-interface 1

[Sysname-Vlan-interface1] dhcp relay information enable

[Sysname-Vlan-interface1] dhcp relay information strategy replace

[Sysname-Vlan-interface1] dhcp relay information format verbose

1.1.5  dhcp relay information strategy

Syntax

dhcp relay information strategy { drop | keep | replace }

undo dhcp relay information strategy

View

Interface view

Parameters

drop: Specifies to drop messages containing Option 82.

keep: Specifies to forward messages containing Option 82 without any change.

replace: Specifies to forward messages containing Option 82 after replacing the original Option 82 with the Option 82 padded in the specified padding format.

Description

Use the dhcp relay information strategy command to configure DHCP relay agent handling strategy for messages containing Option 82.

Use the undo dhcp relay information strategy command to restore the default handling strategy.

The handling strategy for messages containing Option 82 defaults to replace.

Examples

# Configure the DHCP relay agent handling strategy for messages containing Option 82 as keep.

<Sysname> system-view

[Sysname] interface vlan-interface 1

[Sysname-Vlan-interface1] dhcp relay information enable

[Sysname-Vlan-interface1] dhcp relay information strategy keep

1.1.6  dhcp relay release

Syntax

dhcp relay release ip client-ip

View

System view

Parameters

client-ip: DHCP client IP address.

Description

Use the dhcp relay release ip command to request the DHCP server to release a specified client IP address.

Examples

# Request the DHCP server to release the IP address 1.1.1.1.

<Sysname> system-view

[Sysname] dhcp relay release ip 1.1.1.1

1.1.7  dhcp relay security static

Syntax

dhcp relay security static ip-address mac-address [ interface interface-type interface-number ]

undo dhcp relay security { ip-address | all | dynamic | static }

View

System view

Parameters

ip-address: Client IP address for creating a static binding.

mac-address: Client MAC address for creating a static binding, in the format H-H-H.

interface interface-type interface-number: Specifies an interface connecting to the DHCP client. interface-type interface-number specifies the interface type and interface number.

all: Specifies all entries of client IP-to-MAC bindings to be removed.

dynamic: Specifies entries of dynamic client IP-to-MAC bindings to be removed.

static: Specifies entries of manual client IP-to-MAC bindings to be removed.

Description

Use the dhcp relay security static command to configure a static addressing binding, that is, the binding between IP address, MAC address, and VLAN interface on the relay agent.

Use the undo dhcp relay security command to remove specified binding entries from the relay agent.

No manual IP-to-MAC binding is configured on the DHCP relay agent by default.

Note that:

When using the dhcp relay security static command to bind an interface to a static binding entry, make sure that the interface is configured as a DHCP relay agent; otherwise, address entry conflicts may occur.

Related commands: display dhcp relay security.

Examples

# Bind DHCP relay interface VLAN-interface 2 to IP address 10.10.1.1 and MAC address 0005-5d02-f2b3 of the client.

<Sysname> system-view

[Sysname] dhcp relay security static 10.10.1.1 0005-5d02-f2b3 interface vlan-interface 2

1.1.8  dhcp relay security tracker

Syntax

dhcp relay security tracker { interval | auto }

undo dhcp relay security tracker [ interval ]

View

System view

Parameters

interval: Refreshing interval in seconds, in the range of 1 to 120.

auto: Specifies the auto refreshing interval, which is the value of 60 seconds divided by the number of binding entries. Thus, the more entries are, the shorter interval is, but the shortest interval is no less than 500 ms.

Description

Use the dhcp relay security tracker command to set a refreshing interval at which the relay agent contacts the DHCP server for refreshing dynamic bindings.

Use the undo dhcp relay security tracker command to restore the default interval.

The default handshake interval is auto, the value of 60 seconds divided by the number of binding entries.

Examples

# Set the handshake interval as 100 seconds.

<Sysname> system-view

[Sysname] dhcp relay security tracker 100

1.1.9  dhcp relay server-detect

Syntax

dhcp relay server-detect

undo dhcp relay server-detect

View

System view

Parameters

None

Description

Use the dhcp relay server-detect command to enable unauthorized DHCP server detection.

Use the undo dhcp relay server-detect command to disable unauthorized DHCP server detection.

By default, unauthorized DHCP server detection is disabled.

Examples

# Enable unauthorized DHCP server detection.

<Sysname> system-view

[Sysname] dhcp relay server-detect

1.1.10  dhcp relay server-group

Syntax

dhcp relay server-group group- ip ip-address

undo dhcp relay server-group group-id [ ip ip-address ]

View

System view

Parameters

group-id: DHCP server group number, in the range of 0 to 19.

ip ip-address: DHCP server IP address.

Description

Use the dhcp relay server-group command to specify a DHCP server for a DHCP server group.

Use the undo dhcp relay server-group command to remove a DHCP server from a DHCP server group, if no ip ip-address is specified, all servers in the DHCP server group and the server group itself will be removed.

By default, no DHCP server is specified for a DHCP server group.

Note that:

l           The IP address of any DHCP server and any interface’s IP address of the DHCP relay agent cannot be in the same network segment. Otherwise, the client may fail to obtain an IP address.

l           If a server group has been correlated to multiple interfaces, you need to cancel these correlations before removing the server group.

Related commands: display dhcp relay server-group.

Examples

# Specify DHCP server 1.1.1.1 for DHCP server group 1 on the relay agent.

<Sysname> system-view

[Sysname] dhcp relay server-group 1 ip 1.1.1.1

1.1.11  dhcp relay server-select

Syntax

dhcp relay server-select group-id

undo dhcp relay server-select

View

Interface view

Parameters

group-id: DHCP server group number to be correlated, in the range of 0 to 19. The specified server group must be an existing group containing at least a DHCP server.

Description

Use the dhcp relay server-select command to correlate specified interface(s) to a specified DHCP server group.

Use the undo dhcp relay server-select command to remove a configured correlation.

By default, no DHCP server group is correlated with an interface on the relay agent.

Note that an interface on the relay agent can only be correlated to one DHCP server group, and a newly configured correlation overwrites the previous one. If the server group in the new correlation does not exist, the new configuration will not work. The interface still maintains the previous correlation.

Examples

# Correlate VLAN-interface 1 to DHCP server group 1.

<Sysname> system-view

[Sysname] interface vlan-interface 1

[Sysname-Vlan-interface1] dhcp relay server-select 1

1.1.12  dhcp select relay

Syntax

dhcp select relay

undo dhcp select relay

View

Interface view

Parameters

None

Description

Use the dhcp select relay command to enable the relay agent on the current interface, specified or all interfaces. Upon receiving requests from an enabled interface, the relay agent will forward these requests to outside DHCP servers for IP address allocation.

Use the undo dhcp select relay command to restore the default on interface(s).

After DHCP is enabled, the DHCP server is enabled on an interface by default. That is, upon receiving a client’s request from the interface, the DHCP server allocates an IP address from the DHCP address pool to the client.

Examples

# Enable the DHCP relay agent on VLAN-interface 1.

<Sysname> system-view

[Sysname] interface vlan-interface 1

[Sysname-Vlan-interface1] dhcp select relay

1.1.13  display dhcp relay

Syntax

display dhcp relay { all | interface interface-type interface-number }

View

Any view

Parameters

all: Displays information of DHCP server groups that all interfaces correspond to.

interface interface-type interface-number: Displays information of the DHCP server group that a specified interface corresponds to.

Description

Use the display dhcp relay command to display information about DHCP server groups correlated to an interface or all interfaces.

Examples

# Display information about DHCP server groups correlated to all interfaces.

<Sysname> display dhcp relay all

    Interface name            Server-group

    Vlan-interface3                   2

Table 1-1 Description on fields of the display dhcp relay all command

Field

Description

Interface name

Interface name

Server-group

DHCP server group number correlated to the interface.

 

1.1.14  display dhcp relay security

Syntax

display dhcp relay security [ ip-address | dynamic | static ]

View

Any view

Parameters

ip-address: Displays the binding information of an IP address.

dynamic: Displays information about dynamic bindings.

static: Displays information about static bindings.

Description

Use the display dhcp relay security command to display information about bindings of DHCP relay agents. If no parameter is specified, information about all bindings will be displayed.

Examples

# Display information about all bindings.

<Sysname> display dhcp relay security

 IP Address      MAC Address     Type       Interface

 10.1.1.5        00e0-0000-0000  Static     Vlan2

 10.10.1.2       0002-0002-0002  Static     N/A

---   2 dhcp-security item(s) found   ---

Table 1-2 Description on fields of the display dhcp relay security command

Field

Description

IP Address

Client IP address

MAC Address

Client MAC address

Type

Type of binding, including dynamic and static

Interface

VLAN interface connecting to the DHCP client. If no VLAN interface is recorded in the binding entry, “N/A” is displayed.

 

1.1.15  display dhcp relay security statistics

Syntax

display dhcp relay security statistics

View

Any view

Parameters

None

Description

Use the display dhcp relay security statistics command to display statistics information about bindings of DHCP relay agents.

Examples

# Display statistics about client address binding entries.

<Sysname> display dhcp relay security statistics

Static Items      :1

Dynamic Items     :0

Temporary Items   :0

All Items          :1

Table 1-3 Description on fields of the display dhcp relay security statistics command

Field

Description

Static Items

Static client address binding items

Dynamic Items

Dynamic client address binding items

Temporary Items

Temporary client address binding items

All Items

All client address binding items

 

1.1.16  display dhcp relay security tracker

Syntax

display dhcp relay security tracker

View

Any view

Parameters

None

Description

Use the display dhcp relay security tracker command to display the interval for refreshing dynamic bindings on the relay agent.

Examples

# Display the interval for refreshing dynamic bindings on the relay agent.

<Sysname> display dhcp relay security tracker

 Current tracker interval: 10s (Specified by user)

The interval is 10 seconds.

1.1.17  display dhcp relay server-group

Syntax

display dhcp relay server-group { group-id | all }

View

Any view

Parameters

group-id: Displays the information of the specified DHCP server group numbered from 0 to 19.

all: Displays the information of all DHCP server groups.

Description

Use the display dhcp relay server-group command to display the configuration information of a specified or all DHCP server groups.

Examples

# Display IP addresses of DHCP servers in DHCP server group 1.

<Sysname> display dhcp relay server-group 1

    No.            Group IP

    1              1.1.1.1

    2              1.1.1.2

Table 1-4 Description on fields of the display dhcp relay server-group command

Field

Description

No.

Sequence number

Group IP

IP address in the server group

 

1.1.18  display dhcp relay statistics

Syntax

display dhcp relay statistics [ server-group { group-id | all } ]

View

Any view

Parameters

group-id: Specifies a server group number in the range of 0 to 19 about which to display DHCP packet statistics.

all: Specifies all server groups about which to display DHCP packet statistics. Information for each group will be displayed.

Description

Use the display dhcp relay statistics command to display DHCP packet statistics related to a specified or all DHCP server groups.

Note that if no parameter (server-group and all) is specified, all DHCP packet statistics on the relay agent will be displayed.

Examples

# Display all DHCP packet statistics on the relay agent.

<Sysname> display dhcp relay statistics

     Bad packets received:                 0

     DHCP packets received from clients:   20

         DHCPDISCOVER packets received:     10

         DHCPREQUEST packets received:      10

         DHCPINFORM packets received:       0

         DHCPRELEASE packets received:      0

         DHCPDECLINE packets received:      0

         BOOTPREQUEST packets:              0

     DHCP packets received from servers:   20

         DHCPOFFER packets received:        10

         DHCPACK packets received:          10

         DHCPNAK packets received:          0

         BOOTPREPLY packets:                0

     DHCP packets sent to servers:         20

     DHCP packets sent to clients:         20

# Display DHCP packet statistics related to every server group on the relay agent.

<Sysname> display dhcp relay statistics server-group all

 DHCP relay server-group           #2

     Packet type               Packet number

 Client -> Server:

     DHCPDISCOVER                 5

     DHCPREQUEST                  5

     DHCPINFORM                        0

     DHCPRELEASE                    0

     DHCPDECLINE                   0

     BOOTPREQUEST                  0

 Server -> Client:

     DHCPOFFER                    5

     DHCPACK                        5

     DHCPNAK                        0

     BOOTPREPLY                      0

 

 DHCP relay server-group           #3

     Packet type               Packet number

 Client -> Server:

     DHCPDISCOVER                 5

     DHCPREQUEST                  5

     DHCPINFORM                        0

     DHCPRELEASE                    0

     DHCPDECLINE                   0

     BOOTPREQUEST                  0

 Server -> Client:

     DHCPOFFER                    5

     DHCPACK                        5

     DHCPNAK                        0

     BOOTPREPLY                      0

1.1.19  reset dhcp relay statistics

Syntax

reset dhcp relay statistics [ server-group group-id ]

View

User view

Parameters

server-group group-id: Specifies a server group ID in the range of 0 to 19 about which to remove statistics from the relay agent.

Description

Use the reset dhcp relay statistics command to remove statistics from the relay agent.

If no server-group is specified, all statistics will be removed from the relay agent.

Related commands: display dhcp relay statistics.

Examples

# Remove all statistics from the DHCP relay agent.

<Sysname> reset dhcp relay statistics

 


Chapter 2  DHCP Client Configuration Commands

 

l      The DHCP client configuration is supported only on VLAN interfaces.

l      When multiple VLAN interfaces having the same MAC address use DHCP for IP address acquisition via a relay agent, the DHCP server cannot be the Windows 2000 Server or Windows 2003 Server.

l      You are not recommended to enable both the DHCP client and the DHCP Snooping on the same device. Otherwise, DHCP Snooping entries may fail to be generated, or the DHCP client may fail to obtain an IP address.

 

2.1  DHCP Client Configuration Commands

2.1.1  display dhcp client

Syntax

display dhcp client [ verbose ] [ interface interface-type interface-number ]

View

Any view

Parameters

verbose: Specifies verbose DHCP client information to be displayed.

interface interface-type interface-number: Specifies an interface of which to display DHCP client information.

Description

Use the display dhcp client command to display DHCP client information. If no interface interface-type interface-number is specified, DHCP client information of all interfaces will be displayed.

Examples

# Display DHCP client information of all interfaces.

<Sysname> display dhcp client

Vlan-interface1 DHCP client information:

 Current machine state: BOUND

 Allocated IP: 40.1.1.20 255.255.255.0

 Allocated lease: 259200 seconds, T1: 129600 seconds, T2: 226800 seconds

 DHCP server: 40.1.1.2

# Display verbose DHCP client information.

<Sysname> display dhcp client verbose

Vlan-interface1 DHCP client information:

 Current machine state: BOUND

 Allocated IP: 40.1.1.20 255.255.255.0

 Allocated lease: 259200 seconds, T1: 129600 seconds, T2: 226800 seconds

 Lease from 2005.08.13 15:37:59   to   2005.08.16 15:37:59

 DHCP server: 40.1.1.2

 Transaction ID: 0x1c09322d

 Default router: 40.1.1.2

 DNS server: 44.1.1.11

 DNS server: 44.1.1.12

 Domain name: ddd.com

 Boot server: 200.200.200.200  1.1.1.1

Client ID: 3030-3066-2e65-3234-

392e-3830-3438-2d56-

6c61-6e2d-696e-7465-

7266-6163-6531

T1 will timeout in 1 day 11 hours 58 minutes 52 seconds.

Table 2-1  Description on fields of the display dhcp client command

Field

Description

Vlan-interface1 DHCP client information

Information of the interface acting as the DHCP client

Current machine state

DHCP client current machine state

Allocated IP

The IP address allocated by the DHCP server

Allocated lease

The allocated lease time

T1

The 1/2 lease time (in seconds) of the DHCP client IP address

T2

The 7/8 lease time (in seconds) of the DHCP client IP address

Lease from….to….

The start and end time of the lease.

DHCP Server

DHCP server IP address that assigned the IP address

Transaction ID

Transaction ID, a random number chosen by the client to identify an IP address allocation.

Default router

The gateway address assigned to the client

DNS server

The DNS server address assigned to the client

Domain name

The domain name suffix assigned to the client

Boot server

PXE server addresses (up to 16 addresses) specified for the DHCP client, which are obtained through Option 43.

Client ID

Client ID

T1 will timeout in 1 day 11 hours 58 minutes 52 seconds.

How long the T1 (1/2 lease time) timer will timeout.

 

2.1.2  ip address dhcp-alloc

Syntax

ip address dhcp-alloc [ client-identifier mac interface-type interface-number ]

undo ip address dhcp-alloc

View

Interface view

Parameters

client-identifier mac interface-type interface-number: Specifies the MAC address of an interface using which as the client ID to obtain an IP address.

Description

Use the ip address dhcp-alloc command to configure an interface to use DHCP for IP address acquisition.

Use the undo ip address dhcp-alloc command to cancel an interface from using DHCP.

By default, an interface does not use DHCP for IP address acquisition.

Note that:

l           If no parameter is specified, the client uses a character string comprised of the current interface name and MAC address as its ID for address acquisition.

l           The DHCP client sends a DHCP-RELEASE message for releasing the IP address obtained via DHCP, if the interface of the client is down, the message cannot be sent.

Examples

# Configure VLAN-interface 1 to use DHCP for IP address acquisition.

<Sysname> system-view

[Sysname] interface vlan-interface 1

[Sysname-Vlan-interface1] ip address dhcp-alloc

 


Chapter 3  DHCP Snooping Configuration Commands

 

&  Note:

l      DHCP Snooping supports no link aggregation. If an Ethernet port is added into an aggregation group, DHCP Snooping configuration on it will not take effect. When the port is removed from the group, DHCP Snooping can take effect.

l      The DHCP snooping enabled device does not work if it is between the DHCP relay agent and DHCP server, and it can work when it is between the DHCP client and relay agent or between the DHCP client and server.

l      The DHCP Snooping enabled device cannot be a DHCP server or DHCP relay agent.

l      You are not recommended to enable the DHCP client, BOOTP client, and DHCP Snooping on the same device. Otherwise, DHCP Snooping entries may fail to be generated, or the BOOTP client/DHCP client may fail to obtain an IP address.

 

3.1  DHCP Snooping Configuration Commands

3.1.1  dhcp-snooping

Syntax

dhcp-snooping

undo dhcp-snooping

View

System view

Parameters

None

Description

Use the dhcp-snooping command to enable DHCP snooping.

Use the undo dhcp-snooping command to disable DHCP snooping.

With DHCP snooping disabled, all ports can forward responses from any DHCP servers and does not record binding information about MAC addresses of DHCP clients and the obtained IP addresses.

By default, DHCP snooping is disabled.

Related commands: display dhcp-snooping.

Examples

# Enable DHCP snooping.

[Sysname] dhcp-snooping

3.1.2  dhcp-snooping information enable

Syntax

dhcp-snooping information enable

undo dhcp-snooping information enable

View

Ethernet port view

Parameters

None

Description

Use the dhcp-snooping information enable command to configure DHCP Snooping to support Option 82.

Use the undo dhcp-snooping information enable command to disable this function.

By default, DHCP Snooping does not support Option 82.

Examples

# Configure DHCP Snooping to support Option 82.

<Sysname> system-view

[Sysname] interface gigabitethernet1/0/1

[Sysname-GigabitEthernet1/0/1] dhcp-snooping information enable

3.1.3  dhcp-snooping information format

Syntax

dhcp-snooping information format { normal | verbose [ node-identifier { mac | sysname | user-defined node-identifier } ] }

undo dhcp-snooping information format [ verbose node-identifier ]

View

Ethernet port view

Parameters

normal: Specifies the normal padding format.

verbose: Specifies the verbose padding format.

node-identifier { mac | sysname | user-defined node-identifier }: Specifies access node identifier. By default, the node MAC address is used as the node identifier.

l           mac indicates using MAC address as the node identifier.

l           sysname indicates using the device name of a node as the node identifier.

l           user-defined node-identifier indicates using a specified character string as the node identifier, in which node-identifier is a string with 1 to 50 characters.

Description

Use the dhcp-snooping information format command to specify the padding format for Option 82.

Use the undo dhcp-snooping information format command to restore the default padding format.

By default, the padding format for Option 82 is normal.

Note that when you use the undo dhcp-snooping information format command, if the verbose node-identifier argument is not specified, the padding format will be restored to normal; if the verbose node-identifier argument is specified, the padding format will be restored to verbose with MAC address as the node identifier.

Examples

# Specify the padding format as verbose for Option 82.

<Sysname> system-view

[Sysname] interface gigabitethernet1/0/1

[Sysname-GigabitEthernet1/0/1] dhcp-snooping information enable

[Sysname-GigabitEthernet1/0/1] dhcp-snooping information strategy replace

[Sysname-GigabitEthernet1/0/1] dhcp-snooping information format verbose

3.1.4  dhcp-snooping information strategy

Syntax

dhcp-snooping information strategy { drop | keep | replace }

undo dhcp-snooping information strategy

View

Ethernet port view

Parameters

drop: Drops the requesting message containing Option 82.

keep: Forwards the requesting message containing Option 82 without changing Option 82.

replace: Forwards the requesting message containing Option 82 after replacing the original Option 82 with the one padded in specified format.

Description

Use the dhcp-snooping information strategy command to configure the handling strategy for Option 82 in requesting messages.

Use the undo dhcp-snooping information strategy command to restore the default setting.

By default, the handling strategy for Option 82 in requesting messages is replace.

Examples

# Configure the handling strategy for Option 82 in requesting messages as keep.

<Sysname> system-view

[Sysname] interface gigabitethernet1/0/1

[Sysname-GigabitEthernet1/0/1] dhcp-snooping information enable

[Sysname-GigabitEthernet1/0/1] dhcp-snooping information strategy keep

3.1.5  dhcp-snooping trust

Syntax

dhcp-snooping trust [ no-user-binding ]

undo dhcp-snooping trust

View

Ethernet port view

Parameters

no-user-binding: Specifies the port not to record the clients’ IP-to-MAC bindings in DHCP requests it receives. The command without this keyword allows the port to record the IP-to-MAC bindings of clients.

Description

Use the dhcp-snooping trust command to set a port as trusted.

Use the undo dhcp-snooping trust command to restore the default state of a port.

All ports are untrusted by default.

Related commands: display dhcp-snooping trust.

Examples

# Specify GigabitEthernet 1/0/1 as a trusted port and allow it to record the IP-to-MAC bindings of clients.

<Sysname> system-view

[Sysname] interface gigabitethernet 1/0/1

[Sysname-GigabitEthernet1/0/1] dhcp-snooping trust

3.1.6  display dhcp-snooping

Syntax

display dhcp-snooping

View

Any view

Parameters

None

Description

Use the display dhcp-snooping command to display the binding information recorded through DHCP snooping.

Related commands: dhcp-snooping.

 

&  Note:

Using the display dhcp-snooping command displays IP-to-MAC bindings that are present both in the DHCP-ACK and DHCP-REQUEST messages.

 

Examples

# Display DHCP snooping address binding information.

<Sysname> display dhcp-snooping

 DHCP Snooping is enabled.

 The client binding table for all untrusted ports.

 Type : D--Dynamic ,  S—-Static

 Type IP Address  MAC Address    Lease        VLAN    Interface

 ==== ============= ==============    =========   ==== =====================

 D     10.1.1.1      00e0-fc00-0006  286          1     GigabitEthernet1/0/1

 ---   1 dhcp-snooping item(s) found   ---

Table 3-1 Description on fields of the display dhcp snooping command

Field

Description

Type

Binding type

IP Address

IP address assigned to the DHCP client

MAC Address

MAC address of the DHCP client

Lease

Lease period of the IP address in seconds

VLAN

VLAN where the port connecting the DHCP client resides

Interface

Port to which the DHCP client is connected

 

3.1.7  display dhcp-snooping trust

Syntax

display dhcp-snooping trust

View

Any view

Parameters

None

Description

Use the display dhcp-snooping trust command to display information about trusted ports.

Related commands: dhcp-snooping trust.

Examples

# Display information about trusted ports.

<Sysname> display dhcp-snooping trust

 DHCP Snooping is enabled.

 DHCP Snooping trust becomes active.

 Interface                                       Trusted

 =========================                    ============

 GigabitEthernet1/0/1                          Trusted

The above output shows that DHCP snooping is enabled, DHCP snooping trust is active, and port GigabitEthernet 1/0/1 is trusted

3.1.8  reset dhcp-snooping

Syntax

reset dhcp-snooping { all | ip ip-address }

View

User view

Parameters

all: Clears all DHCP snooping binding information.

ip ip-address: Clears the DHCP snooping binding information of the specified IP address.

Description

Use the reset dhcp-snooping command clear DHCP snooping binding information.

Examples

# Clear all DHCP binding information.

<Sysname> reset dhcp-snooping all

 


Chapter 4  BOOTP Client Configuration Commands

 

&  Note:

l      BOOTP client configuration can only be used on VLAN interfaces.

l      If several VLAN interfaces sharing the same MAC address obtain IP addresses through a BOOTP relay agent, the BOOTP server cannot be a Windows 2000 Server or Windows 2003 Server.

l      You are not recommended to enable both the DHCP client and the DHCP Snooping on the same device. Otherwise, DHCP Snooping entries may fail to be generated, or the BOOTP client may fail to obtain an IP address.

 

4.1  BOOTP Client Configuration Commands

4.1.1  display bootp client

Syntax

display bootp client [ interface interface-type interface-number ]

View

Any view

Parameters

interface interface-type interface-number: Displays the BOOTP client information of the interface.

Description

Use the display bootp client command to display related information about a BOOTP client.

Note:

l           If interface interface-type interface-number is not specified, the command will display information about BOOTP clients on all interfaces.

l           If interface interface-type interface-number is specified, the command will display information about the BOOTP client on the specified interface.

Examples

# Display related information of the BOOTP client on VLAN-interface 1.

<Sysname> display bootp client interface vlan-interface 1

Vlan-interface1 BOOTP client information:

Allocated IP: 169.254.0.2 255.255.0.0

Transaction ID = 0x3d8a7431

Mac Address  00e0-fc0a-c3ef

Table 4-1 Description on fields of the display bootp client command

Field

Description

Vlan-interface1 BOOTP client information

Information of the interface serving as a BOOTP client

Allocated IP

BOOTP client’s IP address allocated by the BOOTP server

Transaction ID

Value of the XID field in a BOOTP message, namely, a random number used to match a response message from the BOOTP server while the BOOTP client sends a BOOTP request to the BOOTP server. If the values of the XID field are different in the BOOTP response and request, the BOOTP client will drop the BOOTP response.

Mac Address

MAC address of a BOOTP client

 

4.1.2  ip address bootp-alloc

Syntax

ip address bootp-alloc

undo ip address bootp-alloc

View

Interface view

Parameters

None

Description

Use the ip address bootp-alloc command to enable an interface to obtain an IP address through BOOTP.

Use the undo ip address bootp-alloc command to disable the interface from obtaining an IP address through BOOTP.

By default, an interface does not obtain an IP address through BOOTP.

Related commands: display bootp client.

Examples

# Configure VLAN-interface 1 to obtain IP address through BOOTP protocol

<Sysname> system-view

[Sysname] interface vlan-interface 1

[Sysname-Vlan-interface1] ip address bootp-alloc

 

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
All Support
  • Become a Partner
  • Partner Resources
  • Partner Business Management
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网