计算机网络概论

Similar documents
財金資訊-80期.indd

TCP/IP TCP/IP OSI IP TCP IP IP TCP/IP TCP/IP

版权声明

工程师培训

UDP 8.2 TCP/IP OSI OSI 3 OSI TCP/IP IP TCP/IP TCP/IP Transport Control Protocol TCP User Datagram Protocol UDP TCP TCP/IP IP TCP TCP/IP TC

Microsoft PowerPoint - 数据通信-ch1.ppt

第 1 章 概 述 1.1 计 算 机 网 络 在 信 息 时 代 中 的 作 用 1.2 计 算 机 网 络 的 发 展 过 程 *1.2.1 分 组 交 换 的 产 生 *1.2.2 因 特 网 时 代 *1.2.3 关 于 因 特 网 的 标 准 化 工 作 计 算 机 网 络 在

一、选择题

IP505SM_manual_cn.doc

飞鱼星多WAN防火墙路由器用户手册

第 7 章 下 一 代 网 际 协 议 IPv6 141 足 的 措 施 只 能 是 权 宜 之 计 (3) 路 由 表 膨 胀 早 期 IPv4 的 地 址 结 构 也 造 成 了 路 由 表 的 容 量 过 大 IPv4 地 址 早 期 为 网 络 号 + 主 机 号 结 构, 后 来 引 入

<4D F736F F F696E74202D20A1B6CFEEC4BFD2BB20B3F5CAB6BCC6CBE3BBFACDF8C2E7A1B7C8CECEF1C8FD20CAECCFA A1A24950D0ADD2E9BACD4950B5D8D6B72E707074>

Simulator By SunLingxi 2003

Chapter #

9 Internet 10 Internet

C3_ppt.PDF

第3章 计算机网络体系结构

Chap6.ppt

SEC-220

...1 What?...2 Why?...3 How? ( ) IEEE / 23

ebook140-11

(UTM???U_935_938_955_958_959 V )

end to end 7.2 OSI 7 OSI 3 A B 7.2 Packet Routing LAN WAN

计算机网络

ch09.PDF


<4D F736F F D D352DBED6D3F2CDF8D7E9BDA8D3EBB9DCC0EDCFEEC4BFBDCCB3CCD5FDCEC42E646F63>

ebook140-9

ebook67-1

Symantec™ Sygate Enterprise Protection 防护代理安装使用指南

epub 61-2

untitled

Master Thesis_專門用來製作目錄.doc

iGENUS爱琴思邮件系统技术白皮书

RAQMON Context Setting MG PDA Applications RTP / FTP/ HTTP TCP/UDP S ignaling control plane (e.g. RS VP, NS IS) Streaming Media, Transaction, Bulk dat

D E 答 案 :C 3. 工 作 站 A 配 置 的 IP 地 址 为 /28. 工 作 站 B 配 置 的 IP 地 址 为 /28. 两 个 工 作 站 之 间 有 直 通 线 连 接, 两 台

《计算机网络》实验指导书

目 彔 1. 准 备 工 作 登 彔 设 置 功 能 说 明 实 时 监 控 基 本 控 制 功 能 设 置 画 质 调 节 彔 像 与 抓 拍

PowerPoint Presentation

AL-M200 Series

ebook140-8

IC-900W Wireless Pan & Tilt Wireless Pan & Tilt Remote Control / Night Vision FCC ID:RUJ-LR802UWG

一.NETGEAR VPN防火墙产品介绍

13 根 据 各 种 网 络 商 务 信 息 对 不 同 用 户 所 产 生 的 使 用 效 用, 网 络 商 务 信 息 大 致 可 分 为 四 级, 其 中 占 比 重 最 大 的 是 ( A ) A 第 一 级 免 费 信 息 B 第 二 级 低 收 费 信 息 C 第 三 级 标 准 收 费

计算机网络概论

lan03_yen

Data Server_new_.doc

