SO/OSI Model and TCP/IP Model
The International Standard Organization’s Open System Interconnect (ISO/OSI) is the standard model for networking protocols and distributed applications. This model defines seven network layers.
Layer 1 – Physical
The physical layer defines the cable, or physical, medium itself, e.g. thinnet, thicknet, unshielded twisted pairs (UTP). All media are functionally equivalent. The main difference is the convenience and cost of installation and maintenance. Converters from one media to another work on this layer.
Layer 2 – Data Link
The data link layer defines the format of data on the network. A network data frame (or packet) includes checksum, source and destination address, and data. The largest packet which can be sent through a data link layer defines the Maximum Transmission Unit (MTU).
The data link layer handles the physical and logical connection to the packet’s destination, using a network interface. A host connected to an Ethernet handles connections to the outside world with an Ethernet interface; a loopback interface sends the packets to itself.
Ethernet addresses a host using 48-bit Ethernet address, or Media Access Control (MAC) address. They are usually represented as six, colon-separated pairs of hex digits, e.g. 8:0:20:11:ac:85. This number is associated with a particular Ethernet device. Hosts with multiple network interfaces should not use the same MAC address on each network.
The protocol-specific header of the data link layer specifies the MAC address of the source and destination of the data packet. When a packet is broadcasted to all hosts, a special MAC address (ff:ff:ff:ff:ff:ff) is used.
The data link layer also operates switches and bridges.
WebMux has a transparent mode, which works on this network layer.
Layer 3 – Network
Internet Protocol (IP) is responsible for routing directing datagrams from one network to another. The network layer may have to break large datagrams, i.e. larger than the MTU, into smaller packets to transmit; the receiving host will have to reassemble the datagram. NFS, for example, uses IP as its network layer interface.
IP identifies each host with a 32-bit IP address, written as four, dot-separated numbers between 0 and 255 (e.g. 18.104.22.168). The first through third bytes could be used to identify the network; the remaining byte identify the host. For example, the network identifier could be assigned by InterNIC Registration Services, under contract by the National Science Foundation; the host identifier could be assigned by the local network administrators locally by Indiana University. For large, subnetted sites, the first two bytes identify the network, while the third identifies the subnet, and the fourth the host.
Even though IP packets are designated with IP addresses, the data cannot be transported from host to host without using hardware addresses. The Address Resolution Protocol (ARP) maps the IP address to its hardware address.
In recent years, there has been an IP address shortage. IPv6 proposed a new format, which can take the form:
WebMux supports both IPv4 and IPv6 address spaces.
Layer 4 – Transport
The transport layer subdivides user-buffer datagrams into network-buffer sized datagrams, and enforces desired transmission control. Two transport protocols, Transmission Control Protocol (TCP) and User Datagram Protocol (UDP), sit at this layer.
The main differences between the protocols are reliability and speed.
TCP establishes connections between two hosts on the network through “sockets,” determined by the IP address and port number. TCP keeps track of the order of packet delivery, and which packets must be resent. Maintaining this information for each connection makes TCP a stateful protocol. UDP provides a low-overhead transmission service, but this comes with less error checking. NFS is built on UDP, because of its speed and statelessness (which simplifies the crash recovery).
Load-balancing based in the transport layer can handle TCP/IP and UDP/IP. WebMux may also depend on higher layer functions when working in this layer. For example, if it is supporting passive FTP load balancing, WebMux monitors the data packets going back and forth, and decodes the data to determine the passive communication high ports.
Layer 5 – Session
The session protocol defines the format of the data sent over the connections.
The NFS uses Remote Procedure Call (RPC), which may be built on TCP or UDP.
Login sessions use TCP, whereas NFS and broadcast use UDP.
WebMux uses some session information to determine the best method for load balancing the traffic.
Layer 6 – Presentation
The presentation layer holds External Data Representation (XDR), which converts the local representation of data to its canonical representation, and vice versa. The canonical representation uses standard conventions for byte orders and structure packing, which are independent of the host.
Layer 7 – Application
The application layer provides network services to the end users. These services include HTTP, HTTPS, Mail, ftp, telnet, DNS, NIS, NFS.
WebMux has extended features to support Layer 7 traffic management. These features allow WebMux to redirect users based on rules the administrator set. Most of the features are related to HTTP. For HTTPS traffic, enable WebMux’s SSL acceleration feature to terminate HTTPS traffic into HTTP traffic. In HTTP, there is a MIME header, which WebMux can examine to redirect the traffic. Based on the rules for the URL or for the cookies, WebMux will either send the user to a new server, or remain on the current one.
TCP/IP Network Model
Although the OSI model is widely used, and is often cited as standard, most Unix workstation vendors use the TCP/IP model. This model is designed around a simple four-layer scheme, instead of seven layers. While it does omit some features found under the OSI model, the TCP/IP model combines features from adjacent layers in the OSI model and splits other layers apart.
Layer 1 – Link
This layer defines the network hardware and device drivers.
Layer 2 – Network
This layer is used for basic communication, addressing, and routing. TCP/IP uses IP and ICMP at this layer.
Layer 3 – Transport
This layer handles communication among programs on a network. TCP and UDP fall into this layer.
Layer 4 – Application
End-user applications reside at this layer. Commonly used applications include HTTP, HTTPS, NFS, DNS, arp, rlogin, talk, ftp, tmp, and traceroute.
Please note that WebMux layers are not based on this section.