91
St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

Embed Size (px)

Citation preview

Page 1: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

1

Higher Computing – Unit 3

Networking

Protocols

Page 2: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

2

• Client and a server. • The server provides resources to the client and the

client uses the resources provided by the server.• You should know that on a network, every

computer needs a unique address -• this is necessary so that information can be

correctly routed from one machine to another. On the Internet this unique address is known as the Internet Protocol (IP) address. IP addresses are translated into user-friendly domain names by the Domain Name Service (DNS).

• You should know that computers use agreed standards in order to make communication easy, and that a common data standard used to transfer information between computers is the American Standard Code for Information Interchange (ASCII).

Pre-Requisite Knowledge

Page 3: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

3

Learning ObjectivesAfter studying this topic you should be able

to:• Understand the need for protocols when

connecting computers together in networks

• Describe the purpose of a number of common network protocols

• Understand how these protocols are linked to network applications

• Describe the functions of the networking protocols underlying the Internet

Pre-Requisite Knowledge

Page 4: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

4

Q1: What is an IP address?a) The physical location of a computerb) The code which identifies the user on a networkc) A unique number which identifies a computer on a networkd) An internet web site

Q2: What kind of data is ASCII code used to transmit?a) Textb) Graphicsc) Audiod) Binary code

Q3: Why do we need a Domain Name Service?a) Because people cannot always remember names of web

sitesb) To translate user-friendly domain names into IP addressesc) Because not all computers on the Internet have an IP

addressd) To give every computer on the Internet a unique IP address

Pre-Requisite Knowledge

Page 5: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

5

A protocol is an internationally agreed set of rules that two parties agree upon in order to communicate successfully, even when using different hardware and software. A protocol is a set of rules governing things like data format, handshaking (who speaks first) and control commands, which allow computers to communicate.As soon as it was possible to connect two computers together, it became necessary to develop software to enable computers and their users to communicate.

What is a Network Protocol

Page 6: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

6

The four main application areas where computer communications were developed are:• accessing computers remotely• accessing information on remote computers• transferring files between computers• sending and receiving email.

What is a Network Protocol

Page 7: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

7

The protocols associated with these applications are:

• Telnet• File Transfer protocol (FTP)• Hypertext Transfer protocol (HTTP)• Simple Mail Transfer Protocol (SMTP)• Post Office Protocol (POP3)• Networks are best understood as a series of

software layers with network applications functioning on the top layer. On this top layer, all of these protocols use ASCII code to initiate communication and transfer commands, even when the commands issued by the user use GUI, the network communication protocols consist of simple ASCII text commands.

What is a Network Protocol

Page 8: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

8

All of these protocols:• FTP• Telnet• HTTP• SMTP• POP

What is a Network Protocol

rely on the concept of addressability between computers on a network This means that every computer on the network must have a unique identity known as an Internet Protocol (IP) address.

Page 9: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

9

TelnetAllows you to log-in to a remote machine from the machine you are sitting at. Telnet had no security built into it except the initial request for a login name and password on the remote system. Telnet has a command driven interface and all communication between the two machines is transferred as ASCII code.

Telnet – Remote Login

Page 10: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

10

Telnet is still used to monitor and control network devices such as a hub a switch or a Print Server. It can be used as a primitive diagnostic tool to test web servers, mail servers, news servers and other remote network services. When a telnet connection is made between client and server, the connection is retained until the client disconnects.

Telnet operates at the application layer of the OSI model and is part of the TCP/IP protocols.

Telnet – Remote Login

Page 11: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

11

HTTP is the protocol which provides many of the functions of the WWW today. HTTP is a file transfer system. The WWW makes accessing information much easier as the files are transferred transparently, possibly from different computers, without each file being requested separately. When you enter a web address the client machine issues a command to the web server requesting that the server sends the page to the client machine.

HTTP – Hypertext Transfer Protocol

Page 12: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

12

Web pages stored on Web servers are written in HTML. HTML describes a document using embedded formatting controls (tags). An HTML document is written in ASCII text, so it can be read by any machine which accesses it. The browser receives the page and interprets the HTML in order to lay out the text on the screen, requesting additional files such as graphics, multimedia content etc. from the web server as it needs them.

HTTP – Hypertext Transfer Protocol

Page 13: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

13

HTTP transfers one file at a time and only maintains the connection between client and server while the file is being transferred.Pages on the WWW are identified by a Uniform Resource Locator (URL). A URL contains the protocol used, the server domain name or IP address, and the path-name of the file.e.g.

HTTP – Hypertext Transfer Protocol

HTTP - application layer of OSI model.

Page 14: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

14