经华名家讲堂

第4章网络层_2_.doc

NSC-161

ext-web-auth-wlc.pdf

第 11 章 互聯網技術 11.1 互聯 網 和 萬 維 網 的 發 展 歷 史 A. 互聯網的發展 互聯網是由 ARPANET 開 始發展的 1969 年 美國國防部高級研究計劃署 (ARPA) 把部分軍事研究所和大 的電腦連接起來 建造了㆒個實驗性的電腦網絡 稱為 ARPANET 並 列 的功能

BYOD Http Redirect convergence Client (1) 2008R2 NLB( ) (2) NLB Unicast mode switch flooding (arp ) NLB DNS Redirect 1. Round-Robin DNS DNS IP/DNS Cli

¶C¶L§§¬_™¨ A.PDF

A API Application Programming Interface 见 应 用 程 序 编 程 接 口 ARP Address Resolution Protocol 地 址 解 析 协 议 为 IP 地 址 到 对 应 的 硬 件 地 址 之 间 提 供 动 态 映 射 阿 里 云 内


计 算 机 网 络 基 础 任 务 教 程 () 组 成 计 算 机 网 络 的 每 台 计 算 机 都 是 独 立 的 即 计 算 机 之 间 没 有 明 显 的 主 从 关 系, 每 台 计 算 机 可 以 连 网 工 作, 也 可 以 不 连 网 工 作 (2) 建 立 计 算 机 网 络 的

中国计算机软件专业技术资格和水平考试

11N 无线宽带路由器

Improved Preimage Attacks on AES-like Hash Functions: Applications to Whirlpool and Grøstl

计算机网络

QL1880new2.PDF

软件概述

穨CAS1042快速安速說明.doc

GPRS IP MODEM快速安装说明

Microsoft Word - YDB Vehicle Telematics Service Requirement and General Framework

Microsoft Word - 選擇_無解答2_.doc

1 1 2 OSPF RIP 2

Bus Hound 5

计算机网络概论

SiteView技术白皮书

IP Access Lists IP Access Lists IP Access Lists

13 A DSS B DSS C DSS D DSS A. B. C. CPU D. 15 A B Cache C Cache D L0 L1 L2 Cache 16 SMP A B. C D 17 A B. C D A B - C - D

untitled

Windows XP

Chn 116 Neh.d.01.nis

Microsoft PowerPoint - Aqua-Sim.pptx

Microsoft Word - template.doc

weblogic

<B1B1BEA9B9E2BBB7D0C2CDF8BFC6BCBCB9C9B7DDD3D0CFDEB9ABCBBEB4B43F3F12FB6CB293>

穨control.PDF

PL600 IPPBX 用户手册_V2.0_.doc

QVM330 多阜寬頻路由器

C6_ppt.PDF

untitled

EC51/52 GSM /GPRS MODEN

PS PS GMM SM.zte.com.

FreeRouter V2 完全手册

Microsoft Word htm

2 SGML, XML Document Traditional WYSIWYG Document Content Presentation Content Presentation Structure Structure? XML/SGML 3 2 SGML SGML Standard Gener

untitled


D-link用户手册.doc

06 C H A P T E R 6-1 WWW 6-2 WWW WWW WWW

联想天工800R路由器用户手册 V2.0

基于泛在网的智能交通应用系统总体框架

WebSphere Studio Application Developer IBM Portal Toolkit... 2/21 1. WebSphere Portal Portal WebSphere Application Server stopserver.bat -configfile..

User Group SMTP

声 明 本 人 郑 重 声 明 : 此 处 所 提 交 的 硕 士 学 位 论 文 基 于 等 级 工 鉴 定 的 远 程 考 试 系 统 客 户 端 开 发 与 实 现, 是 本 人 在 中 国 科 学 技 术 大 学 攻 读 硕 士 学 位 期 间, 在 导 师 指 导 下 进 行 的 研 究

ebook177-1

