PART-TWO

Views:
 
Category: Education
     
 

Presentation Description

No description available.

Comments

Presentation Transcript

Slide 1:

NETWORK PRIMER NETWORK:- A network can be defined as connection among similar type of systems. INTERNET:- The connection of two or more distinct networks so that computers on one network are able to communicate with computers on another network. PROTOCOL:- A protocol defined as set of rules and regulation how to data transfer between source and destination. Ex:-TCP, UDP. TOPOLOGY:- The shape of the network. PACKET:- A packet is a small unit of data it contains source address and destination address. LAN:- It can be used to communicate certain distance between computers like single building. LANs can operate at high speeds. MAN:- It can be used to communicate one city to another city systems. UNIX NETWORK PROGRAMMING UNIT-2 1

Slide 2:

WAN:- It can be used to communicate a long global area. i.e., one country to another country. These networks sometimes referred as long haul networks. GUIDED MEDIA:- It is a physical connection i.e., what kind of cable can be used to communicate network system. UNGUIDED MEDIA:- It is a logical connection i.e., how to communicate network systems i.e., it can be worked based upon signals. ROUTER:- The path between source to destination is called a router. UNIX NETWORK PROGRAMMING UNIT-2 2

Slide 3:

ENCAPSULATION:- An encapsulation defined as required addition flow of data to transfer actual data from source to destination. Association:- An association is a set of five tuples is represented as {protocol, local process id, local process address, foreign process id, foreign process address} Half association:- Half association represented as set of { protocol local process id, local process address} BRIDGE:- It is used to control the flow of traffic. UNIX NETWORK PROGRAMMING UNIT-2 3

Slide 4:

UNIX NETWORK PROGRAMMING UNIT-2 4 GATEWAY:- The connection between two networks is called a gateway. The purpose of the gateway is to pass the information from one network to another network. FRAGMENTATION AND REASSEMBLY:- Fragmentation is the breaking up of a data stream into smaller pieces. Some networks use the term segmentation instead of fragmentation. The reverse of fragmentation is reassembly. Modes of Service: There are several services provided in the OSI model to communicate between peer to peer networks. These parameters are: Connection-oriented or connection less Sequencing Error control Flow control Byte stream or messages Full-duplex or half-duplex

Slide 5:

UNIX NETWORK PROGRAMMING UNIT-2 5 CONNECTION ORIENTED SERVICE:- In connection oriented service establish connection between two different process, it provided reliable data transmission. A logic al connection with each other before communication take place. Ex: TCP A connection-oriented service exchange involves three steps: Connection establishment Data transfer Connection termination. CONNECTION LESS SERVICE:- It can providing unreliable data transmission i.e., to send datagram (small unit of data like packet) from source to destination, it cannot providing any guarantee to reach destination. Ex:- UDP. Sequencing:- The data is received by the receiver in the same order as it is transmitted by the sender. Error control:- It guarantees that error-free data is received by the application programs. There are two conditions that can generate errors The data gets corrupted during transmission or the data gets lost.

Slide 6:

UNIX NETWORK PROGRAMMING UNIT-2 6 Flow control:- It assures that the sender does not overwhelm the receiver by sending data at a rate faster than the receiver can process the data. Byte stream:- A byte stream service does not provide any record boundaries to the data stream. Full-duplex:- A full-duplex connection allows data to be transferred in both directions at the same time between the two peer entities. Half-duplex:- only allow one side to transfer at a time.

Slide 7:

COMMUNICATION PROTOCOL:- A Protocol is a set of rules and conventions between the communicating participants . These protocols are designed in layers to implement the communication more efficient way. A Protocol suite is a collection of protocols from more than one layer. This collection is also referred to as a protocol family. There are several protocol suites depending on architectures and each of the following protocol suites define different protocols at different layers. The following protocol suites are: The TCP/IP protocol suite (the internet protocol) Xerox Networking Systems (Xerox NS or XNS) IBM’s Systems Network Architecture (SNA) IBM’s NetBIOS. The OSI Protocol Unix-to-Unix Copy (UUCP) UNIX NETWORK PROGRAMMING UNIT-2 7

Slide 8:

TCP/IP PROTOCOL SUITE:- INTRODUCTION:- In 1980s a new family of protocols was specified as the standards for the APRANET and associated DoD (Dept of Defense) networks with the name “DARPA internet protocol suite”. It is commonly referred as the TCP/IP protocol suite or just TCP/IP. In 1987 the National Science Foundation (NSF) funded a network that connects the six national supercomputer centers together. This network is called the NSFNET. Some features:- It is not vendor-specific. It can be implemented on small PC to super computers. It is used for both LANs and WANs. It is used in govt. as well as commercial agencies. OVERVIEW:- TCP/IP protocol suite consists the following other protocols on separate layers of internet architecture. TCP, UDP, ICMP, IP, ARP, RARP These protocols are defined in different layers of OSI model and its internet architecture which consists 4 layers (user process, transport, network, data link layer) UNIX NETWORK PROGRAMMING UNIT-2 8

Slide 9:

UNIX NETWORK PROGRAMMING UNIT-2 9 USER PROCESS HARDWARE INTERFACE ICMP TCP UDP IP ARP RARP USER PROCESS OSI LAYERS 5-7 OSI LAYERS 4 Transport layer OSI LAYERS 3 Network layer OSI LAYERS 1-2 LAYERING IN THE INTERNET PROTOCOL SUITE

Slide 10:

TCP :- TRANSMISSION CONTROL PROTOCOL TCP is defined in transport layer. It is a connection-oriented protocol i.e., reliable data transmission i.e., send packet from source to destination it can provided guarantee to reach destination. This protocol provides full duplex service. TCP is used in most internet application programs. TCP completely uses the IP. UDP:- USER DATA GRAM PROTOCOL UDP is also defined in transport layer. It is a connection less protocol for user processes. It is an unreliable protocol i.e., there is no guarantee that UDP datagram's reach their destination. ICMP:- INTERNET CONTROL MESSAGE PROTOCOL ICMP is defined in network layer. It handles the errors and control information between gateways and hosts. While ICMP messages are transmitted using IP data grams. These ICMP messages are generated and processed by the TCP/IP networking software itself, not by the user processes. IP:- INTERNET PROTOCOL IP is defined in network layer. It provides the packet delivery service for TCP, UDP and ICMP. There is no involvement of the user process to this protocol. UNIX NETWORK PROGRAMMING UNIT-2 10

Slide 11:

ARP:-ADDRESS RESOULUTION PROTOCOL It maps an internet address into a hardware address. This protocol is not used on all networks. It maps a hardware address to an internet address. This protocol is not used on all networks. RARP:REVERSE ADDRESS RESOLUTION PROTOCOL It maps hardware address to an internet address. This protocol is not used on all networks. Data link layer:- The data link layer provides hardware interface, TCP/IP model can be used to communicate 50 computers in a network by using leased telephone lines at 57.6Kbps. This network is called APRANET(Advance Research Project Agency Network). Network layer:- IP-datagram Network layer is referred all IP layer. It provides a connection less and unreliable delivery system. It is a connection less because, each IP data gram is treated as independent of others. Every IP data gram contains the source address and the destination address. It is an unreliable because, there is no guarantee that IP data grams are delivered or not correctly. The reliability is provided by the upper layer. UNIX NETWORK PROGRAMMING UNIT-2 11

Slide 12:

Services of IP layer:- The IP layer computers and verifies a checksum that covers its own 20 byte header for source and destination addresses. IP layer is responsible for fragmentation and defragmentation processes. The IPO module breaks up the data gram into fragments and sends each fragment as an IP packet. These fragments are reassembled into an IP datagram only when they reach their final destination. IP layer provides an elementary form of flow control. Internet addresses An address is required to identify the network and computers. An internet address required to identify the host among number of hosts in the huge networks of network. This internet address is specified with 32-bits, which holds a network-ID and a host-ID. The host id is relative to the network-id. TCP/IP addresses on the internet are assigned by a central authority called NIC (network information center). There are four formats in which the internet address can be assigned. Class A, class B, class C and class D. UNIX NETWORK PROGRAMMING UNIT-2 12

Slide 13:

Class A is used for those networks that have a lot of hosts on a single network. Class B is used for those networks which has considerable number of hosts. Class C is used for those networks that have less hosts per network. Class D is used not for specific network, it holds multicast address. Internet address is written as 4 decimal numbers. These numbers are separated by decimal point. Each decimal digit encodes one byte of 32-bit internet address. UNIX NETWORK PROGRAMMING UNIT-2 13

