Download presentation
Presentation is loading. Please wait.
Published byAnn Miles Modified over 9 years ago
1
CS 620 Advanced Operating Systems Lecture 2 – Networking Overview Professor Timothy Arndt BU 331
2
Networking A computer network is a high-speed communications medium connecting many, possibly dissimilar, computers or hosts. A network is a combination of computer and telecommunication hardware and software. In addition to host computers, the network may involve many dedicated computers that perform message switching (switches), relaying between LANs (bridges), joining several networks (hubs and routers) and joining dissimilar networks (gateways).
3
Hosts and Dedicated Computers
4
Types of Networks Networks are usually classified as either Wide Area Networks (WAN) or Local Area Networks (LAN) WANs span large distances and typically connect networks rather than hosts. Speeds range from T1 (1.5 Mbps) to T3 (45 Mbps). LANs connect hosts that are physically close and operate at 10-100 Mbps. The most widely used LAN is Ethernet running at 3- 10 Mbps.
5
Networking Protocols Networking protocols are a set of rules and conventions that hosts follow in order to communicate on a network. They decide such things as: Address formats Data formats Manner of data transmission Sequencing and addressing of messages Initiating and terminating logical connections Establishing remote services Accessing remote services
6
Networking Protocols The Internet Protocol (IP) is the most widely used networking protocol. IP is the basic protocol for the Internet and is widely supported by UNIX systems. As shown in the following slides, networks are typically designed as a number of layers. The higher layers use the services provided by the lower level layers.
7
Networking Protocols
8
The OSI Reference Model
9
TCP/IP Reference Model
10
TCP/IP Model
11
Internet Basics The Internet is a global network that connects IP networks. A network of networks is called an internetwork. The Internet evolved from the ARPANET a DARPA sponsored network that developed IP, TCP and UDP. The concept was supposed to make the military’s networks less vulnerable to attacks. The ARPANET became the Internet when the government gave control of the network to its component members.
12
Internet
13
Network Addresses An addressing scheme is an important part of a network and its protocol. For the Internet, each host has a unique IP address represented by 4 bytes in a 32-bit quantity. The IP address can be represented in dot notation giving the decimal value of each byte: 137.148.216.15 is the IP address of grail. Each host may also have a domain-based name composed of words: grail.cba.csuohio.edu
14
Network Addresses
15
Packet Switching The Internet is an example of a packet switched network. A packet is routed from one host on the Internet to another. Data is sent as a sequence of packets. Individual packets may take different routes to the destination host. Use the command traceroute to see the route that a packet takes to a particular host.
16
Packet Switching penguin:/users/faculty/arndt> /usr/local/etc/traceroute speedy.cs.pitt.edu traceroute to speedy.cs.pitt.edu (136.142.79.2), 30 hops max, 40 byte packets 1 137.148.216.1 (137.148.216.1) 3 ms 2 ms 6 ms 2 137.148.254.16 (137.148.254.16) 5 ms 16 ms 3 ms 3 137.148.13.100 (137.148.13.100) 4 ms 25 ms 4 ms 4 clv1-sl9-1.cleveland.oar.net (199.18.113.5) 31 ms 47 ms 23 ms 5 oeb4-atm1-0.columbus.oar.net (199.18.202.14) 55 ms 79 ms 80 ms 6 Serial-0-0-1.GW1.CLE1.ALTER.NET (157.130.102.157) 75 ms 74 ms 80 ms 7 143.ATM2-0.XR1.CHI4.ALTER.NET (146.188.209.66) 104 ms 75 ms 97 ms 8 195.ATM8-0-0.GW1.CHI1.ALTER.NET (146.188.208.145) 53 ms 50 ms 34 ms 9 att-chicago-gw.customer.ALTER.NET (157.130.96.10) 45 ms 69 ms 76 ms 10 br1-a350s1.cgcil.ip.att.net (192.205.31.126) 77 ms 66 ms 58 ms 11 br2-p320.n54ny.ip.att.net (12.127.9.174) 74 ms 93 ms 59 ms 12 ar1-a3120s1.n54ny.ip.att.net (12.127.0.9) 95 ms 106 ms 73 ms 13 12.127.244.62 (12.127.244.62) 112 ms 75 ms 82 ms 14 pitt-gp.psc.net (198.32.224.8) 100 ms 95 ms 79 ms 15 fq.gw.pitt.edu (136.142.12.4) 98 ms 93 ms 76 ms 16 speedy.cs.pitt.edu (136.142.79.2) 134 ms 120 ms penguin:/users/faculty/arndt>
17
TCP/IP The Transmission Control Protocol/Internet Protocol (TCP/IP) suite is a standard set of networking protocols. TCP/IP is the primary protocol of the Internet and the World Wide Web. Almost all operating systems offer TCP/IP support, and most large networks rely on TCP/IP for much of their network traffic.
18
Media and Topologies TCP/IP networks can run over a variety of physical media. Most current networks use some sort of coaxial cable, twisted-pair cable, or fiber-optic cable. Network adapters (also known as Network Interface Cards or NICs) provide the interface between a computer and the physical medium comprising the network connection. They usually consist of a single board. Network interfaces support one or more communications protocols.
19
Media and Topologies All network adapters have a Media Access Control (MAC) address, which is a unique identifier for that individual unit (board). For Ethernet devices, MAC addresses are 48-bit values expressed as twelve hexadecimal digits: e.g. 00-00-F8-23-31-91. Hosts within a LAN can be connected into a variety of arrangements called topologies such as a bus, ring, or star.
20
TCP/IP Core TCP/IP protocols include: Transmission Control Protocol (TCP) User Datagram Protocol (UDP) Address Resolution Protocol (ARP) Internet Control Message Protocol (ICMP) Point to Point Protocol (PPP) Serial-Line IP (SLIP)
21
Internet Protocol Internet Protocol (IP) provides packet delivery for all other protocols in the suite. It is a best-effort, connectionless delivery system for computer data. The protocol’s checksum confirms only the IP header’s integrity. Responsibility for the data within the IP packet (and the sequencing) is assured only by using higher-level protocols.
22
Transmission Control Protocol Transmission Control Protocol provides a reliable, connection-oriented packet delivery service on top of IP. TCP guarantees the delivery of packets, proper sequencing of packets, and provides a checksum that validates the packet header and data for accuracy. If the network corrupts or loses a TCP packet during transmission, TCP is responsible for retransmitting the faulty packet.
23
Transmission Control Protocol TCP is used for session-based data transmission, client-server applications, and critical services. TCP headers require extra bits to provide proper sequencing of information. To guarantee successful data delivery, the protocol also requires that the recipient acknowledge successful receipt of data. These ACKs generate additional network traffic, diminishing data speed for accuracy.
24
User Datagram Protocol When reliability is not essential, User Datagram Protocol (UDP), a TCP complement, offers a connectionless datagram service that guarantees neither delivery nor correct sequencing of delivered packets. UDP checksums are optional, providing a way to exchange data over highly reliable networks without unnecessarily consuming network resources or processing time. ACKS are not enforced. UDP also supports sending data from a single user to multiple receivers.
25
Address Resolution Protocol Not directly related to data transport, the Address Resolution Protocol (ARP) is one of the maintenance protocols that supports the TCP/IP suite. To communicate across a TCP/IP network, the system sending the packet must map the IP address of the target to the physical address of the target. IP acquires this physical address by broadcasting a special inquiry packet (an ARP request packet) containing the IP address of the target.
26
Address Resolution Protocol All ARP-enabled systems on the local IP network detect these messages, and the system that owns the IP address in question replies by sending its physical address to the requester. The physical/IP address is then stored in the ARP cache of the requesting system for subsequent use. Because the ARP reply can also be broadcast to the network, other systems on the network can update their own ARP caches.
27
Internet Control Message Protocol Internet Control Message Protocol (ICMP) is another maintenance protocol. It allows two systems on an IP network to share status and error information. This information can be used by higher-level protocols to recover from transmission problems. The ping program uses the ICMP echo request and reply packets to determine whether a particular IP system on a network is functional. The ping program can be used to diagnose IP network or router failures.
28
Network Services Network operations are accomplished by a number of network services, consisting of the software needed to perform a specific type of network task. Network services are defined by the combination of transport protocol, IP address and port number: a logical network connection identified by a number. Network services are provided by server services or daemon processes which listen for client requests.
29
Daemon Processes UID PID PPID C STIME TTY TIME COMMAND root 88 1 0 03:03:20 ? 0:07 /etc/syncer root 9439 165 0 09:30:40 ttyq1 0:00 telnetd root 165 1 0 03:03:37 ? 0:17 /etc/inetd -l root 129 1 0 03:03:26 ? 0:52 /usr/etc/ypserv root 131 1 0 03:03:26 ? 0:01 /etc/ypbind root 145 1 0 03:03:35 ? 0:00 /usr/etc/rpc.mountd root 147 1 0 03:03:35 ? 0:13 /etc/nfsd 4 root 5626 165 0 07:58:31 ttyp5 0:00 rlogind root 9063 1 0 09:25:00 ? 0:00 talkd Daemon processes generally have names which finish with a ‘d’. The inetd daemon is a server process which listens for TCP/IP requests and forks off the appropriate daemon process to service the request. This approach avoids multiple waiting daemon processes.
30
TCP/IP Diagnostic Tools arp: display or modify the IP-to-MAC address tables. nslookup: interactively query a name server. lpq: examine/manipulate jobs in a printer queue. ping: perform a simple network connectivity test. route: display or modify the static routing tables. traceroute: view the route to a host. netstat: display various network statistics ipconfig: display information about the system’s TCP/IP configuration.
31
Name Resolution Facilities For convenience, high-level user commands generally use hostnames (rather than IP addresses) to specify remote locations on the network. TCP/IP provides two methods for performing hostname-to-IP address translation (also called name resolution). The IP address can be determined by looking up the hostname in the /etc/hosts file.
32
The /etc/hosts File grail:/users/faculty/arndt> more /etc/hosts ## Configured using SAM by root on Mon Jul 11 15:30:33 1994 127.0.0.1 localhost # # Host Database # #----- # HP server 137.148.216.15 grail.cba.csuohio.edu cba.csuohio.edu grail # DELL PowerEdge server running Linux 137.148.216.45 arthur.cba.csuohio.edu arthur # Sun SPARC5 file server 137.148.216.17 shamu.cba.csuohio.edu shamu # Sun SPARC20 with 4 CPUs; should be quadru-pus 137.148.216.18 octopus.cba.csuohio.edu octopus # 11 Sun SPARC4 10 baseT 137.148.216.19 dolphin.cba.csuohio.edu dolphin 137.148.216.20 shark.cba.csuohio.edu shark... Loopback address Our name IP address hostname alias
33
The Domain Name Service The Domain Name Service (DNS) facility relies upon server processes running on various network-accessible systems to provide hostname-to-IP translation. DNS organizes groups of systems into units known as domains. DNS domains are organized into a hierarchical structure on an Internet-wide basis with the defined suffixes constituting the top-level of the tree (.com,.edu,.org, the two-character country codes, etc.).
34
The Domain Name Service “ ukeducomorg cocsuohiociscowidgets researchmfg mrp2
35
The Domain Name Service The administrative unit for DNS is the zone. A zone is a subtree of the DNS database that is administered as a single separate entity. It can consist of a single domain or a domain with subdomains. With the exception of the root, each node in the DNS database has a name of up to 63 characters. Each subdomain must have a unique name within its parent domain. Node names are concatenated and separated with a period to form a fully qualified domain name (FQDN).
36
Name Resolution Name resolution is provided by name servers which interpret the information in a FQDN to find its specific address. A resolver passes a query to its local name server. If the name server does not have the data requested in the query, it queries other name servers on behalf of the resolver. In the worst-case scenario, the local name server starts at the top of the DNS tree with one of the root name servers and works its way down until the address is found.
37
Name Resolution DNS name resolution consists of three key concepts: Recursion: a resolver typically passes a recursive resolution request to its local name server. This puts the burden on the name server. Iteration: If the local name server cannot fully resolve the query, it enlists the aid of other DNS name servers, passing an iterative resolution request (the result may only be a pointer to another server). Caching: As local name servers process recursive requests, they discover a lot of information about the DNS name space. This information is cached.
38
Name Resolution grail:/etc> cat resolv.conf search cba.csuohio.edu csuohio.edu nameserver 137.148.49.10 nameserver 137.148.5.26 grail:/etc> nslookup Default Name Server: csu-a.csuohio.edu Address: 137.148.49.10 > 137.148.5.26 Name Server: csu-a.csuohio.edu Address: 137.148.49.10 Name: csu-b.csuohio.edu Address: 137.148.5.26 >
39
IP Routing The Internet and other TCP/IP networks are connected by routers, which are devices that pass IP packets from one network to another. It is impractical to maintain addresses for all computers on an IP network with which the local computer communicates. Instead, a default gateway (route) which is a computer connected to the local subnet and to other networks is used. It has knowledge of the network IDs of the other networks in the internetwork and how to reach them.
40
IP Routing When IP prepares to send a packet, it inserts the source IP address and the destination address of the packet in the IP header. It then examines a locally maintained route table and does one of the following: Pass the packet up to a protocol layer above IP on the local host. Forward the packet through one of the locally attached network adapters. Discard the packet.
41
IP Routing The search for a match for the destination address in the route table proceeds from the specific to the general as follows: Examine table for exact match. Strip the host portion and examine table for a match (subnet route). Strip subnet portion and examine table for a match (network route). Use default gateway. If no default gateway specified, discard packet.
42
IP Routing The default gateway contains info about the network Ids of the other networks in the internetwork, so it can forward the packet to other routers until the packet is eventually delivered to a router connected to the specified destination. This process is known as routing.
43
Windows Networking Windows traditionally has supported other standard networking protocols in addition to TCP/IP: IPX/SPX (NetWare) AppleTalk SNA On DOS systems, the Basic Input/Output System (BIOS) constituted the OS’s I/O interface. NetBIOS was developed to extend it to I/O operations over a LAN.
44
NetBIOS The NetBIOS interface needed a corresponding transport protocol. The first one developed was called the NetBIOS Frames Protocol (NBFP). In non-TCP/IP environments, NetBIOS traffic used the NetBIOS Extended User Interface (NetBEUI) also known as NetBios Frame (NBF); this is the transport protocol used in traditional Microsoft networks, but has been largely replaced by TCP/IP. NetBIOS may also be run over TCP/IP (NBT).
45
NetBIOS Higher-level services for standard Microsoft networking are provided by the Server Message Block (SMB) protocol. NetBIOS and NetBEUI don’t scale well beyond small networks since: they rely on broadcast-based naming scheme packets cannot be routed lack networking compatibility with other kinds of computers Therefore, methods for running NetBIOS on top of other protocol families were developed.
46
NetBIOS If the NetBEUI protocol was installed, local NetBIOS traffic used its facilities, while standard TCP/IP facilities used TCP/IP. Otherwise, NetBIOS-based facilities used the TCP/IP facilities for communication with other hosts. In general, NetBIOS names consist of a single part, however NetBIOS names are compatible with DNS names, making interoperability possible.
47
NetBIOS The original naming scheme for NetBIOS consisted of a flat name space where each computer was assigned a single-part name. This approach works well for a small network, but does not scale well. A hierarchical naming scheme (like DNS) has been implemented for NetBIOS. Is is called NetBIOS Scope. Windows uses the HOSTS file for DNS names and LMHOSTS for NetBIOS names.
48
NetBIOS over TCP/IP Name Resolution Name resolution services for Windows fall into two general categories: NetBIOS over TCP/IP (NetBT) Domain Name System (DNS) NetBT is the session-layer network service that performs name-to-IP address mapping for name resolution. It is implemented through the broadcast name resolution and Windows Internet Name Service (WINS) (on those networks with WINS servers)
49
NetBIOS over TCP/IP Name Resolution The two most important aspects of the related naming activities are registration and resolution: Registration is the process used to register a unique name for each host on the network. Resolution is the process used to determine the physical address of a host. NetBIOS names are resolved using two methods, depending on whether WINS resolution is available and enabled on the client computer.
50
NetBIOS over TCP/IP Name Resolution If WINS is not enabled on the client: The computer registers its name by sending name registration request packets to the local subnet. To find a host, the non-WINS computer sends name query request packets (as broadcast messages) on the local subnet. The broadcast message cannot be passed through IP routers. If local name resolution fails, the local LMHOSTS file is consulted.
51
NetBIOS over TCP/IP Name Resolution If WINS is enabled on the client: The computer first queries the WINS server. If that fails, it sends name registration and query requests. To register a name: A non-WINS host broadcasts a name registration request on the local subnet. If a host on the subnet already has claimed the name, it must challenge the name registration. A WINS host sends a registration request directly to the WINS server to be added to the database.
52
Windows Internet Name Service The Windows Internet Name Service (WINS) is a dynamic hostname-based addressing scheme used on LANS supporting NetBIOS. It is integrated with DNS via the Microsoft DNS Server, allowing WINS clients to resolve DNS names. WINS translates NetBIOS names to IP addresses.
53
Dynamic Host Configuration Protocol The Dynamic Host Configuration Protocol (DHCP) facility assigns IP addresses to network hosts dynamically. This decreases the individual workstation configuration necessary for a system to be successfully connected to the network. It is especially suited for computers that change network locations frequently (e.g. laptops). A system is identified as a DHCP client via the General tab of its TCP/IP Properties.
54
Dynamic Host Configuration Protocol DHCP works as follows When a DHCP-prepared PC starts, it sends a DHCPDISCOVER broadcast message on the LAN. If the client doesn’t receive an answer, it keeps sending messages four times a minute for the next five minutes, or until it receives an answer. Each DHCP server that receives a DHCPDISCOVER message searches its tables for an allocation for this PC. If it finds one, it answers with a DHCPOFFER message, which contains the IP address the lease period, and other info.
55
Dynamic Host Configuration Protocol If no previous allocation exists, one or more DHCP servers answer with IP addresses belonging to the subnet on which the PC is placed. When the PC wants to accept an IP address, it returns a DHCPREQUEST message with an identification of the chosen DHCP server. Clients equipped with hard disks keep the allocated TCP/IP address with each subsequent start. The client will try to renew the lease when half of the lease period is over. If the lease period expires without a resubscription, the PC must stop using the IP address and start a new negotiation using the process described above.
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.