File transfer is the moving of a file from one computer to another over a network. An FTP server program must be running on a host machine before a client FTP program can access it in order to transfer files to or from that machine. FTP requires an ID and password before the user can transfer files, but guest access is allowed. FTP allows multiple file selection, batch file transfer, automatic updates of web-sites, and synchronisation options.

FTP – File Transfer Protocol

Page 15: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

15

FTP is the preferred option for downloading files from a remote site for such tasks as software installation or driver upgrades. In a situation like this the user will normally be able to use anonymous FTP where the user ID is "anonymous" and the password is their email address. Like Telnet, when an FTP connection is made between client and server, the connection is retained until the client disconnects.FTP operates at the application layer of the OSI model

FTP – File Transfer Protocol

Page 16: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

16

Email protocolsElectronic mail allows a message to be composed and sent to another person on a remote system. The protocols SMTP and POP are used.SMTP specifies how mail is sent from one computer to another. Originally designed for permanently connected systems and allowed email to be relayed between machines so that it could be transferred from the sender’s mail server across the world to the recipient’s mail server. SMTP now requires authentication due to “spam”, ie User ID and password.

SMTP – Simple Mail Transfer Protocol, POP – Post Office Protocol

Page 17: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

17

The POP3 protocol was designed to receive mail stored on a remote mailbox. This is useful for users who connect over a dial-up connection and are not permanently connected to their mail server. The POP3 protocol requires the user to provide a username and password, but like Telnet and FTP, these are transmitted in plain unencrypted ASCII code.The SMTP server is used for sending mail, the POP3 server for receiving it. SMTP operates at the application layer of the OSI model

SMTP – Simple Mail Transfer Protocol, POP – Post Office Protocol

Page 18: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

18

An email address has the following structure:

username@domain_nameusername is the recipient of the email, the domain name will usually consist of several words separated by full stops. Theoretically the domain name identifies the computer that the email account is stored on. The last item in the domain name is called the top level domain and will consist of 2 or 3 letters. The top level domain often gives some indication of your affiliation or country of residence. For example:[email protected]@smallcompany.co.uk

SMTP – Simple Mail Transfer Protocol, POP – Post Office Protocol

Page 19: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

19

Two letter top level domains are allocated to countries other than the United States. Examples are:

SMTP – Simple Mail Transfer Protocol, POP – Post Office Protocol

If you get email from someone, and there is no "at" sign (@), then that probably means they have the exact same domain as you. For example, when you receive mail in school from someone else on the school email system.

Top level Domain Country.uk United Kingdom

.fr France

.di Germany

.au Australia

.jp Japan

Page 20: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

20

The OSI Network model is a 7 layer model.

All People Seem To Need Domino’s Pizza

Lower Layer Network Protocols

Page 21: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

21

The OSI Network model is a 7 layer model.Computer network functions are divided into different layers to make them easier to implement. Protocols like HTTP and FTP operate at the top layer (application layer), but there are other protocols such as TCP and IP which operate on layers lower down.TCP/IP is the acronym for Transmission Control Protocol / Internet Protocol. These are the two standard protocols, internationally adopted, which have made connecting networks together and connecting to the Internet easy to achieve.

Lower Layer Network Protocols

Page 22: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

22

Lower Layer Network Protocols

Page 23: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

23

TCPWhen a file is to be transmitted between two computers on a network running TCP/IP then the file is broken down into chunks of data called packets. TCP is responsible for splitting the data into packets and adding a header to each one. This header includes a sequence number which allows the file to be re-assembled at the receiving end by re-assembling the packets in the correct order. TCP is also responsible for retransmitting packets if it does not receive an acknowledgment that a packet has been received.

Lower Layer Network Protocols

Page 24: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

24

IPThe IP protocol is responsible for taking each packet and adding its own header to allow the packet to be routed around and between networks. As it is perfectly possible for packets to follow different routes to their destination, they might easily take different amounts of time to arrive and therefore be out of sequence when they do.As long as the packets can be re-assembled in the correct order by TCP using the sequence numbers added when packets were created, then the transmission will have been successful and TCP will issue an ACKnowledgment.

Lower Layer Network Protocols

Page 25: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

25

PortsThe use of ports allow a number of different network functions to occur simultaneously eg browsing the web and transferring a file. Some common ports and the services that run on them are:Service PortFile Transfer Protocol 21 and 20Telnet 23Simple Mail Transfer Protocol 25Hyper Text Transfer Protocol 80Post Office Protocol 110By specifying ports and including port numbers with TCP data, multiple network connections can take place simultaneously. This is known as multiplexing, and is why you can collect your email and browse the Internet at the same time. The port number along with the IP address together make a socket.

Lower Layer Network Protocols

Page 26: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

26

