Professional Documents
Culture Documents
Lecturer: Martin Hsler E-Mail: martin.huesler@fhso.ch Schedule: Winter Semester 2004/2005 University of Applied Sciences Solothurn Northwestern Switzerland
This manuscript is part of an introduction to network technologies. The content specializes primarily in the TCP/IP protocol family.
Modular Goals
To understand the fundamentals of data communication To know the basic terms of network technologies To be able to explain current network topologies To know the most important components of a network To understand the functional cycle of data transmission To be able to describe elementary network protocols
Literature
Einfhrung in die Informatik, 3. Auflage
Oldenbourg Verlag, H.-P. Gumm / M. Sommer ISBN: 3-486-24422-1
TCP/IP und ONC/NFS in Theorie und Praxis Unix in lokalen Netzen, 2. Auflage
Addison Wesley, Michael Santifaller ISBN: 3-89319-531-9
EDV-Grundwissen Eine Einfhrung in Theorie und Praxis der modernen EDV, 4. Auflage
Addison Wesley, M. Precht, N. Meier, J. Kleinlein ISBN: 3-8273-1222-1
Internetworking with TCP/IP Volume 1; Principles, Protocols, and Architecture 2nd Edition
Prentice Hall International Editions, Douglas E. Comer ISBN: 0-13-474321
08.03.05
TABLE OF CONTENTS
1. THE FUNDAMENTALS OF DATA COMMUNICATION 1.1 Communication 1.2 Parallel and serial transmission 1.3 Simplex, Half-duplex and Full-duplex 1.5 Error Detection 1.6 Modulation Methods 1.7 Protocols 1.8 The OSI Model 1.9 The Organisation of the Networks 1.9.1 LAN (Local Area Network) 1.9.2 WAN (Wide Area Network) 1.9.3 MAN (Metropolitan Area Network) 1.9.4 GAN (Global Area Network) 1.10 Data Transmission in Public Networks 1.11 Network Topologies 1.11.1 Bus 1.11.2 Ring 1.11.3 Star 1.11.4 Access methods 2. ACTIVE NETWORK ELEMENTS 2.1 Repeater 2.2 Bridge 2.3 Router 2.4 Hub 2.5 Gateway 5 5 5 5 6 7 10 11 12 12 12 12 13 13 14 15 15 16 16 17 17 18 18 18 18
08.03.05
3. THE ETHERNET 3.1 Transmitting Media 3.2 Ethernet Address 3.3 Ethernet-Frame 4. TRANSMITTING MEDIA 4.1 Coaxial cable 4.2 Twisted Pair 4.3 Fiber Optic Cable 4.4 Satellites / Directional Radios 5. SUMMARY TCP/IP 5.1 The Basics 5.2 Organization 5.3 The IP Address 5.4 Address Resolution Protocol ARP 5.5 Internet Protocol IP 5.6 User Datagram Protocol UDP 5.7 Transmission Control Protocol TCP 5.8 Internet Applications 5.9 Domain Name Service DNS
18 19 19 19 20 20 20 20 20 21 21 22 23 24 26 32 33 33 34
08.03.05
It must be possible to transfer information, i.e. bits, by some method. This can be, for example, a network cable, a telephone line or a radio link. Both partners must have a common protocol.
There must be a set of laws that allows both partners to interpret the exchanged bits in the same way. Every type of communication must obey these rules so that each partner can understand the other. We are talking about the type of language used and the point in time, when communication is possible. Now, we want explain in detail certain fundamental rules of data communication.
Full-duplex:
Today, three modes are known with two-wire-full-duplex. For each transmission direction, a separate carrier frequency is used. The communication devices operate with high speed on lines in half-duplex mode and simulate fullduplex for the connected devices.
Both communication devices send and receive at the same time, whereby they suppress their own echo with a sophisticated circuit (echo compensation).
08.03.05
This byte-by-byte method of securing data is called Vertical Redundancy Check (VRC). If the block of data is supplemented with a byte, which contains a parity bit for every first bit and a further parity bit for every second to eighth bit, then one speaks of a Longitudinal Redundancy Check. With this method, a one-bit-error can be directly corrected.
University of Applied Sciences Olten 6 08.03.05
Cyclic Block Check: During the cyclic block check, the block information is taken from the data of a text block, whereby the whole text block is viewed as a binary number. This number is divided by another pre-assigned one and the remainder is the checksum. Typical representatives of the cyclic block check are BCS (Block Check Sequence), CRC (Cyclic Redundancy Checking), or FCS (Frame Check Sequence).
08.03.05
Carrier frequency:
t U Digital signal: 0
0 t
Modulated signal:
Carrier frequency: t
Digital signal: 0 1 0 1 1 0 t
Modulated signal:
08.03.05
Carrier frequency: t
Digital 0 1 0 1 1 0 t
Modulated signal
180
10 11
00
270
08.03.05
1.7 Protocols
Computer applications communicate through protocols. Protocols are rules that coordinate the exchange of information between partners and make it efficient. This is just like humans who use certain formulisms to simplify understanding. An example of a human protocol is the use of "roger" and "over" in wireless radio communication. Communicating partners acknowledge the change in communication direction by saying "over". When data is exchanged between data processing systems, similar, but more advanced demands take place. However, due to the complexity of the communication between data processing systems, it is often not useful to handle all of the necessary functions in just one single protocol. As a result, it is common that several data processing protocols are used simultaneously. These protocols are layered into stacks and the various functions are divided among the different protocols in the stack. They all cooperate with one another and together provide a service for the user. Some functions: Controlling the electrical signals during the communication Controlling the sequence, in which a computer communicates (see access method) Defining the language for communication Recognizing and correcting errors in communication Addressing the data that is to be communicated In addition to the addressing of the endpoint communication, the controlling of the data flow and many more things, one of the main functions of protocols is the provision of services to make data transfer reliable. Behavior Error recognition Error correction Address Flow control What happens (examples) checksum, sequence number, timer supervision acknowledgements packet repetition, correction procedure address data destination window, acknowledgements
In the above table, some more important protocol behaviors and how they happen are listed. Networks, computers and data lines are by no means immune to data corruption or system failure. A user of a network service expects correct data, and it does not matter if it is the end-user at a computer station or a protocol that is higher in the stack. Therefore, during the transfer of data, these problems must be first recognized and, when possible, solved.
10
08.03.05
7 6 5 4 3 2 1
Presentation Layer Session Layer Transport Layer Network Layer Link Layer Physical Layer
Presentation Layer Session Layer Transport Layer Network Layer Link Layer Physical Layer
Transport system
The seven layers of the OSI Reference Model Usually, each protocol collection (e.g. TCP/IP) has its own architecture. Individual protocols, or rather their functions, are modelled into the various layers. The stacking is based on the principle that one layer (e.g. the network layer) can use the one below it (in this case the link layer) without knowing how the layer renders its service. The layer directly above it (here the transport layer) will offer its own defined service. In this way, a division of the work per layer is achieved. The OSI model divides the entire communication protocol (from the physical level to the application level) into a total of seven protocol layers. Applications, which communicate through the network, pass through all seven layers. As the protocol passes from the lowest layer to the highest one, it experiences an increasing abstraction. This means that the uppermost layer describes the communication protocol from the point of view of the user, while the lower layers increasingly refer to the technical aspects of the data transmission. The lowest layer deals solely with the physical transmission: it defines, for example, the signal level for the data transmission. Due to the particular importance of layers 1 4, we will look at them later in more detail.
11
08.03.05
WAN-Node
WAN-Node
Based on the OSI-Model, this structure illustrates the protocols in the nodes of a common data network. Important for the differentiation between the various types of local networks are only the two lower layers. Everything else above them either belongs in the station itself or in the nodes of the wide-area network. Both middle protocol towers, each with three layers, represent nodes in the wide-area network. They are pure communication nodes, which do the routing.
A MAN is a special wide-area network, which is limited to an urban area or to the area of a company. Mainly, it differs from WANs only in the rates of transmission (approx. up to 100 Mbits/s).
1. the establishment of a connection 2. the transmission of data 3. the ending of the connection A connectionless service, trusting on the reliability of the medium, just sends the packet - well aware of the fact that the occasional loss of a data packet can be put up with. The eventual error will be corrected in the higher layers. ISDN (Integrated Services Digital Network) Since that moment when we have been able to transmit the human voice digitally, it has become unnecessary to have separate networks for data and voice. As a result of this modern public communication network, all services can be simultaneously offered (integrated). ISDN makes this idea possible. Rates of transmission of at least 144 Kbits/s are possible (2 bearer channels with 64 Kbits/s and one control channel with 16 Kbits/s). 8 devices can be connected, whereby only two of them (computer and telephone) can be in use at the same time. Service charges are about twice as high as those of a normal telephone connection. DSL / ADSL The acronym DSL means digital subscriber line and needs two modems; one at the switching center and the other one at the client's. At the moment, today's technology allows transmission rates of up to 8Mbit per second over existing cables. In actuality, though, slower transfer rates are in use because there are then fewer reciprocal disturbances in the cable strands. There are ADSL and SDSL connections: the A stands for asymmetrical and the S for symmetrical. It is called asymmetrical because the speed of the data stream is higher to the ADSL user than it is to the sender. Downloads are, therefore, faster than uploads. With symmetrical connections, upstream is as fast as downstream. The normal Internet user usually requests more data from the Internet than they feed back to it. Therefore, an ADSL connection seems more logical. A company, on the other hand, might need to send large quantities of data into the network, for example, building or floor plans, digital pictures, etc. Here, a SDSL connection would be more advantageous. UMTS UMTS is well known because people had to bid millions for the adequate licenses. The new UMTS standard (Universal Mobile Telecommunication System) allows a transfer rate of up to 2 Mbit. This is 31 times the speed of the current ISDN devices in the conventional telephone network. Faster Internet connections, multimedia usage, stock market transactions, or online reservations all these things should have been made possible with this third generation mobile phone technology. However, in order to keep investments in the new network from getting out of hand, the maximum data rate was limited to 384 Kbits/s. UMTS is based upon the Wideband Code Division Multiplexing Access scheme (WCDMA), which differs greatly from the time division multiplex scheme, which has been in use up to now. With WCDMA, all the data within a radio cell are transferred over the same frequency and at the same time. The data are kept apart through codes, which have been agreed upon by the sender and the receiver. As with GPRS, the totality of the available radio cell spectrum is split dynamically (automatically adapted) among the clients; with UMTS, though, this is around four times higher. ATM The ATM network (Asynchronous Transfer Mode) is based on broadband technology. It could be the network of the future. The network is also based on the transfer of packets, (which are indeed smaller), and because of its possible transfer rate of up to 1 giga bps, it is far more capable than the other network types. At the moment, this network is being used in various research networks and has not yet won wide acceptance among commercial users. Because of its great performance potential, it could be used for LANs.
The topology of a network is the spatial arrangement of the stations and the transmission units. Two distinct topologies will be briefly described below, but it must be remembered that there are hybrids and combinations of the two.
1.11.1 Bus
A bus is the linear layout of the transmission medium with several port possibilities for stations. Because there is no central distribution center, error search can be difficult. To avoid reflections, both ends have to be fitted with end resistors.
Today, more and more systems are used which employ so-called hubs as buses rather than a physical cable. The construction of a bus looks more like a multiple star network, but it behaves like a bus network. This form of networking is also known as structured cabling.
Bus network with hubs Bus networks have become very important. We will look at one of its most important advocates, the Ethernet, later on.
1.11.2 Ring
In a ring, all the data is transmitted in one direction. Packets of data are read by any one of the stations on the loop and the data can be passed forward by any one of the 'listening' stations. If a transported packet is addressed to a particular station on the loop, then the message is regenerated and passed forward. And finally, once the loop has been completed, the packet will be absorbed once again by the sender. Each station on the ring can be in one of three states. a) listening b) sending c) by pass
15
08.03.05
1.11.3 Star
With the classic star topology, all the computers are connected to a central hub. One disadvantage is the amount of cables that are necessary for the set up. This has caused people to switch to the bus and ring topology. Today, though, the star topology is again very popular. The expense caused by the amount of cable is set off by other advantages. For example, the hub can contain errors better. In addition, if there are problems with a computer or if there is a cable disruption, the other stations are not necessarily affected. And finally, the connected computers do not have to share the connection with other users, thus leading to faster rates of transmission.
There are two types of communication: 1. controlled access through polling or reservation. Polling: Each station that desires communication with another one has to first receive permission either to permit data transmission or to establish a firm connection. People differentiate between 'roll call polling' and 'hub polling'. With roll call polling, the hub of a given loop will call each station in succession to ask if communication is desired. If the distance is long, then this can take a long time. 'Hub polling' can help the situation. Here, the station next in line simply gives permission to transmit to the next following station, once its own communication is ended. 2. competition: A station that is ready to transmit a packet of data, sends this packet when there is no other traffic. Due to the finite speeds, this can, however, lead to collisions. There are combinations of the star and ring topologies. So-called 'wiring concentrators' are placed on a ring, to which groups of stations are radially connected. There are several reasons for this. First, the number of stations should not be too large because of the synchronisation of the whole ring. (A concentrator counts as one station.) Second, due to geographic or to cabling reasons, it is often advisable to install concentrators.
In a round of discussion, if all the participants start to talk at the same time, no one will be able to understand the other because of the jumble of words. A similar situation can happen to computers in a network. If they start to send data at the same time, this will invariably leads to collisions individual packets of data will overwrite themselves. This means that some data will not be transmitted as desired to a receiver. Therefore, rules are needed to control communication on a network (In the case of the round of discussion, this could be a list organizing the speakers.) In the area of network technology, there are two methods of preference: CSMA-CD (Carrier Sense Multiple Assess Collision Detector) Token Ring CSMA-CD CSMA-CD stands for Carrier Sense multiple Access with Collision Detection and the name essentially describes the principle of the method: All devices have shared access to the medium All data transmitters listen in to the medium and try to detect if another station is sending a signal. There is a chance of collision when several stations send at the same time. If a collision happens and transmission will be stopped. (Collision detection)
16
08.03.05
Two data stations sending data simultaneously can cause data collision. As soon as a collision is detected, transmission is stopped. Both devices wait for a short period of time before they try to re-transmit. The waiting time for both stations is random and it also depends on the failed transmission attempt. This procedure is to prevent the signal from being re-sent at the same time. The procedure can be describes as follows: a group of people are sitting in a dark room. They are all talking with one another. The information is no longer being sent by electronic signals but by sound waves. Each person can understand the other, but only if one person is speaking (carrier sense). Each person can rise to speak (multiple access) and each person is invited to make only a short statement. If someone breaks this rule, he or she is excluded from the group. No one interrupts the other. If two people rise to speak at the same time, they will notice this since they will hear something that they themselves are not saying (collision detection). As soon as the speakers become aware of this problem, they will both stop talking, whereby the length of the pause will vary randomly. The second speaker will wait until the first speaker is finished, before making his/her remarks. This procedure assures that all the devices can communicate over a common medium, only one single device can transmit, the other devices are still able to receive at the same time. Token Ring The token-ring method is an enabling method, which allows only that computer to send, which has received permission to do so. This principle is analogue to a round of discussion, in which a person can speak only when he/ she has received permission from the chairperson. In a token-ring, a special bit pattern (authorization token) assumes the role of the chairperson. This marker travels around the token-ring network. As the token circulates, a computer that wants to speak can capture the token (plants a flag), attaches its message and the receiver's address to it and lets it circulate to its destination. The flag lets the other computers know that a message is underway and now they control the destination address to see if the attached message is for them. The target station can now receive the data and places a 'have read' flag in the authorization token. When the token returns to the sender, it recognizes that the message has been read and then releases the token back into the network. The token-ring method is used only in ring networks.
2.1 Repeater
A repeater is purely a signal amplifier, which works on the first layer of the OSI model. This means, a repeater forwards the data exactly as the sender sent it, it does not change the data in any way. A repeater simply strengthens the input signal, thus enabling it to be sent over greater distances. Repeaters, however, can only be used with networks of similar type. For example, several Ethernet segments can be linked together, in order to build a larger network. Collision detection of is done separately in each Ethernet segment.
17
08.03.05
2.2 Bridge
Bridges work on the second layer of the OSI model. They are also used to link to Ethernet segments together, but they have, in contrast to repeaters, a much larger function range. Whereas a repeater only strengthens simple signals, bridges are responsible for the forwarding of whole packets of data (frames). They also increase data security and the capacity of a network. In each case, a bridge reads the Ethernet sender's and receiver's address (MAC address). It recognizes whether the packet should be transmitted over another segment, thus greatly reducing communication within a network. On the other hand, data can be simultaneously transmitted within a segment so that a considerable improvement in capacity can be achieved with skilful network segmentation. A bridge can be its own computer without a keyboard and screen or it can be a special program on a normal computer. Whereas the aforementioned linking elements serve only as connectors for networks with the same topology, the elements discussed below are used to connect differing networks.
2.3 Router
Routers work on the third layer of the OSI model. Routers link networks with differing topologies, e.g. an Ethernet can be linked with a token-ring network. The networks that are to be connected need to be based only on the same transport layer (e.g. TCP/IP or DECNet). Routers are, therefore, used for the construction of wide area networks (WANs). A special function of a router is its ability to determine the shortest path between two computers. To do this, a router maintains a 'routing table', which stores the necessary information and actualises it continuously. Since routers play such a central role in the connecting of networks on the Internet, we will talk about them again later.
2.4 Hub
We were introduced to hubs in an earlier chapter as they are used in the construction of bus networks. Their main function is to switch interfaces, i.e. a cable always goes out from the hub to each computer. The hub can be used as the connecting point for either other network components or other networks. Hubs can function like a repeater or can be equipped to act like a bridge. Hubs can have 4, 8, 16, or 24 ports. All the information from the attached devices passes through the hub, thus substantially facilitating network management.
2.5 Gateway
Gateways work solely on the application level of the OSI model, implementing all seven layers of the OSI model. This allows networks with different protocols and topologies to interconnect. In telecommunication, gateways are used as the transmission units for certain services. With its range of function, gateways can be compared to routers, but in addition, they must do various protocol conversions and they must insure that the correct protocols are used. Typically, a gateway is the entrance to a postal service LAN (x25 gateways) or the interface for the exchange of e-mails between computers with different networks
3. The Ethernet
The Ethernet today is the most widespread local network. It was developed in the 70s by Xerox PARC and together with Intel Corp. and Digital Equipment Corp. standardized. The Ethernet is a bus-oriented network because all its stations are connected to a common medium. It uses the CSMA-CD access method. It is a so-called broadcast system since all stations can receive a transmitted message. Each Ethernet connection is essentially made up of two components. The transceiver (transmitter-receiver) connects the station to the bus cable. The transceiver contains the transmitter and receiver logics and the collision detection. Ultimately, the host interface connects the transceiver with the computer, that is, it implements the communication between the two and contains for example the logic whether a packet is meant for the station.
University of Applied Sciences Olten 18 08.03.05
In today's computers, the Ethernet port is pre-installed or is available as an additional Ethernet card.
3.3 Ethernet-Frame
Data packets (frames) that are sent in the Ethernet have various lengths, but are at least 64 bytes long. An Ethernet Frame has essentially the following components: the Ethernet address of the destination the Ethernet address of the source a type field and the data The following illustration shows the complete structure of an Ethernet frame Preamble
64 bits
Destinationaddress
48 bits
Sourceaddress
48 bits
type
16 bits 304
data
-12000 bits
CRC
32 bits
The preamble synchronizes the network nodes and the CRC field (Checksum) at the end of the frame identifies transmission errors. The type field specifies the kind of data that are transmitted. In a way, the
University of Applied Sciences Olten 19 08.03.05
type field allows the self-identification of the frame. Thus, the system can recognize which communication protocol the frame should process.
4. Transmitting Media
The transmission media are the actual ways in which signals are transmitted that carry the information to be communicated, i.e., the cable and the kind of signal transmission on it. When transmitting electrical signals, we basically differentiate between closed or open transmission. Open transmission is found in systems which radiate information to the receiver by using electromagnetic waves via space. Essentially, three types of closed transmission can be found today: 1. twisted pair (2 copper wires that are twisted together, sheathed or unsheathed) 2. coaxial cable (in many varieties) 3. optical fibers (optical characteristics: multimode, monomode)
Characteristically, conductors can show constant resistance, independent of the conductor length. This resistance corresponds to the alternating current resistance of the line for high frequencies. It is determined by the material and the dimensioning of the cable. The end resistance of bus conductors has to be the same as the resistance of the cable. It hinders reflexions by simulating a further conductor.
microwaves, which allow a transmission capacity of up to several Gigabits/s. Microwaves are also used to transmit data over large distances within a country. With directional radio, the transmitter sends a directed beacon to a reception facility.
5. Summary TCP/IP
5.1 The Basics
Normally, the term TCP/IP comprises everything that is somehow connected with a TCP or IP protocol, so for example, other protocols (UDP, ARP, ) diverse applications (telnet, ftp, ect.) or even network media (Ethernet, ) The term, Internet Technology, describes this technique more exactly. A network that uses this technique is called the Internet. Essentially, TCP/IP spans the layers 1 through 5 of the OSI-Model. However, the following four-layered model has established itself as the description of this protocol. It is based on a design of the American Defence Department.
Application Layer Transport Layer Internet Layer Network Access Layer Network applications TCP UDP IP ARP Ethernet
Ethernet address IP address
Transceiver
The main function of the network access layer is the transfer of an IP-datagram to other devices through a directly connected network. This layer defines how an IP-datagram is to be transported over the network. The protocols of this layer have to know the exact construction of the network underneath it. The Internet layer defines the IP-Datagram. It assumes the routing of the datagrams to other computers and is responsible for their fragmentation and defragmentation. The transport layer represents the computer-to-computer connection, which means, it is the connector between the application layer and the Internet Layer, which lies below it. Here, the user can access several protocols, with which data can be transferred. Ultimately, the individual protocols represent modules, which process the data that is being transferred through them. The Ethernet cable is then connected to the computer with a transceiver. In the diagram, one can see, for example, that the Internet layer has only one protocol (IP Protocol), but the transport layer has two protocols available.(TCP and UDP).
21
08.03.05
The Data Framing: If a user sends a data packet from the application layer, then the data are not just simply sent unchanged to the layer underneath. Each layer adds control and address fields to the existing packet. However, upon reception of the data in the reverse direction, each layer will again remove its control fields before forwarding it to the next higher layer. This process is called data framing or data de-framing. Terms The following table contains a summary of the terms for the data, which has various names depending on the processing stage within the individual protocols. Name Ethernet Frame IP Datagram Description The data lies on the cable as a packet. IP = Internet Protocol The data has been framed by the IP and lies between the IP and the Ethernet Modules. UDP = User Datagram Protocol The data has been framed by the UDP and lies between the UDP and IP Modules. TCP = Transmission Control Protocol The data has been framed by the TCP and lies between the TCP and IP Modules. The data is lying as a data stream in the network applications.
UDP Datagram
TCP Segment
Applications data
If we follow the data flow down from the application layer through to the lower layers, we can see that the data either passes through the TCP module (Transmission Control Protocol) or through the UDP module (User Datagram Protocol). This means there are applications on the applications layer that use either the TCP protocol or the UDP protocol. SNMP (Simple Network Management Protocol) is an example for a UDP application, whereas FTP (File Transfer Protocol) uses the TCP protocol.
5.2 Organization
The IAB (Internet Activities Board) is the highest body that coordinates the development of the TCP/IP protocol family and organizes the expansion of the Internet. The IRTF (Internet Research Task Force) and the IETF (Internet Engineering Task Force) are subordinate to the IAB. The much smaller IRTF deals with basic research activities and the IETF endeavours to solve short and medium term problems. The IETF is divided into 8 sub organisations, which are coordinated by a common body, the IESG (Internet Engineering Steering Group). The goals of the individual task groups are determined in regularly occurring meetings and are then published on the Internet.
22
08.03.05
Internet Institutes:
IAB IRTF
Sub org 1
IETF
Sub org 2 Sub org 3
IESG
...
The ICANN (Internet Corporation for Assigned Names and Numbers) is probably the absolutely most important authority of the Internet. It is a non-profit organization. It is responsible for the administration of IP addresses and domain names. (Formerly, the IANA (Internet Assigned Numbers Authority) had this responsibility alone). The ICANN is at the apex of a hierarchy. Both IP controllers RIPE (Resaux IP Europene) and APNIC (Asian-Pacific Network Information Center) are subordinate to it. Internet Administration:
ICANN
RIPE
APNIC
ARIN
NIC.CH
NIC.DE
NIC.XX
Datacomm
Swisscom
Sunrise
SWITCH manages NIC.CH. SWITCH is also the place of registration for the top level domain names "ch" and "li". A registered domain name must have at least 3 and at most 24 letters or numbers. The only special character that is permitted is the hyphen (-) that cannot be at the beginning nor at the end of a name.
school computer that is connected to the Internet has, for example, the following IP address: 193.135.241.184. The IP address is made up of a network and a host part. Internet addresses are divided into 3 network types, called class A, B, and C. The class is recognizable by the position of the first 0 in the bit pattern of the address. For each class, a certain number of bits are reserved for the identification of the networks in that class. The remaining bits identify the individual hosts in the net. The following table shows the starting bits for each net class and the number of reserved bits for the identification of the networks and the individual hosts in this class. This table also shows the resulting address block and the numbers of networks and hosts in the respective network class.
Network class
Class A Class B Class C
Number of Number of addresses networks per network 128 16384 approx. 16 mil approx. 65000 255
128.0.0.0 - 191.255.255.255
The above table shows the address blocks that are theoretically possible. The IANA (Internet Assigned Numbers Authority) has reserved 3 areas for private Internets. (RFC-1918). If a private net needs to be configured, then these suggestions should be followed without fail. The subnet mask defines the number of bits of the IP address that belong to the netblock. In the UAS, the subnet mask 255.255.255.0 is used, i.e., the first 3 bytes determine the network portion and the remaining bytes are allocated to the host. This also means that this IP area can maintain 2^8 = 256 addresses and represents a C Network Class. 11000001 11111111 11000001 00000000 10000111 11111111 10000111 00000000 11110001 11111111 11110001 00000000 10111000 00000000 00000000 10111000 IP Address Subnetmask Network part Host part
Perspectives Due to the enormous expansion of the Internet over the last years and in spite of the seemingly large number of possible IP addresses, a shortage of address is foreseeable in the near future. This is why; efforts are being made to define new IP address structures. A new version uses a 128-bit address and this should suffice for the time being. At the same time, however, a new IP protocol is also being defined, known under the name of IPV6. It will also be retroactively compatible with existing protocols.
Addresses higher than 223 are reserved. They are not for public use. 24 08.03.05
each computer on the local network. Basically, the ARP table has a column of IP addresses and a column of corresponding Ethernet addresses. If an Ethernet address has to be resolved, then the table will be searched for this address. If the address is there, the corresponding Ethernet address will be selected. It should be remembered, a host must maintain its own ARP table for each network card. ARP Table: IP Address 192.168.10.1 192.168.10.2 192.168.10.3 Ethernet Address 08-00-39-00-2F-C3 08-00-5A-21-A7-22 08-00-10-99-AC-54
The ARP table is insofar necessary because Ethernet addresses and IP addresses are neither allocated at the same time nor from the same body. No algorithm is useful to calculate the corresponding Ethernet address from an IP address. The organization's network administrator allocates the IP address, whereas the producer of network cards allocates Ethernet addresses. If a host is moved to another place on the Internet, then the IP address must also be changed, but not the Ethernet address. This address, however, is changed, if the network card has to be replaced. ARP Request When an IP datagram is generated and broadcast to the Ethernet driver, then the Ethernet driver calls upon the ARP module. The module looks through its ARP table and selects the receiver's Ethernet address that corresponds to the IP address. If, however, the desired Ethernet address is missing, then an ARP request must be sent. The pertinent IP diagram is queued. An Ethernet broadcast (Address FF-FF-FF-FF-FF-FF) is started that is directed to all hosts on the local network. This is why every computer receives this request. The Ethernet driver examines the type of request and, based on the value of the ARP packet, recognizes that it must forward the request to the ARP module. An ARP request looks like this: "If your IP address corresponds to the IP address of the receiver, then let me know your Ethernet address." Addresses IP address Ethernet address Sender 192.168.10.1 08-00-39-00-2F-C3 Receiver 192.168.10.4 ?
Example of an ARP request The ARP Module controls these IP addresses and if there is a match, the requesting computer is answered directly since the Ethernet address in already known. The answer can be: " Yes, this IP address belongs to me. I will tell you my Ethernet address." Addresses IP address Ethernet address Sender 192.168.10.1 08-00-39-00-2F-C3 Example of an ARP reply The answer is sent back to the sender. The Ethernet driver recognizes the information as an ARP packet and sends it farther to the ARP module. The ARP module can now complete its table. Receiver 192.168.10.4 08-00-28-00-38-A9
25
08.03.05
The ARP table after the ARP request This update takes only a few milliseconds. The IP datagram that is being queued can now be retrieved. The missing information is added and forwarded to the Ethernet driver.
If the destination computer does not exist, then, there is neither an entry in the ARP table nor does the request lead to a result. The IP module throws out the affected IP datagram. Thus, it cannot be ascertained in the higher layers if the connection is interrupted or if the computer with the questionable IP address even exists.
IP Network "Engineering"
If pilatus sends an IP datagram to rigi, then the IP header contains the IP address of pilatus as the sender IP address and the Ethernet header contains die Ethernet address of pilatus as the sender Ethernet address. In
University of Applied Sciences Olten 26 08.03.05
addition, the IP header recognizes the IP address of the receiver rigi and the Ethernet header recognizes the Ethernet address of the receiver rigi. Addresses IP Header Ethernet Header Sender Pilatus Pilatus Addresses in an Ethernet frame In this simplified case, the IP is redundant because the IP datagram does not contain any further information which is not already in the Ethernet frame. The IP will make unnecessary resource demands because it will first generate a header, then transfer a larger packet and finally, on the other side, unpack the header and analyse it. Once the IP datagram arrives at rigi, the IP module will see if the receiver's address is identical to its own. If it is, then, the data will be transferred into the upper layers. Indirect Routing If the sender wants to send a packet to a computer on another network, then, the IP address of the destination computer will be known to him, but not the Ethernet address. Because of this, the data packet will now be switched over a local computer, the IP router, to the destination computer (or further routers). This process is called indirect routing. The following illustration shows a complex IP network. It is made up of 3 subnets, development, administration and production. Each computer, except asterix, has a TCP/IP protocol stack consisting of an IP address and an Ethernet address. The computer asterix has the function of the IP router. It is equipped with 3 network cards, each of which has an IP address and an Ethernet address. Asterix has 3 Ethernet drivers, 3 ARP modules but only one IP module.
pilatus 192.168.10.2 rigi 192.168.10.3 titlis 192.168.10.4
geneva 192.168.20.2
lucerne 192.168.20.3
basel 192.168.20.4
oak 192.168.30.2
beek 192.168.30.3
fir 192.168.30.4
An Internet made of 3 IP Networks The network administrator has allocated to each IP network its own IP address and a name. If computer pilatus has a message for computer titlis, then "direct routing" will use direct routing.
University of Applied Sciences Olten 27 08.03.05
But what happens if computer pilatus wants to communicate with a computer that is outside of its subnet and "direct routing" can no longer be used? Pilatus must now call upon the services of asterix, which can forward IP datagrams from one subnet to another. This technique is called "indirect routing". If pilatus wants to send an IP datagram to lucerne, then pilatus will attach the IP sender address and the Ethernet sender address. Lucerne's IP address will be used as the destination, but the router asterix will be used as the destination's Ethernet address. Addresses IP Header Ethernet Header Sender pilatus pilatus Receiver lucerne asterix
Addresses in an Ethernet frame from pilatus to lucerne (before asterix) The IP module asterix receives this IP datagram and after comparing IP addresses, it recognizes that this packet is not addressed to it: "This is not my IP address," and forwards the IP datagram to lucerne, regenerating the Ethernet frame during this process. Addresses IP Header Ethernet Header Sender pilatus asterix Receiver lucerne lucerne
Addresses in an Ethernet frame from pilatus to lucerne (after asterix) Both of these examples illustrate the actual routing procedure, but not how it really works. The next subchapter will explain the rules of routing or rather, the routing algorithms. IP Module: Routing Rules The rules that an IP module must observe before it can forward an IP datagram or consult the ARP tables are as follows: 1. When the IP module receives an IP datagram from the transport layer, it has to decide whether the packet is to be sent directly or indirectly. In addition, a network interface has to be chosen. These decisions are made after the routing tables have been consulted. 2. When the IP module receives an IP datagram from the network access layer, it must then decide whether the packet should be forwarded on the transport layer or on a network interface. When it is being forwarded, the packet is re-marked as "to be sent". 3. The IP module receives an IP datagram from a certain interface. When a packet is forwarded, it can never be forwarded over the same network interface again. DNS Names Each interface with an IP address can be matched to a computer name, e.g., the computer with the IP address 192.168.10.2 has the name pilatus. Names are given because they are easier to remember than numerical addresses and names are easier to type mistake-free. For small networks, the host name-to-IP address mapping is stored in a hosts file that every computer has. Due to the administrative expense, larger organizations usually set up a service to maintain these allocations. This service is called the Domain Name Service (DNS). Below, you can see an excerpt from a hosts file: 192.168.10.2 192.168.10.3 192.168.10.4 192.168.10.1 192.168.20.2 192.168.20.3 pilatus rigi titlis asterix geneva lucerne Excerpt from a hosts file
University of Applied Sciences Olten 28 08.03.05
The IP address is always in the first column, followed by the computer names in the second column. Please note that in this case, the IP router asterix has only been allocated one IP address. However, asterix is reachable over all three IP addresses and it will also correctly process the IP datagrams that are addressed to it that have the address 192.168.30.1. IP networks are also allocated a name. The networks file maintains the allocation of IP addresses to host names. 192.168.10 192.168.20 192.168.30 development administration production Excerpt from a networks file From these examples, it can be seen that computer pilatus belongs to the network development and the computer lucerne belongs to the network administration. The above hosts file is not necessarily of much use to the network administrator. To the line with the asterix entry, he/she will probably add the following: 192.168.10.1 192.168.20.1 192.168.30.1 developrouter adminrouter prodrouter asterix
Addition to a hosts file with router entries The three new lines give each network interface a significant name, whereby there are 2 entries in the first line: the entry for a router and the entry for the computer itself. In practice, the IP router is normally called up by using the name asterix; only if a dedicated interface needs to be called upon, e.g. the network administration, will the appropriate router host name be chosen. These files are not essential for the correct functioning of a network, but working with names and not addresses greatly facilitates the network administration. IP Routing Tables The IP router asterix has 3 network cards. How can its IP module recognize to which interface it must forward a datagram? To solve this problem, the IP module will consult the IP routing table and from the entries, choose the appropriate interface. For each path (= route) in the routing table, there is an entry. These are: The IP network number of the destination computer The IP address of the router The direct / indirect flag The number of the interface The table is consulted before each sending. The routing table can be administered by using the route command. Direct IP Routing In order to exemplify this process, computer entries are supplemented with an interface number.
pilatus 192.168.10.2 : 1 rigi 192.168.10.3 : 1 titlis 192.168.10.4 : 1
29
08.03.05
The routing table of pilatus could look like this: Network destination Router development < > Direct/Indirect flag direct Interface number 1
Basic Routing Table with DNS names This information can be gotten by using the command netstat -r. In this simple example, all the computers have the same routing table. The table can also be shown with IP addresses: netstat rn Network destination Router 192.168.10 < > Direct/Indirect flag direct Interface number 1
Basic Routing Table with IP addresses The computer pilatus now wants to send an IP datagram to the computer rigi. The data is already in the IP module from pilatus. The destination is rigi or 192.168.10.3. The IP module trims the network part from the IP address by overlaying the IP address with the subnet mask. In the example, the subnet mask is 255.255.255.0, the IP network 192.168.10 will be reached. With this address, the routing table will be consulted and a match found in the first entry. The additional information found in this entry shows that the computer is addressable on subnet 192.168.10 directly over interface 1. Now, using the IP address 192.168.10.3 and the ARP table, the Ethernet address will be sought. Finally, this address with the IP datagram will be delivered to the Ethernet module of interface 1. If an application wants to send data to an IP address outside of the network development with this routing table, then the IP module will not find an entry in the table. It will then delete the IP datagram and trigger the error "network not reachable". The next subchapter will show how such a process can still be managed. Indirect IP Routing Analogue to the above example, the more complicated example for the illustration of indirect IP routing will be amended.
pilatus 192.168.10.2 : 1
30
08.03.05
In this example, pilatus' routing table looks like this: Network destination Router development administration production < > asterix asterix Direct/Indirect flag direct indirect indirect Routing Table of pilatus and now with IP addresses: Network destination Router 192.168.10 192.168.20 192.169.30 < > 192.168.10.1 192.168.10.1 Direct/Indirect flag direct indirect indirect Interface number 1 1 1 Interface number 1 1 1
Asterix is the IP router for pilatus and the IP address corresponds to the interface that is connected to the network development. The computer pilatus wants to send an IP datagram to the computer lucerne. The data is in the IP module from pilatus and the destination is lucerne or 192.168.20.3. The IO module trims the network part from
the IP address by laying the subnet mask over the IP address. In the example, the subnet mask is 255.255.255.0, the result is the IP network address 192.168.20. With this address, the routing table is consulted and a match is found in the second entry. The additional information in this entry shows that the destination computer lucerne, which has the IP address 192.168.20.3, is in the network administration and is reachable through the IP router asterix. Now, using the IP address 192.168.20.1 and the ARP table, the Ethernet address from asterix is sought out. This is now, together with the IP datagram, forwarded to the Ethernet module of interface 1. It should be noted that the destination IP address is still lucerne. By way of interface 1 on the IP router asterix, the IP datagram now arrives and will be transmitted up to the IP module. The destination address is now controlled and it is realized that the IP datagram is not meant for asterix. Because of this, the IP datagram must be forwarded further. The IP module re-trims the network part out of the IP address. The IP module obtains the IP network address 192.168.20 as the result. Using this address, the routing table is consulted. The routing table of asterix can look this: Network destination Router development administration production < < < > > > direct/indirect flag direct direct direct Interface number 1 2 3
IP Routing Table of asterix with DNS Names And only with IP addresses: Network destination Router 192.168.10 192.168.20 192.169.30 < < < > > > direct/indirect flag direct direct direct Interface number 1 2 3
31
08.03.05
A match is found in the second entry. Now, the IP module forwards the IP datagram by means of interface 2 directly to the computer lucerne. The computer lucerne is not only the IP destination but also the Ethernet destination. The IP datagram now arrives at the computer lucerne and is transmitted up to the IP module. There, the IP addresses are compared and a match between the destination and its own address is found. Now, the signal can be given to the transport layer. Summary If an IP datagram is wandering around a large network, it is possible that, depending on the services, many IP routers must be used before the end destination is finally reached. A central source does not control the path of the IP datagram. It is the result of the entries in the routing tables of those computers, through which the IP datagram has to pass. In a large network, it is a difficult task to maintain correct routing tables on all computers because the network configuration can change daily. On the one hand, errors in the routing tables can block network traffic and on the other hand, it is difficult to find them. Various services can simplify this administrative job: ICMP (Internet Control Message Protocol) can discover various route errors. Another possibility is to patch in a routing protocol, which allows the dynamic exchange of information between computers. In addition, the Domain Name System (DNS) simplifies the maintenance of hosts files on the individual computers.
SMTP
SMTP
POP3
Mail Server
Mail Server
E-Mail on the Internet SMTP SMTP (Simple Mail Transfer Protocol) is primarily used to send messages. The protocol contains the necessary functions to define the sender, the receiver and the text of the message. Furthermore, it permits the building of user groups, which then can be used as an addressee. If only a message for a local user is involved, then the mail server will send the message directly to the user. With any other destination, the mail server has to first establish a TCP/IP connection to the end computer and then it will hand over the message for delivery. If the connection cannot be established, then delivery will be regularly attempted over a period of time and this can be several days - before the mail is finally returned to the sender as undelivered. Port Nummer Port numbers - it is 25 for SMTP - play a very important role in every network communication. The port number establishes the connection from the TCP layer to the application layer. If you want to access a remote computer e.g. the SMTP service (a computer also provides other services at the same time), you
University of Applied Sciences Olten 33 08.03.05
must indicate not only the computer's address, but also the service that you want to use. This is done with port numbers. The following example should illustrate this: Let us assume we want to send a file with the FTP protocol from computer 193.135.241.127 to computer 193.135.241.184. To start this process, we need know not only the Internet address, but also how to call the FTP server on the other side. Fortunately, everyone knows that port number 21 has been allocated to the FTP server. If we now start the program ftp on our computer, we will be assigned any free user port, e.g. 1234. While establishing the connection to the other side, port 21 will be explicitly addressed in order to activate the FTP server. A unique connection can be established using Internet addresses and port numbers. Once the connection has been established, the application can forward the message to the transport layer for Internetapplications, principally to the TCP protocol.
34
08.03.05
Index
A
Amplitude Modulation (AM).............................8 APNIC ............................................................23 ARP ................................................................24 ATM ...............................................................14
Layers ............................................................ 11 M
MAN (Metropolitan Area Network)................ 13 Modem ............................................................ 7
B
Baud .................................................................6 Bridge .............................................................18
O
OSI-Model ..................................................... 11
P
Parity Check..................................................... 6 Phase Modulation (PM).................................... 9 Polling............................................................ 16 POP3 ............................................................. 34 Port Nummer ................................................. 34
C
Cheapernet .....................................................19 CRC..................................................................7 CSMA-CD ......................................................16
D
Datex-L...........................................................13 Datex-P ..........................................................13 DNS................................................................34 DNS Names ....................................................28 DSL / ADSL.....................................................14
Q
Quadratur Amplitude Modulation .................... 9
R
Repeater ........................................................ 17 RIPE ............................................................... 23 Router............................................................ 18 Routing .......................................................... 28
E
Echo .................................................................6 Ethernet ..........................................................18 Ethernet-Frame ...............................................19
S
Simplex ............................................................ 5 SMTP ............................................................. 34 Subnet Mask .................................................. 24 Switch ............................................................ 23
F
Frequency Modulation (FM)..............................8
G
GAN (Global Area Network) ...........................13 Gateway .........................................................18
T
TCP................................................................ 33 Token-Ring .................................................... 17 Carrier Frequency ............................................. 7 TwistedPair .................................................... 19
H
Half-duplex.......................................................5 Hayes Commands ...........................................7 Hub ................................................................18
U
UDP ............................................................... 33 UMTS ............................................................ 14
I
IANA ..............................................................23 ICANN............................................................23 ISDN...............................................................14
V
Full-duplex ....................................................... 5
K
Coaxial Cable..................................................20
W
WAN (Wide Area Network)............................ 12
L
LAN (Local Area Network) ..............................12
Z
Cyclic Block Check............................................ 7
35
08.03.05