tcpip20250328.txt


(C) David Vajda
2025-03-28
TCP/IP Networking

ASCII Code

NUL     Nullzeichen
SOH     Start of Heading
STX     Start of Text
ETX     End of Text
EOT     End of Transmission
ETB     End of Transmission Block
LF      Line Feed
FF      Form Feed
HT      Horizontal Tab
VT      Vertical Tab
BS      Backspace
CR      Carriage Return
CAN     Cancel
DEL     Delete
DC1     Device Controll 1
..
DC4     Device Controll 4
ACK     Acknowlege
NAK     Not Acknowlege
SI      Shift In
SO      Shift Out

RS-232/CCITT-1

1 Startbit
1 oder 2 Stopbit
5, 6, 7, 8, 9 Data Bits
keine gerade ungerade Paritaet

baudrate: 1200, 2400

UBBR - USART Baud Rate Register
UBRRH, UBRRL
UCSRC, UCSRB, UCSRA - USART Controll and Status Register
UDR - USART Data Register

GND     Ground
TxD     Transmit Data
RxD     Recieve Data
CTS     Clear To Send
RTS     Ready To Send
DSR     Data Set Ready
DTR     Data Terminal Ready

TXEN - Transmit Enable
RXEN - Recieve Enable
UDRE - USART Data Register
UCSZ1, UCSZ0

Terminal: datenendgeraet
Modem: Datenuebertragungsgeraet

ACK/NAK-Protocoll
X-ON/X-OFF-Protocoll

Appliation Layer Ports
    15  Netstat
    20  FTP
    22  SSH
    25  SMTP
    53  DNS
    80  HTTP
    110 POP3
    143 IMAP
    586 SMTPS


TCP
    Source Port (2 Byte)
    Destination Port (2 Byte)
    Sequence Number (4 Byte)
    Acknowlegement Number (4 Byte)
    Data Offset (5 Bit) / reserved
    Flags
        ...

IP
    Source IP-Address (4 Byte)
    Destination IP-Address (4 Byte)
    TTL - Time To Live
    DSCP
    IHL


DNS records
    A       IPv4
    AAAA    IPv6
    TXT     Text Record
    PTR     Pointer Record
    MX      Mail e(X)change Record
    CNAME   Cannoical Name Record

iptables
    tables
    chains

    tables
        filter
        nat
        mangle
        raw
    chains
        INPUT
        PREROUTING
        FORWARD
        POSTROUTING
        OUTPUT

    -A  INPUT
        OUTPUT
        ...

    -j ACTION

    -j
        DROP
        REJECT
        ACCEPT
        LOG
        ...

    -p PROTOCOLL
        tcp/udp/icmp

    -s source address
    -d destination address

    -dport destination port
    -sport source port

ip ifconfig
route traceroute tracepath
netstat
ping