Internet Protocols - หน้าหลักcpe.rmutt.ac.th/network/images/cn/Chapter 3 Internet...
Transcript of Internet Protocols - หน้าหลักcpe.rmutt.ac.th/network/images/cn/Chapter 3 Internet...
1
C H A P T E R I I I
1
Internet Protocols
Contents 2
TCP/IP and the DoD Model Protocol Header Layers
IP Addressing Broadcast Address
ICMP
ARP
IPv6
2
TCP/IP and the DoD Model 3
DoD Model Process/Application layer Host-to-Host layer Internet layer Network Access layer
Describe TCP/IP Model
3
Explain protocol data units (PDU) and encapsulation
Describe the process of sending and receiving messages
4
Compare OSI and TCP/IP model
Explain how labels in encapsulation headers are used to manage communication in data networks
6
The Process/Application Layer Protocols 12
Telnet FTP TFTP NFS SMTP
LPD X Window SNMP DNS DHCP/BootP
The Host-to-Host Layer Protocols 13
Transmission Control Protocol (TCP) User Datagram Protocol (UDP)
7
TCP Segment Format 14
TCP header details (I) 15
source, destination port:16,16 - identify
applications at ends of the connection
sequence:32 - indicates 1st data octet in this
segment
acknowledgment:32 - next expected
sequence number, valid only when the ACK bit (reside in flag) is set
8
TCP header details (II) 16
data offset:4 - 32 bit words offset tells the receiver where user data begins
reserved:6 -not used flag:6 URG : validity of urgent pointer field ACK : validity of acknowledge field PSH : push request (pass segment to appl layer
immediately) RST : reset the connection SYN : initial synchronization FIN : sender at end of byte stream
TCP header details (III) 17
window:16 - advertise amount of buffer space this node has allocated
checksum:16 - 16 bits 1’s complement of pseudo header, TCP header and data
urgent pointer:16 - byte position of data that should be processed first
options - variable length option e.g. MSS (max segment size) tells destination node
12
The Internet Layer Protocols 24
Internet Protocol (IP) Internet Control Message Protocol (ICMP)
Network Access / Internet Layer
Address Resolution Protocol (ARP) Reverse Address Resolution Protocol (RARP) Proxy ARP
IP header 25
18
Network Addressing 36
Network Address Range: Class A 00000000 = 0 01111111 = 127
Network Address Range: Class B 10000000 = 128 10111111 = 191
Network Address Range: Class C 11000000 = 192 11011111 = 223
Summary of the three classes of networks 37
19
Broadcast Addresses 38
Layer 2 broadcasts These are sent to all nodes on a LAN.
Broadcasts (layer 3) These are sent to all nodes on the network.
Unicast These are sent to a single destination host.
Multicast These are packets sent from a single source, and transmitted to many devices on different networks.
Layer 2 broadcasts 39
known as hardware broadcasts they only go out on a LAN
The broadcast would be all 1s in binary and all Fs in hexadecimal, as in FF.FF.FF.FF.FF.FF.
20
Broadcasts (layer 3)
40
Broadcast messages are meant to reach all hosts on a broadcast domain. example that you’re already familiar with: The network
address of 172.16.0.0 255.255.0.0 would have a broadcast
address of 172.16.255.255 Broadcasts can also be “all networks and all hosts,”
as indicated by 255.255.255.255. A good example of a broadcast message is an
Address Resolution Protocol (ARP) request.
41
Part II
30
60
IPv6 Overviews
IPv6: IP next generation 61
IETF IPv6 WG ถกจดตงขนในชวงตนยค 90s เพอแกปญหาการเจรญเตบโตของ internet ทมมากจนท าใหเกดการขาดแคลน IP address
ขณะเดยวกนนน กไดมการพฒนา CIDR และ NAT ขนในชวงป ค.ศ. 1992 และ ค.ศ. 1994 ซงชวยลดปญหาการขาดแคลน IP address ได
นอกจากนนยงไดมการจดตง RIR และไดมการ reclaim IP address ปญหาการเตบโตของ routes ใน routing table (85,000+ routes) ยงคงม
อย
31
Introduction to IPv6 62
IETF standard ตงแตป ค.ศ. 1996
128-bit addresses 2^128 340,282,366,920,938,463,463,374,607,431,768,211,456 3.4 * 10^38 addresses
ขอดของ IPv6 63
Larger Address 128-bit addresses Efficient and hierarchical addressing and routing
Better Mobility ดวยคณสมบต auto-configure, รองรบ anycast และ address ทมอยอยางมาก พอท าใหเหมาะสมส าหรบการใชงานกบอปกรณ mobile internet
Better Security IPSec ถกรวมไวในตว protocol ของ IPv6 ไมจ าเปนตองใช NAT
32
IPv6 Addresses Representation 64
128 bit ของ IPv6 address จะถกแบงเปนกลมกลมละ 16 bit ตวเลข 16 bit จะถกแปลงเปนเลขฐาน 16(0-F) 4 หลกโดยทเลขฐาน 16ในแตละชดจะถกแบงดวย “:”
IPv6 Addresses Representation 65
ตวเลขศนยทน าหนาตวเลขแตละกลมสามารถละไวได
ส าหรบ address ทกลมของตวเลขทเปนศนยตดๆ กนเราสามารถทจะเขยนแทนไดดวย “::” (ละได 1 ครงตอ 1 address ) 2001:00D3:0001:2F3B:0000:0000:0000:9C5A
2001:D3:1:2F3B:0:0:0:9C5A
2001:D3:1:2F3B::9C5A
FE80::212:3FFF:FEED:1671 InterfaceID for resolving the link-local address
33
66
IPv6 ใน URL จะตองถกเขยนอยในเครองหมาย “[ ]” http://[2001:1:4F3A::206:AE14]:8080/index.html *สรางความล าบากใหแกผใชในการ
จดจ าและการพมพ
ดงนนจงจ าเปนทจะตองใช DNS
* Browser หลายๆตวยงไมรองรบ URL ในรปแบบน
IPv6 Prefixes 67
ไมม subnet mask ใน IPv6 ใช Prefix ซงเปนสวนหนงของ address เพอระบ
subnet แทน เขยนเหมอนกบทใชกนใน CIDR (IPv4) Prefix ใน IPv6 เขยนไดดงน address/prefix-length 2001:D3::/48 route prefix 2001:D3:0:2F2B::/64 subnet prefix
34
Types of IPv6 Addresses 68
Unicast single host/one to one (Global, Site-local, Link local)
Multicast multiple host in specified range/one to many
Anycast multiple host, only received by single host (the nearest host) /one to
nearest (unicast)
No Broadcast use Mulicast Efficient use of the network Range can be much larger
Address type identification 69
Unspecified 00..0 ::/128 Loopback 00..1 ::1/128 Link Local 1111 1110 10 FE80::/10 Multicast 1111 1111 FF00::/8
All address types have to support EUI-64 bits interface ID setting Except for multicast
35
IPv6 Global Unicast Addresses 70
IPv6 Global Unicast addresses ถกออกแบบมาใหเปนล าดบชน เพอใหสามารถท าการ aggregate ได
3 bits แรก 001 (2000::/3) คอ IP ชดแรกท IANA ไดรบมาเพอใหใชกบ IPv6 Unicast
http://www.iana.org/assignments/ipv6-unicast-address-assignments
IPv6 Address Allocation 71
IANA allocated 2001::/16 to IPv6 Unicast RIR gets /23 prefixes from IANA RIR allocate /32 prefix to an ISP ISP allocate /48 prefix to end customer
36
IPv6 Interface IDs 72
Lowest order 64-bit field ของ unicast address จะถกก าหนดไดดวยหลายวธทแตกตางกน
Auto-configured from a 64 bit EUI-64 Auto-generated random number DHCPv6 Manually configured
Converting 48-Bit MAC Addresses to IPv6 Modified EUI-64 Identifiers
73
37
IPv6 Header 74
มขนาดคงทท 40 Octet ตด field Header length ออก Field หลกๆ เชน TTL, ToS, Total Length ยงคงอยแตเปลยนลกษณะ และจ านวน
ของ bits ทใชอางอง มการยายบาง Field ททการใชงานเฉพาะในบางอปกรณออกจาก Header แลวสรางสวน
Extended Header ขนมาใชงานเฉพาะทาง เชน Identification, Fragmentation และ Padding
Header checksum ถกน าออกไปเนองจาก ใน Header ของ Layer มการท างานฟงกชนนอยแลว
เพม Flow Label เพอใหสามารถแยก flow ของการท างานแตละประเภทได ม Next Header เพอระบวา Header ถดไปเปน Extended Header ประเภท
ใด
IPv6 Header 75
38
The IPv6 header fields are as follows: 76
version (4 bit): Indicates the protocol version, and will thus contain the number 6.
DS byte (8 bit): This field is used by the source and routers to identify the packets belonging to the same traffic class and thus distinguish between packets with different priorities.
flow label (20 bit): Label for a data flow payload length (16 bit): Indicates the length of the
packet data field.
The IPv6 header fields are as follows: (2) 77
next header (8 bit): ): Identifies the type of header immediately following the IPv6 header.
hop limit (8 bit): Decremented by one by each node that forwards the packet. When the hop limit field reaches zero, the packet is discarded.
source address (128 bit): The address of the originator of the packet.
destination address ( 128 bit) : The address of the intended recipient of the packet.
Reference->http://www.ietf.org/rfc/rfc2460.txt
39
IPv4 & IPv6 co-existence 78
มการพฒนาวธการตางๆ ขนเพอใหสามารถรองรบการท างานในแบบ IPv6 และ IPv4 ไปควบคกนได โดยทวไปสามารถแบงไดเปน 3 วธ Dual-stack เปนเทคนคทท าใหสามารถใช IPv4 และ IPv6 พรอมกนในเครองเดยวกนทอยบน
เครอขายเดยวกนได
Tunneling เปนเทคนคทใชส าหรบหลกเลยงปญหาทตอง upgradeอปกรณหลายๆตวในเครอขาย
Translation เปนเทคนคซงท าใหอปกรณทใชไดเฉพาะกบ IPv6 สามารถตดตอกบอปกรณทใชไดเฉพาะกบ IPv4
Dual Stack Approach 79
Dual Stack: ทง IPv4 และ IPv6 protocol stack สามารถถกเรยกใชงานได
Application สามารถคยไดกบทงสอง protocol การเลอกใชงานจะขนอยกบการท า name lookup และApplication
preference
40
Dual Stack Approach & DNS 80
ในกรณทมการใชงาน Dual Stack และในกรณท application รองรบการท างานแบบ IPv4 และ IPv6
Application จะขอ address ทกประเภททมใน DNS เลอก address ทตองการแลวท าการเชอมตอ
อางอง 81
http://ipv6.nectec.or.th
http://www.ipv6.org
http://www.6bone.net
http://www.kame.net
http://www.linux-ipv6.org
http://www.ipv6forum.com
http://ipv6.cpe.rit.ac.th/ cancle http://www.tcpipguide.com/