Vous êtes sur la page 1sur 40

TCP/IP An Overview

Brawijaya Computer Science Feb June 2008

Course Outline
Overview Networking Protocols Names and Addresses Interconnection

Overview
The term "TCP/IP" is shorthand for a large collection of protocols and services that are used for internetworking computer systems In any given implementation, TCP/IP encompasses operating system components, user and administrative commands and utilities, configuration files, and device drivers, as well as the kernel and library support upon which they all depend

Overview
This picture below depicts an example TCP/IP network including several kinds of network connections Assuming that these computers are in reasonably close physical proximity to one another, this network would be classed as a local area network (LAN) Each computer system on the network is known as a host and is identified by both a name and an IP address

Overview

Overview
The host romeo serves as a gateway between the two subnets. It is part of both subnets and passes data from one to the other In this case, the gateway is a computer with two network interfaces (adapters). However, it is probably more common to use a specialpurpose computer known as a router for this purpose

Networking
TCP/IP networks can run over a variety of physical media Traditionally, most networks have used some sort of coaxial cable (thick or thin), twisted pair cable, or fiber optic cable Network adapters provide the interface between a computer and the physical medium comprising the network connection

Networking
Media Comparison

Networking
All network adapters have a Media Access Control (MAC) address , which is a numerical identifier that is globally unique to that individual adapter For Ethernet devices, MAC addresses are 48-bit values expressed as twelve hexadecimal digits, usually divided into colonseparated pairs: for example, 00:00:f8:23:31:a1

Networking
Network communication is organized as a series of layers. With the exception of the layer referring to the physical transmission medium, these layers are logical or conceptual rather than literal or physical, and they are implemented in the networking software running on computers and other network devices

Networking
Every network message moves down through the layers on its originating system, travels across the physical medium, and then moves up through the same stack of layers on the destination system No discussion of any network architecture is complete without at least a brief mention of the Open Systems Interconnection (OSI) Reference Model

Networking
This description of networking has seldom been the basis of actual network implementations, but it can be quite helpful in clearly identifying the distinct functions necessary for network communications to occur The OSI Reference Model is probably best thought of as an after-the-fact, generalized, logical description of network communications

Protocols

Protocols
These are some of the most important lowerlevel protocols in the TCP/IP family:
ARP , The Address Resolution Protocol specifies
how to determine the corresponding MAC address for an IP address. It operates at the Network Access layer. While this protocol is required by TCP/IP networking, it is not actually part of the TCP/IP suite. IP , The Internet Protocol manages low-level data transmission, routing, and fragmentation/reassembly. It operates at the Internet layer

Protocols
These are some
TCP , The Transmission Control Protocol
provides reliable network communication sessions between applications, including flow control and error detection and correction. It operates at the Transport layer. UDP , The User Datagram Protocol provides "connectionless" communication between applications. In contrast to TCP, data transmitted using UDP is not delivery-verified; if expected data fails to arrive, the application simply requests it again. UDP operates at the Transport layer

Protocols
Important Ports and Services

Protocols
Sample of TCP Conversation
# hamlet> finger chavez@greece
ETH: [ 32:21:a6:e1:7f:c1 18:33:e4:2a:43:2d ] type 800 (IP) IP: < SRC = 192.168.2.6 (hamlet) IP: < DST = 192.168.1.6 (greece) TCP: <source port=1031, destination port=79(finger)> TCP: th_off=6, flags<SYN>

Protocols
Sample of
Each line of this packet display is labeled with the protocol that created it: ETH lines were created at the Ethernet level (Network Access layer), IP lines by the IP protocol (Internet layer), and TCP lines by the TCP protocol (Transport layer) Here are the next two packet which complete the three way handshake of TCP After these two sequence packets, all data are transferred between hamlet and greece

Protocols
Sample of
ETH: [ 18:33:e4:2a:43:2d -> 32:21:a6:e1:7f:c1 ] type 800 (IP) IP: < SRC = 192.168.1.6 > (greece) IP: < DST = 192.168.2.6 > (hamlet) TCP: <source port=79(finger), destination port=1031 > TCP: th_seq=d71b9601, th_ack=d83ab202 TCP: th_off=6, flags<SYN | ACK>

Protocols
Sample of
ETH: [ 32:21:a6:e1:7f:c1 -> 18:33:e4:2a:43:2d ] type 800 (IP) IP: < SRC = 192.168.2.6 > (hamlet) IP: < DST = 192.168.1.6 > (greece) TCP: <source port=1031, destination port=79(finger) > TCP: th_seq=d83ab202, th_ack=d71b9602 TCP: th_off=5, flags<ACK>

Protocols
Sample of All that remains is to close down the connection:
IP: < SRC = 192.168.1.6 > (greece) IP: < DST = 192.168.2.6 > (hamlet) TCP: th_off=5, flags<FIN | ACK> IP: < SRC = 192.168.2.6 > (hamlet) IP: < DST = 192.168.1.6 > (greece) TCP: th_off=5, flags<FIN | ACK> IP: < SRC = 192.168.1.6 > (greece) IP: < DST = 192.168.2.6 > (hamlet) TCP: th_off=5, flags<ACK>

