yer receives the data. This is called demultiplexing.
The de facto standard for TCP/IP implementations is the one from the computer systems research group at the University of California at Berkeley. Historically this has been distributed with the 4.x BSD system (Berkeley Software Distribution), and with the "BSD networking releases."
Two popular application programming interfaces (APIs) for applications using the TCP/IP protocols are called sockets and TLI (transport layer interface). The former is sometimes called "Berkeley sockets,".
Chapter 2: Link Layer
The loopback interface allows a client and a server on the same host to communicate with each other using TCP/IP.
MTU refers to the maximum transmission unit: the limit on the size of the frame for encapsulation. Path MTU refers to the maximum of the network.
netstat -in provides information on the interfaces on the system.
Chapter 3: Internet Protocol (IP)
All TCP, UDP, ICMP, and IGMP data gets transmitted as IP datagrams.
IP provides an unreliable, connectionless datagram delivery service.
Unreliable: it does not guarantee successful delivery of an IP datagram, rather IP provides a best effort service. Any required reliability must be provided by a higher layer, for example TCP.
Connectionless: IP does not contain state information about successive datagrams. Datagrams can be delivered out of order.
IP uses big endian byte ordering (also called network byte ordering). Systems that use little endian byte ordering must convert header values into big endian or network byte order before transmitting data.
IP routing is simple, especially for a host. If the destination is directly connected to the host (e.g., a point-to-point link) or on a shared network (e.g., Ethernet or token ring), then the IP datagram is sent directly to the destination. Otherwise the host sends the datagram to a default router, and lets the router deliver the datagram to its destination.
The IP layer has a routing table in memory that it searches each time it receives a datagram to send. When a datagram is received from a network interface, IP first checks if the destination IP address is one of its own IP addresses or an IP broadcast address. If so, the datagram is delivered to the protocol module specified by the protocol field in the IP header. If the datagram is not destined for this IP layer, then (1) if the IP layer was configured to act as a router the packet is forwarded (that is, handled as an outgoing datagram as described below), else (2) the datagram is silently discarded.
A host address has a nonzero host ID and identifies one particular host. a network address has a host ID of 0 and identifies all the hosts on that network (e.g., Ethernet, token ring).
All hosts are now required to support subnet addressing. Instead of considering an IP address as just a network ID and host ID, the host ID portion is divided into a subnet ID and a host ID.
The ability to specify a route to a network, and not have to specify a route to every host, is another fundamental feature of IP routing.
A different link-layer header can be used on each link, and the link-layer destination address (if present) always contains the link-layer address of the next hop. Ethernet addresses are normally obtained using Address Resolution Protocol (ARP).
All hosts are now required to support subnet addressing. The host ID portion of the IP address is divided into a subnet ID and a host ID. Whether to subnet or not (after obtaining IP network ID of certain class from the internet) is up to the systems administration.
A subnet mask specifies at boot time how many bits are to be used for the subnet ID and how many bits are for the host ID.
ifconfig to configure or query a network interface for use by TCP/IP.
netstat provides information about the interfaces on the system.
-i for interface information,
-n to print IP addresses instead of hostnames.
Chapter 4: Address Resolution Protocol (ARP)
IP addresses are only relevant to the TCP/IP suite. The link layer has its own addressing scheme, which can be used at the same time as