How the Internet Works? ( TCP/IP, DNS… ) How computers send data? Protocol Connection method Channel Address 2 Communication Channel what kind of media? Telephone line (Twist pair, Optical fiber) Modulator-Demodulator (Modem) Digital Subscriber Line (DSL) Cable modem Satellite, Microwave Wireless connection (IR, RF) 3 Different medium Twisted pair RJ45 connector Coaxial cable BNC connector Fiber optic cable Different cabling length Optic > coaxial > Twisted pair 4 Use Modem Digital data - 10101010101 Telephone line Analog data Modulation / De-modulation E.g. CU Dialup Pool (56kbps max.) 5 Use Digital Subscriber Line (DSL) Traditional phone line ADSL modem Why ADSL? 6 Why ADSL? Asymmetric DSL A slower upstream (upload) can trade off a faster downstream (download) speed. 128 to 640 kbps (upstream) 1.5M to 5M bps (downstream) 7 Use Cable Modems Use coaxial cable to carry TV signal and High speed Internet access 8 Satellite & Microwave Satellite systems Use satellites orbiting above the Earth to relay signals from one part of a WAN to another, cause 0.5 to 5 sec delays. Microwave Costly to install but cheaper than satellite. It is very useful for connecting networks that are separated by a barrier, such as a highway or a lake. Requires line of sight. 9 Using A Computer To Interconnect Networks Special-purpose computers are used to interconnect networks. Using standard hardware (CPU, memory, and network interfaces) Running special-purpose software 10 Network Interface Card NIC Physically connects a computer to the transmission medium on a network. 11 Hardware/Physical/MAC (Media Access Control) address When a NIC is manufactured, the card is given a unique hardware address. It never changes. 12 Routers Interconnecting computers are called routers by using the same protocol. Determining where to send packets Router 13 Hubs A network cable connects a computer via a network card to a hub. Provides a central location. 14 Ports A hub contains sockets or ports. Some LED indicates information transferred through the port. 15 Ethernet Repeater A repeater is a device that strengthens and retransmits signals on a network. 16 Network Architecture It refers how information transfers on networks. Ethernet It the most popular architecture used to build networks. Least expensive and easiest to setup Token-ring architecture It was developed by IBM in 1984. They are popular found in large organizations, such as banks and insurance companies. Others: ARCnet, AppleTalk, … 17 Ethernet & Token Ring Ethernet, Fast Ethernet, Gigabit Ethernet (transmit data at 1Gbps). 18 Postal Services You have to write a complete address on the envelope specifying the country, state, city, district, street, and so on. After put the letter put into the mailbox, it will be delivered (routed) to its destination in a hierarchical way. California Post Office knows the letter is sent to NC, without concerning the actual address to be routed within NC. 19 Basic Internet Structure The Internet works in a similar way as postal services. Roughly speaking, you may consider states within this country, as individual networks connecting to each other. The different pieces of the Internet are connected by a set of computers (Gateways) Translates between protocols 20 Postage over the Internet When delivering information via the Internet, the information is split into small units called data packets (1500 byte each) When a packet is sent from California to a particular host in UNC. The packet is first delivered to NC, then is further transmitted to UNC, then is further transmitted to the appropriate department, finally arrived to the specific host. The data is reassembled at the destination. The data packet is continuously being switched from the source to destination. The Internet is said to be Packet Switching Network. 21 Packet Switching Network 22 Packet switching example Figure 16.1 An example internet with four networks connected by routers. Figure 16.2 Cars from two roads merging onto another road are analogous to packets from two networks merging onto a third network. 23 IP address Each host in the Internet is assigned to a specific and unique number for identification. This number is called the IP address of the specific host. This number is divided into 4 parts for improving the readability. The range of each number is between 0 and 255. E.g. 0.0.0.0 255.255.255.255 For example, the host “UNC.edu” has its IP address of “152.2.240.8” 24 Network Number / Host Number IP addresses are split into 2 parts A network number + a host number For example, 152.2 is the network number of UNC, 240.8 is the host number of the host “UNC.edu” Network numbers are assigned by a central authority, the Internet Corporation for Assigned Names and Numbers (ICANN). 25 Network Classes There are 5 classes of IP address Class A comprises networks 1.0.0.0 to 127.255.255.255, the network address is in first quad. It allows roughly 16 million hosts per network. Class B comprises network 128.0.0.0 to 191.255.255.255, the network address is in the first two quads. It allows for 16,382 networks with up to 64K hosts. 26 Network Classes Class C comprises networks 192.0.0.0 to 223.255.255.255, with the network number contained in the first three quads. It allows about 2 million networks with up to 254 hosts in each network. Class D and E are falling into the range of 224.0.0.0 to 254.0.0.0 which are reserved for multicast address and for special purpose use. 27 Subnet The Internet is structured hierarchically. UNC consists of many academic departments and administrative bodies. IP allows you to subdivide a network into several subnets. E.g. SILS and Davis Library are two subnets inside UNC. Each subnet is identified by a subnet number. E.g. we have a different way to interpret the IP address 152.2.62.223 (the ILS server) 152.2 refers to the network number of UNC, 62 refers to the subnet number of Davis Library, 223 refers to the host number of “afton”. 28 Dynamic Host Configuration Protocol (DHCP) A Protocol for assigning dynamic IP address to devices on a network. It is built on client and server models. Server is the machine running DHCPD. Client can be any network devices. Advantage? Eliminates manual configuration of network parameters and utilizes the use of IP address 29 IP Routing The process of transmitting a data packet from the source to the destination via a series of intermediate stations is called “Routing”. IP routing works as follow: Each data packet is labeled with IP address of the destination host 152.2.90.184 1500 bytes Data here 30 IP Packet Includes Header, payload, data 31 Packets Are Not The Same Size Packets may be any size up to the maximum. Can be as small as a single keystroke Can be larger, depending on application 32 IP Routing For example, when a packet is routing to “UNC.edu” (152.2.62.223), the network number is extracted as 152.2 which is the network number of UNC. The packet is then sent to NC and then to UNC. Inside UNC, the subnet number is examined and it is 62 which is the subnet number of Davis. Then it is sent to Afton. Inside Davis, the host number is examined and it is 223 which is the host number of Afton. Finally, it is routed to the destination. 33 IP enough for routing? A single packet is limited in length, usually 1-1500 bytes. Network may lose packets, or damage the data in transit. Packets may arrive out of sequence (different routing path). TCP is used to solve the problems. 34 Protocol and Addressing To communicate over the Internet, the computers must: use a common language or a protocol to govern the exchange of messages. have a way to address one another. Protocol: specifies exact format, order of messages sent and received among network entities, and actions taken on message transmission and receipt. Addressing: defines where to deliver the messages. 35 Protocol and Addressing TCP/IP model 36 Protocol and Addressing Internet has a large collections of protocols organized in a layering model. Application: enables the user, whether human or software, to access the network. Transport: responsible for source-to-destination (end-to-end) data transfer. Network: responsible for routing packets from source-to-dest across multiple networks. Data link: responsible for data transfer between neighboring network elements. Physical: coordinates the functions required to transmit a bit stream over a physical medium. 37 Protocol and Addressing Lower layer adds header to the data from upper layer. Header includes addressing and other fields. L5 data L5 data 38 Protocol Stack - Open Systems Interconnection (OSI) model 39 Protocol and Addressing TCP/IP Protocol Suite. 40 What is TCP/IP? “TCP would be in charge of the breaking up the packets and messages then reassembling them at the destination, and the IP would be responsible for transmitting the individual packets. For example: the TCP protocol would split up the letter and place it into multiple envelops, while the IP protocol would be in charge of addressing the envelop and making sure it arrived at its proper destination.” – from “Where Wizards Stay Up Late” 41 TCP/IP A protocol is a collection of rules for formatting, ordering, and error-checking data sent across a network. In 1974, Vincent Cerf and Robert Kahn developed the Transmission Control Protocol (TCP) which was further split into the Internet Protocol (IP) and TCP in 1978. In 1982, DoD adopted TCP/IP as the standard protocol in the Internet. Because the significance of TCP/IP in the history of the Internet, Cerf and Kahn are considered to be the Father of the Internet. 42 Transmission Control Protocol - TCP Basic functions Decompose a lengthy data into multiple packets for transmission Error detection, ensure validity Packet loss? No problem, packet retransmission 43 Sequence Numbers TCP breaks the information into multiple packets. Each packet is associated with a sequence number for identification. 152.2.90.184 Number 1 Data here 152.2.90.184 Number 2 Data here 152.2.90.184 Number 3 Data here Each packet is individually routed in the Internet, and arrive in random order. The data is reassembled in the correct order according to the sequence number. 44 Packet Retransmission A packet may be lost during the transmission across the Internet (host down, link failure, … ) When the destination host has been waiting for a particular packet for a certain time (timeout), it will request the source host to retransmit the packet. There is no need to retransmit all data packets. Instead, only the missing packet, which is identified by the sequence number, needs to be retransmitted. 45 Error detection Checksums Transmission errors occur even if a data packet is received by the destination successfully. How to ensure the data is correctly received? A method to detect possible transmission errors. At the destination, checksum is recalculated based on the received data. The attached checksum and the newly calculated checksum are compared. Mismatch means there is transmission errors occurred. 46 IPv6 (IP version 6) Major changes: More addresses IP address size from 32 bits to 128 bits Simplified IP headers Reduction of header fields in IP packet Added security features 47 IPX/SPX Protocol IPX/SPX makes up the protocol suite that is used to transfer information on networks running the Novell NetWare operating system. Internetwork Packet Exchange (IPX) - Transfer information between devices. Sequenced Packet Exchange (SPX) - An extension of the IPX protocol. 48 NetBEUI Protocol NetBIOS Extended User Interface Is a network protocol used on small local area networks. A very small and efficient protocol, use little computer resources. NetBIOS Network Basic Input/Output System Develop by IBM and allow computers to communicate with each other on a network. 49 Why DNS? What is DNS? Domain Name System IP address is difficult to remember. 152.2.92.1 is which machine? Names are given to each computer on the Internet for the convenience of human users. Besides IP addresses, all internet applications allow users to use computer names. 50 Computer names on the NET How does it look like? DNS administrators is responsible to name computers/group in their own subnet. Each level of responsibility is called a domain. Domains are separated by “dots” cse.UNC.edu.NC www.intel.com 51 Domain name and Host name Each domain can create or change whatever belongs to it. UNC can create any new domain, cse CSE can buy a new computer and name it as – robin, orchid, any other name. Two computers may have the same name if they are in different domains. UNC.edu orchid.ie.UNC.edu.NC 52 Domain Name System (DNS) Each node in the tree has a label - a string with a maximum of 63 characters. a domain name - a sequence of labels separated by dots. 53 How does DNS work? DNS server = DNS service? 54 IP vs Domain Name 55 Most Common hostname Figure 18.1 The fifty most common names assigned to computers on the Internet in 2000. 56 Top Level Domains The Internet Corporation for Assigned Names and Numbers (ICANN) define the Top Level Domains. 57 ISO 3166 Country Codes Partial list Full list 58 Windows Internet Naming Service (WINS) Like DNS, WINS also resolves names and IP addresses except that the look up by WINS is specific for Windows computers. Dynamic Win2k use DNS to replace WINS 59 Summary What should be considered if you install or update a network? Plan: the size, the budget Determine: the network design Select: the transmission media Choose: the network hardware, devices Install: the network OS, drivers Configure: server & client computers Test: the final network Maintain: the network reliability, admin 60