1 Internet Protocols Chapter III
Jan 02, 2016
1
Internet Protocols
Chapter III
2
Contents
TCP/IP and the DoD Model Protocol Header Layers
IP Addressing Broadcast Address
ICMP ARP IPv6
3
TCP/IP and the DoD Model
DoD Model Process/Application layer - - Host to Host layer Internet layer Network Access layer
Describe TCP/IP Model
Explain protocol data units (PDU) and encapsulation
Describe the process of sending and receiving messages
Compare OSI and TCP/IP model
Explain how labels in encapsulation headers are used to manage communication in data networks
10
The TCP/IP protocol suite
11
12
The Process/Application Layer Protocols
Telnet FTP TFTP NFS SMTP
LPD X Window SNMP DNS DHCP/BootP
13
- - The Host to Host Layer Protocols
Transmission Control Protocol (TCP) User Datagram Protocol (UDP)
14
TCP Segment Format
15
TCP header details (I)
source, destination port:161,6 - identify applications at ends of
the connection sequence32: - indicates 1 st data
octet in this segment acknowledgment32 - next expect
ed sequence number, valid only whe n the ACK bit (reside in flag) is set
16
TCP header details (II) data offset - 4 32: bit words offset tell
s the receiver where user data begins reserved6: - not used flag6
URG : validity of urgent pointer field ACK : validity of acknowledge field PSH : push request (pass segment to appl layer i
mmediately) RST : reset the connection SYN : initial synchronization FIN : sender at end of byte stream
17
TCP header details (III) window16: - advertise amount of b
uffer space this node has allocated checksum - 16 16 bits1’ s co
mplement of pseudo header, TCP he ader and data
urgent pointer16 - byte position o f data that should be processed first
- options variable length option e.g. MSS (max segment size) tells destin ation node
18
UDP Segment Format
19
UDP Header
20
UDP pseudo Header
21
- - Key Concepts of Host to Host Protocols
22
Port numbers for TCP and UDP
23
Key Protocols That Use TCP andUDP
24
The Internet Layer Protocols
Internet Protocol (IP) Internet Control Message Protocol (ICMP
) Address Resolution Protocol (ARP) Reverse Address Resolution Protocol (R
ARP) Proxy ARP
25
IP header
26
IP Header (I)
27
IP Header (2)
28
IP Header (3)
29
The Protocol field in an IP header
30
Possible Protocols Found in th e Protocol Field of an IP Heade
r
31
Fragmentation
32
Fragmentation Flag
33
Fragmentation sample
34
Problem in Fragmentation
35
Avoiding Fragmentation
36
Network Addressing Network Address Range: Class A
00000000 = 0 01111111 = 127
Network Address Range: Class B 10000000 = 128 10111111 = 191
Network Address Range: Class C110 00000 192=110 11111223
37
Summary of the three classes of networks
38
Broadcast Addresses Layer 2 broadcasts These are sent to a
ll nodes on a LAN. Broadcasts (layer3 ) These are sent t
o all nodes on the network. Unicast These are sent to a single desti
nation host. Multicast These are packets sent from
a single source, and transmitted to many devices on different networks.
39
Layer 2 broadcasts
known as hardware broadcasts they only go out on a LAN The broadcast would be all 1s in bin
ary and all Fs in hexadecimal, as inFF.FF.FF.FF.FF.FF.
40
Broadcasts (layer3) Broadcast messages are meant to reach all hosts
on a broadcast domain. example that you’re already familiar with: The networ
k address of 17216002552. . . .5500. . would have a broadcast address of17216255255. . .
Broadcasts can also be “all networks and all host s,” as indicated by25525525. .5255. .
A good example of a broadcast message is an Ad dress Resolution Protocol (ARP) request.
41
Part II
42
Internet Control Message Protocol (ICMP)
43
44
ICMP Header
45
ICMP Types
46
ICMP Types, cont.
47
ICMP type 0/8 echo reply/request
48
ICMP type 3 destination unreachable
49
ICMP type 4 source quench
50
ICMP type 5 route change request
51
Local ARP broadcast
52
ARP/RARP Header
53
ARP Header
54
ARP request packet
55
ARP reply packet
56
ARP mechanisms
57
RARP
58
RARP broadcast example
59
Proxy ARP
60
IPv6 Overviews
61
IPv6: IP next generation IETF IPv6 WG ถู�กจั�ดตั้�งขึ้ นในช่�วงตั้�นยุ�ค 90s เพื่��อ
แก�ปั�ญหาการเจัร#ญเตั้#บโตั้ขึ้อง internet ที่'�มี'มีากจันที่)าให�เก#ดการขึ้าดแคลน IP address
ขึ้ณะเด'ยุวก�นน�น ก-ได�มี'การพื่�ฒนา CIDR และ NAT ขึ้ นในช่�วงปั0 ค.ศ. 1992 และ ค.ศ. 1994 ซึ่ �งช่�วยุลดปั�ญหาการขึ้าดแคลน IP address ได�
นอกจัากน�นยุ�งได�มี'การจั�ดตั้�ง RIR และได�มี'การ reclaim IP address
ปั�ญหาการเตั้#บโตั้ขึ้อง routes ใน routing table (85,000+ routes) ยุ�งคงมี'อยุ��
62
Introduction to IPv6 IETF standard ตั้�งแตั้�ปั0 ค.ศ. 1996
128-bit addresses 2^128 340,282,366,920,938,463,463,374,607,43
1,768,211,456 3.4 * 10^38 addresses
63
ข้�อดี�ข้อง IPv6 Larger Address
128-bit addresses Efficient and hierarchical addressing and routing
Better Mobility ด�วยุค�ณสมีบ�ตั้# auto-configure, รองร�บ anycast และ
address ที่'�มี'อยุ��อยุ�างมีาก พื่อที่)าให�เหมีาะสมีส)าหร�บการใช่�งานก�บอ�ปักรณ4 mobil
e internet Better Security
IPSec ถู�กรวมีไว�ในตั้�ว protocol ขึ้อง IPv6 ไมี�จั)าเปั5นตั้�องใช่� NAT
64
IPv6 Addresses Representation 128 bit ขึ้อง IPv6 address จัะถู�กแบ�งเปั5นกล��มี
กล��มีละ 16 bit ตั้�วเลขึ้ 16 bit จัะถู�กแปัลงเปั5นเลขึ้ฐาน 16(0-F) 4
หล�กโดยุที่'�เลขึ้ฐาน 16ในแตั้�ละช่�ดจัะถู�กแบ�งด�วยุ “:”
65
IPv6 Addresses Representation ตั้�วเลขึ้ศ�นยุ4ที่'�น)าหน�าตั้�วเลขึ้แตั้�ละกล��มีสามีารถูละไว�ได� ส)าหร�บ address ที่'�กล��มีขึ้องตั้�วเลขึ้ที่'�เปั5นศ�นยุ4ตั้#ดๆ ก�น
เราสามีารถูที่'�จัะเขึ้'ยุนแที่นได�ด�วยุ “::” (ละได� 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
66
IPv6 ใน URL จัะตั้�องถู�กเขึ้'ยุนอยุ��ในเคร��องหมีายุ “[ ]” http://[2001:1:4F3A::206:AE14]:808
0/index.html *สร�างความีล)าบากให�แก�ผู้��ใช่�ในการจัดจั)าและการพื่#มีพื่4
ด�งน�นจั งจั)าเปั5นที่'�จัะตั้�องใช่� DNS
* Browser หลายุๆตั้�วยุ�งไมี�รองร�บ URL ในร�ปัแบบน'
67
IPv6 Prefixes ไมี�มี' subnet mask ใน IPv6 ใช่� Prefix ซึ่ �งเปั5นส�วนหน �งขึ้อง address
เพื่��อระบ� subnet แที่น เขึ้'ยุนเหมี�อนก�บที่'�ใช่�ก�นใน CIDR (IPv4) Prefix ใน IPv6 เขึ้'ยุนได�ด�งน'
address/prefix-length 2001:D3::/48 route prefix 2001:D3:0:2F2B::/64 subnet prefix
68
Types of IPv6 Addresses 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
69
Address typeidentification 00 0 128Unspecified .. ::/ 00 1 1128Loopback .. :: / 1111111010Link Local80 10FE ::/
11111111 00 8Multicast FF ::/
ttttt tttt tt ttttttt ttt-tt tttt ttttt64tttt tt ttttttt Except for multicast
70
IPv6 Global UnicastAddresses
IPv6 Global Unicast addresses ถู�กออกแบบมีาให�เปั5นล)าด�บช่�น เพื่��อให�สามีารถูที่)าการ aggregate ได�
3 bits แรก 0 0 1 (2 0 0 0 ::/3 )ค�อ tt ช่�ดแรกที่'� tttt ได�ร�บมีาเพื่��อให�ใช่�ก�บ
6IPv Unicast-6http://www.iana.org/assignments/ipv
ttttttt-ttttttt-ttttttttttt
71
IPv6 Address Allocation IANA allocated 2001::/16 to IPv6 Unicast 23RIR gets / prefixes from IANA 32RIR allocate / prefix to an ISP ISP allocate /48 prefix to end customer
72
IPv6 Interface IDs
- 64Lowest order bit field ขึ้อง ttttttt ttttttt จัะถู�กก)าหนดได�ด�วยุหลายุว#ธี'ที่'�แตั้กตั้�างก�น - tttt t t t ttt 6 4
-64EUI - Auto generated random number 6DHCPv tttttttt tttttttttt
73
Converting 48-Bit MAC Addresses to IPv6 Modified EUI-64 Identifiers
74
IPv6 Header มี'ขึ้นาดคงที่'�ที่'� 40 Octet ตั้�ด field Header length ออก Field หล�กๆ เช่�น TTL, ToS, Total Length ยุ�งคงอยุ��แตั้�
เปัล'�ยุนล�กษณะ และจั)านวนขึ้อง bits ที่'�ใช่�อ�างอ#ง มี'การยุ�ายุบาง Field ที่'�ที่'การใช่�งานเฉพื่าะในบางอ�ปักรณ4ออก
จัาก Header แล�วสร�างส�วน Extended Header ขึ้ นมีาใช่�งานเฉพื่าะที่าง เช่�น Identification, Fragmentation และ Padding
Header checksum ถู�กน)าออกไปัเน��องจัาก ใน Header ขึ้อง Layer มี'การที่)างานฟั�งก4ช่��นน'อยุ��แล�ว
เพื่#�มี Flow Label เพื่��อให�สามีารถูแยุก flow ขึ้องการที่)างานแตั้�ละปัระเภที่ได�
มี' Next Header เพื่��อระบ�ว�า Header ถู�ดไปัเปั5น Extended Header ปัระเภที่ใด
75
IPv6 Header
76
The IPv6 header fields are as followst 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 .
77
The IPv6 header fields are as followst (2)
next header tttttttttt ttt tttt tt(8 ): ): headerimmediatelyf ol l owi ng t he I Pv6header .
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.
dest i nat i on addr ess ( 128 bit ) : The address of the intended recipient of the packet.
Reference->http://www.ietf.org/rfc/rfc2460.txt
78
-IPv4 & IPv6 co existence มี'การพื่�ฒนาว#ธี'การตั้�างๆ ขึ้ นเพื่��อให�สามีารถูรองร�บการ
ที่)างานในแบบ 6IPv และ 4IPv ไปัควบค��ก�นได� โดยุที่��วไปัสามีารถูแบ�งได�เปั5น 3 ว#ธี' - Dual stack เปั5นเที่คน#คที่'�ที่)าให�สามีารถูใช่� 4 และ 6
พื่ร�อมีก�นในเคร��องเด'ยุวก�นที่'�อยุ��บนเคร�อขึ้�ายุเด'ยุวก�นได� Tunneling เปั5นเที่คน#คที่'�ใช่�ส)าหร�บหล'กเล'�ยุงปั�ญหาที่'�
ตั้�อง upgradeอ�ปักรณ4หลายุๆตั้�วในเคร�อขึ้�ายุ Translation เปั5นเที่คน#คซึ่ �งที่)าให�อ�ปักรณ4ที่'�ใช่�ได�เฉพื่าะ
ก�บ 6 สามีารถูตั้#ดตั้�อก�บอ�ปักรณ4ที่'�ใช่�ได�เฉพื่าะก�บ 4
79
Dual Stack Approach
Dual Stack: ที่�ง 4 และ 6IPv pr ot ocol st ack สามีารถูถู�กเร'ยุกใช่�งาน
ได� Application สามีารถูค�ยุได�ก�บที่�งสอง
protocol การเล�อกใช่�งานจัะขึ้ นอยุ��ก�บการที่)า name
lookup และ Application preference
80
Dual Stack Approach &DNS
ในกรณ'ที่'�มี'การใช่�งาน Dual St ack และในกรณ'ที่'� application รองร�บการที่)างานแบบ IPv
4 และ 6IPv 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/
82
Finish