Transcription:

TCP/IP

1. 2. IP 3. TCP/IP 4. IPv6

1 TCP/IP 7 6 5 4 Application Presentation Session Transport 3 Network 2 1 Data Data link link Physical

2 IP IPv4

2.1 IPv4

2.1 IPv4

2.1 IPv4

2.1 IPv4-

2.1 IPv4-

2.1 IPv4-

2.1 IPv4-

2.1 IPv4- IETF A B C 10.0.0.0 10.255.255.255 172.16.0.0 172.31.255.255 192.168.0.0 192.168.255.255 Internet Internet

2.1 IPv4- Internet IP a1.b1.c1.d1 a2.b2.c2.d2 an.bn.cn.dn NAT a3.b3.c3.d3 x1.x2.x3.x4 x1.x2.x3.x4 x1.x2.x3.x4

2.1 IPv4-48bits Ipconfig /all

2.2 IPv4 Network Mask Def. A B C 255.0.0.0 255.255.0.0 255.255.255.0

2.2 Sub-Network Mask Hostid Netid N 1+ M 0=32 IP =

2.2 Sub-Network Mask

202.183.56.1xxxxxxx 202.183.56.xxxxxxxxx 202.183.56.0xxxxxxx

202.112.11.0 A B C ip 120 60 62 ip

3 TCP/IP : ICMP IGMP ARP RARP : UDP TCP : SMTP/POP HTTP DNS FTP

3.1 ARP/RARP ICMP IGMP

IPv4 header structure Version Version IHL IHL Time-to-live Time-to-live Identification Identification Type Type of of Service Service Protocol Protocol Options Options Flags Flags Total Total length length of of IP IP datagram datagram Fragment Fragment offset offset Header Header checksum checksum (for (for error error control) control) Source Source IP IP address address Destination Destination IP IP address address Padding Padding Payload Payload of of IP IP datagram datagram Version (4 bits): tells that this is IP Version 4 (IPv4)

IPv4 header structure Version Version Time-to-live Time-to-live IHL IHL Type Type of of Service Service Identification Identification Protocol Protocol Options Options Total Total length length of of IP IP datagram datagram Flags Flags Fragment Fragment offset offset Header Header checksum checksum (for (for error error control) control) Source Source IP IP address address Destination Destination IP IP address address Padding Padding Payload Payload of of IP IP datagram datagram Header length (4 bits) is needed since Options + Padding can vary in length. Options Security (packet classification), Strict source routing (the whole routing list), Loose source routing (the mandatory routing list), Record route (record the IP address of each hop), Timestamp (record the IP address and timestamp of each hop).

IPv4 header structure Version Version IHL IHL Time-to-live Time-to-live Identification Identification Type Type of of Service Service Protocol Protocol Options Options Flags Flags Total Total length length of of IP IP datagram datagram Fragment Fragment offset offset Header Header checksum checksum (for (for error error control) control) Source Source IP IP address address Destination Destination IP IP address address Padding Padding Payload Payload of of IP IP datagram datagram ToS = Type of Service (8 bits) is used for QoS management purposes. The first 3 bits of TOS indicate priorities, 0 being low (normal packet) and 7 being high (network control packet); the next 3 bits indicate service types, being delay, throughput, and reliability; the last 2 bits are reserved. Source could use service type bits to indicate the routing metrics to be used.

IPv4 header structure Version Version IHL IHL Time-to-live Time-to-live Identification Identification Type Type of of Service Service Protocol Protocol Options Options Flags Flags Total Total length length of of IP IP datagram datagram Fragment Fragment offset offset Header Header checksum checksum (for (for error error control) control) Source Source IP IP address address Destination Destination IP IP address address Padding Padding Payload Payload of of IP IP datagram datagram Datagram length (16 bits): since this field is 16 bits long, the IP datagram can contain up to 2 16 = 65535 bytes (in theory). Most routers, however, cannot handle such large datagrams.

