青蛙不是癞蛤蟆

CCNA chapter 2

TCP/IP and DoD model:
DoD 模型分为4 层,从上到下是:
1.Process/Application layer
2.Host-to-Host layer
3.Internet layer
4.Network Access layer
 
在功能上和OSI 参考模型互相对应的话,那么:
1.DoD 模型的Process/Application 层对应OSI 参考模型的最高3 层
2.DoD 模型的Host-to-Host 层对应OSI 参考模型的Transport 层
3.DoD 模型的Internet 层对应OSI 参考模型的Network 层
4.DoD 模型的Network Access 层对应OSI 参考模型的最底2 层
The Process/Application Layer
    telnet    FTP    LPD    SNMP
    TFTP    SMTP    NFS    X Window
Host-to-Host Layer    TCP    UDP
Internet layer    ICMP    ARP    RARP
    IP
Network Access Layer    Ethernet    FastEthernet    Token Ring    FDDI

相关协议的解释<中文版的书翻译的有些出入,还是给原文吧,> 其实是我比较懒,而且这些不重要,不想译了
Telnet
Telnet is the chameleon of protocols—its specialty is terminal emulation. It allows a user ona remote client machine, called the Telnet client, to access the resources of another machine,the Telnet server. Telnet achieves this by pulling a fast one on the Telnet server and making the client machine appear as though it were a terminal directly attached to the local network. This projection is actually a software image—a virtual terminal that can interact with the chosen remote host. These emulated terminals are of the text-mode type and can execute refined procedures like displaying menus that give users the opportunity to choose options from them and access the
applications on the duped server. Users begin a Telnet session by running the Telnet client software and then logging into the Telnet server.


File Transfer Protocol (FTP)
File Transfer Protocol (FTP) is the protocol that actually lets us transfer files, and it can accomplish this between any two machines using it. But FTP isn’t just a protocol; it’s also a program. Operating as a protocol, FTP is used by applications. As a program, it’s employed by users to perform file tasks by hand. FTP also allows for access to both directories and files and can accomplish certain types of directory operations, such as relocating into different ones. FTP teams up with Telnet to transparently log you into the FTP server and then provides for the
transfer of files. Accessing a host through FTP is only the first step, though. Users must then be subjected to an authentication login that’s probably secured with passwords and usernames implemented by system administrators to restrict access. But you can get around this somewhat by adopting the username “anonymous”—though what you’ll gain access to will be limited. Even when employed by users manually as a program, FTP’s functions are limited to listingand manipulating directories, typing file contents, and copying files between hosts. It can’t execute remote files as programs.

Trivial File Transfer Protocol (TFTP)
Trivial File Transfer Protocol (TFTP) is the stripped-down, stock version of FTP, but it’s the protocol of choice if you know exactly what you want and where to find it, plus it’s so easy to use and it’s fast too! It doesn’t give you the abundance of functions that FTP does, though. TFTP has no directory-browsing abilities; it can do nothing but send and receive files. This compact little protocol also skimps in the data department, sending much smaller blocks of data than FTP, and there’s no authentication as with FTP, so it’s insecure. Few sites support it because of the inherent security risks.

Network File System (NFS)
Network File System (NFS)is a jewel of a protocol specializing in file sharing. It allows two different
types of file systems to interoperate. It works like this: Suppose the NFS server software
is running on an NT server, and the NFS client software is running on a Unix host. NFS allows
for a portion of the RAM on the NT server to transparently store Unix files, which can, in turn,
be used by Unix users. Even though the NT file system and Unix file system are unlike—they
have different case sensitivity, filename lengths, security, and so on—both Unix users and NT
users can access that same file with their normal file systems, in their normal way.

Simple Mail Transfer Protocol (SMTP)
Simple Mail Transfer Protocol (SMTP), answering our ubiquitous call to e-mail, uses a spooled,
or queued, method of mail delivery. Once a message has been sent to a destination, the message
is spooled to a device—usually a disk. The server software at the destination posts a vigil, regularly
checking this queue for messages. When it detects them, it proceeds to deliver them to their destination.
SMTP is used to send mail; POP3 is used to receive mail.

Line Printer Daemon (LPD)
The Line Printer Daemon (LPD) protocol is designed for printer sharing. The LPD, along with the
LPR (Line Printer) program, allows print jobs to be spooled and sent to the network’s printers
using TCP/IP.

X Window
Designed for client-server operations,
X Windowdefines a protocol for writing client/server applications
based on a graphical user interface (GUI). The idea is to allow a program, called a client,
to run on one computer and have it display things through a window server on another computer.


