Moreno Baricevic CNR-IOM DEMOCRITOS Trieste, ITALY INTRO TO INTRO TO NETWORKING NETWORKING PART RT 1: Basic c co concep cepts ts PART 1: Basic concepts (full) (full)
Agenda Agenda Connections Connections Concept of Packet Concept of Packet Network Stack Models (TCP/IP - ISO/OSI) Network Stack Models (TCP/IP - ISO/OSI) Internet Protocol and IP Address Space Internet Protocol and IP Address Space Ethernet and Physical Address Ethernet and Physical Address Speed, Bandwidth, Latency, Throughput Speed, Bandwidth, Latency, Throughput High Speed (and Low Latency) Networks High Speed (and Low Latency) Networks LINUX commands (configuration and diagnostic) LINUX commands (configuration and diagnostic) 2
Connections Connections 3
Connections Connections host-2 Site A Site A host-X LAN LAN Site C Site C switch host-1 INTERNET router/gateway router/gateway (or MAN/WAN) switch host-1.site-A$ ssh host-2.site-A LAN host-X.site-A$ ssh host-Y.site-B Site B Site B host-Y 4
Physical Network Topologies Physical Network Topologies BUS RING LINEAR EXTENDED STAR STAR HIERARCHICAL MESH (TREE) (PARTIAL or FULLY CONNECTED) 5
Example: the lab network Example: the lab network Hybrid topology INTERNET SMR2068.ictp.it node X .hpc NEXUS.lab IOSRV.hwlab HPC2068.lab BORG.hwlab node1.hpc CL1.hwlab CL2 CL3 CL4 node X .cl1 node X .cl3 INFOLAB- X .lab node X .cl2 node X .cl4 HUB (switch) EKLUND- X .lab HOST 6 SERVER/GATEWAY
Clustering topologies (HPC) Clustering topologies (HPC) Imagine a 3D mesh with the ends connected. Thanks ;) 2D Mesh 3D Mesh 3D Torus 2D Torus Hypercube (4-cube) FAT TREE 7
Concept of Packet Concept of Packet 8
Addressing and Multiplexing Addressing and Multiplexing From Address: To Address: Country Country City City Street and Number Street and Number Name Name/Apartment/Floor 0100110100010010 Source Address: Destination Address: hostname: host-a hostname: host-b domain: example.com domain: example.org IP address: 192.0.32.10 IP address: 192.0.2.44 protocol: TCP protocol: TCP port: 35432 port: 25 (SMTP) 9
Fragmentation and Windowing Fragmentation and Windowing 1 1 1 1 2 2 2 2 3 3 3 4 4 4 3 3 3 NETWORK CONNECTIONS ARE (OFTEN) NOT RELYABLE BANDWIDTH IS NOT FREE AND IS NOT UNLIMITED In case of failure, sending twice a large amount of data has a cost, both in terms of money and time. Network protocols splits and fragments the data stream, TCP uses sequence numbers to reassemble 10 the data in case they reach the destination out of order (retransmission, timeout, different routes,...).
Network Stack Network Stack 11
Network Stack Models Network Stack Models TCP/IP Model ISO/OSI Model SW 7. Application 7. Application Application Application 6. Presentation Application 6. Presentation Layers Protocols 5. Session 5. Session Transport 4. Transport 4. Transport Transport Internet 3. Network Data Flow 3. Network Internet Layers 2. Data Link Networks Network 2. Data Link Network Access 1. Physical Access HW 1. Physical SW objects (e-mails, web pages, ...) Logical Addressing streams (segments, packets, frames) Physical bits Addressing HW 12 (voltage levels, light impulses, ...)
TCP/IP Model TCP/IP Model Protocols E-Mail (SMTP), Application Web (HTTP), Application ... Transport TCP, UDP Transport Internet IP, ICMP, ARP, RARP Internet ARP, RARP Network Network ETHERNET (10/100/1G/10G), Access Access PPP, SLIP, ... 13
ISO/OSI Model ISO/OSI Model Network Processes to Applications ● Provides network services to application processes, such as 7. Application electronic mail, file transfer and terminal emulation Data Representation ● Ensures data is readable by receiving system 6. Presentation ● Format of data ● Data structures ● Negotiates data transfer syntax for application layer 5. Session Interhost Communication ● Establishes, manages, and terminates sessions between applications End-to-end Connections ● Concerned with transportation issues between hosts 4. Transport ● Data transport reliability ● Establishes, maintains, terminates virtual circuits ● Fault detection and recovery information flow control 3. Network Network Address and Best Path Determination ● Logical addressing ● Best effort delivery Direct Link Control, Access to Media 2. Data Link ● Provides reliable transfer of data across media ● Physical addressing, network topology, line discipline, error notification, ordered delivery of frames and flow control 1. Physical Binary Transmission 14 ● Wires, connectors, voltages, data rates
Protocol Data Unit (PDU) Protocol Data Unit (PDU) Host A Host B Data 7. Application 7. Application Data 6. Presentation 6. Presentation Data 5. Session 5. Session Segments 4. Transport 4. Transport Packets 3. Network 3. Network Frames 2. Data Link 2. Data Link Bits 1. Physical 1. Physical 15 D-S-P-F-B
OSI Model and snail-mail OSI Model and snail-mail communication parallel communication parallel n o i t a c i l p p A k r o w t e N 16
Encapsulation/De-encapsulation Encapsulation/De-encapsulation USER USER DATA DATA Application Layer USER App. USER App. Header DATA Header DATA Transport Layer (TCP) TCP APPLICATION DATA TCP APPLICATION DATA Header Header Internet Layer E TCP Segment P V D (IP) I I / N E P E C C IP TCP APPLICATION DATA S E T IP TCP APPLICATION DATA Header Header R Header Header Net. Access Layer IP Datagram/Packet (Ethernet) Ethernet IP TCP Ethernet APPLICATION DATA Ethernet IP Ethernet TCP APPLICATION DATA Header Header Header Trailer Header Header Header Trailer Ethernet Frame Media (copper/fiber/air/...) 00100110101001000111100101001 17
Data flow Data flow host X switch router router switch host Y 7. Application 7. Application 7. Application 7. Application 6. Presentation 6. Presentation 6. Presentation 6. Presentation 5. Session 5. Session 5. Session 5. Session 4. Transport 4. Transport 4. Transport 4. Transport 3. Network 3. Network 3. Network 3. Network 3. Network 3. Network 3. Network 3. Network 2. Data Link 2. Data Link 2. Data Link 2. Data Link 2. Data Link 2. Data Link 2. Data Link 2. Data Link 2. Data Link 2. Data Link 2. Data Link 2. Data Link 1. Physical 1. Physical 1. Physical 1. Physical 1. Physical 1. Physical 1. Physical 1. Physical 1. Physical 1. Physical 1. Physical 1. Physical ➔ Switches inspect the traffic for layer 2 info (MAC) ➔ Routers inspect the traffic for layer 3 info (IP) 18
Data flow Data flow firewall or application gateway host X switch router router switch host Y 7. Application 7. Application 7. Application 7. Application 7. Application 7. Application 6. Presentation 6. Presentation 6. Presentation 6. Presentation 6. Presentation 6. Presentation 5. Session 5. Session 5. Session 5. Session 5. Session 5. Session 4. Transport 4. Transport 4. Transport 4. Transport 4. Transport 4. Transport 3. Network 3. Network 3. Network 3. Network 3. Network 3. Network 3. Network 3. Network 3. Network 3. Network 2. Data Link 2. Data Link 2. Data Link 2. Data Link 2. Data Link 2. Data Link 2. Data Link 2. Data Link 2. Data Link 2. Data Link 2. Data Link 2. Data Link 2. Data Link 2. Data Link 1. Physical 1. Physical 1. Physical 1. Physical 1. Physical 1. Physical 1. Physical 1. Physical 1. Physical 1. Physical 1. Physical 1. Physical 1. Physical 1. Physical ➔ Switches inspect the traffic for layer 2 info (MAC) ➔ Routers inspect the traffic for layer 3 info (IP) ➔ most Firewalls inspect the traffic for layers 2, 3 and 4 info 19 ➔ Application Gateways (proxies) and layer-7 firewalls inspect the traffic up to layer 7
7. Application 7. Application 6. Presentation Protocols, Ports and Services Protocols, Ports and Services 6. Presentation 5. Session 5. Session 4. Transport 4. Transport 3. Network server listens on port 67 3. Network 2. Data Link clients use port 68 2. Data Link 1. Physical 1. Physical 21 22 25 80 53 53 67 68 69 123 FTP SSH SMTP HTTP DNS DNS DHCP TFTP NTP queries over UDP zone transfers over TCP TCP UDP IP LAN WAN Internet 20
7. Application 7. Application 6. Presentation Ports Ports 6. Presentation 5. Session 5. Session 4. Transport 4. Transport 3. Network 3. Network 2. Data Link 2. Data Link 1. Physical ● Privileged Ports: 1-1023 1. Physical – main network services (SSH, SMTP, FTP, TFTP, DHCP, HTTP, HTTPS, ...) – need superuser's privileges ● Unprivileged Ports: 1024-65535 – clients and unprivileged/no-suid services (Squid, NFS, X11, MySQL, ...) – any user can bind to any unprivileged port 21
Recommend
More recommend