Displaying and maintaining ip addressing, Ip addressing configuration example, Network requirements – H3C Technologies H3C S12500 Series Switches User Manual

Page 36

Advertising
background image

22

must assign a primary IP address and a secondary IP address to the interface to enable the switch to

communicate with all hosts on the LAN.
Follow these guidelines when you assign an IP address to an interface:

An interface can have only one primary IP address. A newly configured primary IP address
overwrites the previous one.

The primary and secondary IP addresses of an interface can be located on the same network
segment, but different interfaces on your device must reside on different network segments.

To assign an IP address to an interface:

Step Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter interface view.

interface interface-type
interface-number

N/A

3.

Assign an IP address to
the interface.

ip address ip-address

{ mask-length | mask } [ sub ]

By default, no IP address is assigned.

Displaying and maintaining IP addressing

Task Command Remarks

Display IP configuration information
about the specified Layer 3 interface
or all Layer 3 interfaces.

display ip interface [ interface-type
interface-number
] [ | { begin | exclude |
include } regular-expression ]

Available in any view.

Display brief IP configuration
information about the specified Layer
3 interface or all Layer 3 interfaces.

display ip interface [ interface-type
[ interface-number ] ] brief [ description ]

[ | { begin | exclude | include }

regular-expression ]

Available in any view.

IP addressing configuration example

IMPORTANT:

By default, Ethernet, VLAN, and aggregate interfaces are down. To configure such an interface, bring the
interface up by executing the undo shutdown command.

Network requirements

As shown in

Figure 12

, the VLAN-interface 1 on a switch is connected to a LAN comprising two segments:

172.16.1.0/24 and 172.16.2.0/24.
To enable the hosts on the two network segments to access the external network through the switch, and

to enable the hosts on the two network segments to communicate with each other:

Assign a primary IP address and a secondary IP address to VLAN-interface 1 on the switch.

Set the primary IP address of the switch as the gateway of one host and the secondary IP address
as the gateway of the other host.

Advertising