Topics Computer Addressing The / Layers and Addresses Computer and Data Communication Laboratory I 2 The Internet Communication The / Layers and Addresses 4
Protocol Layers / Protocol Stack OSI and / SMTP FTP HTTP DNS SNMP BOOTP UDP IGMP ICMP ARP RARP Data Data Link Link Underlying LAN / WAN Ethernet MAC Technology 5 6 Layers Communication Each layer communicate with the same layer from host to host The layer didn t know how the lower layer communicate / communication communication Port / : Socket Process Process Process PORT Data link MAC Data link Process 7 8
Protocol Data Unit Layer s PDU Protocol encapsulates data to PDU PDU = Protocol Information + Data s Message Protocol Information usually called header PDU size must shorter than protocol s MTU (Maximum Transfer Unit) UDP Segment Segment header Protocol Information Data Packet Packet Packet Packet Protocol destination address Protocol source address Data Data Link Link Ethernet MAC Frame Frame Frame Frame Frame Frame Frame Frame Others protocol information 9 10 Segmentation Addressing Layer s address Every PDU labeled with protocol address & protocol information Segmentation must add higher layer address in each segment s UDP PORT Layer 1 L1,Des. L1,Src. Data socket Layer 2 L2,Des. L2,Des. L2,Src. L2,Src. L1,Des. L1,Des. L1,Src. L1,Src. Segment 1 Data Segment 2 Data Data Data Link Link Ethernet MAC MAC Address 11 12
Layer s header Communication s Message communicate with its message To communicate application only know which application to send to and receive from UDP Segment Packet App. App. Data Data Link Link Ethernet MAC MAC Frame 13 14 Communication communicate with its segment and use as communication address To communicate trans layer only know which to send to and receive from Communication communicate with its packet and use as communication address To communicate trans layer only know which to send to and receive from 15 16
Internet Protocol Communication Layer and Connection Internet Protocol work on network layer Use address to communicate through network address group to network Each network connected by Router switch/hub LAN / L2 Router / L3 Internet Router / L3 10.40.60.21 10.40.60.22 10.20.20.2 10.20.20.4 Router switch/hub LAN / L2 Router / L3 10.20.30.21 10.20.30.22 17 LAN Ethernet / MAC LAN Fiber WAN Lease Line / Frame relay switch/hub LAN / L2 18 End host sending Router sending Use destination to send data to Host check destination even is in the same network Same network send data to host directly Not in the same network send data to router Router connected more than one network When receive destination, it find out which network that s the way to send out to reach it s destination Router use the Routing Information routing table to forward network network Internet forward network network 19 20
Hostname & ping www.nu.ac.th Who is www.nu.ac.th? 10.20.20.30 ping 10.20.20.30 DNS www.nu.ac.th 10.20.20.30 Each node has it s unique name and address DNS service mapping to name and name to Host use to create packet as the destination address 22 The Address Router s Address 32 bits 00001010 00010100 00010100 00011110 8 bits 8 bits 8 bits 8 bits 10.20.20.30 Write in 8 bit-decimal block Dot-Decimal notation 32 bits unique address any interface has it s own unique address Dot-Decimal notation is easily to read and write. 10.40.60.21 10.40.60.22 10.40.60.1 10.20.20.2 10.20.20.4 10.20.20.1 Internet 203.200.182.34 address associated with interface not machine Each machine can have more than one interface 1 by 1 or 1 to many mapping MAC to Address 23 24
Addressing Concept Partition into 2 fields Address (define a ) Node Address (specific a device on the network) 10.40.60.21 10.40.60.22 10.20.20.2 10.20.20.4 10.20.30.21 10.20.30.22 Address 8 / 16 / 24 from NIC assign to network 32 bits Host assign to machine Interface 32 bits divided to address and Host address address refer to number Host address refer to Host number on 25 26 Address Class 8 16 24 32 Class A 0 ID Host ID Class B 10 ID Host ID Class C 110 ID Host ID Class D Class E 1110 11110 Multicast Address Reserved Address Class A 0. 0. 0. 0 0.0.0.0 to 127.0.0.0 0 to 127 128. 0. 0. 0 Class B 128.0.0.0 to 191.255.0.0 128 to 191 0 to 255 Class C 192.0.0.0 to 223.255.255.0 Class D Class E 192. 0. 0. 0 192 to 223 0 to 255 0 to 255 224. 0. 0. 0 240. 0. 0. 0 Class D and E has no and Host ID 27 28
Number of and Host Special Addresses Reserved Addresses those are not assigned to any node Class Number of s Number of Hosts A 2 7 2 = 126 2 24 2 = 16,277,214 B 2 14 2 = 16,384 2 16 2 = 65,534 C 2 21 2 = 2,097,152 2 8 2 = 254 D Not applicable Not applicable E Not applicable Not applicable Net ID Any Any All 1s All 0s Host ID All 0s All 1s All 1s All 0s 127 Any Purpose Address Directed Broadcast Address Limited Broadcast Address This Host on this Loopback Address 29 30 Address Class Class A Address that s s assigned to network 10.0.0.1 10.0.0.2 : 10.0.0.0 Broadcast : 10.255.255.255 Class Class C 202.1.4.1 202.1.4.2 Class Class B 160.1.0.1 160.1.0.2 : 160.1.0.0 Broadcast : 160.1.255.255 Directed Broadcast Address Address for broadcast on subnetwork 200.0.1.255 200.0.1.1 200.0.1.2 200.0.1.4 Broadcast to a specific subnet Router forwards directed broadcast address to the subnet : 202.1.4.0 Broadcast : 202.1.4.255 31 200.0.1.3 32
Limited Broadcast Address Address for broadcast on owned network This Host on this Address Address for unassigned node on network Bootstrap Server 200.0.1.1 200.0.1.2 200.0.1.4 Broadcast to all host on it s own network Router not allowed limited broadcast forward to others subnet diskless client use 0.0.0.0 as a source for Bootp Router use 0.0.0.0 as a default network for routing 255.255.255.255 * Class E address source destination 0.0.0.0 255.255.255.255 200.0.1.3 33 34 Loopback Address Pseudo address as host s s own address Process 1 Process 2 Datalink Host use loopback to talk to it s own service Most system use 127.0.0.1 as loopback and names localhost Loopback packet never leaves it s machine Private Address Space Addresses those use for private network Class A 10.0.0.0 1 B 172.16.0.0 to 172.31.0.0 16 Number C 192.168.0.0 to 192.168.255.0 256 RFC 1918 defines special blocks that will be isolated from Internet. Any one can use without any permission. Use for Isolated, Experiment, Internal or Security 35 36
Problem with class assignment A E B D C Class A takes 50% range Class B takes 25% range Class C takes 12.5% range Problems address wasteful (specially in class A) running out of address How to assigns address RFC 1466 Class A : no allocation at this time Class B : Allocation will be restricted to apply Organization that has more than 32 subnets Organization that has more than 4096 hosts Class C: divided to regional blocks 37 38 Question? Lab Work การแปลงเลขฐาน 2 และ 10 decimal notation 128 32 8 2 64 16 4 1 1 1 1 1 1 1 1 1 ฝ กแปลงกล บระหว างเลขฐาน 10 และฐาน 2 40
Lab Work จงบอก ของ class network address broadcast address first host address last host address............... 41