• Telnet - protocol to connect to a remote computer• FTP - protocol to transfer files to and from a remote

computer• HTTP - protocol to retrieve web pages and other files from a

web server• SMTP - protocol to transfer email to a mail server• POP3 - protocol to retrieve email from a mailbox on a mail

server• An email address consists of a username and a domain

name separated by the @ symbol, then the top level domain (eg fr, uk)

• Telnet, FTP, HTTP, SMTP and POP3 all use plain text ASCII commands, although nowadays GUI front ends exist to make them easier to use

• TCP is a lower level protocol responsible for splitting a file to be transmitted into packets, each with a sequence number to allow it to be re-assembled at its destination

• IP is a lower layer protocol responsible for routing packets around and between Networks

• A combination of a port and a TCP/IP connection is called a socket and allows several virtual connections to run on one machine at the same time.

Protocols

Page 27: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

27

• Before studying this topic you should know that computers on the Internet are uniquely identified by their IP address and that the World Wide Web (WWW) uses a Name Resolution system so that user friendly domain names can be mapped to a machine’s IP address. You should know that computers on a network which provide a service to other users are often referred to as hosts.

Learning Objectives• After studying this topic you should be able to:• Describe the structure of an IP address• Explain the three different classes of IP address• Understand the difference between static and

dynamic IP addressing• Understand some of the limitations of IP

addressing• Describe the Domain Name Service (DNS)

IP Addresses and Domain Name Service. Pre-requisite Knowledge

Page 28: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

28

RevisionQ1: Which of these is a host?a) A network linkb) A networked printerc) A networked machine running a mail serverd) A multi-port repeater (hub)

Q2: Which of the these is not a host?a) A networked machine running a web serverb) A print serverc) A routerd) A multi-port repeater (hub)

IP Addresses and Domain Name Service. Pre-requisite Knowledge

Page 29: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

29

RevisionQ3: What is an IP address?a) The physical location of a computerb) The code which identifies the user on a networkc) A unique number which identifies a computer on a

networkd) An internet web site

Q4: Why do we need a Domain Name Service?a) Because people cannot always remember names

of web sitesb) To translate user-friendly domain names into IP

addressesc) Because not all computers on the Internet have an

IP addressd) To give every computer on the Internet a unique

IP address

IP Addresses and Domain Name Service. Pre-requisite Knowledge

Page 30: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

30

An IP address allows a device on a network to be distinguished from all other devices on the same network. All devices must have a unique IP address so the network can distinguish between them. You can have a single computer with two network Interface Cards (NIC)s fitted, each one with its own IP address. In this case the computer would be connected to two different networks. Routers are computers like this.Because IP addresses are difficult to remember, we use Domain names to identify them instead.

Eg google.co.uk is actually IP address 216.239.59.99.But the IP address is too difficult for us to remember.

Introduction to IP Addresses and Domain Name Service

Page 31: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

31

An IP address is a 32-bit number separated into four 8-bit parts called octets. The first number of the IP address is the most general and the last is the most specific. An IP address can be divided into 2 sections - the network identifier and the host identifier. There are three ways to split the IP address.Class A nnn.hhh.hhh.hhhClass B nnn.nnn.hhh.hhhClass C nnn.nnn.nnn.hhhwhere n = network identifier, h = host identifier

Introduction to IP Addresses and Domain Name Service

Page 32: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

32

The network identifier is used to route packets to the correct destination network. Once a packet reaches the network which requested it, the network part of the address is ignored and the packet is routed to the correct host using the host identifier. That is, the network address sends the data packet to the correct network, the host address to the correct device.

IP4 AddressingThe IP4 addressing scheme is made up of 4 octets. On Tuesday 1st February 2011 the final addresses in this range were allocated. If you want to read up on this read the article at:-

http://www.theregister.co.uk/2011/02/02/ipv4_exhaustion/

Introduction to IP Addresses and Domain Name Service

Page 33: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

33

Since each computer on the Internet needs a different IP address and since there are a small number of large organizations and a large number of small organizations, ranges of IP addresses can be allocated by giving large organisations blocks of Class A addresses and small organisations blocks of Class B or Class C addresses.

Classes of IP address

Page 34: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

34

Class A addresses first octet is in the range 1 to 126;Class B addresses first octet is in the range 128 to 191;Class C addresses first octet is in the range 192 to 223.

Class A addresses allow a block of about 16 million IP addresses, such as 115.h.h.hThere are only 127 Class A address blocks, and no more are to be allocated. The owner is assigned an address in the first octet and can assign addresses in the remaining 3 octets

eg given nnn.hhh.hhh.hhh, so can have 124 or up to 16 million addresses.

Class A is for large companies such as HP, Apple etc.

