Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

Biblio5

.pdf
Скачиваний:
45
Добавлен:
25.03.2016
Размер:
8.77 Mб
Скачать

12.2 PACKET DATA COMMUNICATIONS BASED ON CCITT REC. X.25

341

Figure 12.5 Logical channel assignment (Ref. 1).

taneous virtual circuits through its DCE to other DTEs. As mentioned, this is usually done by multiplexing these circuits over a single transmission facility.

Permanent virtual circuits (PVCs) have permanently assigned logical channels, whereas those for virtual calls are assigned channels only for the duration of a call, as shown in Figure 12.5. Channel 0 is reserved for restart and diagnostic functions. To avoid collisions, the DCE starts assigning logical channels at the lowest number end and the DTE from the highest number end. There are one-way and both-way (two-way) circuits. The both-way circuits are reserved for overflow to avoid chances of double seizures (i.e., both ends seize the same circuit).

Octet 5 in Figure 12.4 is the packet type identifier subfield. The packet type and its corresponding coding are shown in Table 12.1. We can see in the table that packet types are identified in associated pairs carrying the same packet identifier (bit sequence). A packet from the calling terminal (DTE) to the network (DCE) is identified by one name. The associated packet delivered by the network to the called terminal (DTE) is referred to by another associated name.

12.2.2.4 Two Typical Packets

Call request and incoming call packet. This type of packet sets up the call for the virtual circuit. The format of the call request and incoming packet is illustrated in Figure 12.6. Octets 1–3 have been described in the previous subsection. Octet 4 consists of the address length field indicators for the called and calling DTE addresses. Each address length indicator is binary coded, and bit 1–5 is the lower-order bit of the indicator.

342 ENTERPRISE NETWORKS II: WIDE AREA NETWORKS

Figure 12.6 Call request and incoming call packet format. The general format identifier is coded 0X01 (basic) and 0X10 (extended format). (From ITU-T Rec. X.25, Figure 5-3/ X,25, p. 58, ITU-T Organization, Helsinki, March 1993, [Ref. 1].)

Octet 5 and the following octets consist of the called DTE address, when present, and then the calling DTE address, when present.

The facilities length field (one octet) indicates the length of the facilities field that follows. The facility field is present only when the DTE is using an optional user facility requiring some indication in the call request and incoming call packets. The field must contain an integral number of octets with a maximum length of 109 octets.

Optional user facilities are listed in CCITT Rec. X.2. There are 45 listed. Several examples are listed here to give some idea of what is meant by facilities in CCITT Rec. X.25:

Nonstandard default window;

Flow control parameter negotiation;

Throughput class negotiation;

Incoming calls barred;

Outgoing calls barred;

Closed user group (CUG);

Reverse charging acceptance; and

Fast select.

DTE and DCE data packet. Of the 17 packet types listed in Table 12.1, only one truly carries user information, the DTE and DCE data packet. Figure 12.7 illustrates the packet format.

Octets 1 and 2 have been described. Bits 6, 7, and 8 of octet 3 or bits 2–8 of octet 4, when extended, are used for indicating the packet received sequence number P(R). It is binary coded and bit 6, or bit 2 when extended, is the low-order bit.

In Figure 12.7, M, which is bit 5 in octet 3 or bit 1 in octet 4 when extended, is used for more data (M bit). It is coded 0 for “no more data” and 1 for “more data to follow.”

12.2 PACKET DATA COMMUNICATIONS BASED ON CCITT REC. X.25

343

Figure 12.7 DTE and DCE packet format. (From ITU-T Rec. X.25, Figure 5-7/ X.25, p. 64, ITU-T Organization, Helsinki, March 1993, [Ref. 1]. D c Delivery confirmation bit; M c More databit; Q c Qualifier bit.)

Bits 2, 3, and 4 of octet 3, or bits 2–8 of octet 3 when extended, are used for indicating the packet send sequence number P(S ). Bits following octet 3, or octet 4 when extended, contain the user data.

The standard maximum user data field length is 128 octets. CCITT Rec. X.25 (para. 4.3.2) states: “In addition, other maximum user data field lengths may be offered by Administrations from the following list: 16, 32, 64, 256, 512, 1024, 2048, and 4096 octets . . . . Negotiation of maximum user data field lengths on a per call basis may be made with the flow parameter negotiation facility.”

12.2.3 Tracing the Life of a Virtual Call

