Internet Technology M.E. Sem-I Remedial Examination April 2011 Q.1 a) Differentiate between Internet, Extranet and Intranet and show the list of basic network components required to setup the internet at home. Ans: Differentiate between Internet, Extranet and Intranet: Internet The Internet is a global system of interconnected computer networks. It is not controlled by a central entity and therefore relies on network devices and accepted conventions and protocols to relay the data traffic until it gets to its destinations. Some countries have imposed rules to censor or otherwise control what kind of content is accessible by its citizen (i.e. China). However, except for the management of Internet Protocol addresses and the Domain Name System by ICANN (the Internet Corporation for Assigned Names and Numbers), the Internet remains unregulated and uncensored. The beginnings of the Internet can be traced back to the 1960s when the United States funded research by its military agencies to develop a fault-tolerant and robust distributed network of computers. The Internet is now global and in theory can be accessed by anyone who can get access from an Internet service provider. Intranet On the other hand, an intranet is a private network that is setup and controlled by an organization to encourage interaction among its members, to improve efficiency and to share information, among other things. Information and resources that are shared on an intranet might include: organizational policies and procedures, announcements, information about new products, and confidential data of strategic value. An intranet is a restricted-access network that works much like the Internet, but is isolated from it. As is the case with the Internet, an intranet is based on TCP/IP protocols. Therefore, a web page in an intranet may look and act just like any other webpage on the Internet, but access is restricted to authorized persons and devices. In some cases, access to an intranet is restricted by not connecting it to other networks, but in other cases a firewall is used to deny access to unauthorized entities. The difference between an intranet and the Internet is defined in terms of accessibility, size and control. Unless content filters are being used or the government is censoring content, all the Internet’s content is accessible to everyone. On the other hand an intranet is owned and controlled by a single organization that decides which members are allowed access to certain parts of the intranet. In general, an intranet is usually very small and is restricted to the premises of a single organization. Extranet An extranet is an extended intranet. In addition to allowing access to members of an organization, an extranet uses firewalls, access profiles, and privacy protocols to allow access to users from outside the organization. In essence, an extranet is a private network that uses Internet protocols and public networks to securely share resources with customers, suppliers, vendors, partners, or other businesses. Both intranets and extranets are owned, operated and controlled by one organization. However, the difference between intranets and extranets is defined in terms of who has access to the private network and the geographical reach of that network. Intranets allow only members of the organization to access the network, while an extranet allows persons from outside the organization (i.e. business partners and customers) to access the network. Usually, network access is managed through the administration of usernames and passwords, which are also used to determine which parts of the extranet a particular user can access. 1|Page Vikram J.Patel Internet Technology M.E. Sem-I Remedial Examination April 2011 Basic network components required to setup the internet at home: In order to set up a home Ethernet or wireless network, you will need the components listed below. All of the components are used in both wired and wireless networks, except Ethernet cable which is only used in wired networks. This section also gives an overview of the components needed to set up different sized home networks. Network Interface Card (NIC) - The best means of connecting a computer to a network is through a Network Interface Card (NIC). A NIC will allow a computer to send and receive electrical or radio signals in a manner that other computers can understand. Most modern computers come with Ethernet NICs installed by default. Laptops usually even come with wireless NICs. If your computer does not already have a NIC, you can purchase one from your local computer supply store. Before you buy a NIC, make sure you have decided whether you are going to create a wireless or Ethernet network. Hub - In order to connect more than two computers together, a device that distributes packets, or blocks of data, must be used. A hub is the most basic of these devices. When a computer connected to a network makes a request for data from another computer, that request will be sent to the hub. The hub will then send that request to every computer it is connected to, including the originating computer. Most of the computers on the network will ignore the request. The computer that the request is being sent to will accept the data packet and send out a reply packet. The reply packet will then be sent to every computer by the hub. One problem with hubs is that they often cause collisions between packets. As a result, data is lost in transmission and must be re-sent. Switch - A switch is a device that distributes packets, or blocks of data, between computers in a network. Switches function in a similar fashion to hubs, but are much more efficient. A switch can send a packet directly to a specific destination, instead of sending it to every computer in a network. Router - A router is a device that joins two different networks together. Home networks usually employ routers to connect to the Internet. The majority of routers contain a switch within them so that all of the computers on a network can communicate. Modem - A modem is a device that allows you to connect to your Internet service provider and browse the Internet. Because modems only provide one IP address each, the best way to use a high-speed modem is to share its services among computers. Ethernet Cable - To set up a wired network, Ethernet cables are needed that allow the transmission of data from one networked device to another. Category 5 (Cat 5) cable is one of the most common types of Ethernet cable. When connecting computers to a network, one end of the Cat 5 cable is plugged into the computer’s NIC and the other is plugged into the hub, switch, or router. Standard Network Setups This section contains the basic shopping list you will need to build a home network for several standard setups. We assume that you are using a normal commercial cable/DSL provider, and that you are connecting to the Internet through a WAN (Wide Area Network). 2|Page Vikram J.Patel Internet Technology M.E. Sem-I Remedial Examination April 2011 Single Workstation with WAN Connectibility Workstation Cable/DSL modem* Patch cable Two Workstations without WAN Connectibility Two workstations Cross-over cable Two Workstations with WAN Connectibility Two workstations Cable/DSL modem* Router with built-in switch/hub Patch cables Three or More Workstations without WAN Connectibility Three or more workstations Patch cables Switch/hub with adequate ports Three or More Workstations with WAN Connectibility Three or more workstations Patch cables 1 Router with enough switches/hubs to handle the network Cable/DSL Modem* Q.1 b) Define following network devices along with its functional role and place in which OSI layer it does operate i) Hub ii) Network switch iii) Repeater iv) Router v)Server Ans: i) Hub ii) Network switch iii) Repeater iv) Router: see notes v) Server : In the context of client-server architecture, a server is a computer program running to serve the requests of other programs, the "clients". Thus, the "server" performs some computational task on behalf of "clients". The clients either run on the same computer or connect through the network. In most common use, server is a physical computer (a hardware system) dedicated to running one or more such services (as a host), to serve the needs of users of the other computers on the network. Depending on the computing service that it offers it could be a database server, file server, mail server, print server, web server, or other. In the context of Internet Protocol (IP) networking, a server is a program that operates as a socket listener. Servers often provide essential services across a network, either to private users inside a large organization or to public users via the Internet. For example, when you enter a query in a search engine, the query is sent from your computer over the internet to the servers that store all the relevant web pages. The results are sent back by the server to your computer. Q.2 a) Write on the following server for their functional roles 3|Page Vikram J.Patel Internet Technology M.E. Sem-I Remedial Examination April 2011 i) Internet server components ii) Web Servers iii) E-mail server iv) FTP server v) Proxy server vi) Directory server Ans: i) Internet server components: The following paragraphs describe the typical components of a server computer. Motherboard The motherboard is the computer's main electronic circuit board to which all the other components of your computer are connected. More than any other component, the motherboard is the computer. All other components attach to the motherboard. The major components on the motherboard include the processor (or CPU), supporting circuitry called the chipset, memory, expansion slots, a standard IDE hard drive controller, and input/output (I/O) ports for devices such as keyboards, mice, and printers. Some motherboards also include additional built-in features such as a graphics adapter, SCSI disk controller, or a network interface. Processor The processor, or CPU, is the brain of the computer. Although the processor isn't the only component that affects overall system performance, it is the one that most people think of first when deciding what type of server to purchase. At the time of this writing, Intel had four processor models designed for use in server computers: Itanium 2: 1.60GHz clock speed; 1–2 processor cores Xeon: 1.83–2.33GHz clock speed; 1–4 processor cores Pentium D: 2.66-3.6GHz clock speed; 2 processor cores Pentium 4: 2.4-3.6GHz clock speed; 1 processor core Each motherboard is designed to support a particular type of processor. CPUs come in two basic mounting styles: slot or socket. However, you can choose from several types of slots and sockets, so you have to make sure that the motherboard supports the specific slot or socket style used by the CPU. Some server motherboards have two or more slots or sockets to hold two or more CPUs. The term clock speed refers to how fast the basic clock that drives the processor's operation ticks. In theory, the faster the clock speed, the faster the processor. However, clock speed alone is reliable only for comparing processors within the same family. In fact, the Itanium processors are faster than Xeon processors at the same clock speed. The same holds true for Xeon processors compared with Pentium D processors. That's because the newer processor models contain more advanced circuitry than the older models, so they can accomplish more work with each tick of the clock. The number of processor cores also has a dramatic effect on performance. Each processor core acts as if it's a separate processor. Most server computers use dual-core (two processor cores) or quad-core (four cores) chips. Memory Don't scrimp on memory. People rarely complain about servers having too much memory. Many different types of memory are available, so you have to pick the right type of memory to match the memory supported by your motherboard. The total memory capacity of the server depends on the motherboard. Most new servers can support at least 12GB of memory, and some can handle up to 32GB. Hard drives Most desktop computers use inexpensive hard drives called IDE drives (sometimes also called ATA). These drives are adequate for individual users, but because performance is more important for servers, another type of drive known as SCSI is usually used instead. For 4|Page Vikram J.Patel Internet Technology M.E. Sem-I Remedial Examination April 2011 the best performance, use the SCSI drives along with a high-performance SCSI controller card. Recently, a new type of inexpensive drive called SATA has been appearing in desktop computers. SATA drives are also being used more and more in server computers as well due to their reliability and performance. Network connection The network connection is one of the most important parts of any server. Many servers have network adapters built into the motherboard. If your server isn't equipped as such, you'll need to add a separate network adapter card. Video Fancy graphics aren't that important for a server computer. You can equip your servers with inexpensive generic video cards and monitors without affecting network performance. (This is one of the few areas where it's acceptable to cut costs on a server.) Power supply Because a server usually has more devices than a typical desktop computer, it requires a larger power supply (300 watts is typical). If the server houses a large number of hard drives, it may require an even larger power supply. ii) Web Servers: refer july-2011 Remedial exam, Q.5 b) ii) iii) E-mail server : The Email Server is a Microsoft Windows-based SMTP and POP3 server. This program allows you to send internet mail directly from a Windows PC to its destination on the internet, and it will also accept email sent to you from other email servers. You can use any standard email program to read and write messages, like Microsoft Outlook Express. If you have a PC network, all the PC's can send and receive email through the server with a single internet dial-up connection. v) Proxy server: see notes vi) Directory server: Directory Server (previously Fedora Directory Server) is an LDAP (Lightweight Directory Access Protocol) server developed by Red Hat, as part of Red Hat's communitysupported Fedora Project. Directory Server is identical to the Red Hat Directory Server, just rebranded. The name 389 is derived from the port number for LDAP. While Directory Server is freely distributable under the terms of the GPL, Red Hat is also offering an officially supported version, Red Hat Directory Server, but with a different license known as open public license. The paid subscription will include added features like certified stable builds, customer service, and technical support, although the paid version is only available in limited markets. Directory Server has multi-master capability. Directory Server also has the ability to export parts of the directory to read-only servers. This is similar to the Read Only Domain Controller in Microsoft's Active Directory Domain Services. Directory Server has a Java-based GUI front end for administration, but the underlying LDAP database can be managed by other LDAP compliant tools. b) Explain basic structure of an html files and show its various elements with its operation in HTML document. Ans: see notes OR b) How does OSI layer works and differentiate between TCP/IP stack and OSI layers .Ans: see notebook 5|Page Vikram J.Patel Internet Technology M.E. Sem-I Remedial Examination April 2011 Q.3b) What is XHTML? & compare it with HTML & show HTML & XHTML segment showing the syntax difference. Ans: XHTML (eXtensible HyperText Markup Language) is a family of XML markup languages that mirror or extend versions of the widely-used Hypertext Markup Language (HTML), the language in which web pages are written. While HTML was defined as an application of Standard Generalized Markup Language (SGML), a very flexible markup language framework, XHTML is an application of XML, a more restrictive subset of SGML. Because XHTML documents need to be well-formed, they can be parsed using standard XML parsers—unlike HTML, which requires a lenient HTMLspecific parser. Semantics: When we refer to the “semantics” of a language, we’re referring to the meaning of a given tag. HTML 4.01 and XHTML 1.0 assign the same semantics to their elements and attributes. For example, an element address has exactly the same meaning in HTML 4.01 and XHTML 1.0: they’re both used to mark up addresses. Only bits of the syntax vary between the two languages. HTML 4.01 example <img alt="Portrait" src="/images/img1.jpg"> <p lang="fr">Je Honesty is the best policy Old is Gold Tit for Tat</p> <p><cite class="title">The Beautiful World</cite> - <cite class="author">ABC</cite></p> XHTML 1.0 example <img alt="Portrait" src="/images/img1.jpg" /> <p xml:lang="fr">Je Honesty is the best policy Old is Gold Tit for Tat</p> <p><cite class="title">The Beautiful World</cite> - <cite class="author">ABC</cite></p> The syntax in these examples are still very similar and there are only a few differences between them. Both languages come in three flavors: Frameset, Transitional and Strict. The “strict” version is strongly recommended by the W3C for regular documents. Using strict versions removes problematic elements as well as forcing a significant separation between the structure of your document and its presentation. Transitional versions allow deprecated elements to assist those implementers to upgrade smoothly their software or their content. 6|Page Vikram J.Patel Internet Technology M.E. Sem-I Remedial Examination April 2011 Using the right tool for the job: Is there any advantage to using HTML 4.01 over XHTML 1.0? There is no simple answer and the benefits you will gain are tied to how you’re using the language in a given situation. Switching from HTML 4.01 to XHTML 1.0 brings almost no direct benefits for the visitors of your Web site; still, there are several good reasons for Web authors to make the switch: XHTML is easier to maintain: XML syntax rules are far more rigorous than HTML. As a result, XHTML makes authors work more precisely, having to address issues such as: all elements and attribute names must appear in lower case all attribute values must be quoted non-Empty Elements require a closing tag empty elements are terminated using a space and a trailing slash no attribute minimization is allowed in strict XHTML, all inline elements must be contained in a block element In HTML, case, quotes, termination of many elements and uncontained elements are allowed and commonplace. The margin for errors in HTML is much broader than in XHTML, where the rules are very clear. As a result, XHTML is easier to author and to maintain, since the structure is more apparent and problem syntax is easier to spot. XHTML is XSL ready: As you are probably aware by now, XHTML 1.0 is the reformulation of HTML 4.01 in XML. Therefore, XHTML documents are hypertext documents and XML documents. A powerful technology has been developed at W3C to manipulate and transform XML documents: the Extensible Style sheet Language Transformations (XSLT). This technology is tremendously useful to create various new resources automatically from an XHTML document. For example XHTML is easier to teach and to learn: The syntax rules defined by XML are far more consistent than those found in HTML and therefore easier to explain than the SGML rules on which HTML is based. XHTML is ready for the future: When the new version of XHTML becomes a recommendation, XHTML 1.0 documents will be easily upgradable to this new version, to allow to take advantages of its exciting new features. It’s likely that an XSLT style sheet will be available by then to help you move your XHTML 1.0 (strict) documents to XHTML 2.0 documents. Q.4 a) What is CSS? How in there different ways Cascaded style properties can be written? Show example style property each way. Ans: refer July-2011 Remedial Examination Q.2 b) b) Using javascript sample code develop a for.. loop[ to display numbers 1 to 10 in HTML document view. Ans: The for loop is the most compact form of looping and includes the following three important parts: The loop initialization where we initialize our counter to a starting value. The initialization statement is executed before the loop begins. The test statement which will test if the given condition is true or not. If condition is true then code given inside the loop will be executed otherwise loop will come out. 7|Page Vikram J.Patel Internet Technology M.E. Sem-I Remedial Examination April 2011 The iteration statement where you can increase or decrease your counter. You can put all the three parts in a single line separated by a semicolon. Syntax: for (initialization; test condition; iteration statement){ Statement(s) to be executed if test condition is true } Example: Following example illustrates a basic for loop: <script type="text/javascript"> <!-var count; document.write("Starting Loop" + "<br />"); for(count = 1; count <= 10; count++){ document.write("Current Count : " + count ); document.write("<br />"); } document.write("Loop stopped!"); //--> </script> This will produce following result which is similar to while loop: Starting Loop Current Count : 1 Current Count : 2 Current Count : 3 Current Count : 4 Current Count : 5 Current Count : 6 Current Count : 7 Current Count : 8 Current Count : 9 Current Count : 10 Loop stopped! OR Q.4 a) Compare alert, prompt & confirm dialog in javascript with example for each one of them. Ans: Alert Dialog Box: An alert dialog box is mostly used to give a warning message to the users. Like if one input field requires to enter some text but user does not enter that field then as a part of validation you can use alert box to give warning message as follows: <head> <script type="text/javascript"> <!-alert("Warning Message"); //--> </script> </head> Nonetheless, an alert box can still be used for friendlier messages. Alert box gives only one button "OK" to select and proceed. 8|Page Vikram J.Patel Internet Technology M.E. Sem-I Remedial Examination April 2011 Confirmation Dialog Box: A confirmation dialog box is mostly used to take user's consent on any option. It displays a dialog box with two buttons: OK and Cancel. If the user clicks on OK button the window method confirm() will return true. If the user clicks on the Cancel button confirm() returns false. You can use confirmation dialog box as follows: <head> <script type="text/javascript"> <!-var retVal = confirm("Do you want to continue ?"); if( retVal == true ){ alert("User wants to continue!"); return true; }else{ alert("User does not want to continue!"); return false; } //--> </script> </head> Prompt Dialog Box: The prompt dialog box is very useful when you want to pop-up a text box to get user input. Thus it enable you to interact with the user. The user needs to fill in the field and then click OK. This dialog box is displayed using a method called prompt() which takes two parameters (i) A label which you want to display in the text box (ii) A default string to display in the text box. This dialog box with two buttons: OK and Cancel. If the user clicks on OK button the window method prompt() will return entered value from the text box. If the user clicks on the Cancel button the window method prompt() returns null. You can use prompt dialog box as follows: <head> <script type="text/javascript"> <!-var retVal = prompt("Enter your name : ", "your name here"); alert("You have entered : " + retVal ); //--> </script> </head> b) What is DHTML? And what are different ways DHTML can be achieved. Ans: Dynamic HTML, or DHTML, is an umbrella term for a collection of technologies used together to create interactive and animated web sites by using a combination of a static markup language (such as HTML), a client-side scripting language (such as JavaScript), a presentation definition language (such as CSS), and the Document Object Model. DHTML allows scripting languages to change variables in a web page's definition language, which in turn affects the look and function of otherwise "static" HTML page content, after the page has been fully loaded and during the viewing process. Thus the dynamic 9|Page Vikram J.Patel Internet Technology M.E. Sem-I Remedial Examination April 2011 characteristic of DHTML is the way it functions while a page is viewed, not in its ability to generate a unique page with each page load. By contrast, a dynamic web page is a broader concept, covering any web page generated differently for each user, load occurrence, or specific variable values. This includes pages created by client-side scripting, and ones created by server-side scripting (such as PHP, Perl, JSP or ASP.NET) where the web server generates content before sending it to the client. Q.5 a) What are different network topology. Explain the protocol at data link layer for Ethernet Network Interface card for accessing link. Ans: Network Topologies: 1. Bus topology • Uses a trunk or backbone to which all of the computers on the network connect. • Systems connect to this backbone using T connectors or taps. • Coaxial cablings ( 10Base-2, 10Base5) were popular options years ago. Advantages: Cheap and easy to implement. Require less cable Does not use any specialized network equipment. Disadvantages Network disruption when computers are added or removed A break in the cable will prevent all systems from accessing the network. Difficult to troubleshoot. 2. Ring Topology • Logical ring – Meaning that data travels in circular fashion from one computer to another on the network. – Typically FDDI, SONET or Token Ring technology are used to implement a ring Network – Ring networks are most commonly wired in a star configuration • Token Ring has multi-station access unit (MSAU), equivalent to hub or switch. MSAU performs the token circulation internally. Advantages: Cable faults are easily located, making troubleshooting easier Ring networks are moderately easy to Install Disadvantages: Expansion to the network can cause network disruption A single break in the cable can disrupt the entire network. 3. Star Topology • All computers/devices connect to a central device called hub or switch. • Each device requires a single cable 10 | P a g e Vikram J.Patel Internet Technology M.E. Sem-I Remedial Examination April 2011 • Point-to-point connection between the device and hub. • Most widely implemented • Hub is the single point of failure Advantages: Easy to troubleshoot and isolate problems Cable failure affects only a single user Easily expanded without disruption Disadvantages: Requires more cable A central connecting device allows for a single point of failure More difficult to implement 4. Mesh Topology • Each computer connects to every other. • High level of redundancy. • Rarely used. – Wiring is very complicated – Cabling cost is high – Troubleshooting a failed cable is tricky – A variation hybrid mesh – create point to point connection between specific network devices, often seen in WAN implementation. Advantages: Provides redundant paths between devices The network can be expanded without disruption to current uses Disadvantages: Requires more cable than the other LAN topologies Complicated implementation b) Define following protocol : (i) HTTP (i) FTP (iii) NNTP (iv) ARP (v) TCP (vi) UDP. Ans: (i) HTTP :The HTTP protocol is designed to permit intermediate network elements to improve or enable communications between clients and servers. High-traffic websites often benefit from web cache servers that deliver content on behalf of the original, so-called origin server, to improve response time. HTTP proxy servers at network boundaries facilitate communication when clients without a globally routable address are located in private networks by relaying the requests and responses between clients and servers. HTTP is an Application Layer protocol designed within the framework of the Internet Protocol Suite. The protocol definitions presume a reliable Transport Layer protocol for hostto-host data transfer. The Transmission Control Protocol (TCP) is the dominant protocol in use for this purpose. However, HTTP has found application even with unreliable protocols, such as the User Datagram Protocol (UDP) in methods such as the Simple Service Discovery Protocol (SSDP). 11 | P a g e Vikram J.Patel Internet Technology M.E. Sem-I Remedial Examination April 2011 (ii) FTP: File Transfer Protocol (FTP) is a standard network protocol used to transfer files from one host to another host over a TCP-based network, such as the Internet. FTP is built on a clientserver architecture and uses separate control and data connections between the client and server. FTP users may authenticate themselves using a clear-text sign-in protocol but can connect anonymously if the server is configured to allow it. The first FTP client applications were interactive command-line tools, implementing standard commands and syntax. Graphical user interface clients have since been developed for many of the popular desktop operating systems in use today. FTP operates on the application layer of the OSI model, and is used to transfer files using TCP/IP.In order to do this an FTP server needs to be running and waiting for incoming requests. The client computer is then able to communicate with the server on port 21. This connection, called the control connection, remains open for the duration of the session, with a second connection, called the data connection, either opened by the server from its port 20 to a negotiated client port (active mode) or opened by the client from an arbitrary port to a negotiated server port (passive mode) as required to transfer file data. The control connection is used for session administration (i.e., commands, identification, passwords) exchanged between the client and server using a telnet-like protocol. For example "RETR filename" would transfer the specified file from the server to the client. Due to this two-port structure, FTP is considered an out-of-band protocol, as opposed to an in-band protocol such as HTTP. (iii) NNTP : The Network News Transfer Protocol (NNTP) is an Internet application protocol used for transporting Usenet news articles (netnews) between news servers and for reading and posting articles by end user client applications. Usenet was originally designed based on the UUCP network, with most article transfers taking place over direct point-to-point telephone links between news servers, which were powerful time-sharing systems. Readers and posters logged into these computers reading the articles directly from the local disk. As local area networks and Internet participation proliferated, it became desirable to allow newsreaders to be run on personal computers connected to local networks. Because distributed file systems were not yet widely available, a new protocol was developed based on the client-server model. It resembled the Simple Mail Transfer Protocol (SMTP), but was tailored for exchanging newsgroup articles. A newsreader, also known as a news client, is a software application that reads articles on Usenet, either directly from the news server's disks or via the NNTP. The well-known TCP port 119 is reserved for NNTP. When clients connect to a news server with Transport Layer Security (TLS), TCP port 563 is used. This is sometimes referred to as NNTPS. (iv) ARP: Address Resolution Protocol (ARP) is a telecommunications protocol used for resolution of network layer addresses into link layer addresses, a critical function in multiple-access networks. ARP was defined by RFC 826 in 1982. It is Internet Standard STD 37. It is also the name of the program for manipulating these addresses in most operating systems. ARP has been implemented in many combinations of network and overlaying internetwork technologies, such as IPv4, Chaosnet, DECnet and Xerox PARC Universal Packet (PUP) using IEEE 802 standards, FDDI, X.25, Frame Relay and Asynchronous Transfer Mode (ATM), IPv4 over IEEE 802.3 and IEEE 802.11 being the most common cases. 12 | P a g e Vikram J.Patel Internet Technology M.E. Sem-I Remedial Examination April 2011 (v) TCP: The Transmission Control Protocol (TCP) is one of the core protocols of the Internet Protocol Suite. TCP is one of the two original components of the suite, complementing the Internet Protocol (IP), and therefore the entire suite is commonly referred to as TCP/IP. TCP provides reliable, ordered delivery of a stream of bytes from a program on one computer to another program on another computer. TCP is the protocol that major Internet applications such as the World Wide Web, email, remote administration and file transfer rely on. Other applications, which do not require reliable data stream service, may use the User Datagram Protocol (UDP), which provides a datagram service that emphasizes reduced latency over reliability. (vi) UDP: The User Datagram Protocol (UDP) is one of the core members of the Internet Protocol Suite, the set of network protocols used for the Internet. With UDP, computer applications can send messages, in this case referred to as datagrams, to other hosts on an Internet Protocol (IP) network without requiring prior communications to set up special transmission channels or data paths. UDP uses a simple transmission model without implicit handshaking dialogues for providing reliability, ordering, or data integrity. Thus, UDP provides an unreliable service and datagrams may arrive out of order, appear duplicated, or go missing without notice. UDP assumes that error checking and correction is either not necessary or performed in the application, avoiding the overhead of such processing at the network interface level. Time-sensitive applications often use UDP because dropping packets is preferable to waiting for delayed packets, which may not be an option in a real-time system. If error correction facilities are needed at the network interface level, an application may use the Transmission Control Protocol (TCP) or Stream Control Transmission Protocol (SCTP) which are designed for this purpose. UDP's stateless nature is also useful for servers answering small queries from huge numbers of clients. Unlike TCP, UDP supports packet broadcast (sending to all on local network) and multicasting (send to all subscribers). Common network applications that use UDP include: the Domain Name System (DNS), streaming media applications such as IPTV, Voice over IP (VoIP), Trivial File Transfer Protocol (TFTP), IP tunneling protocols and many online games. OR Q.5 a) Write on list of emphasis tags & their use. Ans: Emphasis tags: Description The HTML em element indicates an emphasis for its content. Although this emphasis is lower than the strong emphasis (HTML strong element), the text inside this element is supossed to be more important than the regular text. Browsers usually render the content of this element with an italic font style to visually represent the emphasis. But, despite this, authors shouldn't confuse its semantic purpose with its usual visual representation. Examples: Attributes: 13 | P a g e Vikram J.Patel Internet Technology M.E. Sem-I Remedial Examination April 2011 id (name) The "id" attribute assigns an identifier to the associated element. This identifier must be unique in the document and can be used to refer to that element in other instances (e.g., from client-side scripts). class (cdata) The "class" attribute assigns a class name (or a list of class names separated by spaces) to the container element. It is used together with style sheets and tells the browser the class (or classes) to which the element is associated. style (style) This attribute is used to define presentational attributes for the containing element, and its value should be composed by style sheets properties. Although in some cases it can become useful, a better practice is to place presentational attributes in external files, relating them to elements with the "class" attribute. This way you keep the semantic and presentational parts of your document separated. title (text) The purpose of this attribute is to provide a title for the element. Its value must be a short and accurate description of the element. Browsers usually render it as a "tool tip" when the user puts the mouse pointer over the element for a short period of time. lang (langcode) Specifies the language of an element's content. The default value is "unknown". When writing XHTML 1.0 documents, the attribute used to specify the language of an elements is "xml:lang". For forward and backward compatibility both attributes can be used 14 | P a g e Vikram J.Patel Internet Technology M.E. Sem-I Remedial Examination April 2011 simultaneously as in the example below. Note that in XHTML 1.1 the "lang" attribute has been completely replaced by "xml:lang" and its use is no longer valid. dir This attribute indicates the direction in which the texts of the element must be read. This includes content, attribute values and tables. It has two possible values that are caseinsensitive: RTL: Right to left. LTR: Left to right. Q.5 b) What is URL & it’s components? Compare absolute & relative links in URL. Ans: URL: A URL (Uniform Resource Locator) is a specific type of URI (Universal Resource Identifier). A URL normally locates an existing resource on the Internet. A URL is used when a Web client makes a request to a server for a resource. The concepts of the URI and the URL are defined by the Internet Society and IETF (Internet Engineering Task Force) Request for Comments document RFC 2396, Uniform Resource Identifiers (URI): Generic Syntax (http://www.ietf.org/rfc/rfc2396.txt). Briefly, a URI is defined as any character string that identifies a resource. A URL is defined as those URIs that identify a resource by its location or by the means used to access it, rather than by a name or other attribute of the resource. The components of a URL: A URL for HTTP (or HTTPS) is normally made up of three or four components: 1. A scheme. The scheme identifies the protocol to be used to access the resource on the Internet. It can be HTTP (without SSL) or HTTPS (with SSL). 2. A host. The host name identifies the host that holds the resource. For example, www.example.com. A server provides services in the name of the host, but there is not a one-to-one mapping between hosts and servers. Host names explain more about host names. Host names can also be followed by a port number. Port numbers explains more about these. Well-known port numbers for a service are normally omitted from the URL. Most servers use the well-known port numbers for HTTP and HTTPS , so most HTTP URLs omit the port number. 15 | P a g e Vikram J.Patel Internet Technology M.E. Sem-I Remedial Examination April 2011 3. A path. The path identifies the specific resource within the host that the Web client wants to access. For example, /software/htp/cics/index.html. 4. A query string. If a query string is used, it follows the path component, and provides a string of information that the resource can use for some purpose (for example, as parameters for a search or as data to be processed). The query string is usually a string of name and value pairs, for example, q=bluebird. The scheme and host components of a URL are not defined as case-sensitive, but the path and query string are case-sensitive. Usually, the whole URL is specified in lower case. The components of the URL are combined and delimited as follows: scheme://host:port/path?query The scheme is followed by a colon and two forward slashes. If a port number is specified, that number follows the host name, separated by a colon. The path name begins with a single forward slash. If a query string is specified, it is preceded by a question mark. Figure 1. Syntax of an HTTP URL This is an example of an HTTP URL: http://www.research.ibm.com/software/htp/cics/index.html If a port number was specified, the URL would be: http://www.research.ibm.com:1030/software/htp/cics/index.html A URL can be followed by a fragment identifier. The separator used between the URL and the fragment identifier is the # character. A fragment identifier is used to point a Web browser to a reference or function within the item that it has just retrieved. For example, if the URL identifies an HTML page, a fragment identifier can be used to indicate a subsection within the page, using the ID of the subsection. In this case, the Web browser normally displays the page to the user so that the subsection is visible. The action taken by the Web browser for a fragment identifier differs depending on the media type of the item and the defined meaning of the fragment identifier for that media type. Other protocols, such as File Transfer Protocol (FTP) or Gopher, also use URLs. The URLs used by these protocols may have a different syntax to the one used for HTTP. Absolute link: A link is an absolute link if the URL and file name can be found from anywhere on the Web, not just from a single Web site. An absolute link specifies a fully-qualified URL; the protocol must be present in addition to a domain name, and often a file name must be included as well. 16 | P a g e Vikram J.Patel Internet Technology M.E. Sem-I Remedial Examination April 2011 For instance: <a href="http://www.compugoddess.com/ index.htm">Go to CompuGoddess</a> The URL in this link can be browsed to regardless of where one starts. Relative link: A relative link specifies the name of the file to be linked to only as it is related to the current document. For example, if all the files in your Web site are contained within the same directory (or folder), and you want to establish a link from page1.html to page2.html, the code on page1.html will be: <a href="page2.html">Go to page 2</a> This link will be valid only from within the same directory that page2.html is saved in. Relative links, and their paths, can be tricky. For example, imagine that page1.html is in the root directory (or main folder) and page2.html is in a subdirectory named folder2. In that case, a link from page1.html to page2.html would be coded: <a href="folder2/page2.html">Go to page 2</a> In other words, instead of typing the file name, you would first type the folder (directory) name, a forward slash, and then the file name. 17 | P a g e Vikram J.Patel