Classes of IP address

Page 35: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

35

Class B addresses are common for large companies, allowing a block of 65534 IP addresses. When a Class B IP address is allocated, (say 135.113.n.n), the first two numbers identify that company network. The company can give any IP address in that block to any computer on their network. The owner is assigned an address in the first 2 octets

eg 129.135.hhh.hhh. They can have up to 216 or 65,534 unique nodes (MS = Class B, it was assigned when it was small!)

Classes of IP address

Page 36: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

36

Class C addresses are the third type, giving 254 possible IP addresses for any one block (0 and 255 are reserved for particular functions). The owner is assigned an address in the first 3 octets leaving 256 addresses to be assigned. Eg 193.135.57.hhh. These are generally assigned to ISP companies, which break them into blocks and assign them to small companies with 10-20 hosts.When you dial up an ISP with a modem, your computer is temporarily allocated an IP address. This will be in the range of the Class C licences that they own.

Classes of IP address

Page 37: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

37

There are two other special classes of IP addresses: Class D addresses have their first octet in the range 224 to 239 and are used for multicast. Multicast is a way of defining a group of nodes and only sending packets to these nodes instead of every node on the network (Broadcast). Class E addresses have their first octet in the range 240 to 255 and these are reserved for experimental purposes.

Classes of IP address

Page 38: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

38

These are addresses that can safely be used in internal Local Area Networks (LAN)s, as they have no direct connection to the Internet eg in our school. The advantages to using private IP addresses on a network is that you can use a proxy server with a single public IP address to access the network. The proxy server forwards requests for web pages (made by client machines) or other Internet services as if they were its own. This means that only one IP address is presented to the outside world, protecting machines on the network from external attack, and avoiding the purchase of more than one IP address. This arrangement is known as Network Address Translation (NAT). This is what we use in school.

Classes of IP address - Private IP addresses

Page 39: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

39

Classes of IP address - Private IP addresses

Page 40: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

40

Static IP addresses – a device has a fixed IP addressDynamic IP addresses – Normally allocated when a user logs-in to a server or dials-in to an ISP.On a LAN, dynamic IP addressing is often used in order to avoid the possibility of two machines being allocated the same IP address. The server runs a DHCP (Dynamic Host Configuration Protocol) service which allocates IP addresses from a range specified by the network manager to machines whenever they connect.

Classes of IP address - Static and Dynamic IP addressing

Page 41: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

41

In school all computers are allocated an address in the range 10.5.10.h to 10.5.11.h. Type ipconfig into any PC to find out its IP address. It keeps the same IP address for around 90 days then it may be allocated a different one.This is ipconfig from my laptop at home, note the IP address is the one allocated by my ISP!

Classes of IP address - Static and Dynamic IP addressing

What class of IP address is this?

Page 42: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

42

A Domain Name is the unique name that identifies an Internet site. Domain Names always have 2 or more parts, separated by dots. The part on the left is the most specific, and the part on the right is the most general. For example in the domain name: my_comany.com

my_company refers to a specific company and

.com refers to the commercial domain.

Domain Names

Page 43: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

43

Examples of three letter top level domains are:

Domain Names

Two letter top level domains are allocated to countries other than the United States. Examples are:

Page 44: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

44

Name resolution is the system of mapping a domain name to its IP address. This is done on the Internet by the Domain Name Service.Resolving Domain NamesWhen you type in a domain name eg bbc.co.uk this name must be converted to an IP address with 4 octets. A DNS server does this.DNS servers are sites that have a list of IP addresses and domain names in a database. Each computer is set to have a few DNS lookups. If the name cannot be resolved to the IP address in the first DNS lookup address it moves up the hierarchy and uses the next DNS address to resolve the IP address.

Domain Name Service (DNS)

Page 45: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

45

Using Ping (Packet Internet Groper)ping 10.5.0.3 This sends a packet internet groper to one of our servers. It should reply 4 times giving you similar data to that below:-Pinging 10.5.0.3 with 32 bytes of data:

Ping – Detecting Network Errors

Ping statistics for 192.168.0.1:

Page 46: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

46

Using nslookupYou can use the nslookup command from a command prompt to get a domain name from an IP address, or an IP address from a domain name. In this example the users commands are in bold with the response following:-nslookup www.microsoft.com

Server: resolver2.svr.pol.co.ukAddress: 195.92.195.95Name: www2.microsoft.akadns.netAddresses: 207.46.134.189, 207.46.249.29,

207.46.245.92, 207.46.249.189207.46.245.156, 207.46.134.221, 207.46.134.157,

207.46.249.221Aliases: www.microsoft.com, www.microsoft.akadns.net

