• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Networking
 

Networking

on

  • 431 views

 

Statistics

Views

Total Views
431
Views on SlideShare
431
Embed Views
0

Actions

Likes
0
Downloads
4
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Networking Networking Presentation Transcript

    • Networking Networking and Operating Systems Kinds of Networking Applications The Stack Protocol Suites Connection-Oriented or Connectionless? Mux/Demux Layers Application Access Example: tcpdump Networking at Link Layer Example: DHCP Example: OSPF Example: ping Interfaces Applications Middleware The Global Grid 1 / 43
    • Networking and Operating Systems Networking Networking and s Many different pieces Operating Systems Kinds of Networking s Some pieces are in the kernel; others are in Applications The Stack user space Protocol Suites Connection-Oriented or Connectionless? s Apart from the division, we need appropriate Mux/Demux Layers interfaces Application Access Example: tcpdump at Link Layer Example: DHCP Example: OSPF Example: ping Interfaces Applications Middleware The Global Grid 2 / 43
    • Kinds of Networking Networking Networking and s Different protocols; different protocol suites Operating Systems Kinds of Networking s User versus kernel consumption Applications The Stack s Synchronous versus asynchronous Protocol Suites Connection-Oriented or Connectionless? Mux/Demux Layers Application Access Example: tcpdump at Link Layer Example: DHCP Example: OSPF Example: ping Interfaces Applications Middleware The Global Grid 3 / 43
    • Applications Networking Networking and s Service Operating Systems Kinds of Networking s Servers Applications The Stack s Clients Protocol Suites Connection-Oriented or Connectionless? s Peer-to-peer Mux/Demux Layers s Which are part of the OS? Application Access Example: tcpdump at Link Layer Example: DHCP Example: OSPF Example: ping Interfaces Applications Middleware The Global Grid 4 / 43
    • The Stack Networking Networking and s Seven layers: physical, link, network, transport, Operating Systems Kinds of Networking session, presentation, application Applications The Stack s Well, not really, on the Internet Protocol Suites Connection-Oriented or Connectionless? s Link layer — device drivers Mux/Demux Layers s Network: IP (Internet Protocol) Application Access Example: tcpdump s Transport (and a bit of session): TCP, UDP at Link Layer Example: DHCP s Presentation, application: applications Example: OSPF Example: ping s All but the last are in the kernel Interfaces Applications Middleware The Global Grid 5 / 43
    • Protocol Suites Networking Networking and s TCP/IP — The Internet Operating Systems Kinds of Networking s Subclass: IPv6 Applications The Stack s OSI Protocol Suites Connection-Oriented or Connectionless? s Novell IPX Mux/Demux Layers s Appletalk Application Access Example: tcpdump s NetBIOS at Link Layer Example: DHCP s Many others that have faded from the scene Example: OSPF Example: ping Interfaces Applications Middleware The Global Grid 6 / 43
    • Connection-Oriented or Connectionless? Networking Networking and s Some protocols are connection-oriented — Operating Systems Kinds of Networking once things are set up, you always talk to a Applications The Stack single endpoint Protocol Suites Connection-Oriented or Connectionless? s Example: TCP Mux/Demux Layers s Others are connectionless — each packet can Application Access Example: tcpdump go to or come from a different place at Link Layer Example: DHCP s Example: UDP, as used in the DNS Example: OSPF Example: ping Interfaces Applications Middleware The Global Grid 7 / 43
    • Mux/Demux Networking Networking and s Many layers of multiplex/demultiplex Operating Systems Kinds of Networking s Link layer selects different network layers (and Applications The Stack maybe different protocol suites) Protocol Suites Connection-Oriented or Connectionless? s Network layer selects different transports Mux/Demux Layers s Transport layer selects different applications Application Access Example: tcpdump s User space can read all layers at Link Layer Example: DHCP Example: OSPF Example: ping Interfaces Applications Middleware The Global Grid 8 / 43
    • Layers Networking Networking and Operating Systems Kinds of Networking Applications The Stack Application Protocol Suites Connection-Oriented or Connectionless? Mux/Demux Layers Application Access Example: tcpdump at Link Layer Transport Transport Example: DHCP Example: OSPF Example: ping Interfaces Network Network Applications Middleware The Global Grid Link 9 / 43
    • Application Access Networking Networking and s Why do applications have access to all layers? Operating Systems Kinds of Networking s Debugging Applications The Stack s Implement layer at user level Protocol Suites Connection-Oriented or Connectionless? Mux/Demux Layers Application Access Example: tcpdump at Link Layer Example: DHCP Example: OSPF Example: ping Interfaces Applications Middleware The Global Grid 10 / 43
    • Example: tcpdump at Link Layer Networking Networking and # tcpdump -v -v -s 1500 not ip and not Operating Systems Kinds of Networking arp Applications The Stack tcpdump: listening on bge0, link-type Protocol Suites Connection-Oriented EN10MB (Ethernet), capture size 1500 or Connectionless? Mux/Demux bytes 23:05:57.642505 00:48:54:71:ce:32 Layers Application Access Example: tcpdump > Broadcast null I (s=0,r=0,C) len=42 at Link Layer Example: DHCP Example: OSPF Example: ping Interfaces Applications Middleware The Global Grid 11 / 43
    • Example: DHCP Networking Networking and s DHCP is used to assign IP addresses to hosts Operating Systems Kinds of Networking s At the time a host issues a DHCP request, it Applications The Stack has no IP address, so it can’t speak IP Protocol Suites Connection-Oriented or Connectionless? s Both the DHCP client and the DHCP server Mux/Demux Layers have to listen – and speak – at link level Application Access Example: tcpdump at Link Layer Example: DHCP Example: OSPF Example: ping Interfaces Applications Middleware The Global Grid 12 / 43
    • Example: OSPF Networking Networking and s The OSPF routing protocol runs directly on Operating Systems Kinds of Networking top of IP Applications The Stack s To implement this at user level, the program Protocol Suites Connection-Oriented or Connectionless? has to read IP packets Mux/Demux Layers Application Access Example: tcpdump at Link Layer Example: DHCP Example: OSPF Example: ping Interfaces Applications Middleware The Global Grid 13 / 43
    • Example: ping Networking Networking and s ping uses ICMP messages Operating Systems Kinds of Networking s ICMP lives directly on top of IP Applications The Stack s In other words, ICMP packets have to be Protocol Suites Connection-Oriented or Connectionless? available both in the kernel and at user level Mux/Demux Layers Application Access Example: tcpdump at Link Layer Example: DHCP Example: OSPF Example: ping Interfaces Applications Middleware The Global Grid 14 / 43
    • Interfaces Networking Interfaces s What is the interface to the networking stack? Interfaces Network s Is it file-like? Something special? Connections Aren’t Files s The answer, of course, is “it depends” The Socket Interface Sockets and Layers Connectionless Networks Couldn’t We Just Open /dev/tcp? Interfaces — Summary Applications Middleware The Global Grid 15 / 43
    • Network Connections Aren’t Files Networking Interfaces s We always do much more than just read or Interfaces Network write Connections Aren’t Files s We often have to pass extra information, such The Socket Interface Sockets and Layers as source or destination address for Connectionless Networks Couldn’t We Just connectionless protocols Open /dev/tcp? Interfaces — s But sometimes, we do just read and write. . . Summary Applications Middleware The Global Grid 16 / 43
    • The Socket Interface Networking Interfaces s Due originally to Berkeley, circa 1983 Interfaces Network s Network access is initiated by the socket() Connections Aren’t Files system call The Socket Interface Sockets and Layers s On Unix, socket() returns an ordinary file Connectionless Networks Couldn’t We Just descriptor; you can (eventually) do Open /dev/tcp? Interfaces — read()/write()/close() Summary s On Windows, it returns a special type of file Applications Middleware descriptor; you can only do special socket The Global Grid operations, such as send()/recv() 17 / 43
    • Sockets and Layers Networking Interfaces s Sockets are used at all layers — parameters on Interfaces Network the socket() call specify the layer and Connections Aren’t Files protocol The Socket Interface Sockets and Layers s The semantics of the returned file descriptor Connectionless Networks Couldn’t We Just are layer-dependent Open /dev/tcp? Interfaces — s A variety of options can be set with Summary setsockopt() and ioctl() Applications Middleware s Sockets are also used for configuration control, The Global Grid such as assigning IP addresses to interfaces s You control the routing tables by writing to a special socket 18 / 43
    • Connectionless Networks Networking Interfaces s Every packet written needs a destination Interfaces Network address as well as data Connections Aren’t Files s Every packet read contains a source address as The Socket Interface Sockets and Layers well as data Connectionless Networks Couldn’t We Just s Use sendto()/recvfrom() Open /dev/tcp? Interfaces — s (Address format will vary, depending on the Summary type of network; some networks even use Applications Middleware variable-length addresses The Global Grid 19 / 43
    • Couldn’t We Just Open /dev/tcp? Networking Interfaces s On some systems, such as Solaris, you can! Interfaces Network s But — we still need special operations Connections Aren’t Files s setsockopt() could just be an ioctl, but The Socket Interface Sockets and Layers accept() returns a new file descriptor Connectionless Networks Couldn’t We Just s Connectionless networks use special data Open /dev/tcp? Interfaces — format Summary Applications Middleware The Global Grid 20 / 43
    • Interfaces — Summary Networking Interfaces s Network connections aren’t really files Interfaces Network s Given all the special stuff that has to go on Connections Aren’t Files anyway, there’s little advantage to using the The Socket Interface Sockets and Layers file system instead of sockets Connectionless Networks Couldn’t We Just s There may be some advantage, though, to Open /dev/tcp? Interfaces — getting a normal file descriptor Summary Applications Middleware The Global Grid 21 / 43
    • Applications Networking Interfaces s Service Applications s Servers Applications Service Applications s Clients Service Dispatchers The Port Mapper s Peer-to-peer The Port Mapper Other Applications? Telnet and SSH Anonymous FTP Middleware The Global Grid 22 / 43
    • Service Applications Networking Interfaces s Service applications function as an extension of Applications the OS Applications Service Applications s Example: with NFS, the client and server are Service Dispatchers The Port Mapper in the kernel, but other pieces are at user level: The Port Mapper Other Applications? mounting and unmount the file system, Telnet and SSH Anonymous FTP locking, etc. Middleware s Example: Routing — IP is pretty useless The Global Grid without it 23 / 43
    • Service Dispatchers Networking Interfaces s Certain applications exist just to run other Applications applications Applications Service Applications s ineted — Runs most TCP and UDP Service Dispatchers The Port Mapper applications The Port Mapper Other Applications? s (Original idea was to keep the process table Telnet and SSH Anonymous FTP small, to improve performance. Now, it Middleware permits (some) servers to just use The Global Grid stdin/stdout) s Example: portmapper — dispatches inbound RPC requests 24 / 43
    • The Port Mapper Networking Interfaces s Subprocedures — or rather, their stubs — Applications register with the portmapper Applications Service Applications s The caller’s stubs contact the port mapper to Service Dispatchers The Port Mapper find out the actual port number for the The Port Mapper Other Applications? subprocedure Telnet and SSH Anonymous FTP s This is not quite invisible to the application Middleware programmer; at the least, the registration has The Global Grid to be set up 25 / 43
    • The Port Mapper Networking Interfaces $ rpcinfo -p cluster.cs.columbia.edu Applications Applications program vers proto port service Service Applications Service Dispatchers 100000 4 tcp 111 portmapper The Port Mapper The Port Mapper 100000 3 tcp 111 portmapper Other Applications? Telnet and SSH 100005 3 tcp 32782 mountd Anonymous FTP 100003 2 udp 2049 nfs Middleware The Global Grid and many more besides 26 / 43
    • Other Applications? Networking Interfaces s Most applications have nothing to do with the Applications OS Applications Service Applications s A Web server could run, almost unchanged, Service Dispatchers The Port Mapper just as well on Windows as on Unix The Port Mapper Other Applications? s (Minor differences in a few system calls) Telnet and SSH Anonymous FTP s But some do authentication Middleware The Global Grid 27 / 43
    • Telnet and SSH Networking Interfaces s Telnet and SSH permit remote logins Applications s They have to authenticate users, using Applications Service Applications OS-specific mechanisms Service Dispatchers The Port Mapper s Telnet can invoke login; SSH, which can do The Port Mapper Other Applications? its own authentication, cannot Telnet and SSH Anonymous FTP Middleware The Global Grid 28 / 43
    • Anonymous FTP Networking Interfaces s Ordinary FTP has to authenticate users; see Applications above Applications Service Applications s Anonymous FTP has a different problem: Service Dispatchers The Port Mapper confining the remote user The Port Mapper Other Applications? s Must use OS-specific sandbox mechanism Telnet and SSH Anonymous FTP Middleware The Global Grid 29 / 43
    • Middleware Networking Interfaces s Common middle layer between applications Applications and the stack Middleware Middleware s I.e., common middle ground between Goals of Middleware Types of Middleware applications and the OS CORBA Publish-Subscribe s Arguably as much a part of the OS as the C The Global Grid runtime library 30 / 43
    • Goals of Middleware Networking Interfaces s Common interface Applications s Naming Middleware Middleware s Replication Goals of Middleware Types of Middleware s Access CORBA Publish-Subscribe The Global Grid 31 / 43
    • Types of Middleware Networking Interfaces s Document-based: the Web Applications s File-based: distributed file system Middleware Middleware s Object-based: CORBA Goals of Middleware Types of Middleware s Publish-subscribe CORBA Publish-Subscribe s More. . . The Global Grid 32 / 43
    • CORBA Networking Interfaces s CORBA: Common Object Request Broker Applications Architecture Middleware Middleware s RPC extended procedure calls to the net Goals of Middleware Types of Middleware s CORBA extends objected-oriented CORBA Publish-Subscribe programming to the net The Global Grid s Instead of referencing files or web pages, you invoke methods s The CORBA Object Broker handles naming, location, access method, etc. 33 / 43
    • Publish-Subscribe Networking Interfaces s Processes that have information publish it Applications s On a LAN, implemented as a broadcast Middleware Middleware s Information router forwards such broadcasts to Goals of Middleware Types of Middleware other interested LANs CORBA Publish-Subscribe s If a process subscribes to a topic, its local The Global Grid information broker tells other LANs it wants such data 34 / 43
    • The Global Grid Networking Interfaces s Share computing resources around the world Applications s (The original goal of the ARPANET!) Middleware s Built on high performance computers and high The Global Grid The Global Grid performance networks It’s a Distributed OS Actually, There Are Many Grids Scenarios Security Issues Sandboxing Storage Space Accounting Other Essential Components 35 / 43
    • It’s a Distributed OS Networking Interfaces s The Grid functions like a large-scale distributed Applications operating system Middleware s It has to solve all the distributed OS problems The Global Grid The Global Grid we talked about It’s a Distributed OS Actually, There Are Many Grids s These include security, scheduling, locking, Scenarios Security Issues communications, and more Sandboxing Storage Space Accounting Other Essential Components 36 / 43
    • Actually, There Are Many Grids Networking Interfaces s The Grid is a concept and a set of protocols, Applications not a single Internet-wide virtual machine Middleware s You and your friends can pool your own The Global Grid The Global Grid machines It’s a Distributed OS Actually, There Are Many Grids s Each Grid sets up its own access control policy Scenarios Security Issues Sandboxing Storage Space Accounting Other Essential Components 37 / 43
    • Scenarios Networking Interfaces s Specific computer; local I/O only — simply Applications have to authenticate to host computer Middleware s Specific computer; remote I/O — must The Global Grid The Global Grid delegate security credentials to host OS to It’s a Distributed OS Actually, There Are Many Grids allow file retrieval and update Scenarios Security Issues s Run on “best” computer — must talk to Sandboxing Storage Space scheduler and delegate credentials; scheduler Accounting Other Essential must verify acceptability of credentials on each Components candidate machine s Multiprocessing — each remote job needs credentials to talk to other pieces 38 / 43
    • Security Issues Networking Interfaces s User authentication — straight-forward Applications s Must protect grid computers from remote Middleware users — standard operating system problem The Global Grid The Global Grid s Must have large-scale, secure, distributed file It’s a Distributed OS Actually, There Are Many Grids system Scenarios Security Issues s Users want to protect their data from the Sandboxing Storage Space remote OS — hard! Accounting Other Essential Components 39 / 43
    • Sandboxing Networking Interfaces s If untrusted users are running jobs on your Applications machine, you may want to sandbox them Middleware s But each user needs different resources; you The Global Grid The Global Grid need a flexible sandbox It’s a Distributed OS Actually, There Are Many Grids s You want to isolate each remote user from Scenarios Security Issues every other, and (if possible) from your local Sandboxing Storage Space users Accounting Other Essential Components 40 / 43
    • Storage Space Networking Interfaces s The Grid is for big problems; these take a lot Applications of storage space Middleware s How do we manage allocation? The Global Grid The Global Grid s How do we transfer that much over the net? It’s a Distributed OS Actually, There Are Many Grids s How do we encrypt that much data during Scenarios Security Issues storage? Sandboxing Storage Space Accounting Other Essential Components 41 / 43
    • Accounting Networking Interfaces s Someone has to pay for resources used Applications s The Grid includes accounting standards — Middleware record CPU, disk, and RAM usage (and The Global Grid The Global Grid perhaps bandwidth) It’s a Distributed OS Actually, There Are Many Grids Scenarios Security Issues Sandboxing Storage Space Accounting Other Essential Components 42 / 43
    • Other Essential Components Networking Interfaces s Name space Applications s File I/O and format conversion Middleware s File replication and cache engine The Global Grid The Global Grid s Brokers, which talk to schedulers It’s a Distributed OS Actually, There Are Many Grids s These are middleware Scenarios Security Issues Sandboxing Storage Space Accounting Other Essential Components 43 / 43