Internet Programming Tools
Internet Programming Tools
A network of networks, joining many government, university and private computers together and providing an infrastructure for the use of E-mail, bulletin boards, file archives, hypertext documents, databases and other computational resources The vast collection of computer networks which form and act as a single huge network for transport of data and messages across distances which can be anywhere from the same office to anywhere in the world.
What is the Internet? 1. The largest network of networks in the world. 2. Uses TCP/IP protocols and packet switching . 3. Runs on any communications substrate. Brief History of the Internet
1968 - DARPA (Defense Advanced Research Projects Agency) contracts with BBN (Bolt, Beranek & Newman) to create ARPAnet. The funds were provided by the Department of Defense(DoD) in 1969. 1970 - First five nodes: a. UCLA b. Stanford c. UC Santa Barbara d. U of Utah, and e. BBN 1974 - TCP specification by Vint Cerf 1984 On January 1, the Internet with its 1000 hosts converts en masse to using TCP/IP for its messaging
Internet Growth Trends i. 1977: 111 hosts on Internet ii. 1981: 213 hosts iii. 1983: 562 hosts iv. 1984: 1,000 hosts v. 1986: 5,000 hosts vi. 1987: 10,000 hosts vii. 1989: 100,000 hosts viii. 1992: 1,000,000 hosts ix. 2001: 150 175 million hosts x. 2002: over 200 million hosts xi. By 2010, about 80% of the planet will be on the Internet
Internet Addressing i. ii. iii. iv. Addresses provide information on how to locate something, e.g., what route to take from here to there. Internet addresses combine a. a routing portion, known as the network part b. a name portion known as the host part How to split an Internet address into the network part and the host part has changed over time Back when the TCP/IP protocols were first being designed, there was a big argument between fixed length and variable length addresses a. Fixed length will always be limited i. But if you make it big enough, no one will notice b. Variable length will always take more cycles to process i. But there are tricks you can play to minimize the difference The decision was made for fixed, 32 bit addresses
v.
IP Address a. An IP address is a 32-bit sequence of 1s and 0s. b. To make the IP address easier to use, the address is usually written as four decimal numbers separated by periods. c. This way of writing the address is called the dotted decimal format.
IP addresses are divided into classes A,B and C to define large, medium, and small networks.
Host
The Class D address class was created to enable multicasting. IETF reserves Class E addresses for its own research.
Reserved IP Addresses a. Certain host addresses are reserved and cannot be assigned to devices on a network. b. An IP address that has binary 0s in all host bit positions is reserved for the network address. c. An IP address that has binary 1s in all host bit positions is reserved for the broadcast address.
Obtaining an Internet Network Address a. IP network addresses must be unique, or the Internet will not be stable b. The Internet Network Information Centre (InterNIC) was originally responsible for issuing Internet network addresses c. Today, the Internet Assigned Number Authority (IANA) issues network addresses to Information Service Providers (ISPs) d. ISPs split networks up into subnets and sell them on to their customers Text Internet Addressing i. In text Internet addresses, the text strings are referred to as Domains ii. Every internet mail address has two parts, they are separated by @ sign. a. Username b. Name of the Internet Provider
iii. iv.
The domain for the providers ends with the zone. Some of the Zones are v. jstewar [email protected]&l.com.uk a. Th e top
Commercial Organization Educational Institutions Networking Organizations US Government Sites Military sites Other Organizations
level domain shows which country the computer is located in, b. The second level domain indicates the type of organization. c. Between Second and user name there might be several intermediate domains that locate an organization. OSI Model
OSI Layers
Physical layers - The physical layer is responsible for the movement of individual bits from one hop (node) to the next.
Data Link layer - The data link layer is responsible for moving frames from one hop (node) to the next.
Network Layer - The network layer is responsible for the delivery of individual packets from the source host to the destination host
Transport layer - The transport layer is responsible for the delivery of a message from one process to another.
Session Layer
Presentation Layer
Application Layer
Summary of Layers
TCP/IP Protocol Suite The TCP/IP protocol suite is made of five layers: physical, data link, network, transport, and application. The first four layers provide physical standards, network interface, internetworking, and transport functions that correspond to the first four layers of the OSI
model. The three topmost layers in the OSI model, however, are represented in TCP/IP by a single layer called the application layer.
Addressing Three different levels of addresses are used in an internet using the TCP/IP protocols: physical (link) address, logical (IP) address, and port address. Addresses in TCP?IP Relationship of Layers
DNS Overview What is DNS? Distributed Directory Service Maps names to values resource records Highly resilient to attack* Major backbone of the internet Makes networks human friendly Defined (primarily) in RFC1034 and 1035 *if implemented properly
com
net
org
au
info
biz
Other ccTLDs
org
id
com
net
ausregistry
microsoft
yahoo
theage
internal
prosrs
DNS
vs File System
C:
com
au
net
P ro g r a m F ile s
W in d o w s
Tem p
o rg
com
net
id
C a ch e
S y s te m 3 2 F o n ts
M e d ia
m ic ro s o ft
g o o g le
yahoo
d riv e r s
d llc a c h e
spool
What is a domain? A domain is a sub tree of a larger tree identified by a domain name Contains resource records and sub-domains com net o rg au Some resource records point to authoritative server for sub-domains / zones eg. the root contains pointers to .au google.com.au is a domain
o rg id com
in fo
b iz
O th e r ccTLD s
net
a u s re g is t r y m ic r o s o ft
g o o g le
yahoo
th e a g e
in te rn a l
p ro s r s
What is a resource record? A domain contains resource records Resource records are analogous to files Classified into types Some of the important types are SOA, NS, A, CNAME and MX Normally defines in zone files Type SOA A MX CNAME PTR HINFO TXT Meaning Start of Authority IP address of a host Mail Exchange Canonical Name Pointer Host Description Text Value Parameters for this zone 32bit integer Priority, domain willing to accept email Domain Name Alias for an IP address CPU and OS in ASCII (security risk rarely used) Uninterpreted ASCII text
Domain Names vs. URLs The A Record The Address record One or more normally defines a host Contains an IPv4 Address (the address computers use to uniquely identify each other on the internet) Eg. The record: www A 203.18.56.31 In the ausregistry.com.au domain, defines the host uniquely identifiable as www.ausregistry.com.au to be reachable at the IPv4 Address 203.18.56.31 The CNAME Record A CNAME defines an alias The alias will then be resolved, if another CNAME is encountered then the process continues until an A record is found Eg. The record: search CNAME www.google.com. In the ausregistry.com.au domain, defines the name uniquely identifiable as search.ausregistry.com.au to be and alias to www.google.com The MX Record An MX record defines the mail servers for a particular domain Mail eXchange records hold the name of hosts, and their priorities, able to deliver mail for the domain. Eg. The record: ausregistry.com.au MX 10 mail
In the ausregistry.com.au domain, defines the host mail to be the priority 10 mail server for the ausregistry.com.au domain The NS Record An NS record defines the authoritative Name servers for the domain. The Name Server records also define the name servers of children domains Eg. The record: internal NS ns1.hosting.com.au. In the ausregistry.com.au domain, defines the host ns1.hosting.com.au to be a name sever for the internal.ausregistry.com.au sub-domain What is a Delegation? Delegation refers to the act of putting NS records in a domain name delegating control of a sub-domain to another entity This entity then has the ability to control the resource records in this sub-domain and delegate further children domains to other entities. Eg. IANA delegating control of a country code domain to the country. What is a zone? Its records are held in a database (zonefile) and served from an authoritative name server Zone refers to all the resource records in a domain but not its sub domains, the com.au zone contains delegations records for ausregistry.com.au, but not the resource records for ausregistry.com.au, however all of these records are part of the com.au domain What is a Name Sever? Server responsible for answering DNS queries Exists at all levels of hierarchy Authoritative name servers hold part of the DNS database One name server can serve more then one zone Many name servers should serve the same zone Some name servers are authoritative for certain zones Iterative vs Recursive Name Servers Serve two very different functions Shouldnt mix the two Generally the DNS your computer points to is recursive Zones are hosted in iterative name servers Iterative servers can only answer information they know or have cached Recursive know how to ask others for information Who runs what? ICANN/IANA have been granted the power by the US department of commerce to run the root zone. Root zone is split into all the ISO ccTLD and some other TLDs eg. .com, .net, .info Domain name Registries are appointed to operate the major zones.
Each country elects a delegate whom controls their ccTLD eg in Australia the delegate is auDA. Modify TLD and ccTLD resource records on behalf of registrants through a system of registrars eg. MelbourneIT. So what does all this mean to you? Domain names make large networks such as the internet human friendly IPv4 address difficult to remember and offer no hint as to whom they belong to. Problem gets worse when you consider IPv6 Allow intelligent systems (eg Mail (SMTP)) to preform tasks automaticall Accessing a web page
Step 1: Y our PC sends a resolution request to its configured D S N Server, typically at you ISP r .
Step 2: Y our ISPs recursive nam e server starts by asking one of the root servers predefined in its hints T m the A ell e ddress of file.
w .google.com ww
I dont know the address but I knowwhos authoritative for the com dom ask them ain
S p 3 Y u IS s re u iv n m te : o r P c rs e a e s rv r th n a k o e o th c m e e e ss n f e o n m s rv rs a d c d a e e e s ire te .
T ll m th A d s o e e e d re s f w .g o le o w w o g .c m
Step 4: Y our ISPs recursive nam e server then asks one of the google.com nam servers as e T m the A dress o ell e d f directed.
w w oog w .g le.co m
S d m th w w o g en e e w .g o le.co .au m w p e eb ag
S p 6 Y u P ca th n m e th te : o r C n e ak e a a H T re u t to th w b ctu l T P q es e e se er. rv
H re it is! e
Summary
WEB (HTTP) Request root DNS servers google.com.au Web Server 6
2
DNS requests
DNS
google.com DNS server
Sending an Email DNS is not just used in HTTP protocol (web pages) DNS is involved in almost every protocol in use on the internet Next example is how DNS facilitates the transfer of electronic mail.
Step 1: Y our PC sends the e to its configured outbound m ail server. A DNS request sim ilar to the previous exam is required to find ple the address of the m server. ail
Your PC Outbound Mail (SMTP) Server
Outbound Mail server DNS servers
-m ail
Step 2: Y our m server follows ail the sam intensive process to find e the authoritative servers for exam ple.com .
Step 3: A the exam sk ple.com nam server for the list of M e ail eXchangers (M for that dom X) ain.
T m the M s for ell e X exam ple.com
S p 4 S le t a M il s rv r a d te : e c a e e n d liv r th m il. e e e a
H reis s m m il fo th e o e a r e x m le o d m in e a p .c m o a
M il a c p dfo d liv ry a c e te r e e
Summary DNS is integral part in most protocols used on the internet Makes the internet human friendly for us all Is the world largest distributed database system Fits the international model perfectly In simple terms is a mapping between names and IP addresses What is E-mail? E-mail is a text-based mail sent via the computer from one person to another.
E-mail is an ideal method for sending documents already on your computer using attachments. In computer terms, email is short for electronic mail. It is a more up to date method of transmitting data, text files, and digital photos and ... from one computer to another over the Internet. This phenomenon did not become popular until 1990 and now it is a major business and personal communications. Email users create and send messages from individual computers using Mail-User Agents (MUAs). If the user were to send the message to more than one recipient, it is called broadcasting. An E-mail account may looks like below: [email protected] user@computername Two Important Mail Protocols Two important protocols Mail Process POP3: Is useful when e-mail is checked from only one computer. POP3 works by reviewing the inbox on the mail server, and downloading the new messages to your computer so your mail is stored on your PC. IMAP is the better choice when you would like to check your mails from multiple computers at work and home. IMAP downloads the headers of the new messages on the server, then retrieves the message you want to read when you click on it. When using IMAP, the mail is stored on the mail server. Unless you copy a message to a "Local Folder" the messages are never copied to your PC. [email protected] [email protected]
Scenarios of Use POP3: You only check e-mail from one computer. You want to remove your e-mail from the mail server.
IMAP: You check e-mail from multiple locations. You use Webmail. Mail process: MUA: Mail User Agent Program used for reading and writing mail. For example: Pine , Netscape, Eudora Mailbox access methods used by MUAs: POP , IMAP
MTA: Mail Transport Agent Program used for transporting mail from one host to another like: Sendmail, Exchange, qmail, Exim, Postfix Protocol between MTAs: SMTP
MDA: Mail Delivery Agent MDA delivers the mail to the users mailbox
Scenario1: When the sender and the receiver of an email are on the same system, we need only two user agents.
Scenario 2: When the sender and the receiver of an email are on different systems, we need two UAs and a pair of MTAs (client and server)
Scenario 3: When the sender is connected to the mail server via a LAN or a WAN, we
need two UAs and two pairs of MTAs (client and server).
Scenario 4:
Push Vs Pull
When both sender and receiver are connected to the mail server via a LAN or a WAN, we need two UAs, two pairs of MTAs (client and server), and a pair of MAAs (client and server). This is the most common situation today. The user agent (UA) provides service to the user to make the process of sending and receiving a message easier.
Some examples of command-driven user agents are mail, pine, and elm Hypertext Transfer Protocol (HTTP) i. HTTP is the protocol used to access resources on the World Wide Web ii. A browser application is used to send a request to the WWW server for a resource, e.g. a web page, graphics file, audio file, etc. iii. The server responds by sending the resource (a file) to the client and closing the connection Benefits of E-Mail Inexpensive communications medium Generates additional revenue opportunities Builds relationships Results are measurable Quick response cycles Drives web-site traffic Popular Medium - 45% US population 119 million Complements other communication channels Cost Savings due to E-Mail Usage among U.S. Companies Newsgroups NNTP protocol newsgroups stored on NNTP news servers NNTP (Network News Transfer Protocol) server usually provided by ISP client should carry a wide Email client range of newsgroups Newsgroups: Protocol public servers carry limited ranges of newsgroups port 119
Newsgroups: Quality of Service communication bandwidth news servers client application usually an email client also
File Transfer Protocol (FTP) Protocol for copying files between client and an FTP server Uses a TCP connection for reliable transfer of files with error-checking Most browsers support FTP, or you can use a dedicated FTP client program, e.g WS_FTP Trivial File Transfer Protocol (TFTP) is a lightweight version for small memory devices Telnet Telnet allows a user to run commands and programs remotely on another computer across the Internet The user runs a Telnet client program on the local host A Telnet server process must be running on the remote host The user must have the necessary permissions and password to access the remote host Some Port Assignments 21 23 FTP Telnet 25 70 smtp (mail) gopher 79 80 finger HTTP