Chapter 3 IP Internet Protocol
2016-09-20 23:02:19 0 举报
AI智能生成
TCP/IP 卷一详解版
作者其他创作
大纲/内容
3.1 Introduction
IP is the workhorse protocol of the TCP/IP protocol suite. ALL TCP,UDP,ICMP and IGMP data gets transmiitted as IP datagrams.
3.2 IP Header
Figure 3.1 shows the format of an IP datagram. The normal size of the IP header is 20 bytes, unless options are present
Figure 3.2 shows the recommended values of the TOS field for various applications . In the final column we show the hexadecimal value, since that's what we'll see in the tcpdump output later in the text
3.3 IP Routing
Conceptually, IP routing is simple,especially for a host. if the destination is directly connected to the hostor on a shared network, then the IP datagram is sent directly to the destination.
IP routing is done on a hop-by-hop basis. As we can see from this routing table information, IP does not know the complete route to any destination.
3.4 Subnet Addressing
All hosts are now required to support subnet addressing . Instead of considering an IP address as just a network ID and host ID , the host ID portion is divided into a subnet ID and a host ID.
3.5 Subnet Mask
Part of the configuration of any host that takes place at bootstrap time is the specification of the host's IP address. Most systems have this stored in a disk file that's read at bootstrap time, and we'll see in Chapter 5 how a diskless system can also find out its IP address when it's bootstrapped.
3.6 Special Case IP Addresses
Having described subnetting we now show the seven special case IP addresses in Figure 3.9 . In this figure, 0 means a field of all zero bits, -1 mean a field of all one bits, and netid, subnetid , and hostid mean the corresponding field that is neither all zero bits nor all one bits. A blank subnet ID column means the address is not subnetted.
3.7 A Subnet Example
3.8 ifconfig Command
Now that we've described the link layer and the IP layer we can show the command used to configure or query a network interface for use by TCP/IP. The ifconfig command is normally run at bootstrap time to configure each interface on a host
3.9 netstat Command
The netstat command also provides information about the interfaces on a system. The -i flag prints the interface information, and the -n flag prints IP addresses instead of hostnames
3.10 IP Futures
Since only one of these four proposals will be chosen as the successor to IPV4 , and since the decision may have been made by the time you read this , we won't say any more about them. With the forthcoming implementation of CIDR to handle the shortterm problem, it will take many years to implement the successor to IPV4.
3.11 Summary
0 条评论
下一页