Network Basics CS490 - Security in Computing Copyright © 2005 by Scott Orr and the Trustees of Indiana University
Section Overview Network terms and topologies Network terms and topologies OSI and TCP/IP Protocol Stacks OSI and TCP/IP Protocol Stacks Ethernet and TCP/IP Packets Ethernet and TCP/IP Packets Addressing and Name Resolution Addressing and Name Resolution Routing Routing
References Security in Computing, 3 rd Ed. Security in Computing, 3 rd Ed. Chapter 7 (pgs ) Chapter 7 (pgs )
Basic Networking Terms Hosts & Nodes Hosts & Nodes Links & Media Links & Media Protocols Protocols LANs, MANs, & WANs LANs, MANs, & WANs Internets and Intranets Internets and Intranets
Network Topologies Star Ring Bus
OSI Network Model Application Presentation Session Transport Network Data Link Physical Application Presentation Session Transport Network Physical
Application (FTP, HTTP, DNS) Transport Layer (TCP,UDP) Network Layer (IP) TCP/IP Protocol Stack Link Layer (Device Drivers) Physical Layer (media)
EIPT/U TCP/IP Packet Encapsulation UTP/PSTN Ethernet/PPP IP TCP/UDP Service Data Data T/UData IPT/UData E
IP Addresses Unique for each connection (interface) Unique for each connection (interface) Consists of 4 octets (#.#.#.#) Consists of 4 octets (#.#.#.#) Network portion Network portion Host portion Host portion Special Addresses Special Addresses Network Address Network Address Broadcast Address Broadcast Address
Internet Protocol Destination Address Source Address Data Versn.IHL Type of Svc. Total Length IdentificationFlags Fragment Offset TTLProtocol Header Checksum PaddingOptions o o o
IP Address Classes Class 1 st Byte Format Total Hosts A 0 – – 126N.H.H.H 16 Million B 128 – 191 N.N.H.H 64 Thousand C 192 – 239 N.N.N.H254 D 224 – 239 -(Multicast) E 240 – 254 -(Experimental)
Hostnames Uniquely identifies each system Uniquely identifies each system Fully Qualified Domain Name Fully Qualified Domain Name hostname.site.domain[.country] hostname.site.domain[.country] Country: 2 letter identifier for country Country: 2 letter identifier for country Domain: Type of site (edu, com, org) Domain: Type of site (edu, com, org) Site: Unique name of organization Site: Unique name of organization Hostname: Unique name of system Hostname: Unique name of system
DNS Name Resolution host.domain.comdns.domain.comdns.iupui.edudns.cs.iupui.edu Root Server Non-Recursive Recursive
Client-Server Model Server Client Listens for incomingrequests Makes a request Request fulfilled
Services TCP TCP TELNET, FTP, HTTP, NNTP, SMTP, finger, talk, r-commands UDP UDP TFTP, NTP, SNMP NFS, DNS, RPC ICMP ICMP ping, traceroute
Network Protocols Service request/response syntax Service request/response syntax Often uses English commands Often uses English commands Request For Comments (RFC) Request For Comments (RFC) Documentation for protocols and practices Documentation for protocols and practices Each revision its own number Each revision its own number May have a second classification May have a second classification For Your Information (FYI) For Your Information (FYI) Best Common Practices (BCP) Best Common Practices (BCP) Standards (STD) Standards (STD)
Network Ports Enables processes to communicate with each other across a network Enables processes to communicate with each other across a network 64K possible ports 64K possible ports Privileged ports Privileged ports < 1024 reserved for system use only < 1024 reserved for system use only Correspond to well-known services Correspond to well-known services
Transmission Control Protocol Data o o o Source Port Destination Port Sequence Number Acknowledgment Number OffsetRsrvd.FlagsWindow Urgent Pointers Checksum PaddingOptions
SYN 3-Way Handshake SYN(C, ISN c ) SYN(S, ISN s ) ACK(C, ISN c ) ACK(S, ISN s ) First step in all new TCP/IP sessions Client Server
User Datagram Protocol Data o o o Source Port Destination Port LengthChecksum “Connectionless”
Translates IP addresses to Ethernet (MAC) addresses Translates IP addresses to Ethernet (MAC) addresses Address Resolution Protocol Who is ? I am (1:2:3:7:8:9)
Ethernet Addressing Assigned by manufacturer (hardware) Assigned by manufacturer (hardware) Must be absolutely unique Must be absolutely unique Address format Address format 6 octets in hex (#:#:#:#:#:#) 6 octets in hex (#:#:#:#:#:#) First 3 octets: Manufacturer Identifier First 3 octets: Manufacturer Identifier Last 3 octets: Card serial number Last 3 octets: Card serial number Used for local network communication Used for local network communication
Ethernet Type Data o o o Checksum Data Destination Address Source Address
Interconnectivity Gateway Router Bridge Repeater Network Access Internet Transport Application Physical Internet Transport Application Physical
Connects Networks together Connects Networks together If destination not on local network, packets sent through gateway If destination not on local network, packets sent through gateway Routers
Subnet Masks Splits networks into subnetworks Splits networks into subnetworks Separates address into 2 parts Separates address into 2 parts 1’s – Network Portion 1’s – Network Portion 0’s – Host Portion 0’s – Host Portion Example: Class C Network Example: Class C Network Address: N.N.N.H Address: N.N.N.H Mask: (255 = ) Mask: (255 = ) CIDR Notation: N.N.N.H/24 CIDR Notation: N.N.N.H/24