H3C S3100 Series Ethernet Switches command Manual-Release 21XX Series(V1.06)

HomeSupportSwitchesH3C S3100 Switch SeriesReference GuidesCommand ReferencesH3C S3100 Series Ethernet Switches command Manual-Release 21XX Series(V1.06)
05-Management VLAN Commands
Title Size Download
05-Management VLAN Commands 79.05 KB

Management VLAN Configuration Commands

delete static-routes all

Syntax

delete static-routes all

View

System view

Parameter

None

Description

Use the delete static-routes all command to delete all static routes.

The system will request your confirmation before it deletes all the configured static routes.

Related command: ip route-static and display ip routing-table.

Example

# Delete all the static routes in the router.

<Sysname> system-view

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

[Sysname] delete static-routes all

Are you sure to delete all the unicast static routes?[Y/N]y

display interface Vlan-interface

Syntax

display interface Vlan-interface [ vlan-id ]

View

Any view

Parameter

vlan-id: ID of the management VLAN interface the information about which is to be displayed.

Description

Use the display interface Vlan-interface command to display the information about the management VLAN interface.

Related command: interface Vlan-interface.

Example

# Display the information about the management VLAN interface. (Assume that VLAN 1 is the management VLAN.)

<Sysname> 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-e256-ae10

Internet Address is 192.168.0.39/24 Primary

Description : Vlan-interface1 Interface

The Maximum Transmit Unit is 1500

Table 1-1 Description on the fields of the display interface Vlan-interface command

Field

Description

Vlan-interface current state

Current state of Vlan-interface1

Line protocol current state

Current state of the link layer protocol

IP Sending Frames' Format

Format of the sent IP packets

Hardware address

MAC address corresponding to the management VLAN interface

Internet Address Primary

Primary IP address

Description

Description string assigned to the VLAN interface

The Maximum Transmit Unit

The maximum transmit unit (MTU)

 

display ip interface

Syntax

display ip interface [ Vlan-interface vlan-id ]

View

Any view

Parameter

vlan-id: ID of the management VLAN interface.

Description

Use the display ip interface command to display the information about a specified VLAN interface.

Example

# Display the information about VLAN-interface 1.

<Sysname> 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

Table 1-2 Description on the fields of the display ip interface command

Field

Description

Vlan-interface1 current state

Current state of Vlan-interface1

Line protocol current state

Current state of the link layer protocol

Internet Address

IP address

Broadcast address

Broadcast address

The Maximum Transmit Unit

The maximum transmit unit (MTU)

IP packets input number: 11790, bytes: 550920, multicasts: 3049

IP packets output number: 8374, bytes: 404537, multicasts: 0

Number of received/sent packets (total), bytes, and multicast packets.

TTL invalid packet number

Number of received packets with TTL errors

ICMP packet input number

Number of received ICMP messages

Echo reply

Echo replies

Unreachable

Unreachable messages

Source quench

Source quench messages

Routing redirect

Routing redirect messages

Echo request

Echo requests

Router advert

Router advertisements

Router solicit

Router solicit messages

Time exceed

Time exceed messages

IP header bad

IP header bad messages

Timestamp request

Timestamp requests

Timestamp reply

Timestamp replies

Information request

Information requests

Information reply

Information replies

Netmask request

Netmask requests

Netmask reply

Netmask replies

Unknown type

Messages with unknown type

 

display ip interface brief

Syntax

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

View

Any view

Parameter

vlan-id: ID of the management VLAN interface.

Description

Use the display ip interface brief command to display brief information about a specified VLAN interface.

Example

# Display brief information about VLAN-interface1.

<Sysname> display ip interface brief vlan-interface 1

*down: administratively down

(l): loopback

(s): spoofing

 Interface               IP Address     Physical Protocol     Description

 Vlan-interface1         192.168.0.39    up       up           Vlan-inte...

Table 1-3 Description on fields of the display ip interface brief command

Field

Description

*down

The interface is administratively shut down with the shutdown command.

(s)

Spoofing attribute of the interface. It indicates that the interface whose link layer protocol is displayed up may have no such a link present or the link is set up only on demand.

Interface

Interface name

IP Address

IP address of the interface (If no IP address is configured, “unassigned” is displayed.)

Physical

Physical state of the interface

Protocol

Link layer protocol state of the interface

