CS计算机代考程序代写 dns file system FTP Internet Protocols

Internet Protocols
31
Internet Protocols
A Layered Architecture
TCP/IP.
These protocols have been implemented in every operating system, and make fast web development possible.
Networking is it’s own entire discipline.
Web developer needs general awareness of what the suite of Internet protocols does
32

Internet Protocols
A Layered Architecture
33
Internet Protocols
Link Layer
• Responsible for
• physical transmission of data across media (both wired and wireless) and
• Establishing logical links.
It handles issues like packet creation, transmission, reception, error
detection, collisions, line sharing, and more.
Much more to learn in Networking courses outside of web development.
34

Internet Protocols
Internet Layer
The Internet layer provides “best effort” communication.
Makes use of IP addresses
35
Internet Protocols
Internet Layer (IP)
36

Internet Protocols
IP addresses
37
Internet Protocols
Transport Layer (TCP)
• Ensures transmissions arrive in order and without error
38

Internet Protocols
Application Layer
There are many application layer protocols. Web developers should be aware of :
• HTTP.
• SSH.
• FTP.
• POP/IMAP/SMTP. • DNS.
39
Domain Name System
40

Domain Name System
Name Levels
Third-level domain Top-level domain (TLD) server1.www.funwebdev.com
Most general
Most specific
Fourth-level domain Second-level domain (SLD)
Top-level domain (TLD) com
Second-level domain (SLD)
funwebdev
Third-level domain www
Fourth-level domain
server1
41
Domain Name System
Types of Top Level Domains
• Generic top-level domain (gTLD)
• Unrestricted. TLDs include .com, .net, .org, and .info.
• Sponsored. TLDs including .gov, .mil, .edu, and others.
• New TLDs.
• Country code top-level domain (ccTLD)
• TLDs include .us , .ca , .uk , and .au.
• Internationalized Domain Names
• ARPA
42

Domain Name System
Name Registration
43
Domain Name System
Address Resolution
44

Uniform Resource Locators
45
Uniform Resource Locators
Overview
http://www.bfoubnbwyecbhdaenv.coormg/index.php?page=17#article
Protocol Domain Path Query String Fragment
46

Uniform Resource Locators
Protocol
Recall that we listed several application layer protocols on the TCP/IP stack. FTP, SSH, HTTP, POP, IMAP, DNS, …
Requesting
• ftp://example.com/abc.txt à sends out an FTP request on port 21, while
• http://example.com/abc.txt à transmits an HTTP request on port 80.
47
Uniform Resource Locators
Domain
• The domain identifies the server from which we are requesting resources.
• Since the DNS system is case insensitive, this part of the URL is case insensitive.
• Alternatively, an IP address can be used for the domain
48

Uniform Resource Locators
Port
• The optional port attribute allows us to specify connections to ports other than the defaults
• Add a colon after the domain, then specify an integer port number.
49
Uniform Resource Locators
Path
Familiar concept to anyone who has ever used a computer file system.
The root of a web server corresponds to a folder somewhere on that server.
• On many Linux servers that path is /var/www/html/
• On Windows IIS machines it is often /inetpub/wwwroot/
The path is optional. However, when requesting a folder or the top-level page, the web server will decide which file to send you.
50

Uniform Resource Locators
Query String
Keys
?username=john & password=abcdefg
Delimiters
Values
51
Uniform Resource Locators
Fragment
A way of requesting a portion of a page.
• Browsers will see the fragment in the URL, seek out the tag anchor in the HTML, and scroll the website to it.
52

Hypertext Transfer Protocol
53
Hypertext Transfer Protocol
Headers
• Request headers include data about the client machine.
• Response headers have information about the server answering the request and the data being sent
54

Hypertext Transfer Protocol
Request Methods
55
Hypertext Transfer Protocol
Response Codes
• 2## codes are for successful responses,
• 3## are for redirection-related responses,
• 4## codes are client errors,
• 5## codes are server errors.
56

Hypertext Transfer Protocol
(Some) Response Codes
200: OK
301: Moved Permanently 304: Not Modified
307: Temporary redirect 400: Bad Request
401: Unauthorized
404: Not found
414: Request URI too long 500: Internal server error
57
Web Browsers
58

Web Browsers
Fetching a Web Page – Load Times and Cascades
59
Web Browsers
Browser Rendering
• Interpreting the entire HTML markup together with the image and other assets into a grid of pixels for display within the browser window is called rendering the webpage.
• Implemented differently for each browser (Firefox, Chrome, Safari, Explorer, and Opera)
60

Web Browsers
Browser Caching
61
Web Browsers
Browser Features
• search engine integration,
• URL autocompletion,
• Form autocompletion,
• cloud caching of user history/bookmarks,
• phishing website detection,
• secure connection visualization, and much more
62