IPv4 header structure Version Version IHL IHL Time-to-live Time-to-live Identification Identification All fragments contain the same number Type Type of of Service Service Protocol Protocol Options Options Flags Flags Total Total length length of of IP IP datagram datagram Fragment Fragment offset offset Header Header checksum checksum (for (for error error control) control) Source Source IP IP address address Has value zero Destination Position of Destination IP IP address address in last fragment in Padding fragment original datagram Padding Payload Payload of of IP IP datagram datagram IP fragmentation: a large IP datagram may be fragmented (in any router along the path) and will be reassembled at the destination. Flags: 1st bit reserved; 2nd bit DF, 0 fragment yes, 1 fragment no; 3rd bit MF, 0 last fragment, 1 more fragment. SEU 31

IPv4 header structure Version Version IHL IHL Time-to-live Time-to-live Identification Identification Type Type of of Service Service Protocol Protocol Options Options Flags Flags Total Total length length of of IP IP datagram datagram Fragment Fragment offset offset Header Header checksum checksum (for (for error error control) control) Source Source IP IP address address Destination Destination IP IP address address Padding Padding Payload Payload of of IP IP datagram datagram Time-to-live (8 bits): this number is decreased by one in each router along the path. If number zero is reached in a router, IP datagram is discarded and router sends an ICMP message (TTL expired) to the source of the datagram.

IPv4 header structure Version Version IHL IHL Time-to-live Time-to-live Starts here... Identification Identification Type Type of of Service Service Protocol Protocol Options Options Flags Flags Payload Payload of of IP IP datagram datagram Total Total length length of of IP IP datagram datagram Fragment Fragment offset offset Header Header checksum checksum (for (for error error control) control) Source Source IP IP address address Destination Destination IP IP address address Padding Padding Protocol field (8 bits): describes which higher layer protocol is used (TCP, UDP, SCTP...). The header of this upper protocol is located at the beginning of the IP datagram payload. e.g. 6 TCP, 17 UDP, 1 ICMP, 89 OSPF, etc. SEU 33

IPv4 header structure Version Version IHL IHL Time-to-live Time-to-live Identification Identification Type Type of of Service Service Protocol Protocol Options Options Flags Flags Total Total length length of of IP IP datagram datagram Fragment Fragment offset offset Header Header checksum checksum (for (for error error control) control) Source Source IP IP address address Destination Destination IP IP address address Padding Padding Payload Payload of of IP IP datagram datagram Header checksum (16 bits): used for error control (if used, routers along the path have to recalculate the checksum). This kind of error control is not used in IPv6 (since the same error control function is offered by TCP - and even UDP). SEU 34

IPv4 header structure Version Version IHL IHL Time-to-live Time-to-live Identification Identification Type Type of of Service Service Protocol Protocol Options Options Flags Flags Total Total length length of of IP IP datagram datagram Fragment Fragment offset offset Header Header checksum checksum (for (for error error control) control) Source Source IP IP address address Destination Destination IP IP address address Padding Padding Payload Payload of of IP IP datagram datagram Source and destination IP address (32 bits each): note that these addresses are not changed in routers along the route. SEU 35

IP

(ARP/RARP)

ARP/RARP

ARP

ARP 1 IP 0800

ARP

example broadcast unicast

ARP

ARP -cache

C:\Documents and Settings\Administrator>PING 172.18.12.199 Pinging 172.18.12.199 with 32 bytes of data: Reply from 172.18.12.199: bytes=32 time<1ms TTL=128 Reply from 172.18.12.199: bytes=32 time<1ms TTL=128 Reply from 172.18.12.199: bytes=32 time<1ms TTL=128 Reply from 172.18.12.199: bytes=32 time<1ms TTL=128 Ping statistics for 172.18.12.199: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 0ms, Maximum = 0ms, Average = 0ms C:\Documents and Settings\Administrator>ARP -D C:\Documents and Settings\Administrator>ARP -A No ARP Entries Found C:\Documents and Settings\Administrator>ARP -S 172.18.12.199 00-88-88-88-88-88 C:\Documents and Settings\Administrator>APR -A 'APR' C:\Documents and Settings\Administrator>ARP -A Interface: 172.18.12.192 --- 0x10005 Internet Address Physical Address Type 172.18.12.199 00-88-88-88-88-88 static C:\Documents and Settings\Administrator>PING 172.18.12.199

