• 产品与解决方案
  • 行业解决方案
  • 服务
  • 支持
  • 合作伙伴
  • 新华三人才研学中心
  • 关于我们

H3C S3600系列以太网交换机 命令手册-RELEASE 1510(V1.04)

06-配置管理VLAN命令

本章节下载  (215.89 KB)

docurl=/cn/Service/Document_Software/Document_Center/Switches/Catalog/S3600/S3600-SI/Command/Command_Manual/S3600-SI_CM(V1.04)/200711/317201_30005_0.htm

06-配置管理VLAN命令

  录

第1章 管理VLAN配置... 1-1

1.1 管理VLAN配置命令.. 1-1

1.1.1 description. 1-1

1.1.2 display interface Vlan-interface. 1-2

1.1.3 display ip interface Vlan-interface. 1-3

1.1.4 display ip routing-table. 1-4

1.1.5 display ip routing-table ip-address. 1-5

1.1.6 display ip routing-table ip-address1 ip-address2. 1-7

1.1.7 display ip routing-table protocol 1-8

1.1.8 display ip routing-table radix. 1-10

1.1.9 display ip routing-table statistics. 1-10

1.1.10 display ip routing-table verbose. 1-11

1.1.11 interface Vlan-interface. 1-13

1.1.12 ip address. 1-14

1.1.13 ip route-static. 1-14

1.1.14 management-vlan. 1-16

1.1.15 shutdown. 1-16

第2章 DHCP/BOOTP客户端配置... 2-1

2.1 DHCP/BOOTP客户端配置命令.. 2-1

2.1.1 display bootp client 2-1

2.1.2 display dhcp client 2-2

2.1.3 ip address bootp-alloc. 2-3

2.1.4 ip address dhcp-alloc. 2-3

 


第1章  管理VLAN配置

1.1  管理VLAN配置命令

1.1.1  description

【命令】

description text

undo description

【视图】

VLAN视图,VLAN接口视图

【参数】

text:描述当前VLAN或VLAN接口的一个字符串。

l              描述当前VLAN的字符串长度为1~32个字符。缺省值为该VLAN的VLAN ID,例如“VLAN 0001”。

l              描述VLAN接口的字符串长度为1~80个字符。缺省值为该VLAN接口的接口名,例如“Vlan-interface1 Interface”。

【描述】

description命令用来设置当前VLAN或VLAN接口的描述字符串。undo description命令用来恢复当前VLAN或VLAN接口的描述字符串为缺省值。

相关配置可参考命令display vlandisplay interface Vlan-interface

【举例】

# 指定VLAN 2为管理VLAN,并为VLAN 2的接口指定一个描述字符串“RESEARCH”。

<H3C> system-view

System View: return to User View with Ctrl+Z.

[H3C] vlan 2

[H3C-vlan2] quit

[H3C] management-vlan 2

[H3C] interface Vlan-interface 2

[H3C-Vlan-interface2] description RESEARCH

1.1.2  display interface Vlan-interface

【命令】

display interface Vlan-interface [ vlan-id ]

【视图】

任意视图

【参数】

vlan-id:指定要显示管理VLAN接口的接口号。

【描述】

display interface Vlan-interface命令用来显示管理VLAN接口本身的一些相关信息,包括:管理VLAN接口的物理状态与链路状态、发送帧格式、管理VLAN接口对应的MAC地址、IP地址及子网掩码、管理VLAN接口描述字符串及MTU等。

相关配置可参考命令interface Vlan-interface

【举例】

# 显示当前管理VLAN 1接口的相关信息。

<H3C> display interface Vlan-interface 1

Vlan-interface1 current state : DOWN

Line protocol current state : DOWN

IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 000f-e20f-4101

Internet Address is 192.168.0.39/24 Primary

Description : Vlan-interface1 Interface

The Maximum Transmit Unit is 1500

表1-1 display interface Vlan-interface命令显示信息描述表

字段

描述

Vlan-interface1 current state

管理VLAN接口当前状态

Line protocol current state

Line协议当前状态

IP Sending Frames' Format