Description

Description information for the interface

 

display ip routing-table

Syntax

display ip routing-table [ | { begin | exclude | include } regular-expression ]

View

Any view

Parameter

regular-expression: Regular expression, which specifies a match character string.

|: Uses the regular expression to match the output routing information.

begin: Displays the routing information from the route entry containing the specified character string.

include: Displays all routing information containing the specified character string.

exclude: Displays all routing information without the specified character string.

Description

Use the display ip routing-table command to display the summary information about the routing table.

This command displays the summary information about a routing table, with the items of a routing entry contained in one line. The information displayed includes destination IP address/mask length, protocol, preference, cost, next hop and outbound interface.

The display ip routing-table command only displays the routes currently in use, that is, the optimal routes.

Example

# Display the summary information about the routing table.

<Sysname> 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.1       InLoopBack0

Table 1-4 Description on the fields of the display ip routing-table command

Field

Description

Destination/Mask

Destination IP address/mask length

Protocol

Routing protocol that discovers the route

Pre

Route preference

Cost

Route cost

Nexthop

Next hop IP address of the route

Interface

Outbound interface, through which packets destined for the destination network segment are to be transmitted

 

display ip routing-table acl

Syntax

display ip routing-table acl acl-number [ verbose ]

View

Any view

Parameter

acl-number: Number of a basic access control list (ACL), in the range of 2000 to 2999.

verbose: Displays the detailed information about the active and inactive routes that match the specified ACL. If you do not specify this keyword, only the summary information about the active routes matching the specified ACL is displayed.

Description

Use the display ip routing-table acl command to display the routes that match a specified basic ACL.

As this command displays the routes that match a specified basic ACL, you can use it to trace routing policies.

Example

# Display the summary information about the active routes that match ACL 2000.

<Sysname> system-view

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

[Sysname] acl number 2000

[Sysname-acl-basic-2000] rule permit source 10.1.1.1 0.0.0.255

[Sysname-acl-basic-2000] rule deny source any

[Sysname-acl-basic-2000] display ip routing-table acl 2000

Routes matched by access-list 2000:

  Summary count: 1

Destination/Mask   Protocol Pre  Cost       Nexthop        Interface

10.1.1.0/24         STATIC   60   0            192.168.0.31    Vlan-interface1

Refer to Table 1-4 for the description on the output fields.

# Display the detailed information about the active and inactive routes that match ACL 2000.

[Sysname] display ip routing-table acl 2000 verbose

Routes matched by access-list 2000:

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

 

  Summary count: 1

 

**Destination: 10.1.1.0          Mask: 255.255.255.0

         Protocol: #STATIC       Preference: 60

         *NextHop: 192.168.0.31     Interface: 192.168.0.51(Vlan-interface1)

         State: <Int ActiveU Gateway Static Unicast>

         Age: 1:48:18            Cost: 0/0

Table 1-5 Description on the fields of the display ip routing-table acl command

Field

Description

Destination

Destination address

Mask

Mask

Protocol

Routing protocol that discovers the route

Preference

Route preference

NextHop

Next hop IP address

Interface

Outbound interface, through which packets destined for the destination network segment are to be transmitted

State

Descriptions on the route state are as follows:

ActiveU

Valid unicast route. “U” stands for unicast.

Blackhole

Blackhole route is the same as reject route except that a router drops a packet traveling along a blackhole route without sending ICMP unreachable messages to the source of the packets.

Delete

The route is deleted.

Gateway

The route is not a direct route.

Hidden

The route is a hidden route. The system hides routes that are temporarily unavailable for some reasons (such as the policy configured or the interface is down) for later use.

Holddown

The route is held down. Holddown is a kind of route advertisement policy used in some D-V (distance vector) routing protocols (such as RIP) to avoid the propagation of some incorrect routes and improve the transmission speed of route-unreachable information. For details, refer to corresponding routing protocols.

Int

The route is discovered by the internal gateway protocol (IGP).

NoAdvise

The route is not advertised when the router advertises routes based on policies

NotInstall

The route are not loaded to the core routing table but can be advertised. Normally, the routes with the highest preference in the routing table are loaded to the core routing table and are advertised.

Reject

The packets travel along the route will be dropped. Besides, the router sends ICMP unreachable messages to the source of the dropped packets. The Reject routes are usually used for network testing.

