The Linux TCP/IP Stack Networking for Embedded Systems

This course is provided by InfoSecure Open Systems & Solutions, LLC as part of our suite of training materials in open source technologies. It is a four day course including both instructional sessions and hands-on laboratory sessions. The main areas of emphasis are the internals of the Linux TCP/IP stack used in the Linux 2.4 and 2.6 kernels.
The course provides a practical hands-on approach. It presents both general networking protocols fundamentals and specific information about the Linux implementation of the protocol stack. It includes hands-on labs where students will learn to write Linux network interface drivers and add individual protocols and protocol families to the Linux TCP/IP stack. Copies of the book, the Linux TCP/IP Stack, Networking for Embedded Systems by Thomas F. Herbert will be provided to all students along with lecture and laboratory notes.
The course begins with a general background on networking protocols and continues with general information on the TCP/IP stack. Next, we discuss the structure of the stack and how it interfaces with the Linux OS. It covers network interface drivers and modules. Students will have the opportunity to construct network interface drivers and modules implementing key components of a network protocol stack.
Next, we will discuss the internal implementation of the components of TCP/IP. Linux socket implementation, the internals of the routing tables and ARP caches. Finally we will cover the IPv6 implementation in the Linux 2.6 kernel.
• Network Communication Protocols
• The OSI seven layer model
• Broadband Networking Protocols
In this session we will present the structure of some other protocol stacks in historical and current use such as X.25, FR and ATM and how each protocol is related to TCP/IP. The student will learn sufficient information about computer networking to see how TCP/IP relates to the rest of the networking world in an historical and technological context.
• TCP/IP and Embedded Systems
In this session we will cover the history and background of TCP/IP and explore other common implementations of TCP/IP used in embedded systems such as the BSD implementation. The student will learn enough about other implementation to see how they compare with Linux TCP/IP
• Networking Interface Drivers
We discuss the theory and structure of Linux Network Interface Drivers and how they interface to the Linux TCP/IP stack at the packet queuing layer and the socket layer.
• Linux Modules
• Implementing Protocols as Linux Modules
In the first part of this session, we will discuss how Linux modules are structured and how they are linked into the Linux kernel.
• Network Interface Drivers as Linux Modules
In the second part of the session on Linux modules, we will write a sample Linux Network Interface Driver.
• Network Interface Drivers and Modules Lab
In the lab, we will construct a sample Linux module that introduces a new protocol into Linux. We will show how to register a new protocol with an existing address family such as AF_INET and how to create a new address family. We will show how to register with a packet handler and a queuing discipline. We will show how to register with the Notifier Chains.
We will write a sample Linux driver that will receive packets for both the IP protocol and our new protocol.
• Structure of the Linux TCP/IP Stack
• Operating System Interface
In this part, we cover kernel threading and the kernel file system and how they are used by the TCP/IP stack.
• Layer interfaces, Transport Layer, Packet Queuing and Packet Handling Layers.
We will discuss packet handler glue and the packet handling layer. We will cover transport layer demultiplexing. We will discuss the caches used for neighbor discovery and IP routing, the neighbor cache and the destination cache and how these relate to the NDP, ARP and IP routing protocols.
• Linux Sockets
In this part of the course we will discuss the internal structure of the Linux sockets and how the socket API is implemented in Linux. We will also show how protocols register with the socket layer.
• Linux Socket API Lab
In this lab, students will implement a network application. Also students will see how to write a program to use sockets types such as socket options, NETLINK sockets and raw sockets to affect the way the internal TCP/IP behaves.
• The Network layer IP
The IP layer will be discussed in this section. We will show how packets are internally routed through the stack and how the IP layer receives from above and sends packets to protocol layers below.
• IP Routing
In this section, we will discuss the implementation of the Routing Policy Database, the Forwarding Information Base and how IP uses the route cache and destination cache.
• Linux Socket Buffers
In this section we will discuss the Linux Socket Buffer implementation. We will discuss buffer implementations and how to avoid fragmentation. We will contrast socket buffers with mbufs, the popular buffer implementation used in BSD TCP/IP. We will discuss the Linux slab cache implementation.
• The Transport Layer, UDP and TCP
The student will learn about the internals of the UDP and TCP transport layer protocols.
• TCP
In this section, we will show the internals of TCP, how it keeps track of connection state, the TCP timers and how TCP is tuned.
• Follow the Data
In this section, in order to better understand the internals of the OS, we will follow the data as it flows from the socket, through the UDP or TCP protocols, the IP layer and out the network interface.
• IPv6
In this section, the student will learn about the IPv6 implementation in the 2.6 kernel.
• IPv6 Addressing, Packet Format and Sockets
We will cover the IPv6 addressing scheme, the IPv6 packet formats and IPv6 sockets.
• IPv6 in Linux
In this section, we will show the internal implementation of IPv6 and where it differs from IPv4. We will cover requirements for device drivers and protocol implementers.
Back to Services.
|