IP发送帧格式

Hardware address

管理VLAN接口对应的MAC地址

Internet Address Primary

主IP地址

Description

VLAN接口描述

The Maximum Transmit Unit

最大传输单元(MTU)

 

1.1.3  display ip interface Vlan-interface

【命令】

display ip interface [ brief [ Vlan-interface [ vlan-id ] ] | [ Vlan-interface vlan-id ] ]

【视图】

任意视图

【参数】

vlan-id:管理VLAN接口的标识号,取值范围为1~4094。

brief:显示接口基本配置信息。

【描述】

display ip interface Vlan-interface命令用来显示接口的相关信息。

【举例】

# 显示管理VLAN接口1的相关信息。

<H3C> display ip interface Vlan-interface 1

Vlan-interface1 current state :UP

Line protocol current state :UP

Internet Address is 192.168.0.39/24 Primary

Broadcast address : 192.168.0.255

The Maximum Transmit Unit : 1500 bytes

IP packets input number: 7420, bytes: 557679, multicasts: 1

IP packets output number: 7509, bytes: 385809, multicasts: 0

TTL invalid packet number:         0

ICMP packet input number:          0

  Echo reply:                      0

  Unreachable:                     0

  Source quench:                   0

  Routing redirect:                0

  Echo request:                    0

  Router advert:                   0

  Router solicit:                  0

  Time exceed:                     0

  IP header bad:                   0

  Timestamp request:               0

  Timestamp reply:                 0

  Information request:             0

  Information reply:               0

  Netmask request:                 0

  Netmask reply:                   0

  Unknown type:                    0

表1-2 display ip interface命令显示信息描述表

字段

描述

Vlan-interface1 current state

VLAN接口1当前状态

Line protocol current state

Line协议当前状态

Internet Address

IP地址

Broadcast address

广播地址

The Maximum Transmit Unit

最大传输单元

IP input packets : 0, bytes : 0, multicasts : 0

IP output packets : 0, bytes : 0, multicasts : 0

输入/输出单播包数、字节数、组播包数均为0

TTL invalid packet number

收到的TTL非法的报文个数

ICMP packet input number:          0

  Echo reply:                      0

  Unreachable:                    0

  Source quench:                  0

  Routing redirect:                0

  Echo request:                    0

  Router advert:                   0

  Router solicit:                  0

  Time exceed:                    0

  IP header bad:                   0

  Timestamp request:              0

  Timestamp reply:                 0

  Information request:             0

  Information reply:               0

  Netmask request:                0

  Netmask reply:                   0

  Unknown type:                   0

收到的ICMP报文总数,包括如下报文:

Echo应答报文、不可达报文、源地址抑制报文、路由重定向报文、Echo请求报文、路由广播报文、路由请求报文、时间超期报文、IP头错报文、时间戳请求报文、时间戳响应报文、信息请求报文、信息响应报文、掩码请求报文、掩码响应报文、未知类型报文

 

1.1.4  display ip routing-table

【命令】

display ip routing-table

【视图】

任意视图

【参数】

【描述】

display ip routing-table命令用来查看路由表的摘要信息。

该命令以摘要形式显示路由表信息,每一行代表一条路由,内容包括:目的地址/掩码长度、协议、优先级、度量值、下一跳、输出接口。

使用display ip routing-table命令仅能查看到当前被使用的路由,即最佳路由。

【举例】

# 查看当前路由表的摘要信息。

<H3C> display ip routing-table

 Routing Table: public net

Destination/Mask Protocol        Pre Cost        Nexthop         Interface

127.0.0.0/8      DIRECT      0   0       127.0.0.1       InLoopBack0

127.0.0.1/32     DIRECT      0   0       127.0.0.            InLoopBack0

192.168.0.0/24   DIRECT      0   0       192.168.0.91        Vlan-interface1

192.168.0.91/32  DIRECT      0   0       127.0.0.1       InLoopBack0

表1-3 display ip routing-table命令显示信息描述表

字段

描述

Destination/Mask

目的地址/掩码长度

Protocol

发现该路由的路由协议

Pre

路由的优先级

Cost

路由的开销值

Nexthop

此路由的下一跳地址

Interface

输出接口,即到该目的网段的数据包将从此接口发出

 

1.1.5  display ip routing-table ip-address

【命令】

display ip routing-table ip-address [ mask ] [ longer-match ] [ verbose ]

【视图】

任意视图

【参数】

ip-address:目的IP地址,点分十进制格式。

mask:IP地址掩码,点分十进制格式或以整数形式表示的长度,当用整数形式时,取值范围为0~32。

longer-match:自然掩码范围内匹配的所有目的地址路由。

verbose:当使用该参数时,显示处于active状态和inactive状态的路由的详细信息。如果不使用该参数,将只显示处于active状态的路由的摘要信息。

【描述】

display ip routing-table ip-address命令用来查看指定目的地址的路由信息。

使用不同的可选参数,命令的输出也不相同,以下是对该命令不同形式的输出说明:

l              display ip routing-table ip-address

如果目的地址ip-address在自然掩码范围内有相应的路由,则将显示其全部子网路由,否则只显示与目的地址ip-address最长匹配的路由。只显示处于active状态的匹配路由。

l              display ip routing-table ip-address mask

只显示与指定目的地址及掩码精确匹配的路由。

l              display ip routing-table ip-address longer-match

显示目的地址在自然掩码范围内匹配的所有目的地址路由。

l              display ip routing-table ip-address mask longer-match

显示目的地址在指定掩码范围内匹配的所有目的地址路由。

【举例】

# 在自然掩码范围内有相应路由,查看摘要信息。

<H3C> display ip routing-table 169.0.0.0

Destination/Mask     Protocol    Pre Cost    Nexthop     Interface

169.0.0.0/16         Static  60  0       2.1.1.1     LoopBack1

以上显示信息的解释请参见表1-3

# 在自然掩码范围内没有相应的路由(只显示最长匹配的路由),查看摘要信息。

<H3C> display ip routing-table 169.253.0.0

Destination/Mask     Protocol    Pre     Cost    Nexthop     Interface

169.0.0.0/8          Static  60      0       2.1.1.1     LoopBack1

# 在自然掩码范围内有相应路由,查看详细信息。

<H3C> display ip routing-table 169.0.0.0 verbose

Routing Tables:

Generate Default: no

+ = Active Route, - = Last Active, # = Both  * = Next hop in use

  Summary count:2

**Destination: 169.0.0.0     Mask: 255.0.0.0

Protocol: #Static       Preference: 60

*NextHop: 2.1.1.1       Interface: 2.1.1.1(LoopBack1)

Vlinkindex: 0

State: <Int ActiveU Static Unicast>

Age: 3:47   Cost: 0/0   Tag: 0

**Destination: 169.0.0.0     Mask: 255.254.0.0

Protocol: #Static       Preference: 60

*NextHop: 2.1.1.1       Interface: 2.1.1.1(LoopBack1)

Vlinkindex: 0

State: <Int ActiveU Static Unicast>

Age: 3:47   Cost: 0/0   Tag: 0

# 在自然掩码范围内没有相应的路由(只显示最长匹配的路由),查看详细信息。

<H3C> display ip routing-table 169.253.0.0 verbose

Routing Tables:

Generate Default: no

+ = Active Route, - = Last Active, # = Both  * = Next hop in use

  Summary count:1

**Destination: 169.0.0.0     Mask: 255.0.0.0

Protocol: #Static       Preference: -60

*NextHop: 2.1.1.1

Vlinkindex: 0

State: <Int ActiveU Static Unicast>

Age: 3:47   Cost: 0/0   Tag: 0

1.1.6  display ip routing-table ip-address1 ip-address2

【命令】

display ip routing-table ip-address1 mask1 ip-address2 mask2 [ verbose ]

【视图】

任意视图

【参数】

ip-address1ip-address2:目的IP地址,点分十进制格式。ip-address1、mask1ip-address2、mask2共同确定一个地址范围,ip-address1mask1相与,得到地址范围的起始地址;ip-address2mask2相与,得到地址范围的结束地址,此命令显示该地址范围内的路由。

mask1mask2:IP地址掩码,点分十进制格式或以整数形式表示的长度,当用整数形式时,取值范围为0~32。

verbose:当使用该参数时,显示处于active状态和inactive状态的路由的详细信息。如果不使用该参数,将只显示处于active状态的路由的摘要信息。

【描述】

display ip routing-table ip-address1 ip-address2命令用来查看指定目的地址范围内的路由信息。

【举例】

# 查看目的地址从1.1.1.0到2.2.2.0范围内的路由信息。

<H3C> display ip routing-table 1.1.1.0 24 2.2.2.0 24

Routing tables:

  Summary count: 1

Destination/Mask   Protocol   Pre Cost        Nexthop      Interface

1.1.1.0/24          DIRECT       0  0          1.1.1.1      Vlan-interface1

以上显示信息的解释请参见表1-3

1.1.7  display ip routing-table protocol

【命令】

display ip routing-table protocol protocol [ inactive | verbose ]

【视图】

任意视图

【参数】

protocol:该参数有以下多种可选值:

l              direct:显示直连路由信息。

l              ospf:显示OSPF路由信息。

l              ospf-ase:显示ASE路由信息。

l              ospf-nssa:显示NSSA路由信息。

l              rip:显示RIP路由信息。

l              static:显示静态路由信息。

inactive:显示处于inactive状态的路由信息。如果不使用该参数,则显示处于active和inactive状态的路由信息。

verbose:当使用该参数时,显示路由的详细信息。如果不使用该参数,将只显示路由的摘要信息。

【描述】

display ip routing-table protocol命令用来查看指定协议的路由信息。

&  说明:

在S3600-SI系列设备上不能显示OSPF协议相关的信息。

 

【举例】

# 查看所有直连路由的摘要信息。

<H3C> display ip routing-table protocol direct

DIRECT Routing tables:

  Summary count: 4

DIRECT Routing tables status:<active>:

  Summary count: 3

Destination/Mask     Protocol    Pre Cost    Nexthop     Interface

20.1.1.1/32          DIRECT          0   0       127.0.0.1   InLoopBack0

127.0.0.0/8          DIRECT          0   0       127.0.0.1   InLoopBack0

127.0.0.1/32         DIRECT          0   0       127.0.0.1   InLoopBack0

DIRECT Routing tables status:<inactive>:

  Summary count: 1

Destination/Mask     Protocol   Pre  Cost    Nexthop     Interface

210.0.0.1/32         DIRECT     0       0       127.0.0.1   InLoopBack0

# 查看静态路由表摘要信息。

<H3C> display ip routing-table protocol static

STATIC Routing tables:

  Summary count: 1

STATIC Routing tables status:<active>:

  Summary count: 0

STATIC Routing tables status:<inactive>:

  Summary count: 1

Destination/Mask   Protocol   Pre Cost       Nexthop      Interface

1.2.3.0/24          STATIC     60  0           1.2.4.5      Vlan-interface1

以上显示信息的解释请参见表1-3

1.1.8  display ip routing-table radix

【命令】

display ip routing-table radix

【视图】

任意视图

【参数】

【描述】

display ip routing-table radix命令用来查看以树的形式表示的路由表信息。

【举例】

<H3C> display ip routing-table radix

Radix tree for INET (2) inodes 2 routes 2:

 

                +--8+--{127.0.0.0

                   +-32+--{127.0.0.1

表1-4 display ip routing-table radix命令显示信息描述表

字段

描述

INET

地址族

inodes

节点数

routes

路由数

 

1.1.9  display ip routing-table statistics

【命令】

display ip routing-table statistics

【视图】

任意视图

【参数】

【描述】

display ip routing-table statistics命令用来查看路由的综合信息。

路由的综合信息包括路由总数目、active路由数目、添加的路由数目、打上deleted标志没有删除的路由。

【举例】

# 查看路由的综合信息。

<H3C> display ip routing-table statistics

Routing tables:

Proto     route     active      added       deleted

DIRECT     4           4           20          16

STATIC     2           2           2            0

RIP        0           0           0            0

OSPF       0           0           0            0

O_ASE      0           0           0            0

O_NSSA     0           0           0            0

Total      6           6           22          16

表1-5 display ip routing-table statistics命令显示信息描述表

字段

描述

Proto

路由协议

route

总的路由数目

active

活跃的、正在使用的路由数目

added

交换机启动后或在上一次清除路由表后,路由表中添加的路由数目

deleted

标记为删除的路由数目(此类路由在等待一段时间后会被释放)

Total

各类路由的汇总信息

 

1.1.10  display ip routing-table verbose

【命令】

display ip routing-table verbose

【视图】

任意视图

【参数】

【描述】

display ip routing-table verbose命令查看路由表的全部详细信息。

当带参数verbose时显示全部路由表的详细信息。先显示用于路由状态描述的符号,然后输出整个路由表的统计数字,最后依次输出每条路由的详细描述。

使用display ip routing-table verbose命令能查看到当前所有的路由,包括未激活的和无效的路由。

【举例】

# 查看路由表的全部详细信息。

<H3C> display ip routing-table verbose

Routing Tables:

  + = Active Route, - = Last Active, # = Both   * = Next hop in use

 

  Destinations: 2       Routes: 2

  Holddown: 0   Delete: 0       Hidden: 0

 

**Destination: 127.0.0.0        Mask: 255.0.0.0

        Protocol: #DIRECT       Preference: 0

        *NextHop: 127.0.0.1        Interface: 127.0.0.1(InLoopBack0)

        State: <NoAdvise Int ActiveU Retain Unicast>

        Age: 57:12      Cost: 0/0

 

**Destination: 127.0.0.1        Mask: 255.255.255.255

        Protocol: #DIRECT       Preference: 0

        *NextHop: 127.0.0.1        Interface: 127.0.0.1(InLoopBack0)

        State: <NotInstall NoAdvise Int ActiveU Retain Gateway Unicast>

        Age: 57:12      Cost: 0/0

先显示整个路由表的统计数据,然后依次输出每条路由的详细描述,如表1-6所示。

表1-6 display ip routing-table verbose命令显示信息描述表

字段

描述

Holddown

当前被Holddown的路由数目

Delete

当前被删除的路由数目

Hidden

当前被隐藏的路由数目

**Destination

目的地址

mask

掩码

Protocol

发现该路由的路由协议

Preference

路由的优先级

Cost

路由的度量值

NextHop

此路由的下一跳地址

Interface

出接口,即到该目的网段的数据包将从此接口发出

State

路由状态

Age

此路由在路由表中存在的时间

Cost

路由的度量值

 

1.1.11  interface Vlan-interface

【命令】

interface Vlan-interface vlan-id

undo interface Vlan-interface vlan-id

【视图】

系统视图

【参数】

vlan-id:管理VLAN接口的标识号,取值范围为1~4094。

【描述】

interface Vlan-interface命令用来创建并进入管理VLAN接口视图。undo interface Vlan-interface命令用来删除管理VLAN接口。

只有先创建对应vlan-id的VLAN,并将其设为管理VLAN后,才能创建并进入相应的管理VLAN接口视图。

需要注意的是:

交换机管理VLAN接口的vlan-id,应当与该交换机作为集群管理设备时使用management-vlan vlan-id命令配置的集群管理VLAN的vlan-id保持一致,否则配置的命令无法成功配置。

【举例】

# 创建并指定VLAN 10为管理VLAN,并进入管理VLAN 10的接口视图。

<H3C> system-view

System View: return to User View with Ctrl+Z.

[H3C] vlan 10

[H3C-vlan10] quit

[H3C] management-vlan 10

[H3C] interface Vlan-interface 10

[H3C-Vlan-interface10]

1.1.12  ip address

【命令】

ip address ip-address mask [ sub ]

undo ip address [ ip-address mask [ sub ] ]

【视图】

VLAN接口视图

【参数】

ip-address:管理VLAN接口的IP地址。

mask:管理VLAN接口IP地址的掩码,点分十进制格式或以整数形式表示的长度,当用整数形式时,取值范围为0~32。

sub:指定配置VLAN接口的从IP地址。

【描述】

ip address命令用来给管理VLAN接口指定IP地址和掩码。undo ip address命令用来删除管理VLAN接口的IP地址和掩码。

相关配置可参考命令display interface Vlan-interface

【举例】

# 为当前管理VLAN 1的接口指定IP地址和掩码。

<H3C> system-view

System View: return to User View with Ctrl+Z.

[H3C] interface Vlan-interface 1

[H3C-Vlan-interface1] ip address 192.168.0.39 255.255.255.0

1.1.13  ip route-static

【命令】

ip route-static ip-address mask { NULL null-interface-number | next-hop } [ preference preference-value ] [ reject | blackhole ] [ detect-group detect-group-id ] [ description text ]

undo ip route-static ip-address mask [ NULL null-interface-number | next-hop ] [ preference preference-value ]

【视图】

系统视图

【参数】

ip-address:目的IP地址,用点分十进制格式表示。

mask:IP地址掩码,点分十进制格式或以整数形式表示的长度,当用整数形式时,取值范围为0~32。

NULL null-interface-number:指定空接口。空接口是一种虚拟接口,到这个接口的数据包会被立即丢弃,能够减少系统的负荷。

next-hop:指定该路由的下一跳IP地址(点分十进制格式)。

preference-value:为该路由的优先级别,取值范围为1~255,缺省值位60。

reject:指明为不可达路由。

blackhole:指明为黑洞路由。

detect-group:为该路由指定Detect组。

detect-group-id: Detect组编号,取值范围1~25。

description text:静态路由描述信息,为包含1~60个字符的字符串。

【描述】

ip route-static命令用来配置静态路由。undo ip route-static命令用来删除静态路由配置。

缺省情况下,系统可以获取到去往与路由器直连的子网路由。在配置静态路由时如果不指定优先级,则采用缺省值60。到同一目的地址、下一跳相同、preference不同的两条静态路由是两条完全不同的路由,系统会优先选择preference值小(即优先级较高)的作为当前路由。如果没有指明rejectblackhole,则缺省为可达路由。

配置静态路由的注意事项:

l              静态路由的下一跳地址不能配置为本地交换机的VLAN接口地址。

l              当目的IP地址和掩码均为0.0.0.0时,就是配置的缺省路由。当查找路由表失败后,根据缺省路由进行包的转发。

相关配置可参考命令display ip routing-table

【举例】

# 配置缺省路由的下一跳为129.102.0.2。

<H3C> system-view

System View: return to User View with Ctrl+Z.

[H3C] ip route-static 0.0.0.0 0.0.0.0 129.102.0.2

1.1.14  management-vlan

【命令】

management-vlan vlan-id

undo management-vlan

【视图】

系统视图

【参数】

vlan-id:管理VLAN ID,取值范围为1~4094,缺省值为1。

【描述】

management-vlan命令设置管理VLAN。undo management-vlan命令用来将管理VLAN恢复为缺省值。

缺省情况下,VLAN 1为管理VLAN。

【举例】

# 设置管理VLAN为VLAN 2。

<H3C> system-view

System View: return to User View with Ctrl+Z.

[H3C] management-vlan 2

1.1.15  shutdown

【命令】

shutdown

undo shutdown

【视图】

VLAN接口视图

【参数】

【描述】

shutdown命令用来关闭管理VLAN接口。undo shutdown命令用来打开管理VLAN接口。

缺省情况下,当管理VLAN接口对应VLAN下的所有以太网端口状态为关闭时,管理VLAN接口为关闭状态;当管理VLAN接口对应VLAN下有一个或一个以上的以太网端口处于开启状态,VLAN接口处于开启状态。

【举例】

# 打开当前管理VLAN 1的接口。

<H3C> system-view

System View: return to User View with Ctrl+Z.

[H3C] interface Vlan-interface 1

[H3C-Vlan-interface1] undo shutdown

 


第2章  DHCP/BOOTP客户端配置

2.1  DHCP/BOOTP客户端配置命令

2.1.1  display bootp client

【命令】

display bootp client [ interface Vlan-interface vlan-id ]

【视图】

任意视图

【参数】

vlan-id:管理VLAN接口号。

【描述】

display bootp client命令用来显示BOOTP客户端的相关信息,包括BOOTP客户端的MAC地址和申请到的IP地址等信息。

【举例】

# 显示BOOTP客户端的相关信息。

<H3C> display bootp client interface Vlan-interface 1

Vlan-interface1:

Allocated IP: 169.254.0.2 255.255.0.0

Transaction ID = 0x3d8a7431

Mac Address  000f-e20a-c3ef

表2-1 display bootp client命令显示信息描述表

字段

描述

Vlan-interface1

管理VLAN接口1配置为通过BOOTP方式获取IP地址

Allocated IP

所分配到的IP地址

Transaction ID

BOOTP报文中XID字段值

Mac Address

BOOTP客户端的MAC地址

 

2.1.2  display dhcp client

【命令】

display dhcp client [ verbose ]

【视图】

任意视图

【参数】

verbose:显示DHCP Client端的地址分配的详细信息。

【描述】

display dhcp client命令用来显示DHCP Client端的地址分配信息。

需要注意的是:目前S3600I系列以太网交换机作为DHCP客户端,可以持续占用一个IP地址的最长时间为24天。也就是说,即使DHCP服务器端地址池的租约时间长于24天,DHCP客户端也只能获取24天的租期(Lease from…to)。

【举例】

# 显示DHCP Client的地址分配信息。

<H3C> display dhcp client verbose

DHCP client statistic infomation:

Vlan-interface1:

Current machine state: BOUND

Allocated IP: 169.254.0.2 255.255.0.0

Allocated lease: 86400 seconds, T1: 43200 seconds, T2: 75600 seconds

Lease from 2002.09.20 01:05:03   to   2002.09.21 01:05:03

Server IP: 169.254.0.1

Transaction ID = 0x3d8a7431

Default router: 2.2.2.2

Next timeout will happen after 0 days 11 hours 56 minutes 1 seconds.

表2-2 display dhcp client命令显示信息描述表

字段

描述

Vlan-interface1

client端进行动态获取IP地址的接口

Current machine state

client状态机状态

Allocated IP

client分配到IP地址

lease

租约时长

T1

Renewal定时器时长

T2

Rebinding定时器时长

Lease from….to….

租约起止时间

Server IP

选择的DHCP server地址

Transaction ID

事务标识

Default router

网关地址

 

2.1.3  ip address bootp-alloc

【命令】

ip address bootp-alloc

undo ip address bootp-alloc

【视图】

VLAN接口视图

【参数】

【描述】

ip address bootp-alloc命令用来配置VLAN接口通过BOOTP协议获取IP地址。undo ip address bootp-alloc命令用来取消VLAN接口通过BOOTP协议获取IP地址。

缺省情况下,VLAN接口不通过BOOTP协议获取IP地址。

相关配置可参考命令display bootp client

【举例】

# 配置当前管理VLAN 1的接口通过BOOTP协议获取IP地址。

<H3C> system-view

System View: return to User View with Ctrl+Z.

[H3C] interface Vlan-interface 1

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

2.1.4  ip address dhcp-alloc

【命令】

ip address dhcp-alloc

undo ip address dhcp-alloc

【视图】

VLAN接口视图

【参数】

【描述】

ip address dhcp-alloc命令用来配置VLAN接口通过DHCP方式获取IP地址。undo ip address dhcp-alloc命令用来取消VLAN接口通过DHCP方式获取IP地址。

缺省情况下,VLAN接口不通过DHCP方式获取IP地址。

【举例】

# 配置当前管理VLAN 1的接口通过DHCP方式获取IP地址。

<H3C> system-view

System View: return to User View with Ctrl+Z.

[H3C] interface Vlan-interface 1

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

 

 

不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!

新华三官网
联系我们