Skip to content

Instantly share code, notes, and snippets.

@Merovius Merovius/01.txt
Last active Sep 14, 2017

Embed
What would you like to do?
Was ist eigentlich dieses "internet" von dem immer alle reden?
__ __ _ _ _ _ _ _ _ _ _
\ \ / /_ _ ___ (_)__| |_ ___(_)__ _ ___ _ _| |_| (_)__| |_ __| (_)___ ___ ___ ___
\ \/\/ / _` (_-< | (_-< _/ -_) / _` / -_) ' \ _| | / _| ' \ / _` | / -_|_-</ -_|_-<
\_/\_/\__,_/__/ |_/__/\__\___|_\__, \___|_||_\__|_|_\__|_||_| \__,_|_\___/__/\___/__/
|___/
_ _ ___ _ _ _ _ _ _
( | )_ _|_ _| |_ ___ _ _ _ _ ___| |_( | ) __ _____ _ _ __| |___ _ __ (_)_ __ _ __ ___ _ _
V V | || ' \ _/ -_) '_| ' \/ -_) _|V V \ V / _ \ ' \ / _` / -_) ' \ | | ' \| ' \/ -_) '_|
|___|_||_\__\___|_| |_||_\___|\__| \_/\___/_||_| \__,_\___|_|_|_| |_|_|_|_|_|_|_\___|_|
_ _ _ ___
__ _| | |___ _ _ ___ __| |___ _ _|__ \
/ _` | | / -_) | '_/ -_) _` / -_) ' \ /_/
\__,_|_|_\___| |_| \___\__,_\___|_||_(_)
c¼h 2017-08-31
Merovius
+------------------+
| 7. Application |
+------------------+
| 6. Presentation |
+------------------+
| 5. Session |
+------------------+
| 4. Transport |
Das OSI 7-layer Model: +------------------+
| 3. Network |
+------------------+
| 2. Data link |
+------------------+
| 1. Physical |
+------------------+
+---------------+
| Application | HTTP, SMTP, Jabber…
+---------------+
Das IP layer model: | Transport | UDP/TCP
+---------------+
| Internet | IPv{4,6}
+---------------+
| Link | Ethernet
+---------------+
+-------------------+ +-------------------+ +-------------------+
| Computer A | | Computer B | | Computer C |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
+-------------------+ +-------------------+ +-------------------+
…010101101101001000101000101011010101000101110…
+----------------------+----------------------+
| | |
| | |
+-------------------+ +-------------------+ +-------------------+
| Computer A | | Computer B | | Computer C |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
+-------------------+ +-------------------+ +-------------------+
…010101101101001000101000101011010101000101110…
+----------------------+----------------------+
| | |
| | |
+-------------------+ +-------------------+ +-------------------+
| Computer A | | Computer B | | Computer C |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
+-------------------+ +-------------------+ +-------------------+
Probleme:
* Wo fängt Kommunikation an, wo hört sie auf?
* Für wen sind Daten?
* Störungen/Interferenz/…
…010101101101001000101000101011010101000101110…
+----------------------+----------------------+
| | |
| | |
+-------------------+ +-------------------+ +-------------------+
| Computer A | | Computer B | | Computer C |
| | | | | |
| Ethernet: | | Ethernet: | | Ethernet: |
| 98:b8:20:ed:7c:80 | | 1b:67:60:4c:75:c8 | | 88:e0:0c:58:e2:28 |
| | | | | |
| | | | | |
| | | | | |
+-------------------+ +-------------------+ +-------------------+
Probleme:
* Wo fängt Kommunikation an, wo hört sie auf?
* Für wen sind Daten?
* Störungen/Interferenz/…
Ethernet frame:
+----------+---------+---------+--------+--------------+--------+---------+
| Preamble | MAC Dst | MAC Src | Type | Payload | CRC32 | Gap |
+----------+---------+---------+--------+--------------+--------+---------+
| 8 byte | 6 byte | 6 byte | 2 byte | 46-1500 byte | 4 byte | 12 byte |
+----------+---------+---------+--------+--------------+--------+---------+
| Passed to driver |
+-------------------------------------------+
.-~~~-.
.- ~ ~-( )_ _
/ ~ -.
+--| Internet \----+
| \ .' |
| ~- . _____________ . -~ |
+----------------------+ |
| | |
| | |
+-------------------+ +-------------------+ +-------------------+
| Computer A | | Computer B | | Computer C |
| | | | | |
| Ethernet: | | Ethernet: | | Ethernet: |
| 98:b8:20:ed:7c:80 | | 1b:67:60:4c:75:c8 | | 88:e0:0c:58:e2:28 |
| | | | | |
| | | | | |
| | | | | |
+-------------------+ +-------------------+ +-------------------+
Probleme:
* Routing: Wie kommen Daten von Computer A zu Computer B?
* Unterschiedliche Netzwerke unterwegs
.-~~~-.
.- ~ ~-( )_ _
/ ~ -.
+--| Internet \----+
| \ .' |
| ~- . _____________ . -~ |
+----------------------+ |
| | |
| | |
+-------------------+ +-------------------+ +-------------------+
| Computer A | | Computer B | | Computer C |
| | | | | |
| Ethernet: | | Ethernet: | | Ethernet: |
| 98:b8:20:ed:7c:80 | | 1b:67:60:4c:75:c8 | | 88:e0:0c:58:e2:28 |
| | | | | |
| IP: | | IP: | | |
| 138.38.88.156/16 | | 138.38.219.77/16 | | 233.244.59.95/24 |
+-------------------+ +-------------------+ +-------------------+
IPv4 Packet:
+---------------+---------------+---------------+---------------+
| 1 byte | 1 byte | 1 byte | 1 byte |
+---------------+---------------+---------------+---------------+
| Version+HL | Stuff | Total length |
+---------------+---------------+-------------------------------+
| Fragment ID | Flags + Fragment offset |
+---------------+---------------+-------------------------------+
| TTL | Protocol | Header checksum |
+---------------+---------------+-------------------------------+
| Source IP address |
+---------------------------------------------------------------+
| Destination IP address |
+---------------------------------------------------------------+
| [Options...] |
+---------------------------------------------------------------+
| Data... |
+---------------------------------------------------------------+
+-------------------+ +-------------------+
| Computer A | .-~~~-. | Computer B |
| | .- ~ ~-( )_ _ | |
| Firefox | / ~ -. | nginx |
| Thunderbird |---| Internet \--| postfix |
| RobustIRC-irssi | \ .' | RobustIRC |
| Jabber | ~- . _____________ . -~ | prosody |
| ssh | | sshd |
+-------------------+ +-------------------+
Probleme:
* Anwendungs-Addressierung
* Congestion
* Reliability
UDP TCP
+--------------+--------------+ +-----------------------+------------------+
| 2 byte | 2 byte | | 2 byte | 2 byte |
+--------------+--------------+ +-----------------------+------------------+
| Src Port | Dst Port | | Source Port | Destination Port |
+--------------+--------------+ +-----------------------+------------------+
| Length | Checksum | | Sequence number |
+-----------------------------+ +------------------------------------------+
| ACK number |
+-----------------------+------------------+
| Header length + flags | Window size |
+-----------------------+------------------+
| Checksum | Urgent offset |
+-----------------------+------------------+
| [Options…] |
+------------------------------------------+
| Data… |
+------------------------------------------+
HTTP (text-based)
GET / HTTP/1.1\r\n
Host: example.com\r\n
Content-Length: 0\r\n
Cookies: Foo=Bar\r\n
[<header>: <headerval>\r\n]...
\r\n
200 OK\r\n
Content-Type: text/html; utf-8\r\n
Content-Length: 123456\r\n
Transfer-Encoding: gzip\r\n
Set-Cookies: Foo=Baz\r\n
[<header>: <headerval>\r\n]...
\r\n
<html>
<head>
…………
+---------------+
| Application | HTTP, SMTP, Jabber…
+---------------+
Das IP layer model: | Transport | UDP/TCP
+---------------+
| Internet | IPv{4,6}
+---------------+
| Link | Ethernet
+---------------+
+---------------+
| Application | HTTP
+---------------+
| | TLS
+---------------+
HTTPS | Transport | UDP/TCP
+---------------+
| Internet | IPv{4,6}
+---------------+
| Link | Ethernet
+---------------+
+---------------+
| Application | DNS
+---------------+
DNS | Transport | UDP
+---------------+
| Internet | IPv{4,6}
+---------------+
| Link | Ethernet
+---------------+
+---------------+
| Application | SMTP
+---------------+
SMTP | Transport | TCP
+---------------+
| Internet | IPv{4,6}
+---------------+
| Link | Ethernet
+---------------+
+---------------+
| Application | SMTP
+---------------+
| | TLS
+---------------+
SMTPS | Transport | TCP
+---------------+
| Internet | IPv{4,6}
+---------------+
| Link | Ethernet
+---------------+
+---------------+
| Application | SMTP
+---------------+
| | TLS
+---------------+
| | SMTP
+---------------+
SMTP+Starttls | Transport | TCP
+---------------+
| Internet | IPv{4,6}
+---------------+
| Link | Ethernet
+---------------+
| Application | HTTP
+---------------+
| | TLS
+---------------+
| | TCP
+---------------+
| | IPv{4,6}
+---------------+
| | DTLS/TLS
+---------------+
VPN+HTTPS | Transport | UDP/TCP
+---------------+
| Internet | IPv{4,6}
+---------------+
| Link | Ethernet
+---------------+
| Application | HTTP
+---------------+
| | TLS
+---------------+
| | TLS
+---------------+
| | TLS
+---------------+
| | TLS
+---------------+
TOR+HTTP | Transport | TCP
+---------------+
| Internet | IPv{4,6}
+---------------+
| Link | Ethernet
+---------------+
______ _____ _ _
| ____|_ _| \ | |
| |__ | | | \| |
| __| | | | . ` |
| | _| |_| |\ |
|_| |_____|_| \_|
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.