Basic Network 1

Download Report

Transcript Basic Network 1

Basic Network 1
Chapter 3
Basic Network 1
The OSI Model Animation
Basic Network 1
OSI Reference
Basic Network 1
OSI Reference
Basic Network 1
OSI Layers in Real World
Handwrites
a message
Reads the
message
6.Assistant
Prepares
final version
Summarizes or
translates letter
5.Secretary
Provides address
and packs letter
4.Driver
Delivers letter
to post office
Withdraws letter
from mailbox
3.Postal staff
Checks address
and sorts letter
Checks address
and sorts letter
2.Postal staff
Packs letters
for certain directions
Unpacks
packages
Loads on truck
Unloads
from truck
Opens letter
1.Postal staff
Transmission
OSI Reference
7.Manager
Pictures from Wikipedia
Basic Network 1
OSI Reference
Application Layer
Basic Network 1
The Presentation layer has three primary functions
• Coding and conversion of Application layer data to ensure that data
from the source device can be interpreted by the appropriate
application on the destination device.
• Compression of the data in a manner that can be decompressed by
the destination device.
• Encryption of the data for transmission and the decryption of data
upon receipt by the destination.
OSI Reference
Presentation Layer
Basic Network 1
• Functions at this layer create and maintain dialogs between source
and destination applications.
• Most applications, like web browsers or e-mail clients, incorporate
functionality of the OSI layers 5, 6 and 7.
OSI Reference
Session Layer
Basic Network 1
Transport Layer
OSI Reference
• Port addressing
• Segmentation and reassembly
• Connection control
• Flow control & Error control (end-to-end)
Basic Network 1
Network Layer
OSI Reference
• Logical addressing
• Routing
Basic Network 1
Data Link Layer
OSI Reference
• Framing
• Physical addressing
• Flow & Error control (hop-to-hop)
• Access control
Basic Network 1
Data Link Layer
Data 1.1 5.7
1.2
97
32
Data 1.1 5.7 97 25
Network 1
25
R1
B1
79
Network 6
Data 1.1 5.7 79 62
6.6
6.3
62
12
R3
R2
5.2
54
88
3.3
Data 1.1 5.7 54 74
5.7
Network 3
3.8
• Framing
• Physical addressing
• Flow & Error control (hop-to-hop)
• Access control
74
Network 5
OSI Reference
1.1
Basic Network 1
Physical Layer
OSI Reference
• Physical Characteristics of Interfaces and Media
• Representation of Bits
• Data Rate
• Synchronization of Bits
• Physical Topology : Ring; Star; Bus
• Transmission Mode : Simplex; Half-duplex; Full-duplex
Basic Network 1
What is a Protocol?
• Protocol is a controlled sequence
of messages that is exchanged
between two or more systems to
accomplish a given task.
• Protocol specifications define this
sequence together with the format
or layout of the messages that are
exchanged.
Basic Network 1
What is a Protocols
• Computer networking is not only to exchange bytes
• Huge system with several utilities and functions. For examples
• error detection
• Encryption
• Routing
• etc.
• For proper communication, entities in different systems must speak the
same language
• there must be mutually acceptable conventions and rules about the
content, timing and underlying mechanisms
• Those conventions and associated rules are referred as
“PROTOCOLS”
Basic Network 1
Transmission Control Protocol/Internet Protocol
• The Transmission Control
Protocol/Internet Protocol
(TCP/IP) suite of protocols
has become the dominant
standard for inter-networking.
• TCP/IP represents a set of
public standards that specify
how packets of information
are exchanged between
computers over one or more
networks.
Basic Network 1
Transmission Control Protocol/Internet
Protocol
Basic Network 1
Protocol ที่สำคัญของ TCP/IP
Basic Network 1
IP-Addressing and Subneting
• IP Address คือ ที่อยู่ (Address) ของอุปกรณ์ในระบบเครื อข่าย เปรี ยบเสมือนกับเลขที่
บ้ านของเครื่ องคอมพิวเตอร์ หรื ออุปกรณ์เครื อข่ายที่เชื่อมต่อกัน
IP Address คืออะไร
• คำถำม : ทาไมจึงไม่ใช้ MAC Address ?
• จากที่ผ่านมาเราได้ เรี ยนเกี่ยวกับ MAC Address หรื อหมายเลขประจา NIC
(Network Interface Card) หรื อ LAN Card นัน่ เองซึง่ ตัว NIC แต่ละอันก็มี
หมายเลขที่ไม่ซ ้ากัน
Basic Network 1
คำตอบ
สำเหตุที่เรำต้องมี IP Address อีกนั้นก็เพื่อ ?
• MAC Address เปลี่ยนแปลงไม่ได้ แต่ IP Address สามารถเปลี่ยนแปลงเองได้
• MAC Address ทางานในระดับของ Hardware ส่วน IP Address ทางานในระดับของ
Software ในการรับส่งข้ อมูลเราต้ องมีทงั ้ Hardware และ Software
• MAC Address ไม่สามารถจัดกลุม่ เพื่อแบ่งการใช้ งานในระบบได้
Basic Network 1
3 ระดับของ Addressing
• Host Name
Nontri.ku.ac.th
• ชื่อเครื่ อง
158.108.2.71
• Internet Address
• หมายเลข IP
0:0:c:6:13:4a
• Station Address
• เบอร์ Hardware ที่กาหนดให้ กบั NIC หรื อที่เรี ยกว่า MAC Address
Basic Network 1
IP Version 4 และ Version 6
• IP version 4 (IPv4)
• มีขนาด 4 byte
• แต่ละ byte มีขนาด 8 bit
• ดังนัน้ IPv4 จึงมีขนาดเท่ากับ 32 bit
• 32 bit ก็คือ 232 ทาให้ สามารถมีหมายเลข IP Address 4,294,967,296 หมายเลข
• 4 พันล้ านเบอร์ ไม่พอใช้ นักพัฒนาจึงพัฒนา IP เป็ น version 6 หรื อ IPv6 ที่มีขนาด 128 bit และ
เริ่ มนามาเสริ มกับ IPv4 ได้ เป็ น 2128
Basic Network 1
ส่ วนประกอบของ IP Address
Basic Network 1
IP Address Class
Basic Network 1
Note !
Basic Network 1
IPv4 แบ่ งออกเป็ น 5 Class
เหตุผลของการแบ่ง Class คือเพือ่ ให้งา่ ยต่อการจัดสรร
IP Address และจำนวนโฮสในแต่ ละ Class
Basic Network 1
ตัวอย่ ำงหมำยเลข IP Address และ
Subnet Mask
Basic Network 1
Private IP กับ Public IP
• Private IP
• หมายถึง IP Address ที่ไม่ใช้ บน Internet และไม่สามารถติดต่อกับ Public IP ได้ แต่
สามารถใช้ เทคนิค ที่เรี ยกว่า NAT (Network Address Translation) เข้ าช่วยได้
• Private IP สามารถกาหนดขึ ้นใช้ ได้ เอง โดยทัว่ ไปใช้ กบั Intranet ในหน่วยงาน
• Public IP หรืออีกนัยหนึ่งเรียกว่ ำ Real IP
• ใช้ ในเครื อข่าย Internet โดยจะต้ องขอไปยังหน่วยงานที่กากับดูแล IP Address ในแต่ละ
ประเทศ แต่ละหน่วยงานที่ขอ IP Address ต้ องได้ หมายเลขที่ไม่ซ ้า ในประเทศไทยหน่วยงานที่
กากับดูแลคือ thnic.net
Basic Network 1
ช่ วงของหมำยเลขกำรใช้ งำน Private IP
Basic Network 1
192.168.1.1/255.255.255.0 หมำยถึง
• IP Address หรื อ Host Address คือ 192.168.1.1
• Subnet Mask คือหมายเลขหลังเครื่ องหมาย "/" คือ 255.255.255.0 โดยมีความหมายว่า มี
จานวนโฮสในเน็ตเวิร์คเท่าไหร่ ใน Class C คานวณจานวนได้ โดยการนาค่าจานวน Host ID ทีม่ ี
ขนาดเท่ากับ 8 bit หรื อเท่ากับ 28 = 256 ลบด้ วยค่าสุดท้ ายของ Subnet Mask จากตัวอย่าง
คือ 256 - 0 = 256 ดังนันจึ
้ งมีจานวนโฮสทังหมดเท่
้
ากับ 256 โฮส แต่ในหนึ่งเน็ตเวิร์คจะต้ องมี
Network Address และ Broadcast Address เสมอ จึงมีโฮสเท่ากับ 254 โฮส
Basic Network 1
192.168.1.1/255.255.255.0 หมำยถึง
• Network Address บอกตาแหน่งเริ่ มต้ นของ IP Address ใน Class จากตัวอย่าง เป็ น
เน็ตเวิร์ค Class C ซึง่ มีโฮสทังหมดเท่
้
ากับ 256 โฮส โดยมี IP Address เริ่ มจาก
192.168.1.0 - 192.168.1.255 ดังนัน้ Network Address คือ
192.168.1.0
• Broadcast Address เป็ นช่องทางของการส่งข้ อมูลให้ กบั โฮสอื่นๆ เปรี ยบเสมือนการตะโกนเข้ าไป
ในห้ องที่มีคนอยู่รวมๆ กัน ซึง่ ทาให้ คนที่อยู่ในห้ องได้ ยินพร้ อมๆ กันทังหมด
้
โดย Broadcast
Address จะเป็ น IP Address สุดท้ ายของเน็ตเวิร์คเสมอ จากข้ อ 3 Broadcast
Address จึงมีคา่ เท่ากับ 192.168.1.255
Basic Network 1
รู ปแบบกำรเขียน IP Address และ Subnet Mask
• การเขียน Subnet Mask อีกอย่างคือเขียนเป็ นจานวน bit เช่น
192.168.1.1 / 24
• โดย 24 นี ้ คือ NetID จาก 32 bit ของ IPv4 ทาให้ เหลือ Host ID เท่ากับ 8 bit
(32 - 24)
• ดังนันจึ
้ งเขียน Subnet Mask เป็ น /24 ซึง่ เท่ากับการเขียนโดยระบุ Subnet Mask
255.255.255.0
• 192.168.1.1/24 = 192.168.1.1/255.255.255.0 ซึง่ ก็คือ Class C ที่
ไม่ได้ แบ่ง Subnet นัน่ เอง
Basic Network 1
Cast Study กำรจัดสรร IP Address
Basic Network 1
Case : 1
ถ้ ำไม่ แบ่ ง Subnet เลย เรำต้ องระบุให้ หมำยเลข Subnet เป็ น
Basic Network 1
กรณีที่ต้องกำรแบ่ ง Subnet นั้นมีจุดประสงค์ เพือ่ แยก
Network ออกจำกกันซึ่งจะทำให้
• เครื่ องผู้ใช้ จะมองเป็ นกันเฉพาะในกลุม่ เท่านัน้
• การ Boardcast จะเกิดเฉพาะใน Net เดียวกันเท่านัน้
• ลดการแพร่กระจาย Virus ได้
Basic Network 1
Case : 2
ต้ องกำรแบ่ ง Subnet ออกเป็ น 2 กลุ่ม
Basic Network 1
Case : 2
ต้ องกำรแบ่ ง Subnet ออกเป็ น 2 กลุ่ม
Basic Network 1
Case : 3
ต้ องกำรแบ่ ง Subnet ออกเป็ น 3 กลุ่ม
Basic Network 1
Case : 3
ต้ องกำรแบ่ ง Subnet ออกเป็ น 3 กลุ่ม
Basic Network 1
Question?
• จะแบ่ง หรื อ ไม่แบ่ง Subnet ดี ?
• ถ้ ามีการแบ่ง Subnet จะแบ่งเป็ นกี่ Subnet และเพราะอะไร จึงแบ่งแบบ
นัน้ ?
Basic Wireless
Network 1
What is IPv6 ?
คือ อินเทอร์ เน็ตโพรโตคอลรุ่นใหม่ (Internet Protocol version 6; IPv6) เพื่อทดแทน
อินเทอร์ เน็ตโพรโตคอลรุ่นเดิม โดยมีวตั ถุประสงค์ IPv6 เพื่อปรับปรุงโครงสร้ างของตัวโพรโตคอล ให้ รองรับ
หมายเลขแอดเดรสจานวนมาก และปรับปรุงคุณลักษณะอื่นๆ อีกหลายประการ ทังในแง่
้
ของประสิทธิภาพและ
ความปลอดภัยรองรับระบบแอพพลิเคชัน่ (application) ใหม่ๆ ที่จะเกิดขึ ้นในอนาคต และเพิ่ม
ประสิทธิภาพในการประมวลผล แพ็กเก็ต (packet) ให้ ดีขึ ้น ทาให้ สามารถตอบสนองต่อการขยายตัวและ
ความต้ องการใช้ งานเทคโนโลยีบนเครื อข่ายอินเทอร์ เน็ต
Basic Wireless
Network 1
Features of IPv6
• Larger Address Space
• Aggregation-based address hierarchy
– Efficient backbone routing
• Efficient and Extensible IP datagram
• Stateless Address Auto-configuration
• Security (IPsec mandatory)
• Mobility
Basic Wireless
Network 1
IPv4 and IPv6 Header Comparison
IPv6 Header
Version
IPv4 Header
Version IHL
Type of
Service
Identification
Time to Live
Protocol
Traffic
Class
Flow Label
Total Length
Flags
Fragment
Offset
Payload Length
Next
Header
Header Checksum
Source Address
Source Address
Destination Address
Options
Padding
Legend
Field’s Name Kept from IPv4 to IPv6
Fields Not Kept in IPv6
Name and Position Changed in IPv6
New Field in IPv6
Destination Address
Hop Limit
Basic Wireless
Network 1
IPv6 Extension Headers
Simpler and more efficient header means:
• IPv6 has extension headers.
• IPv6 handles the options more efficiently.
• IPv6 enables faster forwarding rate and end nodes
processing.
Basic Wireless
Network 1
Larger Address Space
IPv4
• 32 bits or 4 bytes long
•
4,200,000,000 possible addressable nodes
IPv6
• 128 bits or 16 bytes: four times the bits of IPv4
•
3.4 * 1038 possible addressable nodes
•
340,282,366,920,938,463,374,607,432,768,211,456
•
5 * 1028 addresses per person
Basic Wireless
Network 1
IPv6 Address Representation
• x:x:x:x:x:x:x:x, where x is a 16-bit hexadecimal
field
• Leading zeros in a field are optional:
• 2031:0:130F:0:0:9C0:876A:130B
• Successive fields of 0 can be represented as ::,
but only
once per address.
Examples:
2031:0000:130F:0000:0000:09C0:876A:130B
2031:0:130f::9c0:876a:130b
FF01:0:0:0:0:0:0:1 >>> FF01::1
0:0:0:0:0:0:0:1 >>> ::1
0:0:0:0:0:0:0:0 >>> ::