Internet addressing in java pdf




















In the world of technology, there are vast numbers of users' communicating with different devices in different languages. That also includes many ways in which they transmit data along with the different software they implement.

So, communicating worldwide will not be possible if there were no fixed 'standards' that will govern the way user communicates for data as well as the way our devices treat those data. Here we will be discussing these standard set of rules. Yes, we're talking about "protocols" which are set of rules that help in governing the way a particular technology will function for communication.

A time server returns the number of seconds that have elapsed on the server since midnight, January 1, , as a four-byte, unsigned, big-endian integer. Post Office Protocol version 3 is a protocol for the transfer of accumulated email from the host to sporadically connected clients.

It is an amorphous group of computers in many different countries on all seven continents Antarctica included that talk to one another using IP protocols. Each computer on the Internet has at least one IP address by which it can be identified. Many of them also have at least one name that maps to that IP address. The Internet is not owned by anyone, although pieces of it are. It is simply a very large collection of computers that have agreed to talk to one another in a standard way.

The Internet is not the only IP-based network, but it is the largest one. Other IP networks are called internets with a little i : for example, a high-security internal network that is not connected to the global Internet.

Intranet loosely describes corporate practices of putting lots of data on internal web servers that are not visible to users outside the local network. The most important rules deal with the assignment of addresses to different organizations, companies, and individuals. If everyone picked the Internet addresses they wanted at random, conflicts would arise almost immediately when different computers showed up on the Internet with the same address.

When a company or an organization wants to set up an IP-based network connected to the Internet, their ISP assigns them a block of addresses. Each block has a fixed prefix. For instance if the prefix is However, the lowest address in a block is used to identify the network itself, and the largest address in a block is a broadcast address for the network, so you have two fewer available addresses than you might first expect. In NAT-based networks most nodes only have local, non-routable addresses selected from either The routers that connect the local networks to the ISP translate these local addresses to a much smaller set of routable addresses.

For instance, the dozen or so IP nodes in my apartment all share a single externally visible IP address. Nor could you reach my computer by sending data to The router watches my outgoing and incoming connections and adjusts the addresses in the IP packets. For an incoming packet, it changes the destination address to one of the local addresses, such as Exactly how it keeps track of which connections come from and are aimed at which internal computers is not particularly important to a Java programmer.

As long as your machines are configured properly, this process is mostly transparent. You just need to remember that the external and internal addresses may not be the same. Eventually, IPv6 should make most of this obsolete. NAT will be pointless, though firewalls will still be useful. There are some naughty people on the Internet. The firewall is often part of the router that connects the local network to the broader Internet and may perform other tasks, such as network address translation.

Then again, the firewall may be a separate machine. Modern operating systems like Mac OS X and Red Hat Linux often have built-in personal firewalls that monitor just the traffic sent to that one machine. Either way, the firewall is responsible for inspecting each packet that passes into or out of its network interface and accepting it or rejecting it according to a set of rules. Filtering is usually based on network addresses and ports.

For example, all traffic coming from the Class C network Incoming connections on port 80 web may be allowed, but only to the corporate web server. More intelligent firewalls look at the contents of the packets to determine whether to accept or reject them.

The exact configuration of a firewall—which packets of data are and to pass through and which are not—depends on the security needs of an individual site.

Proxy servers are related to firewalls. If a firewall prevents hosts on a network from making direct connections to the outside world, a proxy server can act as a go-between. Thus, a machine that is prevented from connecting to the external network by a firewall would make a request for a web page from the local proxy server instead of requesting the web page directly from the remote web server.

The proxy server would then request the page from the web server and forward the response back to the original requester. Proxies can also be used for FTP services and other connections.

One of the security advantages of using a proxy server is that external hosts only find out about the proxy server. They do not learn the names and IP addresses of the internal machines, making it more difficult to hack into internal systems.

Whereas firewalls generally operate at the level of the transport or internet layer, proxy servers normally operate at the application layer. Packets that pass through the proxy server can be examined to ensure that they contain data appropriate for their type. For instance, FTP packets that seem to contain Telnet data can be rejected. Figure shows how proxy servers fit into the layer model. As long as all access to the Internet is forwarded through the proxy server, access can be tightly controlled.

For instance, a company might choose to block access to www. Some companies allow incoming FTP but disallow outgoing FTP so confidential data cannot be as easily smuggled out of the company. Proxy servers can also be used to implement local caching. When a file is requested from a web server, the proxy server first checks to see if the file is in its cache.

If the file is in the cache, the proxy serves the file from the cache rather than from the Internet. If the file is not in the cache, the proxy server retrieves the file, forwards it to the requester, and stores it in the cache for the next time it is requested. This scheme can significantly reduce load on an Internet connection and greatly improve response time. America Online runs one of the largest farms of proxy servers in the world to speed the transfer of data to its users.

Many other large ISPs do similarly. The biggest problem with proxy servers is their inability to cope with all but a few protocols. Some network administrators consider this a feature. In the rapidly changing world of the Internet, this is a significant disadvantage.

However, no proxy server will ever understand these one-of-a-kind protocols. However, this has a significant negative impact on security. The firewall is normally there for a reason, not just to annoy Java programmers. Applets that run in web browsers normally use the proxy server settings of the web browser itself, though these can be overridden in the Java Control Panel.

You can set system properties from the command line using the -D flag, like this:. In most cases, a server primarily sends data while a client primarily receives it; but it is rare for one program to send or receive exclusively. A more reliable distinction is that a client initiates a conversation while a server waits for clients to start conversations with it. Figure illustrates both possibilities.

In some cases, the same program may be both a client and a server. Web servers like Apache respond to requests from web clients like Firefox. Data is stored on the web server and is sent out to the clients that request it. Aside from the initial request for a page, almost all data is transferred from the server to the client, not from the client to the server.

FTP uses different application protocols and different software, but is still split into FTP servers that send files and FTP clients that receive files. For instance, in networked games, it seems likely that both players will send data back and forth roughly equally at least in a fair game. These sorts of connections are called peer-to-peer. The telephone system is the classic example of a peer-to-peer network. Each phone can either call another phone or be called by another phone.

Java does not have explicit peer-to-peer communication in its core networking API. However, applications can easily offer peer-to-peer communications in several ways, most commonly by acting as both a server and a client.

Alternatively, the peers can communicate with each other through an intermediate server program that forwards data from one peer to the other peers. This neatly solves the discovery problem of how two peers find each other. However, this is not a book about those protocols. If you need detailed information about any protocol, the definitive source is the standards document for the protocol. Although there are many standards organizations in the world, the two that produce most of the standards relevant to application layer network programming and protocols are the Internet Engineering Task Force IETF and the World Wide Web Consortium W3C.

The IETF is a relatively informal, democratic body open to participation by any interested party. The W3C, by contrast, is a vendor organization, controlled by dues-paying member corporations, that explicitly excludes participation by individuals. For the most part, the W3C tries to define standards in advance of implementation. Despite the name, a published RFC is a finished work.

It may be obsoleted or replaced by a new RFC, but it will not be changed. RFCs range from informational documents of general interest to detailed specifications of standard Internet protocols such as FTP. For the most part, RFCs, particularly standards-oriented RFCs , are very technical, turgid, and nearly incomprehensible. Nonetheless, they are often the only complete and reliable source of information about a particular protocol.

Most proposals for an RFC begin when a person or group gets an idea and builds a prototype. The prototype is incredibly important. Before something can become an IETF standard, it must actually exist and work. This requirement ensures that IETF standards are at least feasible, unlike the standards promulgated by some other organizations.

Table lists the RFCs that provide formal documentation for the protocols discussed in this book. Describes the standardization process and the current status of the different Internet protocols. Periodically updated in new RFCs. Documents the protocols that must be supported by all Internet hosts at different layers data link layer, IP layer, transport layer, and application layer. An internet layer protocol that uses raw IP datagrams but is not supported by Java. Its most familiar uses are ping and traceroute.

The application layer protocol by which one host transfers email to another host. MIME is designed to extend this to support binary data while ensuring that the messages transferred still conform to this standard. An application layer remote login service for command-line environments based around an abstract network virtual terminal NVT and TCP. An application layer protocol that echoes back all data it receives over both TCP and UDP; useful as a debugging tool. An application layer protocol that receives packets of data over both TCP and UDP and sends no response to the client; useful as a debugging tool.

An application layer protocol that returns a quotation to any user who connects over either TCP or UDP and then closes the connection. This contrasts with the various NTP and Time Server protocols, which do not return data that can be easily read by humans.

The time is sent as a machine-readable, bit unsigned integer. The standard is incomplete in that it does not specify how the integer is encoded in 32 bits, but in practice a big-endian integer is used. An optionally authenticated, two-socket application layer protocol for file transfer that uses TCP. The application layer protocol by which Usenet news is transferred from machine to machine over TCP; used by both news clients talking to news servers and news servers talking to each other.

The collection of distributed software by which hostnames that human beings can remember, like www. The internet layer methods by which conforming systems can direct a single packet of data to multiple hosts. This is called multicasting. An application layer protocol for requesting information about a user at a remote site. It can be a security risk. A more precise application layer protocol for synchronizing clocks between systems that attempts to account for network latency.

An application layer protocol used by sporadically connected email clients such as Eudora to retrieve mail from a server over TCP. Version 1. There are a number of Telnet clients having user friendly user interface. The following diagram shows a person is logged in to computer A, and from there, he remote logged into computer B. HTTP is a communication protocol. It defines mechanism for communication between browser and the web server. It is also called request and response protocol because the communication between browser and server takes place in request and response pairs.

The first line i. Get or Post. The second line specifies the header which indicates the domain name of the server from where index. Amit Rana. Raghu Pandey. Harshit Srivastava. Korey Sheppard. Taurius Litvinavicius. Internet Protocols Advertisements.



0コメント

  • 1000 / 1000