4. Networking - RIT-Launch-Initiative/Liftoff-Project GitHub Wiki
Intro to Networking
Networking is a concept extremely important in launch software. A lot of our avionics infrastructure is networking based. Our flight computer modules communicate with each other over Ethernet. Our ground software listens on a network for telemetry data. Although there are no exercises for this chapter, it is good for you to have some context on networking. There are two models that describe the layers of computer networking.
OSI Model
The OSI model is the first model developed to describe networking. It involves seven layers including the Application, Presentation, Session, Transport, Network, Data Link and Physical Layer.
TCP/IP Model
The TCP/IP model is a more modern model that describes networking. It is more concise, with only four layers being described known as the Appication, Transport, Internet and Network Layers. Some of these layers make up multiple layers of the OSI model.
Layer Breakdown
To be unbiased, this is a breakdown with a mix of layers from both models.
Application Layer (Layer 5+)
The application layer is an abstraction layer over the bottom layers to present data that the user would be seeing. This can include HTTP/HTTPS, FTP and SSH. Most of our networking software development will not include this layer.
Transport Layer (Layer 4)
The transport link layer coordinates the transfer of data between nodes. It is responsible for ensuring data is sent and received accurately. The most well known protocols at this layer include TCP, UDP, etc. All of our software utilizes UDP and is part of how our flight computer modules communicate with each other. UDP is faster, more efficient and simpler to implement than TCP which is the reasoning behind using UDP. In TCP, lost packets can be retransmitted, but since our critical communications are wired, it is highly unlikely for packets to be lost.
Network Layer (Layer 3)
The Internet Layer is responsible for routing data packets to other devices across a network by assigning unique identifiers to each device known as an IP address and determining the route for data to travel. It passes outgoing packets to the appropriate link layer and incoming packets to the appropriate transport layer. The main protocols are IPv4 and IPv6. ICMP is another protocol, commonly used for diagnostics and error reporting.
Link Layer (Layer 2)
The data link layer is responsible for transferring data between nodes connected to a physical link. It handles the framing of source and destination addresses, and error detection. This composes a frame header utilized by other nodes on the receiving end to process it accordingly. Example protocols commonly used include Ethernet and 802.11. The backplane flight computer and most of the ground station infrastructure uses Ethernet.
Physical Layer (Layer 1)
The physical layer is the physical connection between two devices. It translates data from the higher level layers to electrical signals to other nodes. Ethernet is also part of this layer too!