sniffer

Arp A: ip 192.168.0.1 AA:AA:AA:AA:AA:AA B: ip 192.168.0.2 BB:BB:BB:BB:BB:BB C: ip 192.168.0.3 CC:CC:CC:CC:CC:CC

Arp 1. 192.0.0.3 C 2. ip 192.0.0.3 3. ip 192.168.0.3, MAC BB:BB:BB:BB:BB:BB A A arp 4. arp C ip-->mac ip mac telnet

ARP ip mac ip+mac mac-->ip

ARP Proxy

RARP

RARP

RARP

ARP LAN IP

3.1.2 ICMP

ICMP

ICMP

ICMP

ICMP

ICMP

ICMP ICMP ip 8 ICMP

ICMP A R1 R2 R3 B 1 2 3 4 ICMP

ICMP

ICMP

ICMP

ICMP ID SN

ICMP ping

TRACEROUTE LINUX TRACERT WINDOWS sniffer

3.1.3 IGMP Multicast Internet Group Management Protocol RFC1112

IGMP

1 0 2

224.0.0.0 224.0.0.1 224.0.0.2 224.0.1.1 NTP.

01.00.5e.00.00.00~01.00.5e.7f.ff.ff 5 1 1 1 0 ID 32

3.2 TCP UDP

3.2

3.2.1 TCP

TCP I P I P TCP TCP

Tcp TCP IP IP

Tcp

TCP Connect and discon

TCP Connect and discon syn syn ISN+1 ISN

TCP Connect Reliability

TCP Connect and discon

TCP Connect and discon

TCP Connect and discon

TCP Connect and discon TCP

TCP How to Get RTT

TCP Max-Send-Segment MSS=Min MTU SMSS RMSS Sniffer

3.2.2 UDP

TCP/UDP

TCP/UDP

TCP/UDP

UDP

3.3 http DNS FTP

3.3.1 Mail

3.3.1 Mail Protocol SMTP Postel J B.Simple Mail Transfer Protocol. RFC821[EB/OL].http://www.ietf.org/ rfc/ rfc0821.txt POP Myers J. Post Office Protocol - Version 3.RFC1939[EB/OL].http://www.ietf.org/rfc/rfc l939.txt

3.3.1 Mail Theory SMTP POP Foxmail Outlook SENDMAIL QMAIL

3.3.1 Mail Format rfc822 Rfc 822

3.3.1 Mail Format-MIME RFC1341 (RFC2231 RFC2646 ) MIME Multipurpose Internet Mail Extensions

3.3.1 MIME

3.3.1 MIME base64

3.3.1 MIME base64

3.3.1 MIME Quoted-printable

3.3.1 MIME Quoted-printable

3.3.1 Mail Format

3.3.1 Mail Format

3.3.1 SMTP Connect 25 Connection establishment

Message transfer

Connection termination

3.3.1 Pop-post office protocol

pop3

3.3.1 SPAM

SPAM

SPAM

SPAM

SPAM Black Menu White Menu rule

SPAM

SPAM

SPAM

HTTP Hypertext Transfer Protocol

HTTP Paradigm

HTTP Message types

HTTP Request Message

HTTP Request Line

HTTP GET Method HEAD POST PUT DELETE

HTTP GET

HTTP POST

HTTP HEAD

HTTP URL

HTTP Response message

HTTP Status line

HTTP STATUS CODE

HTTP

GET

HTTP HEAD