Names and Addresses


Every system on a network has a hostname Hostnames let users refer to any computer on the network by using a short, easily remembered name rather than the host's network address Each system on a TCP/IP network also has an IP address that is unique for all hosts on the network. Systems with multiple network adapters usually have a separate IP address for each adapter

Names and Addresses


A traditional Internet network address is a sequence of 4 bytes(32 bits) Network addresses are usually written in the form a.b.c.d, where a, b, c, and d are all decimal integers: e.g. 192.168.10.23 Each component is 8 bits long and thus runs from 0 to 255 The address is split into two parts. The first parthighest-order bitsidentifies the local network, The second part of the IP address identifies the host within the network

Names and Addresses


The size of the two parts vary. The first byte of the address (a) determines the address type (called its class), and hence the number of bytes allocated to each part

Names and Addresses


Some values of the various network address bytes have special meanings:
The address with a host part of 0 refers to the network itself, as in 192.168.10.0. The 0.0.0.0 network is sometimes used to refer to the local network The 127.0.0.1 address is always assigned to the loopback interface. The remainder of the 127.0 network is reserved

Names and Addresses


Some values
A host part of all ones defines the broadcast address for the network: the destination address used when a computer wants to send a query to every host on the local network. For example, the broadcast address for the network containing the Class C address 192.168.10.23 is 192.168.10.255, and the broadcast address for the network containing the Class A address 10.1.12.43 is 10.255.255.255

Names and Addresses


Network addresses for networks connected to the Internet must be obtained from some official source These days, network addresses for new sites are obtained from one of the ISPs that is authorized to assign them Every host that will communicate directly with a host on the Internet must have an officially assigned IP address

Names and Addresses


Networks that are not directly connected to the Internet also use network addresses that obey the Internet numbering conventions The following IP address blocks are reserved for private networks :
10.0.0.0 through 10.255.255.255 172.16.0.0 through 172.31.255.255 192.168.0.0 through 192.168.255.255

Names and Addresses


At some point in the future, Internet addresses may switch over to the nextgeneration design, IPv6 (the current one is IPv4) IPv6 was designed in the 1990s to address the perceived future shortage of Internet addresses (which fortunately has not yet arrived)

Names and Addresses


IPv6 addresses are 128 bits long, expressed as a series of 8 colon-separated 16-bit values written in hexadecimal, e.g., 1111:2222:3333:4444:5555:6666:7777:8888 Each value runs from 0x0 to 0xFFFF (from 0 to 65535 in decimal) The network host boundary is fixed at 64 bits, and there is some additional internal structure defined

Names and Addresses


IPv6 Host Addresses Interpretation

Names and Addresses


IPv6 allows for backward compatibility with IPv4 by assigning addresses of the form 0:0:0:FFFF:a.b.c.d to IPv4-only devices, where a.b.c.d is the IPv4 address This is generally written as ::FFFF:a.b.c.d, where :: replaces a contiguous block of zeros (any length) in the IPv6 address (but the double colon may be used only once) Finally, the loopback address is always defined as ::1, and the broadcast address is FF02::1

Interconnection

Interconnection
All the hosts in Subnet A are connected to devices called hubs. Traditional hubs serve as an Ethernet backbone, linking all of the connected hosts together Subnet B is another network segment, connected to the other two subnets by routers. Although its internal structure is not shown, the various hosts in this subnet are all connected to hubs or switches. The same is true for the two parts of subnet C

Interconnection
The two branches of subnet C are connected by a switch, a somewhat more intelligent device than a hub, which selectively passes only the data destined for the other segment between the two A hub is just a point where connections come together, while a switch includes some ability to decide which "side" a given packet is destined for. Two-port switches like the one in the figure are sometimes called bridges

Interconnection
More complex switches can handle more than one media type or have the ability to filter the traffic in a variety of ways, and some are capable of connecting networks of different typessay, TCP/IP and SNAby translating or encapsulating the data from one protocol family to/within the other as it is passed across These tasks, performed by such devices, overlap those traditionally assigned to routers

Interconnection
The various subnets and the three local LANs in above picture are connected to one another via routers, a still more sophisticated network linking device that is essentially a small computer In addition to selectively handling data based on its destination, routers also have the ability to determine the current best path to that destination; finding a path to a destination is known as routing

Interconnection
The best routers are highly programmable and can also perform very complex filtering of the data they receive, accepting or rejecting it based upon criteria specified by the network administrator The routers that connect our three locations are arranged so that there are multiple paths to every destination; losing any one of them will cause no harm to communications between the two unaffected networks

Interconnection
Hubs/repeaters, switches/bridges, and routers can be distinguished by where their operations fall within the TCP/IP protocol stack Repeaters operate at the Network Access layer, bridges use the Internet layer, and routers operate within the Transport layer A full network host, which obviously supports all four TCP/IP layers, can thus perform the functions of any of these types of devices

References
Steve Maxwell, Unix System Administration A Beginners Guide. McGraw Hill, 2002 Craig Hunt, TCP/IP Network Administration, 3rd Edition. OReilly, 2002 leen Frisch, Essential System Administration, 3rd Edition. OReilly, 2002

Vous aimerez peut-être aussi