A call is initiated by a DTE by the transfer to the network of a call request packet. It identifies the logical channel number selected by the originating DTE, the address of the called DTE (destination), and optional facility information, and can contain up to 16 octets of user information. The facility and user fields are optional at the discretion of the source DTE. The receipt by the network of the call request packet initiates the call-setup sequence. This same call request packet is delivered to the destination DTE as an incoming call packet. The destination DTE in return sends a “call accepted” packet, and the source DTE receives a “call confirmation” packet. This completes the call setup phase, and the data transfer can begin.

Data packets (Figure 12.7) carry the user data to be transferred. There may be one or a sequence of packets transferred during a virtual call. It is the M bit that tells the destination that the next packet is a logical continuation of the previous packet(s). Sequence numbers verify correct packet order and are the packet acknowledgment tools.

344 ENTERPRISE NETWORKS II: WIDE AREA NETWORKS

The last phase in the life of a virtual call is the clearing (takedown). Either the DTE or the network can clear a virtual call. The “clear” applies only to the logical channel that was used for that call. Three different packet types are involved in the call-clearing phase. The clear request packet is issued by the DTE initiating the clear. The remote DTE receives it as a clear indication packet. Both the DTE and DCE then issue clear confirmation packets to acknowledge receipt of the clear packets.

Flow control is called out by the following packet types: receiver ready (RR), receive not ready (RNR), and reject (Rej). Each of these packets is normally three octets long, or four octets long using the extended version. Sequence numbering also assists flow control (Ref. 1).

12.3 TCP/ IP AND RELATED PROTOCOLS

12.3.1 Background and Scope

The transmission control protocol/ Internet protocol (TCP/ IP) family was developed for the ARPANET (Advanced Research Projects Agency Network). ARPANET was one of the first large advanced packet-switched networks. It was initially designed and operated to interconnect the very large university and industrial defense community to share research resources. It dates back to 1968 and was well into existence before ISO and CCITT took interest in layered protocols.

The TCP/ IP suite of protocols (Refs. 2, 3) has wide acceptance today, especially in the commercial and industrial community worldwide. These protocols are used on both LANs and WANs. They are particularly attractive for their internetworking capabilities. The IP (Ref. 2) competes with CCITT Rec. X.75 protocol (Ref. 4), but is notably more versatile and has much wider application.

The architectural model of the IP (Ref. 2) uses terminology that differs from the OSI reference model.3 Figure 12.8 shows the relationship between TCP/ IP and related DoD

Figure 12.8 How TCP/ IP and associated protocols relate to OSI.

3IP predates OSI.

12.3 TCP/ IP AND RELATED PROTOCOLS

345

Figure 12.9 Connecting one LAN to another LAN via a WAN with routers equipped with IP.

(Department of Defense) protocols and the OSI reference model. Tracing data traffic from an originating host, which runs an application program, to another host in another network, is shown in Figure 12.9. This may be a LAN-to-WAN-to-LAN connectivity, as shown in the figure. It may also be just a LAN-to-WAN or it may be a WAN-to- WAN connectivity. The host would enter its own network by means of a network access protocol such as HDLC or an IEEE 802 series protocol (Chapter 11).

A LAN connects via a router (or gateway) to another network. Typically a router (or gateway) is loaded with three protocols. Two of these protocols connect to each of the attached networks (e.g., LAN and WAN), and the third protocol is the IP, which provides the network-to-network interface.

Hosts typically are equipped with four protocols. To communicate with routers or gateways, a network access protocol and Internet protocol are required. A transport layer protocol assures reliable communication between hosts because end-to-end capability is not provided in either the network access or Internet protocols. Hosts also must have application protocols such as e-mail or file transfer protocols (FTPs).

12.3.2 TCP/ IP and Data-Link Layers

TCP/ IP is transparent to the type of data-link layer involved, and it is also transparent whether it is operating in a LAN or WAN domain or among them. However, there is document support for Ethernet, IEEE 802 series, ARCNET LANs, and X.25 for WANs (Refs. 2, 5).

Figure 12.10 shows how upper OSI layers are encapsulated with TCP and IP header information and then incorporated into a data-link layer frame.

For the case of IEEE 802 series LAN protocols, advantage is taken of the LLC common to all 802 LAN protocols. The LLC extended header contains the SNAP (subnetwork access protocol) such that we have three octets of the LLC header and five octers in the SNAP. The LLC header has its fields fixed as follows (LLC is discussed in Chapter 11):

DSAP c 10101010;

SSAP c 10101010;

Control c 00000011.

The five octets in the SNAP have three assigned for protocol ID or organizational

346 ENTERPRISE NETWORKS II: WIDE AREA NETWORKS

Figure 12.10 The incorporation of upper-layer PDUs into a data-link layer frame showing the relationship with TCP and IP.