nslookup 207.46.134.189Server: resolver2.svr.pol.co.ukAddress: 195.92.195.95Name: origin2.microsoft.comAddress: 207.46.134.189

Detecting Network Errors

Page 47: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

47

Limitations of the IP address systemThe IPv4 Class A, B and C system of allocating IP addresses is very inefficient, particularly where Class A and B addresses are concerned as many allocated IP addresses may remain unused. With more and more devices being connected to the Internet there is concern that the world will run out of IP addresses. The 4 octet IP address system can only address 232 different IP addresses. There are two possible solutions to this problem. One is to extend the number of IP addresses using eight 16-bit fields known as IPv6. IPv6 is a system of IP addressing which among other improvements, increases the IP address size from 32 bits to 128 bits, making a possible maximum number of 3.4 x 1038 addresses

Limitations of IP Address System

Page 48: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

48

The other solution is to dispense with the IP Class system and use Classless Inter Domain Routing (CIDR) uses IP addressing space more efficiently by making it possible to allocate part of a block to a network instead of the whole block.

Limitation of IP Address System

Page 49: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

49

•An IP address consists of four 8 bit numbers called octets

•An IP address can be divided into two sections - a network identifier and a host identifier.

•IP addresses can be classed as A B or C depending on the number of octets used as the host identifier

•Private IP addresses and a Proxy Server can be used on Local Area Networks to provide Network Address Translation (NAT)

•Static IP addressing is where every machine on a network has a fixed IP address

•Dynamic IP addressing is where an IP address is allocated from a pool of Addresses

•The Domain Name Service translates user friendly domain names into IP addresses using Name Resolution

Topic 3 - Summary

Page 50: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

50

Before studying this topic you should know about the services provided by the Internet such as the WWW. You should know that every web page has a unique address or Uniform Resource Location (URL) which includes the protocol used, the domain name and the path and file name of the page referred to: http://domain_name/directory/sub_directory/filename.htm

Topic 4 – Pre-Requisite Knowledge

The HTTP is Hypertext Transfer Protocol (most web browsers assume the HTTP protocol if no other protocol is specified and so do not need this included in the URL). You should also be familiar with using a search engine and navigating web pages using hyperlinks.

Page 51: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

51

After studying this topic you should be able to:Describe the structure of a web page written in HTMLBe able to create a simple HTML web documentExplain the difference between a browser and a micro-browserDescribe the Wireless Markup Language (WML)Describe the various methods used by search engines to build their indexes

Topic 4 – Learning Objectives

Page 52: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

52

Q1: What is a hyperlink?a) A connection between two machines on the Internetb) A downloadable filec) A clickable link on a web page which links to another page on the Internetd) A type of web browserQ2: Which of these is not part of a Uniform Resource Locator?a) A protocolb) A domainc) A hostd) A file pathQ3: Which is the best search string to use if you want to find out about Scottish football?a) Footballb) Soccerc) Scotlandd) "Scottish football"

Topic 4 – Revision

Page 53: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

53

We learned in the section describing the HTTP protocol, that when a web browser requests a file from a web server, it interprets the Hypertext Markup Language (HTML) script in the file in order to format the web page on the screen for the user. We are going to look more closely at the HTML script on a web page and how it influences how a web page looks.

Topic 4 – Introduction to the World Wide Web

Page 54: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

54

A markup language is one which annotates text with additional information about how it should be displayed. HTML uses tags to annotate the text of a web page. Tags in a web page are used to identify elements. Elements should always have a start and an end tag around them (to conform to the XHTML standard). Tags can be nested inside each other.

Topic 4 – Introduction to the World Wide Web

Page 55: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

55

Here is an example of a simple web page<html><head><title> My first web page </title></head><body><h1> Welcome to my first web page! </h1><p> This section is in normal text </p><p> <b> This section is in bold </b></p><p> <u> This section is underlined </u> </p></body>

This file (test.txt), can be downloaded from the course web site.

Topic 4 – Introduction to the World Wide Web

Page 56: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

56

If you type this text into a text editor and save it as "test.htm" then you can see the results when you open it in a web browser:-

Topic 4 – Introduction to the World Wide Web

Page 57: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

57

In the code above, the <html> <head> and <body> tags were structure tags. Structure tags define the structural elements of a web page eg head and body.The <html> tags surround the whole file and determine what type of file it is. The <head> tags define the head element containing some information about the html file (such as its title which is contained in the <title> tag). The <body> tags surround the main content of the file. Also in the example above, there are text tags. The <h1> (headline size 1), <p> (new paragraph), <b> (bold) and <u> (underline) tags all define different text elements.

Topic 4 – The Structure of a Web Page – Structure and Text Tags

Page 58: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

58

