• Aucun résultat trouvé

Overview of TCP/IP

Dans le document IN A NUTSHELL LINUX (Page 46-49)

TCP/IP is a suite of communications protocols that define how different types of computers talk to one another. It’s named for its foundational protocols, the Transmission Control Protocol and the Internet Protocol. The Internet Protocol provides logical addressing as data moves between hosts: it splits data into packets, which are then forwarded to machines via the network. The Transmis-sion Control Protocol ensures that the packets in a message are reassembled in the correct order at their final destination and that any missing datagrams are re-sent until they are correctly received. Other protocols provided as part of TCP/IP include:

Address Resolution Protocol (ARP)

Translates between Internet and local hardware addresses (Ethernet, etc.).

routed Dynamically keep routing tables up to date.

slattach Attach serial lines as network interfaces.

sshd Server for secure shell connections.

tcpdump Write network packet information to screen or file.

telnetd Server for Telnet sessions from remote hosts.

tftpd Server for restricted set of file transfers.

zebra Routing daemon.

Command Action

domainname Set or display name of current NIS domain.

makedbm Rebuild NIS databases.

rpcbind DARPA port to RPC program number mapper.

portmap The old name forrpcbind.

rpcinfo Report RPC information.

ypbind Connect to NIS server.

ypcat Print values in NIS database.

ypinit Build new NIS databases.

ypmatch Print value of one or more NIS keys.

yppasswd Change user password in NIS database.

yppasswdd Update NIS database in response toyppasswd.

yppoll Determine version of NIS map at NIS server.

yppush Propagate NIS map.

ypserv NIS server daemon.

ypset Pointypbind at a specific server.

yptest Check NIS configuration.

ypwhich Display name of NIS server or map master.

ypxfr Transfer NIS database from server to local host.

Command Action

Overview of TCP/IP | 23

Sys AdminOverview

Internet Control Message Protocol (ICMP) Error-message and control protocol.

Point-to-Point Protocol (PPP)

Enables TCP/IP (and other protocols) to be carried across both synchronous and asynchronous point-to-point serial links.

Reverse Address Resolution Protocol (RARP)

Translates between local hardware and Internet addresses (opposite of ARP).

Simple Mail Transport Protocol (SMTP) Used bysendmail to send mail via TCP/IP.

Simple Network Management Protocol (SNMP)

Performs distributed network management functions via TCP/IP.

User Datagram Protocol (UDP)

Transfers data without first making a persistent connection between two systems the way TCP does. Sometimes called unreliable transport.

TCP/IP is covered in depth in the three-volume setInternetworking with TCP/IP (Prentice Hall). The commands in this chapter and the next are described in more detail in TCP/IP Network Administration and Linux Network Administrator’s Guide, both published by O’Reilly.

In the architecture of TCP/IP protocols, data is passed down the stack (toward the Network Access Layer) when it is sent to the network, and up the stack when it is received from the network (see Figure 2-1).

IP Addresses

The IP (Internet protocol) address is a binary number that differentiates your machine from all others on the network. Each machine on the Internet must have a unique IP address. The most common form of IP address used currently (IPv4) uses a 32-bit binary address. An IPv4 address contains two parts: a network part and a host part. The number of address bits used to identify the network and host differ according to the class of the address. There are three main address classes:

A, B, and C (see Figure 2-2). The leftmost bits indicate what class each address is.

Figure 2-1. Layers in the TCP/IP protocol architecture consists of applications and processes that use the network.

provides end-to-end data delivery services.

defines the datagram and handles the routing of data.

consists of routines for accessing physical networks.

Application Layer

Host-to-Host Transport Layer

Internet Layer

Network Access Layer 1

2 3 4

A standard called Classless Inter-Domain Routing (CIDR, or supernetting) extends the class system’s idea of using initial bits to identify where packets should be routed. Under CIDR, a new domain can be created with any number of fixed leftmost bits (not just a multiple of eight). A CIDR address looks like a regular IPv4 address followed by a slash and a number indicating the number of network bits. For example: 192.168.32.1/24 or 128.66.128.1/17. Virtually all Internet gateway hosts now use CIDR.

IPv6, a newer standard, changes the method of addressing and increases the number of fields. An IPv6 address is 128 bits. Part of an IPv6 address is based on the Media Access Control (MAC) address of the network interface. The MAC address is unique for each network interface. When written, it is usually divided into eight 16-bit hexadecimal blocks separated by colons. For example:

FE80:0000:0000:0000:0202:B3FF:FE1E:8329

To shorten this, leading zeros may be skipped, and any one set of consecutive zeros can be replaced with double colons. For example, the above address can be reduced to:

FE80::202:B3FF:FE1E:8329 Figure 2-2. IP address structure

8 network bits

26

0

104 0 19

24 host bits

Class A

16 network bits

128

1

66 12 1

16 host bits

0 Class B

24 network bits

192

1

178 16 1

8 host bits

1 0 Class C

Overview of TCP/IP | 25

Sys AdminOverview

When IPv4 and IPv6 networks are mixed, the IPv4 address can be packed into the lower four bytes, yielding an address like 0:0:0:0:0:0:192.168.1.2, or ::192.168.1.2, or even ::C0A8:102.

Because improvements in IPv4, including CIDR, have relieved much of the pres-sure to migrate to IPv6, organizations have been slow to adopt IPv6. Some use it experimentally, but communication between organizations using IPv6 internally is still usually encapsulated inside IPv4 datagrams, and it will be a while before IPv6 becomes common.

If you wish to connect to the Internet, contact an Internet Service Provider (ISP).

For most users, an ISP dynamically assigns an IP address to their systems. If you wish to always have the same address, have them assign you a static network address or range of addresses. If you are not connecting to an outside network, you can choose your own network address as long as it conforms to the IP address syntax. You should use the special reserved addresses provided in RFC 1597, which lists IP network numbers for private networks that don’t have to be regis-tered with the IANA (Internet Assigned Numbers Authority). An IP address is different from an Ethernet address, which is assigned by the manufacturer of the physical Ethernet card.

Dans le document IN A NUTSHELL LINUX (Page 46-49)

Documents relatifs