code and two octets for “EtherType.” EtherType assignments are shown in Table 12.2. EtherType refers to the general class of LANs based on CSMA/ CD (see Chapter 11 for a discussion of CSMA/ CD).

Figure 12.11 shows the OSI relationships with TCP/ IP working with the IEEE 802 LAN protocol group. Figure 12.12 illustrates an IEEE 802 frame incorporating TCP, IP, and LLC.

Often addressing formats are incompatible from one protocol in one network to

Table 12.2 Ether-Type Assignments

Ethernet Decimal

Hex

Description

 

 

 

512

0200

XEROX PUP

513

0201

PUP address translation

1536

0600

XEROX NS IDP

2048

0800

DOD Internet protocol (IP)

2049

0801

X.75 Internet

2050

0802

NBS Internet

2051

0803

ECMA Internet

2052

0804

Chaosnet

2053

0805

X.25 level 3

2054

0806

Address resolution protocol (ARP)

2055

0807

XNS compatibility

4096

1000

Berkeley trailer

21000

5208

BBN Simnet

24577

6001

DEC MOP dump/ load

24578

6002

DEC MOP remote control

24579

6003

DEC DECnet phase IV

24580

6004

DEC LAT

24582

6005

DEC

24583

6006

DEC

32773

8005

HP probe

32784

8010

Excelan

32821

8035

Reverse ARP

32824

8038

DEC LANBridge

32823

8098

Appletalk

Source: Ref. 6.

12.3 TCP/ IP AND RELATED PROTOCOLS

347

Figure 12.11 How TCP/ IP, working with IEEE 802 series of LAN protocols, relates to OSI.

another protocol in another network. A good example is the mapping of the 32-bit Internet address into a 48-bit IEEE 802 address. This problem is resolved with ARP (address resolution protocol). Another interface problem is limited IP datagram length of 576 octets, where with the 802 series, frames have considerably longer length limits (Ref. 7).

12.3.3 IP Routing Algorithm

In OSI the network layer functions include routing and switching of a datagram through the telecommunications subnetwork. The IP provides this essential function. It forwards the datagram based upon the network address contained within the IP header. Each data-

Figure 12.12 A typical IEEE 802 frame showing LLC and TCP/ IP functions.

348 ENTERPRISE NETWORKS II: WIDE AREA NETWORKS

gram is independent and has no relationship with other datagrams. There is no guaranteed delivery of the datagrams from the standpoint of the Internet protocol. However, the next higher layer, the TCP layer, provides for the reliability that the IP lacks. It also carries out segmentation and reassembly function of a datagram to match frame sizes of data-link layer protocols.

Addresses determine routing and, at the far end, equipment (hardware). Actual routing derives from the IP address, and equipment addresses derive from the data-link layer header (typically the 48-bit Ethernet address) (Ref. 5).

User data from upper-layer protocols is passed to the IP layer. The IP layer examines the network address (IP address) for a particular datagram and determines if the destination node is on its own local area network or some other network. If it is on the same network, the datagram is forwarded directly to the destination host. If it is on some other network, it is forwarded to the local IP router (gateway). The router, in turn, examines the IP address and forwards the datagram as appropriate. Routing is based on a lookup table residing in each router or gateway.

12.3.3.1 IP Routing Details. A gateway (router) needs only the network ID portion of the address to perform its routing function. Each router or gateway has a routing table, which consists of destination network addresses and specified next-hop gateway.

Three types of routing are performed by the routing table:

1. Direct routing to locally attached devices;

2. Routing to networks that are reached via one or more gateways; and

3. Default routing to destination network in case the first types of routing are unsuccessful.

Suppose a datagram (or datagrams) is (are) directed to a host which is not in the routing table resident in a particular gateway. Likewise, there is a possibility that the network address for that host is also unknown. These problems may be resolved with the address resolution protocol (ARP) (Ref. 7).

First the ARP searches a mapping table which relates IP addresses with corresponding physical addresses. If the address is found, it returns the correct address to the requester. If it cannot be found, the ARP broadcasts a request containing the IP target address in question. If a device recognizes the address, it will reply to the request where it will update its ARP cache with that information. The ARP cache contains the mapping tables maintained by the ARP module.

There is also a reverse address resolution protocol (RARP) (Ref. 8). It works in a fashion similar to that of the ARP, but in reverse order. RARP provides an IP address to a device when the device returns its own hardware address. This is particularly useful when certain devices are booted and only know their own hardware address.

Routing with IP involves a term called hop. A hop is defined as a link connecting adjacent nodes (gateways) in a connectivity involving IP. A hop count indicates how many gateways (nodes) must be traversed between source and destination.

One part of an IP routing algorithm can be source routing. Here an upper-layer protocol (ULP) determines how an IP datagram is to be routed. One option is that the ULP passes a listing of Internet addresses to the IP layer. In this case information is provided on the intermediate nodes required for transit of a datagram in question to its final destination.

Each gateway makes its routing decision based on a resident routing list or routing

12.3 TCP/ IP AND RELATED PROTOCOLS

349

table. If a destination resides in another network, a routing decision is required by the IP gateway to implement a route to that other network. In many cases, multiple hops are involved and each gateway must carry out routing decisions based on its own routing table.

A routing table can be static or dynamic. The table contains IP addressing information for each reachable network and closest gateway for the network, and it is based on the concept of shortest routing, thus routing through the closest gateway.

Involved in IP shortest routing is the distance metric, which is a value expressing minimum number of hops between a gateway and a datagram’s destination. An IP gateway tries to match the destination network address contained in the header of a datagram with a network address entry contained in its routing table. If no match is found, the gateway discards the datagram and sends an ICMP (see next subsection) message back to the datagram source.

12.3.3.2 Internet Control Message Protocol (ICMP). ICMP is used as an adjunct to IP when there is an error in datagram processing. ICMP uses the basic support of IP as if it were a higher-level protocol; however, ICMP is actually an integral part of IP and is implemented by every IP module.

ICMP messages are sent in several situations: for example, when a datagram cannot reach its destination, when a gateway (router) does not have the buffering capacity to forward a datagram, and when the gateway (router) can direct the host to send traffic on a shorter route.

ICMP messages typically report errors in the processing of datagrams. To avoid the possibility of infinite regress of messages about messages, and so on, no ICMP messages are sent about ICMP messages. There are eight distinct ICMP messages:

1. Destination unreachable message;

2. Time exceeded message;

3. Parameter problem message;

4. Source quench message;

5. Redirect message;

6. Echo or echo reply message;

7. Timestamp or timestamp reply message; and

8. Information request or information reply message.

12.3.3.3 IP Summary. The IP provides connectionless service, meaning that there is no call-setup phase prior to the exchange of traffic. There are no flow control or error control capabilities incorporated in IP. These are left to the next higher layer, the transmission control protocol (TCP). The IP is transparent to subnetworks connecting at lower layers; thus different types of networks can attach to an IP gateway or router. To compensate for these deficiencies in IP, the TCP (transmission control protocol) was developed as an upper layer to IP. It should be noted that TCP/ IP can be found in both the LAN and WAN environments.

12.3.4 Transmission Control Protocol (TCP)

12.3.4.1 TCP Defined. TCP (Refs. 3, 9) was designed to provide reliable communication between pairs of processes in logically distinct hosts on networks and sets of

350 ENTERPRISE NETWORKS II: WIDE AREA NETWORKS

Figure 12.13 Protocol layers showing the relationship of TCP with other layered protocols.

interconnected networks.4 TCP operates successfully in an environment where the loss, damage, duplication, or misorder of data, and network congestion can occur. This robustness in spite of unreliable communications media makes TCP well suited to support commercial, military, and government applications. TCP appears at the transport layer of the protocol hierarchy. Here TCP provides connection-oriented data transfer that is reliable, ordered, full duplex, and flow controlled. TCP is designed to support a wide range of upper-layer protocols (ULPs). The ULP can channel continuous streams of data through TCP for delivery to peer ULPs. The TCP breaks the streams into portions that are encapsulated together with appropriate addressing and control information to form a segment—the unit of exchange between TCPs. In turn, the TCP passes the segments to the network layer for transmission through the communication system to the peer TCP.

As shown in Figure 12.13, the layer below the TCP in the protocol hierarchy is commonly the IP layer. The IP layer provides a way for the TCP to send and receive variable-length segments of information enclosed in Internet datagram “envelopes.” The Internet datagram provides a means for addressing source and destination TCPs in different networks. The IP also deals with fragmentation or reassembly of TCP segments required to achieve transport and delivery through the multiple networks and interconnecting gateways (routers). The IP also carries information on the precedence, security classification, and compartmentation of the TCP segments, so this information can be communicated end-to-end across multiple networks.

12.3.4.2 TCP Mechanisms. TCP builds it services on top of the network layer’s potentially unreliable services with mechanisms such as error detection, positive ack-

4The IEEE (Ref. 10) defines a host as “A device to which other devices (peripherals) are connected and that generally controls those devices” and a host computer as “A computer, attached to a network, providing primary services such as computation, data base access or special programs or programming languages.”

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]