Retain

The route is not deleted when the routes in the core routing table are deleted. You can enable static routes to remain in the core routing table by configure them to be in retain state.

Static

Static routes configured manually on the router are marked as static. Such routes are not lost when you perform the save operation and then restart the router.

Unicast

The route is a unicast route.

Age

Time period during which the route is allowed to be in the routing table, in the form of hh:mm:ss.

Cost

Cost of the route

 

display ip routing-table ip-address

Syntax

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

View

Any view

Parameter

ip-address: Destination IP address, in dotted decimal notation.

mask: Mask of the destination IP address, which can be in dotted decimal notation or be an integer ranging from 0 to 32.

longer-match: Displays all the routes leading to the destination coupled with the default mask.

verbose: Displays the detailed information about the active and inactive routes leading to the destination. If this keyword is not specified, only the summary information about the active routes is displayed.

Description

Use the display ip routing-table ip-address command to display the information about the routes leading to a specified destination.

The output information of this command differs with the arguments/keywords specified as follows:

l          display ip routing-table ip-address

For the destination address ip-address, if there are some routes matched within the natural mask range, the active routes which best match ip-address are displayed.

l          display ip routing-table ip-address mask

Only the routes which match exactly the specified destination address and mask are displayed.

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

All routes with their destination addresses matched within the natural mask range are displayed.

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

All routes with their destination addresses matched within the specified mask range are displayed.

Example

# Display the summary information of the routes with their destination addresses matched within the natural mask range.

<Sysname> display ip routing-table 10.1.1.0

Destination/Mask   Protocol Pre  Cost        Nexthop       Interface

10.1.1.0/24          STATIC   60    0            192.168.0.31    Vlan-interface1

Refer to Table 1-4 for the description on the output fields.

# Display the detailed information of the routes with their destination addresses matched within the natural mask range.

<Sysname> display ip routing-table 10.1.1.0 verbose

 

Routing tables:

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

 

  Summary count: 1

 

**Destination: 10.1.1.0          Mask: 255.255.255.0

         Protocol: #STATIC       Preference: 60

         *NextHop: 192.168.0.31     Interface: 192.168.0.246(Vlan-interface1)

         State: <Int ActiveU Gateway Static Unicast>

         Age: 32:31              Cost: 0/0

Refer to Table 1-5 for the description on the output fields.

display ip routing-table ip-address1 ip-address2

Syntax

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

View

Any view

Parameter

ip-address1, ip-address2: Destination IP addresses in dotted decimal notation. ip-address1 and mask1, together with ip-address2 and mask2, determine an IP address range. The starting address of the IP address range is determined by the ip-address1 and mask1 arguments; and the end address of the IP address range is determined by the ip-address2 and mask2 arguments.

mask1, mask2: IP address masks. These two arguments can be in dotted decimal notation or two integers ranging from 0 to 32.

verbose: Displays the detailed information about the active and inactive routes. If you do not specify this keyword, only the summary information about the active routes is displayed.

Description

Use the display ip routing-table ip-address1 ip-address2 command to display the information about the routes with their destinations within the specified destination IP address range.

Example

# Display the information about the routes with their destinations within the range of 1.1.1.0 to 2.2.2.0.

<Sysname> 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

Refer to Table 1-4 for the description on the output fields.

display ip routing-table protocol

Syntax

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

View

Any view

Parameter

protocol: This argument can be one of the following:

l          direct: Displays the information about the direct routes.

l          static: Displays the information about the static routes.

inactive: Displays the information about the inactive routes. If you do not specify this keyword, the information about both active and inactive routes is displayed.

verbose: Displays the detailed route information. If you do not specify this keyword, only the summary route information is displayed.

Description

Use the display ip routing-table protocol command to display the information about specified type of routes.

Example

# Display the summary information about all the direct routes.

<Sysname> display ip routing-table protocol direct

DIRECT Routing tables:

  Summary count: 4

DIRECT Routing table status:<active>:

  Summary count: 4

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.1     InLoopBack0

192.168.0.0/24     DIRECT   0    0         192.168.0.246 Vlan-interface1

192.168.0.246/32   DIRECT   0    0         127.0.0.1     InLoopBack0

DIRECT Routing table status:<inactive>:

  Summary count: 0

# Display the summary information about the static routing table.

<Sysname> display ip routing-table protocol static

STATIC Routing tables:

  Summary count: 1

STATIC Routing table status:<active>:

  Summary count: 1

Destination/Mask  Protocol Pre  Cost        Nexthop        Interface

10.1.1.0/24       STATIC   60   0            192.168.0.31    Vlan-interface1

STATIC Routing table status:<inactive>:

  Summary count: 0

Refer to Table 1-4 for the description on the output fields.

display ip routing-table radix

Syntax

display ip routing-table radix

View

Any view

Parameter

None

Description

Use the display ip routing-table radix command to display the information about the routes in a routing table in a hierarchical way.

Example

# Display the information about the routes in a routing table in a hierarchical way.

<Sysname> display ip routing-table radix

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

 

                   +--8+--{127.0.0.0

                      +-32+--{127.0.0.1

Table 1-6 Description on the fields of the display ip routing-table radix command

Field

Description

INET

Address family

inodes

Number of nodes

routes

Number of routes

 

display ip routing-table statistics

Syntax

display ip routing-table statistics

View

Any view

Parameter

None

Description

Use the display ip routing-table statistics command to display the statistics of a routing table.

The statistics information displayed by this command includes:

l          The total number of the routes

l          The number of the active routes

l          The number of the added routes

l          The number of the routes with deleted flags

Example

# Display the statistics information about the routing table.

<Sysname> display ip routing-table statistics

Routing tables:

Proto      route       active      added       deleted

DIRECT     2            2          2           0

STATIC     0            0          0           0

Total      2            2          2           0

Table 1-7 Description on the fields of the display ip routing-table statistics command

Field

Description

Proto

Routing protocol

route

Total number of routes

active

Number of the active routes that are currently in use

added

Number of the routes that are added to the routing table after the switch starts or the routing table is cleared last time

deleted

Number of the routes with deleted flags (this type of routes will be removed after a period of time)

Total

Total numbers of various routes

 

display ip routing-table verbose

Syntax

display ip routing-table verbose

View

Any view

Parameter

None

Description

Use the display ip routing-table verbose command to display the detailed information about a routing table.

You can use this command to display all the routes, including the inactive and invalid routes.

Example

# Display the detailed information about the routing table.

<Sysname> 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

The statistics of the routing table are displayed first, and then the detailed descriptions of each route. Table 1-5 describes the route states and Table 1-8 describes the statistics information about the routing table.

Table 1-8 Description on the fields of the display ip routing-table verbose command

Field

Description

Holddown

Number of the routes that are held down

Delete

Number of the deleted routes

Hidden

Number of the hidden routes

 

interface Vlan-interface

Syntax

interface Vlan-interface vlan-id

undo interface Vlan-interface vlan-id

View

System view

Parameter

vlan-id: ID of the management VLAN, in the range of 1 to 4094.

Description

Use the interface Vlan-interface command to create a management VLAN interface and enter management VLAN interface view.

Use the undo interface Vlan-interface command to remove the management VLAN interface.

Before creating a management VLAN interface, make sure the VLAN identified by the vlan-id argument is created and is configured as the management VLAN.

Note that:

To create the VLAN interface for the management VLAN on a switch operating as the management device in a cluster, make sure the ID of the management VLAN is consistent with that of the cluster management VLAN, that is, the vlan-id argument in the management-vlan vlan-id command when you configure the cluster management VLAN. Otherwise, the configuration fails.

Example

# Create VLAN 10 and configure it as the management VLAN. Create VLAN 10 interface and enter VLAN 10 interface view.

<Sysname> system-view

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

[Sysname] vlan 10

[Sysname-vlan10] quit

[Sysname] management-vlan 10

[Sysname] interface Vlan-interface 10

[Sysname-Vlan-interface10]

ip address

Syntax

ip address ip-address mask

undo ip address [ ip-address mask ]

View

VLAN interface view

Parameter

ip-address: IP address to be assigned to the management VLAN interface.

mask: Mask of the IP address to be assigned to the management VLAN interface. The mask can be in dotted decimal notation or an integer in the range of 0 to 32.

Description

Use the ip address command to assign an IP address with the mask to a management VLAN interface.

Use the undo ip address command to remove the IP address assigned to a management VLAN interface.

Related command: display interface Vlan-interface.

Example

# Assign the IP address 192.168.0.51 (with the mask 255.255.255.0) to the management VLAN interface. (Assume that VLAN 1 is the management VLAN.)

<Sysname> system-view

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

[Sysname] interface Vlan-interface 1

[Sysname-Vlan-interface1] ip address 192.168.0.51 255.255.255.0

ip route-static

Syntax

ip route-static ip-address { mask | mask-length } { interface-type interface-number | next-hop } [ preference preference-value ] [ reject | blackhole ] [ description text ]

undo ip route-static ip-address { mask | mask-length } [ interface-type interface-number | next-hop ] [ preference preference-value ]

View

System view

Parameter

ip-address: Destination IP address, in dotted decimal notation.

mask: IP address mask, in dotted decimal notation.

mask-length: Mask length, in the range of 0 to 32.

interface-type interface-number: Next hop outgoing interface. Currently, you can specify a NULL interface only. A null interface is a virtual interface. Packets destined for a null interface are discarded, helping to reduce system load.

next-hop: IP address of the next hop of this route, in dotted decimal notation.

preference-value: Preference of this route, in the range of 1 to 255.

reject: Specifies the route as an unreachable route. When a static route destined for a destination address is of the reject attribute, all the IP packets destined for the destination address are discarded, and the source host is informed that the destination address is unreachable.

blackhole: Specifies the route as a black hole route. When a static route destined for a destination address is of the blackhole attribute, the outgoing interface of the route is Null 0 regardless of the next hop address. All the IP packets destined for the destination address are discarded, and the source host is not informed that the destination address is unreachable.

description text: Specifies a descriptive string for the static route. The text argument is a case-sensitive string of 1 to 60 characters (including the space).

Description

Use the ip route-static command to configure a static route.

Use the undo ip route-static command to remove a static route.

By default, the system can obtain the subnet route directly connected to the router. When you configure a static route, if no preference is specified for the route, the preference defaults to 60. Note that routes with the same destinations, the same next hops, but different preferences are different routes. Among these routes, the one with least preference (which means the highest preference) is chosen to be the current route. A route configured using the ip route-static command is a reachable route if neither of the reject and blackhole keywords is specified.

Note the following when configuring a static route:

l          The next hop address of a static route cannot be the VLAN interface address of the local switch.

l          A static route with both its destination IP address and mask both being 0.0.0.0 is the default route. When no matched entry is found in the routing table, a received packet is forwarded according to the default route.

Related command: display ip routing-table.

Example

# Configure the next hop of the default route as 129.102.0.2.

<Sysname> system-view

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

[Sysname] ip route-static 0.0.0.0 0.0.0.0 129.102.0.2

management-vlan

Syntax

management-vlan vlan-id

undo management-vlan

View

System view

Parameter

vlan-id: ID of the management VLAN, in the range of 1 to 4094.

Description

Use the management-vlan command to configure a VLAN as the management VLAN.

Use the undo management vlan command to restore the default.

VLAN 1 is the default management VLAN.

Example

# Configure VLAN 2 as the management VLAN.

<Sysname> system-view

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

[Sysname] management-vlan 2

reset ip routing-table statistics protocol

Syntax

reset ip routing-table statistics protocol { all | protocol }

View

User view

Parameter

all: Specifies all protocols.

protocol: Specifies a protocol, which can be static, or direct.

Description

Use the reset ip routing-table statistics protocol command to clear the statistics of routes in a routing table.

Example

# Before executing the reset ip routing-table statistics protocol command, use the display ip routing-table statistics command to display the routing statistics:

<Sysname> display ip routing-table statistics

Routing tables:

Proto      route       active      added       deleted

DIRECT     4           4           24          20

STATIC     0           0           1           1

Total      4           4           25          21

# Clear the routing statistics of all protocols from the IP routing table.

<Sysname> reset ip routing-table statistics protocol all

This will erase the specific routing counters information.

Are you sure?[Y/N]y

# Display the routing statistics in the IP routing table.

<Sysname> display ip routing-table statistics

Routing tables:

Proto      route       active      added       deleted

DIRECT     4           4           0           0

STATIC     0           0           0           0

Total      4           4           0           0

The above information shows that the routing statistics in the IP routing table is cleared.

 

  • 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
新华三官网