HTTP POST

Web (http://www.w3c.org) Web1.0

Web

WWW world wide web

WWW world wide web

Hypertext

Brower structure

Web

html xml xhtml

html xml xhtml

Web phishing

Web phishing

APWG SPONSORS

APWG Global Research Partners:

S1:Email

S2 Visible link: https://www.paypal.com/us/cgi-bin/webscr? cmd=_login-run Actual link to: http://218.246.224.203/icons/.cgi-bin/paypal/cgi-bin/webscrcmd_login.php Phish site IP:218.246.224.203

Web phishing handling Html image

Web phishing handling

Web phishing handling

3.3.3 DNS

DNS g e t h o s t b y n a m e g e t h o s t b y a d d r

DNS

DNS

DNS

DNS

DNS

DNS 0-std query ip 1-recursive 0-iterative 1-inverse query 2-server query query states 0-query 1-response Authoritative answer

DNS types

Format of Query & Answer

What protocol-udp/tcp Client (resolver) Client (resolver) Udp/tcp Udp/tcp Port:53 Main server tcp additional server

Name length Domain name Name=label.label label. Length of label <=63 octet Length of name <=255 octet

DNS domain name structure

DNS Query Process Iterative in which the server refers the client to another server and lets the client pursue the query. Recursive in which the first server pursues the query for the client at another server. Both approaches have advantages and disadvantages, but the iterative approach is preferred for the datagram style of access. The domain system requires implementation of the iterative approach, but allows the recursive approach as an option.

Instance of iterative query

Instance of recursive query User MIT DNS edu DNS root cn DNS Edu.cn DNS Seu.edu.cn DNS MIT DNS edu DNS root cn DNS ibm edu.cn DNS seu.edu.cn DNS User com root edu cn......... User MIT com seu edu pku www email ftp gov ptt tsinghua

3.3.4 Ftp rfc0959

Ftp user-ftp process A set of functions including a protocol interpreter, a data transfer process and a user interface which together perform the function of file transfer in cooperation with one or more server-ftp processes. The user interface allows a local language to be used in the command-reply dialogue with the user server-ftp process A process or set of processes which perform the function of file transfer in cooperation with a user-ftp process and, possibly, another server. The functions consist of a protocol interpreter (PI) and a data transfer process (DTP)

Ftp PI The protocol interpreter. server-dtp The data transfer process, in its normal "active" state, establishes the data connection with the "listening" data port. user-dtp The data transfer process "listens" on the data port for a connection from a server-ftp process.

Ftp FTP model

Ftp Two connections control connection The communication path between the USER-PI and SERVER-PI for the exchange of commands and replies. This connection follows the Telnet Protocol. data connection A full duplex connection over which data is transferred, in a specified mode and type. The data transferred may be a part o a file, an entire file or a number of files. The path may be between a server-dtp and a user-dtp, or between two server-dtps. Normally the client active the control connection the server active the data connection

Ftp PORT ADDRESS Both the user and the server DTPs have a default data port. The user-process default data port is the same as the control connection port,the server-process default data port is the port adjacent to the control connection port (i.e., 21-1=20). the user can set new data port.

Ftp

ftp

ftp

ftp 3-4byte

ftp restart marker marker get put restart 130 CuteFTP Log FTP Netants FTP SIZE.job

4 IPV6

IPV6

IPV6

510000000 149000000 29.2 361000000 71.8 ipv6

IPV6

IPV6

Windows xp Linux ipv6 install

IPV6 Tunnel Ipv4(1)-v6(1) Ipv4(2)-v6(2) Ipv4(3)-v6(3) Ipv4(4)-v6(4) Ipv4(n)-v6(n) How to realize? Ipv4(1)-v6(1) Ipv4(2)-v6(2) Ipv4(3)-v6(3) Ipv4(4)-v6(4) Ipv4(n)-v6(n)

IPV6 Add & Protocol transformation

END of TCP/IP