Компютърни Мрежи и GNU/Linux Боян Кроснов Мариян Маринов SiteGround LLC
2 План Преговор TCP и UDP протоколи Команди – TCP и UDP Демонстрация – IP Routing – VLAN configuration – Troubleshooting – Firewalls
3 Мрежова топология
4 Протоколи
5 Linux kernel networking stack
6 План Преговор TCP и UDP протоколи Команди – TCP и UDP Демонстрация – IP Routing – VLAN configuration – Troubleshooting – Firewalls
7 TCP и UDP протоколи UDP (RFC768 J.Postel 1980) – ports TCP (RFC793 J.Postel 1981) – Session establishment and tear-down – Window procedure – Slow start and congestion avoidance (VJ 1988) Berkeley sockets (1983) – The Berkeley socket API forms the de facto standard abstraction for network sockets. Most other programing languages use an interface similar to the C API. // wikipedia
8 Протоколи
UDP header | Source | Destination | | Port | Port | | | | | Length | Checksum | | | data octets User Datagram Header Format
TCP Header | Source Port | Destination Port | | Sequence Number | | Acknowledgment Number | | Data | |U|A|P|R|S|F| | | Offset| Reserved |R|C|S|S|Y|I| Window | | | |G|K|H|T|N|N| | | Checksum | Urgent Pointer | | Options | Padding | | data | TCP Header Format
11 Linux kernel networking stack
12 TCP state machine
IP Fragmentation, MTU, PMTU-D MTU concept TCP MSS DF (Don't Fragment) bit ICMP type 3 (destination unreachable), code 4 (fragmentation needed but don't-fragment bit set)
14 TCP и UDP команди telnet tcptraceroute netstat, fuser, lsof hping nc - TCP/IP swiss army knife /etc/services /etc/inetd.conf /etc/xinetd.d/ /etc/xinetd.conf
15 Q&A
16 План Преговор TCP и UDP протоколи Команди – TCP и UDP Демонстрация – IP Routing – VLAN configuration – Troubleshooting – Firewalls
17 Демонстрация
18 Demo setup
19
Linux router ip route zebra/quagga XORP, Vyatta
VLANs and Trunking IEEE 802.1q / 802.1p Принцип на работа Native(untagged) VLAN Tag Protocol ID (TPID) 0x bit priority, 12-bit VLAN ID
VLAN configuration vconfig /proc/net/vlan/config
iptables Netfilter firewall connection tracking filter, nat, mangle, raw