Simple Network Management Protocol (SNMP)
Simple Network Management Protocol (SNMP)collects and manipulates this valuable network
information. It gathers data by polling the devices on the network from a management
station at fixed or random intervals, requiring them to disclose certain information. When
all is well, SNMP receives something called a baseline
—a report delimiting the operational
traits of a healthy network. This protocol can also stand as a watchdog over the network,
quickly notifying managers of any sudden turn of events. These network watchdogs are
called agents, and when aberrations occur, agents send an alert called a trap to the management station.

Domain Name Service (DNS)
Domain Name Service (DNS)resolves hostnames—specifically, Internet names, such as
www.routersim.com. You don’t have to use DNS; you can just type in the IP address of any
device you want to communicate with. An IP address identifies hosts on a network and the
Internet as well. However, DNS was designed to make our lives easier. Think about this: What
would happen if you wanted to move your web page to a different service provider? The IP
address would change and no one would know what the new one was. DNS allows you to use
a domain name to specify an IP address. You can change the IP address as often as you want,
and no one will know the difference.DNS is used to resolve a fully qualified domain name (FQDN)
—for example,www.lammle.com or todd.lammle.com. An FQDN is a hierarchy that can logically locate a system based on itsdomain identifier.If you want to resolve the name “todd,” you either must type in the FQDN of
todd.lammle.comor have a device such as a PC or router add the suffix for you. For example, on a Cisco router, youcan use the command ip domain-name lammle.comto append each request with the lammle.com
domain. If you don’t do that, you’ll have to type in the FQDN to get DNS to resolve the name.

Dynamic Host Configuration Protocol (DHCP)/BootP(Bootstrap Protocol)
动态主机配置协议(DHCP)服务器可以提供的信息有: 
1.IP地址 
2.子网掩码(subnet mask) 
3.域名(domain name) 
4.默认网关(default gateway) 
5.DNS 
6.WINS信息 
一个DHCP服务器可以给我们提供比这个更多的信息,为了收到一个ip地址,发送DHCP发现信息的客户机发送出2,3层上的广播, 2层mac全为FF,3层ip为 255.255.255.255 在Transport Layer采用UDP发送

The Host-to-Host Layer Protocols 
Host-to-Host层描述了2种协议: 
1.传输控制协议(Transmission Control Protocol,TCP) 
2.用户数据报协议(User Datagram Protocol,UDP) 
1.TCP
当1 个主机开始发送数据段(segment)的时候,发送方的TCP 协议要与接受方的TCP 协议进行
协商并连接,连接后即所谓的虚电路(virtual circuit),这样的通信方式就叫做面向连接
(connection-oriented).面向连接的最大优点是可靠,但是它却增加了额外的网络负担(overhead)
 
                                    TCP data segment 
TCP segment copied from a network analyzer:
TCP - Transport Control Protocol
Source Port: 5973
Destination Port: 23
Sequence Number: 1456389907
Ack Number: 1242056456
Offset: 5
Reserved: %000000
Code: %011000
Ack is valid
Push Request
Window: 61320
Checksum: 0x61a6
Urgent Pointer: 0
No TCP Options
TCP Data Area:
vL.5.+.5.+.5.+.5 76 4c 19 35 11 2b 19 35 11 2b 19 35 11
2b 19 35 +. 11 2b 19
Frame Check Sequence: 0x0d00000f
UDP
User Datagram Protocol(UDP)
UDP 协议的最他特点是无连接(connectionless),即不可靠,因为它不与对方进行协商并连接,它
也不会给数据段标号,也不关心数据段是否到达接受方
 

Key Concepts of Host-to-Host Protocols

现在把TCP 协议和UDP 协议的一些特性做个比较:
1.TCP.协议在传送数据段的时候要给段标号;UDP 协议不
2.TCP 协议可靠;UDP 协议不可靠
3.TCP 协议是面向连接;UDP 协议采用无连接
4.TCP 协议负载较高,采用虚电路;UDP 协议低负载
5.TCP 协议的发送方要确认接受方是否收到数据段(3次握手协议);UDP 反之
6.TCP 协议采用窗口技术和流控制;UDP 协议反之

Port Numbers
TCP 和UDP 协议必须使用端口号(port number)来与上层进行通信,因为不同的端口号代表了
不同的服务或应用程序.1 到1023 号端口叫做知名端口号(well-known port numbers).源端口一
般是1024 号以上随机分配
 


The Internet Layer Protocol
           在DoD的模型中,设置internet-layer有2个主要理由,1路由,2为上层提供一个简单的网络接口。
Protocol @ internet-layer 
1.    internet protocol
2.    ICMP
3.    ARP
4.    RARP
5.    代理ARP

Internet Protocol(IP)
IP 协议查找每个数据包(packets)的地址,然后,根据路由表决定该数据包下1 段路径该如何走,
寻找最佳路径

Internet Control Message Protocol(ICMP)

