590 likes | 755 Views
Lecture 18 Overview. What is network management?. autonomous systems (aka “network”) 100s or 1000s of interacting hardware/software components
E N D
What is network management? • autonomous systems (aka “network”) • 100s or 1000s of interacting hardware/software components • "Network management includes the deployment, integration and coordination of the hardware, software, and human elements to monitor, test, poll, configure, analyze, evaluate, and control the network and element resources to meet the real-time, operational performance, and Quality of Service requirements at a reasonable cost.“ CPE 401/601 Lecture 18 : Network Management
managing entity data data data data data agent agent agent agent Infrastructure for network management managing entity managed devices contain managed objects whose data is gathered into a Management Information Base (MIB) managed device network management protocol managed device managed device managed device CPE 401/601 Lecture 18 : Network Management
Network Management standards SNMP: Simple Network Management Protocol • Internet roots • SGMP: Simple Gateway Monitoring Protocol • started simple • deployed, adopted rapidly • growth: size, complexity • currently: SNMP V3 • de facto network management standard CPE 401/601 Lecture 18 : Network Management
SNMP overview: 4 key parts • Management information base (MIB): • distributed information store of network management data • Structure of Management Information (SMI): • data definition language for MIB objects • SNMP protocol • convey manager<->managed object info, commands • security, administration capabilities • major addition in SNMPv3 CPE 401/601 Lecture 18 : Network Management
Management Information Base Basic Data Types • Purpose: syntax, semantics of management data well-defined, unambiguous • base data types: • straightforward • OBJECT-TYPE • data type, status, semantics of managed object • MODULE-IDENTITY • groups related objects into MIB module CPE 401/601 Lecture 18 : Network Management
MODULE Management Information Base MIB module specified via SMI MODULE-IDENTITY (100 standardized MIBs, more vendor-specific) OBJECT TYPE: OBJECT TYPE: OBJECT TYPE: objects specified via SMI OBJECT-TYPE construct CPE 401/601 Lecture 18 : Network Management
MIB example: UDP module Object ID Name Type Comments 1.3.6.1.2.1.7.1 UDPInDatagrams Counter32 total # datagrams delivered at this node 1.3.6.1.2.1.7.2 UDPNoPorts Counter32 # underliverable datagrams no app at portl 1.3.6.1.2.1.7.3 UDInErrors Counter32 # undeliverable datagrams all other reasons 1.3.6.1.2.1.7.4 UDPOutDatagrams Counter32 # datagrams sent 1.3.6.1.2.1.7.5 udpTable SEQUENCE one entry for each port in use by app, gives port # and IP address CPE 401/601 Lecture 18 : Network Management
SNMP Naming • question: how to name every possible standard object (protocol, data, more..) in every possible network standard?? • answer: ISO Object Identifier tree: • hierarchical naming of all objects • each branchpoint has name, number 1.3.6.1.2.1.7.1 udpInDatagrams UDP MIB2 management ISO ISO-ident. Org. US DoD Internet CPE 401/601 Lecture 18 : Network Management
request managing entity managing entity data data agent agent SNMP protocol • Two ways to convey MIB info, commands: trap msg response Managed device Managed device request/response mode trap mode CPE 401/601 Lecture 18 : Network Management
SNMP protocol: message types Function Message type GetRequest GetNextRequest GetBulkRequest Mgr-to-agent: “get me data” (instance,next in list, block) InformRequest Mgr-to-Mgr: here’s MIB value SetRequest Mgr-to-agent: set MIB value Agent-to-mgr: value, response to Request Response Agent-to-mgr: inform manager of exceptional event Trap CPE 401/601 Lecture 18 : Network Management
SNMP security and administration • encryption: DES-encrypt SNMP message • authentication: compute, send MIC(m,k): • compute hash (MIC) over message (m), secret shared key (k) • protection against playback: use nonce • view-based access control • SNMP entity maintains database of access rights, policies for various users • database itself accessible as managed object! CPE 401/601 Lecture 18 : Network Management
a 00000011 00000001 a 00000001 00000011 The presentation problem • Q: does perfect memory-to-memory copy solve “the communication problem”? • A: not always! struct { char code; int x; } test; test.x = 256; test.code=‘a’ test.code test.x test.code test.x host 2 format host 1 format problem: different data format, storage conventions CPE 401/601 Lecture 18 : Network Management
Presentation problem: potential solutions • Sender learns receiver’s format and translates into receiver’s format. Sender sends. • Sender sends. Receiver learns sender’s format and translate into receiver-local format • Sender translates host-independent format and sends. Receiver translates to receiver-local format. CPE 401/601 Lecture 18 : Network Management
ASN.1: Abstract Syntax Notation 1 • ISO standard X.680 • used extensively in Internet • defined data types, object constructors • like SMI • BER: Basic Encoding Rules • specify how ASN.1-defined data objects to be transmitted • each transmitted object has Type, Length, Value (TLV) encoding CPE 401/601 Lecture 18 : Network Management
TLV Encoding • Idea: transmitted data is self-identifying • T: data type, one of ASN.1-defined types • L: length of data in bytes • V: value of data, encoded according to ASN.1 standard Tag ValueType Boolean Integer Bitstring Octet string Null Object Identifier Real 1 2 3 4 5 6 9 CPE 401/601 Lecture 18 : Network Management
Network Management • network management • extremely important: 80% of network “cost” • ASN.1 for data description • SNMP protocol as a tool for conveying information • Network management: more art than science • what to measure/monitor • how to respond to failures? • alarm correlation/filtering? CPE 401/601 Lecture 18 : Network Management
Lecture 19Hyper Text Transfer Protocol CPE 401 / 601 Computer Network Systems slides are modified from Dave Hollinger slides are modified from Dave Hollinger
Hyper Text Transfer Protocol • HTTP is the protocol that supports communication between web browsers and web servers. • A “Web Server” is a HTTP server • Most clients/servers today speak version 1.1, but 1.0 is also in use. • RFC 1945 (HTTP 1.0) • RFC 2616 (HTTP 1.1) HTTP
From the RFC • “HTTP is an application-level protocol with the lightness and speed necessary for distributed, hypermedia information systems.” • Transport Independence • The HTTP protocol generally takes place over a TCP connection, • but the protocol itself is not dependent on a specific transport layer. HTTP
HTTP overview • Web’s application layer protocol • client/server model • client: browser that requests, receives, “displays” Web objects • server: Web server sends objects in response to requests HTTP request PC running Explorer HTTP response HTTP request Server running Apache Web server HTTP response Mac running Navigator
Request - Response • HTTP has a simple structure: • client sends a request • server returns a reply • HTTP can support multiple request-reply exchanges over a single TCP connection • The “well known” TCP port for HTTP servers is port 80 • Other ports can be used as well HTTP
HTTP connections • HTTP is “stateless” • server maintains no information about past client requests • Nonpersistent HTTP • At most one object is sent over a TCP connection • Persistent HTTP • Multiple objects can be sent over single TCP connection between client and server
HTTP 1.0+ Request Request-Line Headers . . . • Lines of text (ASCII) • Lines end with CRLF “\r\n” • First line is called “Request-Line” blank line Content... HTTP
Request Line • Method URI HTTP-Version\r\n • The request line contains 3 tokens (words) • space characters “ ” separate the tokens • Newline (\n) seems to work by itself • but the protocol requires CRLF HTTP
HTTP Version Number • Starting with HTTP 1.0 the version number is part of every request • Client tells the server what version it can talk • what options are supported, etc • HTTP 0.9 did not include a version number in a request line • If a server gets a request line with no HTTP version number, it assumes 0.9 • HTTP 0.9 was used for many years HTTP
URI: Universal Resource Identifier • URIs defined in RFC 2396 • Absolute URI: • scheme://hostname[:port]/path • http://www.cse.unr.edu:80/~mgunes/cpe401 • Relative URI: • /path • /blah/foo No server mentioned HTTP
URI Usage • When dealing with a HTTP 1.1 server, only a path is used (no scheme or hostname) • HTTP 1.1 servers are required to be capable of handling an absolute URI • but there are still some out there that won’t • When dealing with a proxy HTTP server, an absolute URI is used • client has to tell the proxy where to get the document! HTTP
Request Method • The Request Method can be: GET HEAD DELETE PUT POST TRACE OPTIONS • future expansion is supported • GET, HEAD and POST are supported everywhere • HTTP 1.1 servers often support PUT, DELETE, OPTIONS & TRACE HTTP
Methods • GET: retrieve information identified by the URI • Typically used to retrieve an HTML document • HEAD: retrieve meta-information about the URI • used to find out if a document has changed • POST: send information to a URI and retrieve result • used to submit a form HTTP
More Methods • PUT: Store information in location named by URI • DELETE: remove entity identified by URI • TRACE: used to trace HTTP forwarding through proxies, tunnels, etc • OPTIONS: used to determine capabilities of server, or characteristics of a named resource HTTP
The Header Lines • Request Headers provide information to the server about the client • what kind of client • what kind of content will be accepted • who is making the request • Each header line contains • an attribute name followed by a “:” followed by a space and the attribute value • There can be 0 headers (HTTP 1.0) • HTTP 1.1 requires a Host: header HTTP
Example HTTP Headers Accept: text/html Host: www.cse.unr.edu From: mgunes@cse.unr.edu User-Agent: Mozilla/4.0 Referer: http://www.unr.edu/ HTTP
End of the Headers • Each header ends with a CRLF ( \r\n ) • The end of the header section is marked with a blank line • just CRLF • For GET and HEAD requests, the end of the headers is the end of the request! HTTP
POST • A POST request includes some content (some data) after the headers • after the blank line • There is no format for the data • just raw bytes • A POST request must include a Content-Length line in the headers: • Content-length: 267 HTTP
Example POST Request POST /~mgunes/grades.cgi HTTP/1.1 Accept: */* Host: www.cse.unr.edu User-Agent: SecretAgent V2.3 Content-Length: 35 Referer: http://www.unr.edu/ stuid=6660182722&item=test1&grade=99 HTTP
Example GET Request GET /~mgunes/cpe401/lab3.htm HTTP/1.1 Accept: */* Host: www.cse.unr.edu User-Agent: Internet Explorer From: mgunes@cse.unr.edu Referer: http://www.unr.edu/ There is a blank line here! HTTP
HTTP Response Status-Line Headers . . . • ASCII Status Line • Headers Section • Content can be anything • not just text • typically an HTML document or some kind of image blank line Content... HTTP
Response Status Line • HTTP-Version Status-Code Message • Status Code is 3 digit number (for computers) • 1xx Informational • 2xx Success • 3xx Redirection • 4xx Client Error • 5xx Server Error • Message is text (for humans) HTTP
Example Status Lines • HTTP/1.0 200 OK • HTTP/1.0 301 Moved Permanently • HTTP/1.0 400 Bad Request • HTTP/1.0 500 Internal Server Error HTTP
Response Headers • Provide the client with information about the returned entity (document) • what kind of document • how big the document is • how the document is encoded • when the document was last modified • Response headers end with blank line HTTP
Response Header Examples Date: Wed, 30 Mar 2010 12:48:17 EST Server: Apache/1.17 Content-Type: text/html Content-Length: 1756 Content-Encoding: gzip HTTP
Content • Content can be anything • sequence of raw bytes • Content-Length header is required for any response that includes content • Content-Type header also required HTTP
Single Request/Reply • The client sends a complete request • The server sends back the entire reply • The server closes it’s socket • If the client needs another document it must open a new connection This was the default for HTTP 1.0 HTTP
Persistent Connections • HTTP 1.1 supports persistent connections • this is the default • Multiple requests can be handled over a single TCP connection • The Connection: header is used to exchange information about persistence (HTTP/1.1) • 1.0 Clients used a Keep-alive: header HTTP
initiate TCP connection RTT request file time to transmit file RTT file received time time Non-Persistent HTTP: Response time • RTT: time for a small packet to travel from client to server and back • Response time: • one RTT to initiate TCP connection • one RTT for HTTP request and first few bytes of HTTP response to return • file transmission time • total = 2RTT+transmit time
Try it with telnet > telnet www.cse.unr.edu 80 GET / HTTP/1.0 HTTP/1.0 200 OK Server: Apache ... Request-line Blank Line (end of headers) Response HTTP
Try it with telnet (persistent) > telnet www.cse.unr.edu 80 GET / HTTP/1.1 Host: www.cse.unr.edu HTTP/1.0 200 OK Server: Apache ... Required! HTTP
User-server state: cookies • Four components: • 1) cookie header line of HTTP response message • 2) cookie header line in HTTP request message • 3) cookie file kept on user’s host, managed by user’s browser • 4) back-end database at Web site • Cookies and privacy: • cookies permit sites to learn a lot about you • you may supply name and e-mail to sites