An element defined by a tag can also have an attribute. An attribute gives additional information about an element. This additional information often relates to the appearance or layout of an element such as colour or size.For example:<body bgcolor = "lightblue" > In this case the body element of the page will beshown with a light blue background<p align = "center"> In this case the paragraph element will be centred

Topic 4 – The Structure of a Web Page – Element Attributes

Page 59: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

59

The link and image tags on a web page are what provide the interactivity which we are so familiar with on web pages. Add this line to your test.htm file and refresh it in the browser to see the effect.<a href = "http://www.google.co.uk/" > Click here for Google </a>

Topic 4 – The Structure of a Web Page – Link and Image Tags

Page 60: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

60

In this example the <a> tags surround the link element. Its attributes in this case are the URL for the Google web page and the text which will show as the link. Add this line to your test.htm file and refresh it in the browser to see the effect.

Topic 4 – The Structure of a Web Page – Link and Image Tags

<img src = "http://www.google.co.uk/intl/en_uk/images/logo.gif" align="left" alt="google logo"></img>

Page 61: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

61

In this example the <img> tags surround the image element. Its attributes in this case are the URL of the Google logo, its alignment, and an alternative text which appears when you move the mouse over the picture.You can learn more about HTML tags from the following linkhttp://archive.devx.com/projectcool/developer/ reference/tag-table.html

Topic 4 – The Structure of a Web Page – Link and Image Tags

Page 62: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

62

Web authoring software enables developers to create web pages using a WYSIWYG (What You See Is What You Get) approach, but it is still very important to understand how the underlying HTML code works so that you can sort out the inevitable problems which occur. HTML code can be interpreted in different ways in different browsers.

Topic 4 – Why Understanding HTML is Important

Page 63: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

63

HTML authoring should primarily be about the structure of a document. It allows you to declare that something is a heading or a quoted section, or an itemised list, but the details of the presentation (how to list items in an itemised list or how to display a heading) are not specified. Ideally you should keep the Structure, Content and Presentation of a web page separate.

Topic 4 – Why Understanding HTML is Important

Page 64: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

64

Use a text editor to edit the page outlined in this section. You should try out a number of different tags from the link above. You should create at least three pages, linked to each other, with a graphic on at least one page and at least one external link. If you are feeling adventurous, see if you can create a table to lay out the content of your page.

Topic 4 – Writing your own web page in HTML

Page 65: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

65

The Extensible Hypertext Markup Language (XHTML) has slightly stricter rules for its tags than HTML, but it is worth making your HTML documents conform to XHTML as it allows pages to be used with XML tools. XML is a standard which describes a method of encoding data in a form which makes it non application specific.

Topic 4 – Extensible Hypertext Markup Language (XHTML)

Page 66: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

66

XHTML rules include:• All documents must have a type

declaration• All elements must be closed (they must

have start and stop tags)• Tag names must be in lower case• Tags must be properly nested - tags cannot

overlap <li> <b> </li> </b> is not allowed.

Topic 4 – Extensible Hypertext Markup Language (XHTML)

Page 67: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

67

To make the original example above a valid XHTML file we need to add the document type declaration at the beginning of the file.

<!DOCTYPE htmlPUBLIC "--//W3C/DTD XHTML 1.0 Strict//EN""http://www.w3.org/TR/xhtml/DTD/xhtml1-strict.dtd"><html><head><title> My first web page </title></head><body><h1> Welcome to my first web page! </h1><p> This section is in normal text </p><p> <b> This section is in bold </b></p><p> <u> This section is underlined </u> </p></body></html>

This file (validXHTML.txt), can be downloaded from the course web site. It creates this:-

Topic 4 – Extensible Hypertext Markup Language (XHTML)

Page 68: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

68

To make the original example above a valid XHTML file we need to add the document type declaration at the beginning of the file.

<!DOCTYPE htmlPUBLIC "--//W3C/DTD XHTML 1.0 Strict//EN""http://www.w3.org/TR/xhtml/DTD/xhtml1-strict.dtd"><html><head><title> My first web page </title></head><body><h1> Welcome to my first web page! </h1><p> This section is in normal text </p><p> <b> This section is in bold </b></p><p> <u> This section is underlined </u> </p></body></html>

This file (validXHTML.txt), can be downloaded from the course web site. It creates this:-

Topic 4 – Extensible Hypertext Markup Language (XHTML)

Page 69: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

69

Creates this:-

Topic 4 – Extensible Hypertext Markup Language (XHTML)

Page 70: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

70

Types of Browsers• Browsers commonly incorporate:-• Email• News• HTML editing facilities• Favourites• History• Built in links to useful web sites. • Use caching – saving data to a local hard

drive and serving the web page to other users from their. Used in networks like our school one.