Slide 14:

UNIX NETWORK PROGRAMMING UNIT-2 14

Slide 15:

UNIX NETWORK PROGRAMMING UNIT-2 15 SUBNET ADDRESSES:- Subnet address is the address of sub networks in any organization. When the host id address space is not enough to indicate the hosts, then the sub-networks are to be organized. This may be done in two ways: Allocate as much number as the clients exists (no subnet address) Allocate by organizing sub network (internal networks) with 8 bits network id and lower 8 bit for host id. (subnet address) An IP address is 32 bits long. One portion of the address indicates a network (netid) and the other portion indicates the host (or router) on the network (hostid. To reach a host on the internet, we must first reach the network using the first portion of the address (netid). Then we must reach the host itself using the second portion (hostid). It is not enough in a big organization. The hosts cannot organized into groups and all of the hosts are at the same level. The organization has one network with many hosts. One solution to this problem is sub netting. The further division of a network into smaller networks called subnetworks. The network is divided into three physical subnetworks: The subnetworks still appear as a single network to the rest of the internet.

Subnetting:

Subnetting

A Network With and Without Subnetting:

A Network With and Without Subnetting

Slide 18:

Internet address consists of Network id Subnet id within network Host id within subnet TRANSPORT LAYER (TCP & UDP LAYER) TCP and UDP protocols belongs to the transport layer of the internet architecture. The user processes interact with the TCP/IP protocol suite by sending and receiving either TCP data or UDP data. These two protocols some times referred as TCP/IP or UDP/IP because these both use IP. UNIX NETWORK PROGRAMMING UNIT-2 18

Slide 19:

The relationship between TCP & UDP in internet layer approach is UNIX NETWORK PROGRAMMING UNIT-2 19 User process User process TCP UDP IP HARDWARE INTERFACE PROCESS LAYER TRANSPORT LAYER NETWORK LAYER DATA LINK LAYER

Slide 20:

UNIX NETWORK PROGRAMMING UNIT-2 20 TCP UDP TCP provides a connection-oriented, reliable, full-duplex, byte-stream service to an application program UDP provides a connection less, unreliable data gram service . TCP handles the establishment and termination of connections between processes UDP provides only two features Port numbers An optional checksum to verify the contents of the UDP datagram. TCP provides end-to-end reliability by checksums, positive acknowledgements, timeouts. There exist message boundaries in UDP. TCP provides end-to-end flow control TCP module contains the logic necessary to provide a reliable, virtual circuit for a user process. When IP sends an unreliable, connection less delivery of packets.

Slide 21:

UNIX NETWORK PROGRAMMING UNIT-2 21 PORT NUMBERS:- TCP or UDP uses more than one user process at a time. To identify the data associated with each user process TCP or UDP use technique of port numbers. Port number is 16-bit integer value. When a client process wants to contact server, the client must have a way of identifying the server that it wants. If the client knows the 32-bit internet address of the host on which the server resides it can contact that host, but how does client identifies the server process. To solve this problem, both TCP and UDP have defined a group of well-known ports, to identify the particular server process in client server connection.

Slide 22:

UNIX NETWORK PROGRAMMING UNIT-2 22 In client server implementation, Lets assume that the client sends a message to the FTP server on some host by sending a message to port 21 on that host. How does the server response First, the server can obtain the 32-bit internet address of the client from the IP datagram. The server obtains the 16-bit port number from the TCP header. When TCP or UDP assign unique port numbers for user processes, they are called Ephemeral port numbers(SHORT LIVE NUMBER). The process that receives the ephemeral port number doesn’t care what value it is. It is the other end of the communication link that needs it. TCP and UDP port numbers in the range 1 through 255 are reserved. All the well-known ports are in this range.

Slide 23:

The combination of information from different sources using identifiers such as port numbers, protocol types and internet addresses is called multiplexing. The 5-tuple that defines an association in the internet suite consists of The protocol (TCP or UDP). The local hosts internet address (a 32-bit value). The local port number (a 16-bit value) The foreign hosts internet address (a 32-bit value). The foreign port number (a 16-bit value). CONCURRENT SERVERS:- Concurrent server is host which is able to handle the requests of clients continuously. These requests may be from same client. Here, The TCP module on the server host able to determine which servers child process is to receive a given data message. This is based on the source internet address and the source top port number. UNIX NETWORK PROGRAMMING UNIT-2 23

Slide 24:

UNIX NETWORK PROGRAMMING UNIT-2 24 The step by step procedure in concurrent server: The server is started on the Host-1 with port number 21. now the server is waiting for clients request. The association { tcp ,*,21} specifies that server is waiting for a TCP connection on any ‘*’denotes any network. Clients starts requesting the server. Clients ephermal port number on host-2 the association is {tcp,H2,1500}. It is clients socket that specifies the connection for top from H2 on port 1500. When server receives the clients connection request, server forks a copy of itself and passes the connection of the host H2 to child process. Here the server process again come to the wait state. If another client process on host 2 requested a connection to the same server the clients TCP module assigns it a new ephermal port 1501, so the socket {tcp,H2,1501} is unique on the host H2. The server creates another server child process and connects it to new client process again server returns to its wait state for another client request.

Slide 25:

Application layer:- FTP:- file transfer protocol FTP is a program used to transfer files from one system to another. It provides features and options such as User authentication, data conversion, director listing etc., The client process establishes a connection with an FTP server process on the remote system using TCP. FTP establishes two connection between the client and server processes One connection for control information (commands and responses). Second connection for transformation of data. FTP uses TCP. FTP handles both text and binary files. TFTP:- Trivial file transfer protocol TFTP is simple protocol, it provides file transfer between a client process and a server process. TFTP is simpler than FTP, and it does not provides any user authentication, directory listing etc., TFTP uses UDP. UNIX NETWORK PROGRAMMING UNIT-2 25

Slide 26:

TELNET: remote login TELNET provides a remote login facility. It allows an interactive user on a client system to start a login session on a remote system. Once a login session is established, the client process passes the users keystrokes to the server process. TELNET uses TCP. SMTP:- simple mail transfer protocol SMTP provides a protocol for two systems to exchange electronic main using a TCP connection between two systems. UNIX NETWORK PROGRAMMING UNIT-2 26

Slide 27:

XEROX NETWORK SYSTEMS (XNS PROTOCOL SUITE) Xerox Network System is the network architecture developed by Xerox Corporation in the late 1970s for integrating their office products and computer systems. XNS is an Open system. Most 4.3 BSD systems provide support for the XNS protocol suite. It is similar in structure of the TCP/IP. XNS protocol suite overview: It consists the following protocols ECHO, RIP, PEX, SPP, ERROR and IDP UNIX NETWORK PROGRAMMING UNIT-2 27

Slide 28:

XEROX NETWORK SYSTEMS (XNS PROTOCOL SUITE) UNIX NETWORK PROGRAMMING UNIT-2 28 USER PROCESS USER PROCESS ECHO RIP PEX ERROR SPP IDP H/W INTERFACE OSI LAYERS 5-7 OSI LAYERS 4 OSI LAYERS 3 OSI LAYERS 1-2

Slide 29:

ECHO:- ECHO protocol is a simple protocol that causes a host to echo the packet that it receives. RIP:- Routing Information Protocol used to maintain a routing data base for use on a host in the forwarding of IDP packets to another host. Typically a routing process exists on the host. This process uses RIP to maintain the database. PEX:- Packet Exchange Protocol is an unreliable, connectionless, data gram protocol for user processes. It retransmits the data message in case of error. SPP:- Sequenced Packet Protocol is an connection oriented, reliable protocol for user processes. It provides a byte stream for the user process with optional message boundaries. It is most commonly used protocol in XNS suite. ERROR: ERROR protocol can be used by any process to report that it has discovered an error and therefore discarded a packet. IDP:- Internet Datagram Protocol is the connectionless, unreliable datagram protocol that provides the packet delivery service for all above protocols. UNIX NETWORK PROGRAMMING UNIT-2 29

Slide 30:

Courier remote procedure call protocol:- Most Xerox applications are built using courier remote procedure call protocol. It is built using SPP. A user process has the choice of interacting directly with SPP or using courier. The application that uses courier can be shown as UNIX NETWORK PROGRAMMING UNIT-2 30 PRINTING PROTOCOL FILING PROTOCOL USER PROCESS COURIER SPP OSI LAYER-7 OSI LAYER-5,6 OSI LAYER-4

Slide 31:

Network layer (IDP layer) in XNS network XNS Addresses An XNS address occupies 12 bytes and consists 3 parts Network id of 32 bit (4 bytes) Host id of 48 bit (6 bytes) Port number of 16 bit (2 bytes) The 16-bit port number is called as socket here. The association is {protocol, local- addr , local-process} In XNS field the association is the protocol is XNS, the Host id is an absolute number, it is unique across all XNS internets. Network id is redundant with unique host id. Both network id and host id are assigned by xerox corporation only. IDP packets The XNS transmits data in the form of IDP packets. IDP provides a connectionless and unreliable delivery service. UNIX NETWORK PROGRAMMING UNIT-2 31

Slide 32:

Every IDP packet contains a 30 byte header as Source XNS address (12 bytes) Destination XNS address (12 bytes) Checksum Length of data (0-546 bytes) Higher layer packet type (SPP, PEX, etc.,) The difference between IP and IDP UNIX NETWORK PROGRAMMING UNIT-2 32 IDP (XNS SUITE) IP (TCP/IP SUITE) IDP packet contains a checksum that includes the entire IDP packet IP checksum is only for IP header and does not include the data in the IP datagram. IDP packets contain a 16-bit port number. Port numbers are defined by TCP and UDP on their own. IDP demultiplexes the incoming datagram's based on the port number. IP demultiplexex the incoming datagrams based on their protocol filed(TCP,UDP).

Slide 33:

TRANSPORT LAYER IN XNS NETWORK SYSTEMS SPP & PEX SPP: Sequenced Packet Protocol SPP provides a connection-oriented, reliable, full-duplex services to an application program. Using SPP, the data is transferred in a 3-level hierarchy consisting 3 data formats are Bytes are the basic entity A packet is composed of zero or more bytes. A message is composed of one or more packets. Through the above 3 data formats SPP can be provide 3-different interfaces to user process as Byte stream interface:- The bytes are delivered to the user process in order. The user process reads or writes the data using any convenient buffer size. Here message boundaries are preserved. Packet stream interface:- The packets are delivered to the user process in order. The user process reads or writes entire packet. Reliable packet interface:- The packets are delivered to the user process but they might be out of order. These packets are presented to the user process as they arrive. UNIX NETWORK PROGRAMMING UNIT-2 33

Slide 34:

UNIX NETWORK PROGRAMMING UNIT-2 34 Feature Byte stream Packet stream Reliable packet Connection oriented Yes Yes Yes Message boundaries Yes Yes No Packet boundaries No Yes Yes Data checksum Yes Yes Yes Positive acknowledgement Yes Yes Yes Time outs and retransformation Yes Yes Yes Duplicate detection Yes Yes Yes Sequencing Yes Yes No Flow control Yes Yes Yes

Slide 35:

UNIX NETWORK PROGRAMMING UNIT-2 35 PEX: Packet Exchange Protocol PEX is a data gram oriented protocol similar to UDP. It retransmits a request when ever needed and PEX does not do the duplicate detection. It is a connection less service i.e., unreliable data transmission but it should not provides duplicate service. PEX has a 6-byte header that includes Id –field of 32-bit: specifies the type of service requested. Client type field of 16-bit: specifies the client type. PEX protocol operates as follows step by step:- The client sets the id-field, sets the client type field to a value that specifies the type of service requested. The packet is sent to the ser ver. The server performs the service specified by the client type. The server sends the same id-field that was sent by client after response packet is formed. Then only the client knows for which request the response is received from the server. The client must used different id-field for next response.

Slide 36:

UNIX NETWORK PROGRAMMING UNIT-2 36 USER PROCESS SPP IDP PEX H/W INTERFACE USER PROCESS USER PROCESS transport layer Process layer Network layer Data link layer The relation ship of the XNS protocols

Slide 37:

UNIX NETWORK PROGRAMMING UNIT-2 37 XNS bridge fields:- The XNS protocols define bridge fields in the headers that encapsulated by each layer. These bridge fields are by next higher layers and not used in its particular layer. There are 3 bridge fields: Packet type field:- It is defined in IDP header. It is not used by IDP layer. It specifies the protocol of the data in the IDP packet. Data stream type field:- It is defined in the SPP header, it is not used by SPP module. It is used in shutting down an SPP connects between two user processes. Client type field:- It is defined in the PEX header, it is not used in PEX module. It is intended for the user process that is using PEX. SYSTEM NETWORK ARCHITECTURE (SNA PROTOCOL SUITE) SNA is an architecture but not a product. i.e., there exist software hardware products to implement SNA. Most Unix systems support this SNA. SNA designed to support the networking of non programmable devices such as terminals, printers. SNA is more complicated than other communication architectures like TCP/IP. The SNA node architecture can be shown as

Slide 38:

UNIX NETWORK PROGRAMMING UNIT-2 38 END USER DATA LINK LOGIC UNIT (LC) PHYSICAL UNIT (PU) SNA NETWORK

Slide 39:

UNIX NETWORK PROGRAMMING UNIT-2 39 SNA was developed in a layered approach similar as OSI model. SNA node consists mainly 4 components. END USER:- An end user is user of network. End user interact with a logical unit to access network. Logical Unit:- LU provides the presentation, data flow, transmission control functions. LU interact with a physical Unit. The services provided by this LU is differ with types of LU. LU types LU.2, LU.3, LU.4 and LU.7 support communication between processes and terminals. LU.1,LU6.1 and LU.6.2 support communication between two processes. PHYSICAL UNIT:- The PU is the operating system of the node and it controls the data link connections between the node and the network. The type of the node specified by the PU type. There are 5 type of nodes presently T1,T2.0,T2.1,T4,T5 DATA LINK:- The data link portion of the node is the device driver of the node specified by PU type.

Slide 40:

UNIX NETWORK PROGRAMMING UNIT-2 40 SNA FUNCTION SNA LAYERS OSI LAYERS USER PROCESS TRANSACTION SERVICES APPLICATION LOGICAL UNIT PRESENTATION SERVICES PRSENTATION DATA FLOW CONTROL SESSION TRANSMISSION CONTROL TRANSPORT PATH CONTROL PATH CONTROL NETWORK DATA LINK DATA LINK CONTROL DATA LINK PHYSICAL CONTROL PHYSICAL SNA COMPLETE 7 LAYER APPROACH CAN BE SHOWN WHICH IS SIMILAR TO OSI 7 LAYER MODEL

Slide 41:

UNIX NETWORK PROGRAMMING UNIT-2 41 There are two form of SNA networks:- Subarea SNA networks:- These networks are built around IBM mainframes. It maintains centralized control over the network. Internets of independent SNA subarea networks can formed using the SNA network interconnect (SNI) facility. APPN networks:- Advanced Peer-to-Peer Networking. It was introduced by IBM in 1986. It is also called SNA/LEN (Low entry networking). APPN is limited to PU type 2.1, LU 6.2. It has features not found in subarea networks, such as dynamic routing. Path control layer:- Path control layer in SNA provides a virtual circuit service to its upper layer(LU). The functions are error control, flow control and sequencing. Path control layer is responsible for moving packets around in an SNA network. The path control header consists with transmission header of size 6 to 26 bytes. Path control layer is also used to packet fragmentation and defragmentation. This activity referred as segmenting in SNA. When a packet must be divided into pieces before passed into data link layer. This is similar to the fragmentation and reassembly done by the IP layer in TCP/IP.

Slide 42:

UNIX NETWORK PROGRAMMING UNIT-2 42 LU 6.2-APPC LU 6.2 is also referred to as APPC for Advanced Program to Program Communication and was released by IBM in 1982. It is the logic unit of type 6.2. it provides a connection oriented, reliable and half duplex service to an application program. It allows data flow between the user processes only in a single direction at a time. It also provides positive acknowledgement, time out and retransmission, duplicate detection and sequencing. SESSIONS AND CONVERSATIONS SESSION:- In SNA terminology, the peer-to-peer connection between 2 Lus is called a session. A session is usually a long term connection between 2 Lus. Conversation:- Peer-to-peer connection between two user processes is called conversation. Conversation is a short-term connection between 2 user processes. End user LU DL PU End user LU PU DL

Slide 43:

UNIX NETWORK PROGRAMMING UNIT-2 43 LU 6.2 PROTOCOL BOUNDARY The interface between a user process and the LU is called Presentation services in SNA. There are two interfaces Mapped conversations Unmapped conversations The major difference between the two types of conversations is in format of data exchanged between the process and the LU. An unmapped conversation is also called a basic conversation. The protocol boundary is defined between the program and LU 6.2 with a collection of verbs. The actual mapping of these verbs into an application program interface depends on the specific LU 6.2 software is being used. The LU 6.2 protocol boundary defines numerous return codes from each of the verbs. The name of the mapped conversation verbs is a basic verb and the function is available and its name is formed by removing MC_prefix (mapped conversation)for example, ALLOCATE is the basic conversation equivalent of MC_ALLOCATE. Logical Records and GDS variables:- Logical Record is the record consisting a 2-byte length field (LL) followed by zero or more bytes of data. All user process has this record. The length of this record is always equal to 2 or more. LL USER DATA

Slide 44:

UNIX NETWORK PROGRAMMING UNIT-2 44 A Process that is writing logical records need not write a complete logical record, it can be written in pieces based on LL. For example, 500 length of logical record can be written in three pieces, 100, 250, 150 in sequence. For mapped conversations, each MC_send_data verb is executed by the process generates a single user data record, generating the mapped conversation record (MCR). GDS(GENERALIZED DATA STREAM) A logical record containing an ID field is called as GDS variable. A GDS variable can be comprised of multiple logical records, if the length of the MCR exceeds 32,763 bytes. APPLICATION LAYER: It provides a 2 programs for user interfaces Application transaction program Service transaction program The only difference between is that service TPs are supplied by IBM and a service TP can provide a service for an application IP. Application TPs are user processes. Service TPs can only be invoked by privileged processes. These two programs provided DIA-Document Interchange Architecture SNADS-SNA Distribution Services DDM-Distributed Data Management I ID LL USER DATA

Slide 45:

UNIX NETWORK PROGRAMMING UNIT-2 45 DIA(DOCUMENT INTERCHANGE ARCHITECTURE):- The functionality of DIA is to interchange modules from one user to another user. DIA uses LU 6.2 for communicating between different computer systems. It provides the following functionalities like document library services, document distribution and file transfer. SNADS(DISTRIBUTION SERVICE):- It is an asynchronous distribution service for moving distribution objects such as a document or an electronic mail message from a source node to a destination node. By asynchronous means that it initiates the sending of the object, but the actual delivery might take place later. The asynchronous nature of SNADS is same as the Unix electronic mail delivery service provided by the Unix uucp program. DDM(DISTRIBUTED DATA MANAGEMENT):- DDM is another application available from IBM that uses LU 6.2. it allows an application program to access the records in a file on another system.

Slide 46:

UNIX NETWORK PROGRAMMING UNIT-2 46 NETBIOS:- NETBIOS derived from BIOS. BIOS stands for the Basic Input Output System. In personal computer it reside into read only memory, it provided interface between the hardware and application program. Similarly, NETBIOS was introduced by IBM in the IBM PC network in 1984. it is designed for a group of Personal computers. NETBIOS was implemented in ROM on the interface card, it provides an interface between a program and the actual hardware on the interface card. Later, IBM introduced its token ring LAN in 1985, the token ring implementation of NETBIOS was implemented as software module as application program. NETBIOS is a software interface, it is not a network protocol. NETBIOS provides both a connection oriented services and connection less services. There are four types of services provided by NETBIOS. Name service Session service Data gram service General commands Name service:- Names are used to identify resources in NETBIOS. There are two types of names Unique name: the name must be unique across the network. Group name: the name need not be unique and all processes that have a given group name belong to the group.

Slide 47:

UNIX NETWORK PROGRAMMING UNIT-2 47 There are four commands related to name service 1.ADD_NAME to add a unique name 2.ADD_GROUP_NAME to add a group name 3. DELETE_NAME to delete name 4. FIND_NAME to determine if a name is registered. Session service:- This service provides a connection-oriented, reliable, full-duplex message service to a user process. It does not provide any form of out-of-band data. The following command provide session service CALL call active open the client connects with the service when the client executes the CALL command. LISTEN the server first issues a passive open with the listen command SEND send session data SEND_NO_ACK send session data, no acknowledgement RECEIVE receive session data RECEIVE_ANY receive session data HANG_UP terminate session. SESSION_STATUS retrieve session status

Slide 48:

UNIX NETWORK PROGRAMMING UNIT-2 48 DATAGRAM SERVICE:- NetBIOS provides connection less service, it supports datagram's up to 512 bytes in length. Data grams can be sent to a specific name or can be broadcast to the entire LAN. There are four data grams commands SEND_DATAGRAM send datagram SEND_BROADCAST_DATAGRAM send broadcast data gram RECEIVE_DATAGRAM receive datagram RECEIVE_BROADCAST_DATAGRAM receive broadcast datagram General commands:- NETBIOS is provided with some general command for various functions. There are four commands RESET reset NETBIOS CLEARS THE NETBIOS NAME AND THE SESSION TABLES CANCEL cancel an asynchronous command ADAPTER_STATUS fetch adapter status UNLINK unlink from bootstrap server Netbios association for session service {the protocol, the source name, the source session number, the destination name, destination session number} Netbios association for data gram service {protocol, the source name}

Slide 49:

UNIX NETWORK PROGRAMMING UNIT-2 49 OSI PROTOCOLS OSI models provides a frame work which develops protocols at each layer. The protocol developed by ISO and other related organizations as OSI protocols. The following features are provided by OSI protocols Transport services Session services Presentation services Association control services Remote operation services Abstract syntax notation tools FTAM(File transfer, Access Management) FTAM(FTP gateway) VT(Virtual Terminal) Directory services The advantage in OSI model is its layered structure, it provides well-defined interfaces between layers. Data link layer:- Data link layer provides services to the network layer. A logical link control is provided as interfaces between the network layer and the data link layer. Networks that use the OSI protocols with point-to point connections typically use Link Access Procedure (LAP). LAP is a part of x.25 standards.

Slide 50:

UNIX NETWORK PROGRAMMING UNIT-2 50 Network layer:- ISO standard 8348 defines the services provided by the network layer for the presentation layer. The original version provides only CONS( connection oriented network services) and for connection less service is (CLNS). x.25 is the protocol widely used in CONS protocol. ISO 8878 describes how x.25 can be used to provide CONS. ISO 8473 defines the protocol used to provide the CLNS. Transport Layer:- Transport layer should provide reliable, end-to-end data transfer for users of the transport layer. ISO standard 8072 provides the data transmission services. Its original standard provides connection oriented transmission, and next also connection less service. Transport layer also provides establishing a connection between two endpoints The specification of the actual connection oriented transport layer protocols is given in ISO standard 8073.

Slide 51:

UNIX NETWORK PROGRAMMING UNIT-2 51 There are three types of services A, B, C Type A: a reliable network service. The network layer and the data link layer handle all error conditions. Type B: a reliable network service with error notification. Type C: an unreliable network service. This type provides services by datagram oriented network. Session layer: session layer provides services to the user process. 8326 defines the services to be provided by this layer. 8327 defines the session layer protocol. The services are Session establishment Session release The other services are dialogue management, it is half duplex , synchronization, activity management, exception reporting. Presentation layer:- The presentation layer is concerned with the representation of the data that is being exchanged. The data representation and the conversion between different formats such as ASCII, binary text.

Slide 52:

UNIX NETWORK PROGRAMMING UNIT-2 52 The other services are conversion of data, data compression, encryption, establishment of session and termination of session. 8822 defines the above services 8823 define the protocol for the above. Application layer:- Application layer consists user process link CASE (Common application service elements), electronic mail, directory services, virtual terminal and file transfer, access and management. There are two types of CASEs Association Control Service Elements (ACSE) Commitment, Concurrency and Recovery (CCR) UNIX-TO-UNIX COPY PROTOCOL SUITE UUCP is a generic name used to describe a set of programs that can be used to copy files between different systems and to execute commands on other systems. UUCP used in 4.3 BSD systems. UUCP is a collection programs. There are four programs uucp, uux, uucico and uuxqt

Slide 53:

UNIX NETWORK PROGRAMMING UNIT-2 53 UUCP it is a program to copy a file one system to another system. This is involved by users is just as cp command in unix systems. Syntax:- uucp main.c apple!~uucp This command says to copy the file main.c in the current directory to the login directory of uucp on the system named apple. Uux:- this program can be used to generate code into one system that code can be executed into another system. Uucico:- this program can be used to generate back end program that can be called Daemon process for uux program. Uuxqt:- this program can be used to generate executable files for uucico.

Slide 54:

UNIX NETWORK PROGRAMMING UNIT-2 54 Protocol comparisons:- Fragmentation and reassembly Flow control Reliability Sequencing Timeout and retransmission