การแบ่งซับเน็ต IPv4
- โฮสต์ต่อซับเน็ต
- 2(32 − prefix) − 2 (/31: 2, /32: 1)
- ขนาดบล็อก
- 256 − (mask octet)
- ที่อยู่เครือข่าย
- IP AND มาสก์
- ที่อยู่บรอดคาสต์
- IP OR (NOT mask): บิตโฮสต์ทั้งหมดเป็น 1
- ซับเน็ตจาก n บิตที่ยืม
- 2n
สรุปสูตร ขั้นตอนวิธีทำที่สำคัญของทุกหัวข้อ และโจทย์ฝึก 6 ข้อ พร้อมเฉลยละเอียดไว้ท้ายเล่ม
ซับเน็ตหนึ่งใช้มาสก์ 255.255.255.252 มีที่อยู่โฮสต์ที่ใช้ได้กี่ที่อยู่ H
โฮสต์มีที่อยู่ 172.20.16.154/21 ออกเท็ตที่สาม x ของที่อยู่บรอดแคสต์ของซับเน็ตมันคือเท่าใด
ซับเน็ต IPv4 /26 มีที่อยู่โฮสต์ที่ใช้งานได้กี่ที่อยู่?
การโจมตีแบบวางยาแคช DNS (DNS cache poisoning) มีเป้าหมายเพื่อ:
ตั้งบิตให้เก็บ −96 ใน two's complement 8 บิต อ่านเป็นจำนวนไม่มีเครื่องหมาย ค่าของรูปแบบ U เป็นเท่าใด
จำนวนเต็มที่ติดลบมากที่สุด N ที่เก็บได้ใน two's complement 24 บิตคือเท่าใด
คำตอบ: H = 2
IPv4 subnetting: an address has 32 bits. The prefix /p says how many leading bits identify the network; the remaining 32 − p bits number the hosts. A subnet has 2³²⁻ᵖ addresses, but the first (network address) and last (broadcast address) cannot be given to hosts, so 2³²⁻ᵖ − 2 hosts fit. Exceptions: a /31 (point-to-point link, RFC 3021) uses both of its 2 addresses for hosts, and a /32 is one single address (a single host or a loopback).
คำตอบ: x = 23
IPv4 subnetting: an address has 32 bits. The prefix /p says how many leading bits identify the network; the remaining 32 − p bits number the hosts. A subnet has 2³²⁻ᵖ addresses, but the first (network address) and last (broadcast address) cannot be given to hosts, so 2³²⁻ᵖ − 2 hosts fit. Exceptions: a /31 (point-to-point link, RFC 3021) uses both of its 2 addresses for hosts, and a /32 is one single address (a single host or a loopback).
คำตอบ: D · 62
/26 มีบิตโฮสต์ 6 บิต: 2⁶ = 64 ที่อยู่ ลบที่อยู่เครือข่ายและบรอดแคสต์ ได้โฮสต์ที่ใช้งานได้ 62
คำตอบ: B · ทำให้รีโซลเวอร์เก็บที่อยู่ IP ปลอมสำหรับโดเมนหนึ่ง
การวางยาแทรกเรกคอร์ดปลอมลงในแคชของรีโซลเวอร์ DNSSEC เพิ่มลายเซ็นเพื่อให้รีโซลเวอร์ตรวจสอบเรกคอร์ดได้
คำตอบ: U = 160
การตั้งค่าบิต: แต่ละบิตมีค่าเป็นกำลังของสอง (128, 64, …, 1) เลขฐานสิบหกหนึ่งหลักคือสี่บิตพอดี และใน two's complement 8 บิต บิตซ้ายสุดมีค่า −128 การดำเนินการระดับบิตทำงานกับแต่ละตำแหน่งบิตแยกกัน
คำตอบ: N = −8.389 × 10⁶
ระบบเลขตามตำแหน่ง: แต่ละหลักมีค่าเท่ากับค่าของหลักนั้นคูณกำลังของฐาน ในเลขฐานสองแต่ละตำแหน่งมีค่า 1, 2, 4, 8, 16, …; ในเลขฐานสิบหก 1, 16, 256, … โดย A–F แทน 10–15 ในระบบ two's complement 8 บิต บิตซ้ายสุดมีค่า −128 แทนที่จะเป็น +128 ซึ่งเป็นวิธีเก็บจำนวนลบ
ExamProblems · examproblems.com/courses/computer-networks