Linux network techniques - General

  • transmits data on layer 3 of the osi model

OSI Layers
Figure 1. OSI Model Layers

IPv4 inside the TCP/IP Stack

Table 1. TCP/IP Protocol Stack

Layer

Protocol

Application

HTTP

IMAP

DNS

SNMP

Transport

TCP

UDP

Internet

IPv4, IPv6

Network Access

Ethernet, WLAN

logical address

Each host gets a unique address. The assignment is made automatically via DHCP (Dynamic Host Configuration Protocol) or by hand.

IPv4 Header

Each data packet has an IPv4/IPv6 header

Table 2. IPv4 Header

BIT

0-3

4-7

8-11

12-15

16-18

19-23

24-27

28-31

0-31

Version

IHL

Type of Service

total length

23-63

Identification

Flags

Fragment offset

64-95

TTL

Protocol

Header-Checksum

96-127

Source address

128-159

Destination address

160-256

Options

Data

IP routing

Ip routing controls the path of a data packet through the network. The routing protocols can be static or dynamic, e.g. OSPF - open shortest path first.

IP name resolution

Network addresses are based on the IPv4 addresses. IPv4 addresses consists of a 32 bit sequence. The dot-decimal notation is used to increase readability.

IPv6 Protocol

IPv6 is the further development of IPv4. The two are not compatible with each other. It was developed because the address range of IPv4 was no longer sufficient. An extension is necessary, especially for the public address range. The switchover is far from complete; ongoing process.

IPv5 was developed as streaming protocol but It has never gained any significance and is no longer used.

IPv4 and IPv6 can be used as a dual stack. They are not compatible, but can be operated in parallel and a network card can have IPv4 and IPv6.

Advantages of IPv6 are: * bigger range of addresses (~ 340 sextillionen) * a host can have several IPv6 addresses for different scopes of application * addresses can be configured automatically * multicasting is possible with special addresses * supports faster routing; because of a smaler header * enables point to point encryption with IPsec * provides quality of service * data package lenght up to 4GB

IPv6 Multicast: The multicast addresses of IPv6 include network nodes and network services together in multicast groups. Each group is accessible via its own address. These groups can be assigned by a host itself and it can respond to packets addressed with the corresponding multicast address.

IPv4 vs. IPv6

Table 3. Comparission between IPv4 and IPv6

IPv4

IPv6

Introduced

1981

1999

Address lenght

32bit

128bit

Address fromat

Point-Decimal-Notation: 192.168.178.1

Hexadecimal Notation: 2FeA:F188:1524:BB10:2348:7340:B530:AABE

Prefix

192.168.0.0/24

2FeA:F188:1524::/48

Address range

2 32

2128

IPv4 Classes and ranges

Table 4. IPv4 classes and ranges

Address class

Value in first octet

Classful Mask (dotted decimal)

Classful Mask (prefix notation)

A

1-126

255.0.0.0

/8

B

128-191

255.255.0.0

/16

C

192-223

255.255.255.0

/24

D

224-239

N/A

N/A

E

240-255

N/A

N/A

D - multicast
E - tests only

Ranges

Private address range in class A
Address class: A
Address range: 10.0.0.0 - 10.255.255.255
Default subnet mask: 255.0.0.0

Private address range in class B
Address class: B
Address range: 172.16.0.0-172.31.255.255
Default subnet mask: 255.255.0.0

Automated private IP adressing range in class B
Address class: B
Address range: 169.254.0.0-169.254.255.255
Default subnet mask: 255.255.0.0

Private address range in class C
Address class: C
Address range: 192.168.0.0-192.168.255.255
Default subnet mask: 255.255.255.0

Table 5. Asignable addresses in each class

Address class

Assignable IP addresses

A

16.777.214 (224-2)

B

65.534 (216-2)

C

254 (28-2)

Classless interdomain routing means the use of a class C subnet mask ( 254 possible addresses) on a class B IP address (with originally 65,534 addresses).

Next page: Useful commands