networking networking
play

NETWORKING NETWORKING PART RT 1: Ba Basic concep epts ts PART - PowerPoint PPT Presentation

Moreno Baricevic CNR-INFM DEMOCRITOS Trieste, ITALY INTRO TO INTRO TO NETWORKING NETWORKING PART RT 1: Ba Basic concep epts ts PART 1: Basic concepts (full) (full) Agenda Agenda Connections Connections Concept of Packet Concept


  1. Moreno Baricevic CNR-INFM DEMOCRITOS Trieste, ITALY INTRO TO INTRO TO NETWORKING NETWORKING PART RT 1: Ba Basic concep epts ts PART 1: Basic concepts (full) (full)

  2. 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

  3. Connections Connections 3

  4. 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

  5. Physical Network Topologies Physical Network Topologies BUS RING LINEAR EXTENDED STAR STAR HIERARCHICAL MESH (TREE) (PARTIAL or FULLY CONNECTED) 5

  6. 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

  7. Clustering topologies (HPC) Clustering topologies (HPC) 2D Mesh 3D Mesh 2D Torus Hypercube (4-cube) FAT TREE 7

  8. Concept of Packet Concept of Packet 8

  9. 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

  10. 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,...).

  11. Network Stack Network Stack 11

  12. 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, ...)

  13. 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

  14. 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

  15. 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

  16. 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

  17. 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

  18. 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

  19. 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

  20. 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

  21. 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

  22. Opening a connection Opening a connection TCP 3-way Handshake TCP 3-way Handshake [1] Src IP: 192.168.10.24 • Clients use random Src Port: 41639 source ports (> 1023) Dst IP: 192.168.0.1 • Servers are bound Dst Port: 22 to fixed ports Protocol: TCP TCP flag: SYN 41639 41639 2 1 3 [3] 22 22 Src IP: 192.168.10.24 1 2 Src Port: 41639 [2] Dst IP: 192.168.0.1 Src IP: 192.168.0.1 Dst Port: 22 Src Port: 22 Protocol: TCP Dst IP: 192.168.10.24 TCP flag: ACK Dst Port: 41639 Protocol: TCP 1 1 TCP flag: SYN/ACK 2 2 3 3 192.168.10.24 192.168.0.1 22

Recommend


More recommend