Topic 4 – Types of Browsers

Page 71: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

71

• Plugins for multimedia content eg audio, animation, video, interactive 3D. (A plugin is a piece of software which allows a browser to display content normally associated with other applications such as a word processor or video player)

Topic 4 – Types of Browsers

A browser interprets the HTML code on a downloaded web page in order to layout the content of the page, and the files linked to it, for the user.

Page 72: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

72

MicrobrowserA microbrowser is one designed for use with a mobile/wireless handheld device such as a mobile phone or Personal Digital Organiser (PDA), or hybrid. Microbrowsers are written to be as small as possible to make best use of the low memory available on handheld devices and the low-bandwidth constraints of wireless-handheld networks.

Topic 4 – Microbrowsers

Page 73: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

73

Wireless Application Protocol (WAP)HTTP is not ideal as a transport protocol for wireless communication via hand-held devices as it is not optimised for low bandwidth. For this reason a new protocol was developed called the Wireless Application protocol (WAP). Just as HTTP is used to retrieve pages written using HTML, WAP is used to retrieve pages written using Wireless Markup Language (WML). WAP is a set of standard protocols and technologies designed to bring web content to hand-held communication devices (hybrids of mobile phones and PDAs).

Topic 4 – WAP

Page 74: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

74

The typical characteristics of WAP devices are:• Small low resolution screens, content

limited • Less powerful processing capabilities so

cannot deal easily with multimedia content• They do not usually have a keyboard, so

typing in a URL is likely to be much more difficult than on a normal computer

• The wireless networks they use operate at a much lower bandwidth (2G = 9.6Kbps, 3G = up to 3.6 Mbps) than desktop computers so content was originally primarily text based rather than graphical

Topic 4 – What you need to know about WAP

Page 75: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

75

• WAP enables web content to be delivered to hand-held devices to collect and send emails and browse for information.

• WAP 2 supports animations, colour graphics, streaming media and allows synchronisation with content stored on desktops.

• WAP is designed to deliver content at 2nd Generation (2G) speeds of 9.6 Kbps, WAP 2 at up to 3.6 Mbps, but some service providers claim the up-to speed is much greater.

• This limited speed (2G/3G) means its unsuitable for accessing HTML based web content using TCP/IP. WAPs therefore use WML.

Topic 4 – What you need to know about WAP

Page 76: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

76

Although all these may be seen as disadvantages, the main advantage of WAP enabled devices is the fact that they can access the Internet without a physical connection - anywhere you can use a mobile phone.

Topic 4 – WAP Characteristics

Page 77: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

77

Topic 4 – WML and HTML - the differences

HTML WML

HTML was designed for creating documents

WML was designed for creating applications

HTML documents are designed to be read on browsers running on powerful desktop machines with cheap reliable connections.

WML applications are designed to run on mobile WAP enabled devices with small screens, low power processors and an expensive connection

A user may spend several minutes reading an HTML document

Users of WAP enabled devices need short menus and easily read questions in order to find what they need. Users want to be connected for as little time as possible.

Simplifies the way users access content

Downloads a whole deck then allows the users to access individual cards

Page 78: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

78

WML files are sent to microbrowsers in a compact form as they compress pages. This compact form is compiled by WAP gateway on the Internet. The compilation is mostly a process of converting tags and elements in a WML document into pre-defined single character codes. This represents a considerable saving in file size.

Topic 4 – WML

Page 79: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

79

Wireless Markup Language (WML)A WML application consists of one or more decks containing collections of cards. Each card typically contains some content displayed to the user and some other content used by the microbrowser to control how the user moves from one card to another. The idea of bundling a deck of related cards together means that several of them can be sent together without the browser requesting a new card from the server every time a user moves from one card to another. The compiled size of a deck is limited to 1.4Kb.

Topic 4 – WML

Page 80: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

80

<?xml version="1.0"?><!DOCTYPE wml PUBLIC "-//WAPFORUM/DTD WML 1.2//EN""http://www.wapforum.org/DTD/wml12.dtd"><wml><card id="welcome"><p> Welcome to my WAP site </p><p> <a href ="#higher"> Enter for Higher course details </a> </p></card><card id = "higher"><p> Course details: </p><p> Higher Computing </p><p> Computer Systems </p><p> Software Development </p><p> <a href ="#welcome"> Back to welcome card </a> </p></card></wml>

Topic 4 – Simple WML File

As you can see it is very similar to XHTML. The file starts with a Document Type Declaration (DTD).

Elements are defined by start and end tags. In this case the card elements have their id attributes specified so that a user can move between the two cards in the deck.

Page 81: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

81

