User Tools

Site Tools


doc:networking:theory

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
doc:networking:theory [2012/12/02 02:44]
uvray313
doc:networking:theory [2014/08/31 17:47] (current)
spriver
Line 1: Line 1:
 +====== Theorie ======
 +
 +===== Netzwerke =====
 +
 +==== ... is packet based ====
 +Information (data) is broken into [[/​doc/​howto/​packet.scheduler/​packet.scheduler.theory#​packets|packets]] prior to being transported to their destination(s).
 +
 +**Example:​**\\
 +  * [[wp>​Ethernet]] (see [[wp>​IEEE 802]] for even more standards) is a huge and successful family of modular //​communication protocols//,​ [[wp>​Fast Ethernet]] comprises the ones that have a gross throughput ([[wp>​Data signaling rate]]) of 100MBit/s and [[wp>​100BASE-TX]] is one distinct example, one specific standard.
 +    * [[wp>​Ethernet frame]] is the denomination for data chunk, a packet transmitted over Ethernet. This is common for all Ethernet standards, whereas the cabling, the encoding and other stuff is not. Depending on the wiring [[wp>​Carrier sense multiple access with collision detection|CSMA/​CD]] could be avoided.
 +    * //As you can see, this layer, has very technical aspects, and also some theoretical,​ logical or software aspects.//
 +
 +
 +==== ... is layer based ====
 +The [[wp>OSI model]] outlines the various layers that data must traverse on it's journey from its source to its destination(s).
 +
 +Each layer has it's own set of rules (protocols) for handling data packets and adds or removes it's own header (and sometimes a footer) before passing data packets to the next layer. It treats each packet, with or without formatting from other layers, as a simple payload, ignoring it's contents. ​ This process is referred to as [[wp>​Encapsulation_(networking)|encapsulation]].
 +
 +The software and hardware associated with each individual layer is not concerned with, and in fact, not even aware of what happens to the packets in the other layers. ​ It's only function is to format the packets it receives from the layer above or below in a predictable fashion. ​ In this way a very complex process is broken down into a series of simple steps which allows all kinds of different technologies to simply and reliably interact with one another. ​
 +
 +  * [[http://​www.routemybrain.com/​wp-content/​uploads/​2010/​04/​encapsulation.jpg|Encapsulation]]
 +  * [[http://​upload.wikimedia.org/​wikipedia/​commons/​3/​37/​Netfilter-packet-flow.svg|Detailed abstract data flow NOT through the layers in one host]]
 +  * [[http://​www.infocellar.com/​networks/​images/​osi.gif|Data flow through OSI layers]]
 + 
 +The //physical layer// always concerns itself with the medium the signal traverses through (or over) while the //link layer// could be split into two sub-layers: //​[[wp>​Media Access Control]]// and //​[[wp>​Logical Link Control]]//​. ​ The [[wp>​Media Independent Interface]] is again something different, this is used to connect the distinct switch-chip to the SoC.
 +
 +How big a packet is, and how it's header looks like depends on the protocol or standard it abides by. Read about this:   , [[wp>IP packet]], for an overview. For real precise technical data, read the corresponding RFCs.
 +
 + These protocols, in turn, 
 +
 +==== Packet Structure ====
 +^ Protocol ^ Header Size in Bytes ^ Total Size in Bytes ^
 +| [[wp>​Ethernet frame]] ​                              ​| ​ 38–42 ​  | Size: 84–1542Bytes,​ with [[wp>​Jumbo frame]] up to 9042  |
 +| [[wp>​IEEE 802.11]] ​                                 |  ???     ​| ​ ????  |
 +| [[http://​www.cisco.com/​web/​about/​ac123/​ac147/​images/​ipj/​ipj_11-4/​114_wireless-fig1b_lg.gif|Cisco Picture]] [[http://​spacehopper.org/​mirrors/​www.geocities.com/​backgndtest/​wlan_mac_frame.jpg|WLAN mac mode]] ​ [[http://​wireless.agilent.com/​wireless/​helpfiles/​n7617b/​ppduframeb_2.gif|PPDU Frame]] ​ |||
 +| [[wp>​IPv4#​Packet_structure|IPv4 Packet Structure]] ​ |  20–60 ​  ​| ​ Size: 20– (20-byte header + 0 bytes data) 65.535 ​ |
 +| [[wp>​IPv6 packet|IPv6 Packet Structure]] ​           |  40 fixed, Optional Extension Header possible ​ |  up to 65.535 ​ |
 +| [[wp>​Transmission_Control_Protocol#​TCP_segment_structure|TCP Segment Structure]] ​ |  20–60 ​ |  up to 65.535 ​ |
 +| [[wp>/​User_Datagram_Protocol#​Packet_structure|UDP Packet Structure]] ​ |  4–8 with IPv4 and 6–8 with IPv6  |  up to 65.535 ​ |
 +
 +Please see [[wp>​Maximum transmission unit|MTU]]
 +
 +^Ethernet |  Preamble ​ |  Start of frame delimiter ​ |  MAC dest  |  MAC source ​ |  802.1Q tag (opt.) ​ |  Ethertype or length ​ |  **Payload** ​ ||||||||||||||||||||||||||| CRC  |  Interframe gap  |
 +^ Octets |  7  |  1  |  6  |  6  |  4  |  2  |  **46–1500** ​ ||||||||||||||||||||||||||| ​ 4  |  12  |
 +^ IPv4 |     ​| ​    ​| ​    ​| ​    ​| ​    ​| ​    ​| ​ Version ​ |  Header Length ​ |  Differentiated Services Code Point  |  Explicit Congestion Notification ​ |  Total Length ​ |  Identification ​ |  Flags  |  Fragment Offset ​ |  Time to Live  |  Protocol ​ |  Header Checksum ​ |  Source IP Address ​ |  Destination IP Address ​ |  Options ( if Header Length > 5 )  |  **Payload** ​ ||||||||||||| ​ |  |
 +^ Bits | | | | | | |  4  |  4  |  6  |  2  |  16  |  16  |  3  |  13  |  8  |  8  |  16  |  32  |  32  |  ?  |  1440-1480Bytes ​ ||||||||||||| | |
 +^ TCP | | | | | | | | | | | | | | | | | | | | |  Source port  |  Destination port  |  Sequence number ​ |  Acknowledgment number ​ |  Data offset ​ |  Reserved ​ |  Flag  |  Window Size  |  Checksum ​ |  Urgent pointer ​ |  Options (if Data Offset > 5)  |  padding ​ |  **Payload** ​ | | |
 +^ Bits | | | | | | | | | | | | | | | | | | | | |  16  |  16  |  32  |  32  |  4  |  4  |  8  |  16  |  16  |  16  |  Options (if Data Offset > 5)  |  8  |  **Payload** ​ | | |
 +
 +Please note, that the Ethernet protocol family comprises standards of Layer 2 and also Layer 1. The latter are e.g. 100Base-TX or 1000Base-T. [[wp>​Point-to-Point Protocol over Ethernet|PPPoE]] is yet another Layer 2 communication protocol! And DSL is another Layer 1 communication protocol. So the Modem on the customers side communicates over some DSL-protocol with the [[wp>​DSLAM]] on the ISP side and the router communicates with the [[wp>​Broadband Remote Access Server|DSL-AC]] over PPPoE.
 +
 +Being Layer 1 protocols, 1000Base-T or DSL don't care about packets or whatever. Their logic is only concerned with transmitting the data over the specified medium.
 +
 +==== Networking Protocols ====
 +=== Layer1 and Layer2 ===
 +  * [[wp>​Ethernet]]
 +    * [[wp>​Point-to-Point Protocol over Ethernet|PPPoE]]
 +  * [[wp>​Asynchronous Transfer Mode|ATM]]
 +    * [[wp>​Point-to-Point Protocol over ATM|PPPoA]]
 +  * [[wp>​IEEE 802.11]]