Configuring ip addresses, Assigning an ip address to an interface, Ip addressing configuration example – H3C Technologies H3C SecBlade NetStream Cards User Manual

Page 82: Network requirements

Advertising
background image

67

With subnetting: Using the first 9 bits of the host-id for subnetting provides 512 (2

9

) subnets.

However, only 7 bits remain available for the host ID. This allows 126 (2

7

– 2) hosts in each subnet,

a total of 64,512 hosts (512 × 126).

Configuring IP addresses

An interface must have an IP address to communicate with other hosts. You can either manually assign

an IP address to an interface, or configure the interface to obtain an IP address through BOOTP, DHCP,
or PPP address negotiation. If you change the way an interface obtains an IP address, the new IP address

will overwrite the previous one.

Assigning an IP address to an interface

You may assign an interface multiple IP addresses, one primary and multiple secondaries.
Generally, you only need to assign the primary address to an interface. In some cases, you need to

assign secondary IP addresses to the interface. For example, if the interface connects to two subnets, to
enable the device to communicate with all hosts on the LAN, you need to assign a primary IP address

and a secondary IP address to the interface.
Follow these steps to assign an IP address to an interface:

To do…

Use the command…

Remarks

Enter system view

system-view

––

Enter interface view

interface interface-type
interface-number

––

Assign an IP address to the
interface

ip address ip-address { mask-length
| mask } [ sub ]

Required
No IP address is assigned by default.

CAUTION:

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

You cannot assign secondary IP addresses to an interface that obtains an IP address through BOOTP,
DHCP, or PPP address negotiation.

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

IP addressing configuration example

Network requirements

As shown in

Figure 24

, GigabitEthernet 0/2 on the SecBlade 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 communicate with the external network through the

SecBlade, and to enable the hosts on the LAN can communicate with each other,

Assign a primary IP address and a secondary IP address to GigabitEthernet 0/2 on the SecBlade.

Set the primary IP address of the SecBlade as the gateway address of the PCs on subnet
172.16.1.0/24, and the secondary IP address of the SecBlade as the gateway address of the PCs on

subnet 172.16.2.0/24.

Advertising