Networks 3 Lecture Networks 3/Slide 1 Content What is a communications protocol? Network protocols TCP/IP High-level protocols Firewalls Network addresses Host name IP address Domain name system (DNS) Lecture Networks 3/Slide 2 Page 1 1
What is a communication protocol? The word protocol is used in different fields (here some examples) Society: Etiquette: is a code of behaviour that delineates expectations. Politics: a formal agreement between nation states. Diplomacy: the etiquette of diplomacy and affairs of state. Science: Natural sc.: a procedural method for conducting experiments. Medicine: guidelines for medical treatment. Communications: A description of the rules computers must follow to communicate with each other. Defines the syntax, semantics and synchronization of communication. Can be implemented as hardware, software or both. Lecture Networks 3/Slide 3 What is TCP/IP? The communication protocol for communication between computers on the Internet Defines how electronic devices (like computers) should be connected to the Internet, and how data should be transmitted between them. TCP/IP stands for Transmission Control Protocol /Internet Protocol TCP/IP is a suite of protocols. Because of the heavy reliance on TCP and for historical reasons, the entire suite is referred to as TCP/IP Lecture Networks 3/Slide 4 Page 2 2
Inside TCP/IP Inside the TCP/IP standard there are several protocols for handling data communication: TCP (Transmission Control Protocol) communication between applications. UDP (User Datagram Protocol) simple communication between applications. Similar to TCP, but simpler and less reliable. IP (Internet Protocol) communication between computers. ICMP (Internet Control Message Protocol) for errors and statistics. DHCP (Dynamic Host Configuration Protocol) for dynamic addressing. Lecture Networks 3/Slide 5 Packet switching Messages are divided into fixed-sized, numbered packets; packets are individually routed to their destination, then reassembled. Packet: A unit of data sent across a network. Router: A network device that directs a packet between networks toward its final destination. Lecture Networks 3/Slide 6 Page 3 3
TCP/IP TCP- Transmission Control Protocol Used for transmission of data from an application to the network. Responsible for breaking data down into IP packets before they are sent, and for assembling the packets when they arrive. IP - Internet Protocol Takes care of the communication with other computers. Responsible for the sending and receiving data packets over the Internet. TCP/IP is TCP and IP working together Lecture Networks 3/Slide 7 IP routers When an IP packet is sent from a computer, it arrives at an IP router. The IP router is responsible for "routing" the packet to the correct destination, directly or via another router. The path the packet will follow might be different from other packets of the same communication. The router is responsible for the right addressing, depending on traffic volume, errors in the network, or other parameters. http://computer.howstuffworks.com/internet/basics/internet-infrastructure3.htm Ping: A program used to test whether a particular network computer is active and reachable. Try http://ping.eu/ping/ Traceroute: A program that shows the route a packet takes across the Internet. Try http://ping.eu/traceroute/ Lecture Networks 3/Slide 8 Page 4 4
Network protocols Network protocols are layered such that each one relies on the protocols that underlie it. Sometimes referred to as a protocol stack. UDP is an alternative protocol to TCP used primarily for establishing low-latency and loss tolerating connections between applications. Layering of key network protocols Lecture Networks 3/Slide 9 High-level protocols Other protocols build on TCP/IP protocol suite Simple Mail Transfer Protocol (SMTP) used to specify transfer of electronic mail. File Transfer Protocol (FTP) allows a user to transfer files to and from another computer. Telnet used to log onto one computer from another. Hyper Text Transfer Protocol (http) allows exchange of Web documents. Which of these have you used? Lecture Networks 3/Slide 10 Page 5 5
TCP/IP Summary Messages (data) sent using this protocol are split up by TCP. Then sent using IP. Then re-assembled using TCP. Applications: e-mail & World Wide Web run on top of this system. Users Software Users Software Hardware Other protocols TCP IP physical link Hardware Lecture Networks 3/Slide 11 Firewalls Firewall: a gateway machine and its software that protects a network by filtering the traffic it allows. Access control policy: a set of rules established by an organization that specify what types of network communication are permitted and denied. A firewall protecting a LAN Lecture Networks 3/Slide 12 Page 6 6
Network addresses Every computer connected to the Internet has a unique identity. You can refer to any inter-connected machine in two ways, by its IP address: for computer use (sequence of numbers). Host name: for human use (sequence of readable words separated by dots). Example: shilling.cs.stir.ac.uk The internet Domain Name Service (DNS) translate host names into equivalent IP addresses and vice versa, as needed by various Internet programs. Find the IP address of your machine: type ipconfig in Command Prompt window. An IP & domain checker: http://ipinfo.info/html/ip_checker.php Lecture Networks 3/Slide 13 IP address Every computer connected to the Internet is identified by a unique four-part string, known as its Internet Protocol (IP) address. It consists of four numbers (each between 0 and 255) separated by dots. Example: 148.78.250.12. In computer terms, TCP/IP uses 32 bits addressing. One byte is 8 bits. TCP/IP uses 4 bytes. One byte can contain 256 different values: 00000000, 00000001, 00000010, 00000011, 00000100, 00000101, 00000110, 00000111, 00001000...and all the way up to 11111111. IP address: stored in 4 bytes Lecture Networks 3/Slide 14 Page 7 7
Domain names The Domain Name System (DNS) is a method of providing the convenience of names, and ensuring that each computer has a unique name. A domain is a grouping of computers. Domains have names. The components of domain names are separated by full stops: stir.ac.uk cs.stir.ac.uk src.doc.ic.ac.uk As you work right to left, the domains get smaller, and eventually may identify a single computer: shilling. cs. stir. ac.uk Computer Area Place Type of institution Country Lecture Networks 3/Slide 15 The Domain Name System, graphically uk co co ic ac stir gov cs ic: Imperial College, which is at the same level as stir. Both are in the ac (academic) domain. gov (government), co (commercial) are at the same level as ac. shilling Lecture Networks 3/Slide 16 Page 8 8
Domain name system Top-level domains, including some relatively new ones Lecture Networks 3/Slide 17 Domain name system Organizations based in countries other than the United States use a top-level domain that corresponds to their twoletter country codes Domain name system (DNS) A distributed system for managing hostname resolution Domain name server A computer that attempts to translate a hostname into an IP address Some of the top-level domain names based on country codes Lecture Networks 3/Slide 18 Page 9 9
Address resolution mechanism The resolution process makes a sequence of queries starting with the right-most (top-level) domain label. It starts with a query to one of the root servers to find the server authoritative for the top-level domain. The obtained top-level domain server is queried for the address of a DNS server authoritative for the second-level domain. Iteratively, each domain name label is used to query the resulting server of the previous step until the IP address of the host name is returned (see an illustration for www.wikipedia.org). In practice caching is used in DNS servers to off-load the root servers. Lecture Networks 3/Slide 19 Domain names and IP addresses Allocation of IP addresses is done by Globally, the Internet Corporation for Assigned Names and Numbers / Internet Assigned Numbers Authority (ICANN/IANA) Regionally, by 5 regional Internet registries: AfriNIC (African Network Information Centre) ARIN (American Registry for Internet Numbers) APNIC (Asia Pacific Network Information Centre) LACNIC (Latin America and Caribbean Network Information Centre) RIPE (Réseaux IP Européens) We're running out of IP addresses: there are only (only!) about four billion different IP addresses. IP Version 6 is slowly being rolled out. V6 uses IP addresses that are twice the length of existing ones, so the number of different IP addresses will be 340,282,366,920,938,463,463,374,607,431,768,211,456 (= 2 64 ) Maybe (?) this will be enough to give every computer (and TV, phone, washing machine, watch, car, ATM,... ) in the world a different IP address. Lecture Networks 3/Slide 20 Page 10 10
Summary Network protocols TCP/IP High-level protocols Firewalls Network addresses Host name IP addresses Domain name system (DNS) Lecture Networks 3/Slide 21 Networks - References N. Dell & J. Lewis, Computer Science Illuminated, Chapters 15-16 H.L Capron & J.A. Jhonson, Computers Tools for an information Age, Chapters 7-8 w3schools.com - TCP/IP http://www.w3schools.com/tcpip/tcpip_intro.asp How Stuff Works - Internet Infrastructure: http://computer.howstuffworks.com/internet-infrastructure.htm Lecture Networks 3/Slide 22 Page 11 11