beautypg.com

Assigning ip addresses – Wavetronix Click 342 (lean managed ethernet switch) (CLK-342) - Managed Switches User Guide User Manual

Page 16

background image

CHAPTER 1 • CLICK 340/341/342 MANAGED SWITCHES

15

switch.

Assigning IP Addresses

The IP address is a 32-bit address, which consists of a network part and a user part. The

network part consists of the network class and the network address (see Figure 2.1).

Figure 2.1 – Position of Bits Within the IP Address

There are currently five defined network classes; Classes A, B and C are used in modern

applications, while Classes D and E are used rarely. It is therefore usually sufficient if a net-

work device only recognizes Classes A, B and C.

With binary representation of the IP address the network class is represented by the first

bits. The key factor is the number of “ones” before the first “zero.” The assignment of classes

is shown in the following table (see Table 2.1). The empty cells in the table are not relevant

to the network class and are already used for the network address.

Bit 1

Bit 2

Bit 3

Bit 4

Bit 5

Class A

0

Class B

1

0

Class C

1

1

0

Class D

1

1

1

0

Class E

1

1

1

1

0

Table 2.1 – Assignment of Classes

The bits for the network class are followed by those for the network address and the user ad-

dress (see Table 2.2). Depending on the network class, a different number of bits are avail-

able, both for the network address (network ID) and the user address (host ID).

Network ID

Host ID

Class A

7 bits

24 bits

Class B

14 bits

16 bits

Class C

21 bits

8 bits

Class D

28-bit multicast identifier

Class E

27 bits (reserved)

Table 2.2 – Bits for the Network and User Addresses