ICMP 协议一样是工作在DoD 模型的Internet 层,IP 协议使用ICMP 协议来提供某些不同的服务,ICMP 协议是一种管理协议一些ICMP 协议相关信息和事件:
1.目标不可达(destination unreachable):假如1 个routers 不能把IP 协议数据报发送到更远的地方去,于是router 将发送ICMP 协议信息给数据报的发送方,告诉它说目标网络不可达
2.缓冲区已满(buffer full):假如router 的缓冲区已经存满发送方发来的IP 协议数据报了,它将发送ICMP 协议信息给发送方并告诉它缓冲区已满,如果再继续接受的话将导致缓冲区溢出,造成数据丢失
3.跳(hops):IP 协议数据报经过1 个router,称为经过1 跳
4.Ping(Packet Internet Groper):采用ICMP 协议信息来检查网络的物理连接和逻辑连接是否完好
5.Traceroute:根据ICMP 协议信息来跟踪数据在网络上的路径,经过哪些跳

Address Resolution Protocol(ARP)
地址解析协议(ARP)用于根据1 个已知的IP 地址查找硬件地址.它把IP 地址翻译成硬件地址
Reverse Address Resolution Protocol(RARP)
RARP 协议用于把MAC 地址翻译成IP 地址


IP Addressing
IP 地址是软件地址,MAC 地址是硬件地址,MAC 地址是烧录在NIC 里的,MAC 地址用于在本
地网络查找主机地址.IP 地址是唯一的,也叫做网络地址(network address);硬件地址也叫节点
地址(node address)

Network Address
网络地址分为5 类:
1.A 类地址:4 个8 位位组(octets).第一个octet 代表网络号,剩下的3 个代表主机位.范围是
0xxxxxxx,即0 到127
2.B 类地址: 前2 个octets 代表网络号,剩下的2 个代表主机位. 范围是10xxxxxx,即128 到191
3.C 类地址: 前3 个octets 代表网络号,剩下的1 个代表主机位. 范围是110xxxxx,即192 到223
4.D 类地址:多播地址,范围是224 到239
5.E 类地址:保留,实验用,范围是240 到255

Network Address:Special Purpose
一些特殊的IP 地址:
1.IP 地址127.0.0.1:本地回环(loopback)测试地址
2.广播地址:255.255.255.255
3.IP 地址0.0.0.0:代表任何网络
4.网络号全为0:代表本网络或本网段
5.网络号全为1:代表所有的网络
6.节点号全为0:代表某个网段的任何主机地址
7.节点号全为1:代表该网段的所有主机
广播地址TCP/IP 协议规定,主机号部分各位全为1 的IP 地址用于广播.所谓广播地址指同时
向网上所有的主机发送报文,也就是说,不管物理网络特性如何,Internet 网支持广播传输.如
136.78.255.255 就是B 类地址中的一个广播地址,你将信息送到此地址,就是将信息送给网络
号为136.78 的所有主机.有时需要在本网内广播,但又不知道本网的网络号时,TCP/IP 协议规
定32 比特全为1 的IP 地址用于本网广播,即255.255.255.255

Private IP Address
私有IP 地址(private IP address):节约了IP 地址是空间,增加了安全性.处于私有IP 地址的网络
称为内网,与外部进行通信就必须靠网络地址翻译(network address translation,NAT)
一些私有地址的范围:
1.A 类地址中:10.0.0.0 到10.255.255.255.255
2.B 类地址中:172.16.0.0 到172.31.255.255
3.C 类地址中:192.168.0.0 到192.168.255.255


Broadcast Address
广播地址:
1.层2 广播:FF.FF.FF.FF.FF.FF,发送给LAN 内所有节点
2.层3 广播:发送给网络上所有节点
3.单播(unicast):发送给单独某个目标主机
4.多播:由1 台主机发出,发送给不同网络的许多节点


Introduction to Network Address Translation(NAT)
NAT 一般都操作在Cisco router 上,用于连接2 个网络,同时把私有地址翻译公有地址
一些NAT 的种类以及特点:
1.静态NAT(static NAT):本地地址和全局地址一一对应.这样的方式需要你拥有真正的Internet
上的IP 地址
2.动态NAT(dynamic NAT):把未注册的IP 地址对应到已注册IP 地址池中的某个IP 地址上.
你不必需要静态配置你的router 使内外地址对应
3.超载(overloading):采用的最广泛的NAT 配置类型.类似动态NAT,但是它是把1 组未注册的
IP 地址根据不同的端口(ports)对应到1 个已注册的IP 地址上.因此,它又叫做端口地址翻译
(port address translation,PAT)

posted on 2006-08-17 09:15 学习资料库 阅读(522) 评论(0)  编辑 收藏 引用 网摘 所属分类: Lan Switch


只有注册用户登录后才能发表评论。
网站导航: