IPv4 Address
- networks in an internetwork need a unique way of identifying each logical network and host
- at Data Link layer: MAC address
- only for local delivery of frames
- at Network layer: IP address
- used to forward packets
- at Data Link layer: MAC address
- IP address provides 2 pieces of info:
- network number (Network ID)
- common to all hosts on the same IP network
- host number (Host ID)
- identifies a host within an IP network
- network number (Network ID)
32-bit IPv4 Addressing
- IPv4 address is 32 bits long
- raw form:
11000110001100110110010000000001 - subdivided into four group of 8 bits (1 byte)
- called octets
- raw form grouped:
11000110 00110011 01100100 00000001
- raw form:
- to make IP address easier to use, it is formatted using dotted decimal notation
- requires each octet to be converted to a decimal value
- separated by a period
- decimal value:
198.51.100.1

Binary-Decimal Conversion
Examples demonstrating binary to decimal conversion:
- in base 2 (binary) digits are either 0 or 1
- values are powers of 2:
- memorize these values to perform binary/decimal conversions using columnar method
- values are powers of 2:
Convert Binary to Decimal
11000110represented in base 2
- the first two rows shows the place value of each digit
- third row shows the binary octet
- fourth and fifth row show that where there is a 1 in the octet, the decimal place value is added to the sum
Convert Decimal to Binary
Convert
to binary:
- if all bits in an octet are set to 1, then = 255
- an IPv4 address can be any number from
0.0.0.0to255.255.255.255- some addresses are not permitted
- some are reserved for special use

