Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Lectures_SSD2_Yermakova / Lectures_SSD2 Yermakova.doc
Скачиваний:
226
Добавлен:
25.02.2016
Размер:
3.16 Mб
Скачать

5.5.1 Routers and tcp/ip

  • Internet Protocol

  • Routers

  • Transmission Control Protocol

Internet Protocol

The Internet functions as a somewhat clean virtual network at a layer above the messy physical networks of which it is made. It has its own protocol called IP (for Internet Protocol), and its own addressing scheme. Each machine on the Internet has a unique IP address, which is 4 bytes long. IP addresses are usually written as four numbers between 0 and 255, separated by periods, such as 128.2.35.186. The first two numbers are a "network ID"; 128.2 is the network ID for Carnegie Mellon University. The last two are a "host ID" within that network. (A host is any computer on a network.)

If a host wants to communicate with another Internet host that is on the same LAN, it can do so by translating the IP address into whatever address format the LAN is using. For Ethernet this would be a 48-bit Ethernet address. But, a host can also communicate with hosts on other networks. In that case, it would not know how to reach the destination host directly. Instead, it refers to the destination by its IP address and goes through an intermediate machine called a router.

Routers

A router is typically connected to two or more local networks. It keeps a list of IP addresses and corresponding LAN addresses for all the hosts on those networks. When a router receives a packet from one of them, one of two things can happen. If the destination IP address is in its host table, the router delivers the packet directly to that host, using the host's LAN address. If not, it must forward the packet to another router, hopefully one that is closer to the ultimate destination. Through this mechanism, a packet may make many hops from router to router before arriving at the host to which it was addressed. If your computer has the TRACEROUTE (or TRACERT) utility, you can use it to find all the hops a packet takes between it and another Internet host. Depending on the distance between the two hosts, some of these hops may travel via network backbones that employ very high capacity communication lines constructed from fiber optic cable. Some hops might even bounce the packet off a satellite!

Transmission Control Protocol

A common occurrence during these multi-hop transfers is that a packet may be lost, usually because a router does not have enough room to store it before retransmitting it. Obviously, many networked applications cannot tolerate random loss of data—imagine your email with large chunks missing. The most common solution to this problem is to use another layer of protocol on top of IP called TCP, or Transmission Control Protocol. Using TCP, the sender and receiver of a stream of data exchange information about which packets carrying the data have successfully arrived. Those that have not are retransmitted. TCP guarantees that packets will be received in the same order they were sent, and none will be lost.

Since TCP is so widely used along with IP, they are often mentioned in the same phrase, as in "TCP/IP networking." All the Internet application protocols we have discussed, such as HTTP for Web browsers, SMTP for mail servers, and NNTP for news servers, are built on top of TCP/IP, but some services use other protocols such as UDP (User Datagram Protocol) in place of TCP.

The Internet Engineering Task Force (www.ietf.org) coordinates the development of the technology that makes the Internet work. The Internet Society (www.isoc.org) promotes "the open development, evolution and use of the Internet for the benefit of all people throughout the world."