•WML devices have limited data input facilities, small screens, and relatively low connection speeds. They can’t access normal web pages written in HTML so WML was designed to produce web content for hand-held devices.

•Allows text portions of Web pages to be displayed on hand-helds

•WML lacks many of the formatting features of HTML since they are hard to implement on the small hand-held displays

•Supports a limited number of styles eg strong emphasis, B, I, U

•Has limited support for tables and images•WML organises content into stack of cards, called decks. It

pre-fetches a deck, caches it, allowing speedier access. •Supports links between cards•Supports dynamic interaction, based on events, input forms

and selection lines.

Topic 4 – WML – Key Points

Page 82: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

82

Topic 4 – WML – Deck/Card Elements

WML Defines start/end of stack

Card Defines start/end of card

head Defines start/end of heading

Event Elements

Do Starts an action

Ontimer Starts action, controlled by timer

onenterforward Forwards to a card after input

onenterbackward Backwards to a card after input

Tasks

Go Links to a card

Prev Links to previous card

Refresh Refreshes display of a card

User Input

Input Reads in user data

Select Reads in user selection

Now answer questions 14 to 19 on page 76 of the How to Pass Higher Computing textbook.

Page 83: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

83

Searching for information on a WAN like the Internet is easy! Many web sites offer a search facility which will search for a specific word or phrase on pages within the site itself. Favourites lists provide a means of saving frequently visited pages, and many organisations provide search facilities on the web to make finding pages easier.

Topic 4 – Search Engines

Page 84: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

84

2 main types of search facility available: Crawler based search engines have databases which are selected and built by computer robot programs called spiders. These programs "crawl" the web in their hunt for pages to include. They find the pages for potential inclusion by following the links in the pages they already have in their database, but also rely on contributors submitting their web pages to be indexed. The software "crawls" through the web indexing pages as it goes, using the content of pages, their titles, and content HTML tags as a means of building the index.Google is an indexed search engine.

Topic 4 – Types of Search Engines

Page 85: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

85

Directories are human powered indexing facilities which are built up by users and editors working for the directory company. Users submit a short description to the directory for their entire site, or editors write one for sites they review. When a query is entered, the search engine only looks for matches in the descriptions submitted.

Yahoo is an example of a directory based search engine.

Topic 4 – Types of Search Engines

Page 86: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

86

Search Engines do not really search the WWW directly. Each one searches an index built from the text of web pages the search engine has looked at. When you click on a link provided by a search engine’s results, you retrieve the current version of the page. New web pages must be submitted by a human to the search engine company for it to be added. Once a spider finds a page, it passes it on to another program for "indexing." This program identifies the text, links, and other content in the page and stores it in the search engine database files so that it can be searched by keyword and whatever more advanced approaches are offered.

Topic 4 – How Do Search Engines Work

Page 87: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

87

A meta tag is an HTML tag which is placed in the HTML header element of a web page. It provides information which is not visible to browsers, but which can be used by search engines to index web pages. The most common meta tags are keywords and description.The keywords tag allows the author to list the words which describe the content of the page. The description tag allows the author to give the text of the summary displayed when the page appears in the results of a search.

Topic 4 – Meta Tags

Page 88: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

88

For instance:<meta name="keywords" content="HTML, html, html reference, HTML tags"></meta><meta name="description" content="Joe's guide to HTML tags."></meta>

Topic 4 – Meta Tags

Page 89: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

89

A meta-search engine is one which passes queries on to several search engines and directories and then summarises all the results, having removed duplicate entries. This means that the results should theoretically be the aggregate of all the best search engines on the web. Some examples of meta-search engines are:http://www.ask.com/ http://www.dogpile.com/ http://www.metacrawler.com/

Topic 4 – Meta Search Engines

Page 90: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

90

• Web pages written in Hypertext Markup Language (HTML), it’s interpreted by a browser to present the page on the screen for the user.

• HTML uses tags which define elements• Structure of an HTML page is shown by the

<html> <head> and <body> tags• Examples of text tags are <p> <b> and <h1>• Elements have attributes which are additional

information relating to the appearance or layout of that element

• XHTML - stricter version of HTML. Requires all documents to have a type declaration, all tags are properly closed, lower case and properly nested

Topic 4 – Summary

Page 91: St Andrew's High School, Higher Computing 1 Higher Computing – Unit 3 Networking Protocols

St Andrew's High School, Higher Computing

91

• Microbrowsers - for mobile devices - small screens/low bandwidth

• Applications written for microbrowsers use the Wireless Markup Language (WML)

• Indexed search engines use programs called spiders to hunt around the web for pages which are linked to pages already in their database

• Directory based search engines rely on human reviewers to create their database of links

• Meta search engines return results from a number of different search engines

Topic 4 – Summary