第四章 IP地址 子网划分 VLSM CIDR Purpose: This chapter reviews the physical layer and describes how to cable various network devices. Timing: This chapter takes.

Slides:



Advertisements
Similar presentations
广州市教育局教学研究室英语科 Module 1 Unit 2 Reading STANDARD ENGLISH AND DIALECTS.
Advertisements

Chapter 2 Combinatorial Analysis 主講人 : 虞台文. Content Basic Procedure for Probability Calculation Counting – Ordered Samples with Replacement – Ordered.
高考短文改错专题 张柱平. 高考短文改错专题 一. 对短文改错的要求 高考短文改错的目的在于测试考生判断发现, 纠正语篇中 语言使用错误的能力, 以及考察考生在语篇中综合运用英 语知识的能力. 二. 高考短文改错的命题特点 高考短文改错题的形式有说明文. 短文故事. 书信等, 具有很 强的实用性.
高考英语阅读分析 —— 七选五. 题型解读: 试题模式: 给出一篇缺少 5 个句子的文章, 对应有七个选项,要求同学们根据文章结构、 内容,选出正确的句子,填入相应的空白处。 考查重点: 主要考查考生对文章的整体内容 和结构以及上下文逻辑意义的理解和掌握。 (考试说明) 选项特点: 主旨概括句(文章整体内容)
期末考试作文讲解 % 的同学赞成住校 30% 的学生反对住校 1. 有利于培养我们良好的学 习和生活习惯; 1. 学生住校不利于了解外 界信息; 2 可与老师及同学充分交流有 利于共同进步。 2. 和家人交流少。 在寄宿制高中,大部分学生住校,但仍有一部分学生选 择走读。你校就就此开展了一次问卷调查,主题为.
英语中考复习探讨 如何写好书面表达 宁波滨海学校 李爱娣. 近三年中考试题分析 评分标准 试卷评分与练习 (2009 年书面表达为例 ) 影响给分的因素: 存在问题 书面表达高分技巧 建议.
2014 年上学期 湖南长郡卫星远程学校 制作 13 Getting news from the Internet.
Time Objectives By the end of this chapter, you will be able to
第 8 章 IP 基礎與定址.
F1 VISA APPLICATION F1学生赴美留学签证申请流程.
Unit 9 Have you ever been to an amusement park? Section A.
-CHINESE TIME (中文时间): Free Response idea: 你周末做了什么?
计算机网络教程(第 2 版) 第 7 章 网络互连 课件制作人:谢希仁.
专题八 书面表达.
How can we become good leamers
自衛消防編組任務職責 講 義 This template can be used as a starter file for presenting training materials in a group setting. Sections Right-click on a slide to add.
Lesson 8 Students: 2-3 students in one group
NetGuru 創新 網路通訊實驗教學解決方案 PART I TCP/IP通訊協定深入剖析/以NetGuru實作
第3章 局域网互连 3.1 网络互连的层次 3.2 网络互连的设备 3.3 实例教学 3.4 VLAN路由配置 3.5 VPN互连远程局域网.
Routing Protocols and Concepts – Chapter 3
“通信工程基础” 主讲教师:姚玉坤 副教授 承担单位:重庆邮电大学通信与信息工程学院 —通信网络教研中心 办公地点:逸夫科技楼三楼
摘要的开头: The passage mainly tells us sth.
How can we be a member of the Society? You should finish the following tasks if you want to be a member of the Birdwatching Society.
Subnetting/Supernetting and Classless Addressing
Welcome Welcome to my class Welcome to my class!.
Homework 4 an innovative design process model TEAM 7
Module 5 Shopping 第2课时.
第 6 章 IP 位址 著作權所有 © 旗標出版股份有限公司.
網路技術管理進階班---網路連結 講師 : 陳鴻彬 國立東華大學 電子計算機中心.
Calling about an apartment for rent II Objectives
Guide to Freshman Life Prepared by Sam Wu.
第4章 网络互联与广域网 4.1 网络互联概述 4.2 网络互联设备 4.3 广域网 4.4 ISDN 4.5 DDN
创建型设计模式.
Chapter 11 Unicast Routing Protocols
Time Objectives By the end of this chapter, you will be able to
第14章 竞争市场上的企业 上海杉达学院 国贸系.
校園網路架構介紹與資源利用 主講人:趙志宏 圖書資訊館網路通訊組.
第5讲 网络层 本讲目的: 概述: 理解网络层服务原理: 因特网的实现实例 网络层的服务 路由选择原理 分层的路由选择 IP协议
客户服务 询盘惯例.
Unit Three On Price next.
Lesson 44:Popular Sayings
中国农村沼气政策与发展战略 李景明 中国北京 农业部科技发展中心能源生态处处长 中国沼气学会秘书长.
Chapter 3 Nationality Objectives:
Try to write He Mengling Daqu Middle School.
基于课程标准的校本课程教学研究 乐清中学 赵海霞.
Mechanics Exercise Class Ⅰ
Unit 8 Our Clothes Topic1 What a nice coat! Section D 赤峰市翁牛特旗梧桐花中学 赵亚平.
Guide to a successful PowerPoint design – simple is best
BORROWING SUBTRACTION WITHIN 20
滕小玲 北京大学计算中心 IPv6技术讲座 现有Internet的基础是IPv4,到目前为止有近20年的历史了。由于Internet的迅猛发展,据统计平均每年Internet的规模就扩大一倍。IPv4的局限性就越来越明显。个人电脑市场的急剧扩大、还有个人移动计算设备的上网、网上娱乐服务的增加、多媒体数据流的加入、以及出于安全性等方面的需求都迫切要求新一代IP协议的出现。
虚 拟 仪 器 virtual instrument
傳輸控制協議 /互聯網協議 TCP/IP.
中央社新聞— <LTTC:台灣學生英語聽說提升 讀寫相對下降>
关联词 Writing.
高考应试作文写作训练 5. 正反观点对比.
TEEN CHALLENGE Next Steps 核心价值观总结 CORE VALUES 青年挑战核心价值观
Distance Vector vs Link State
计算机问题求解 – 论题1-5 - 数据与数据结构 2018年10月16日.
Chapter 10 Mobile IP TCP/IP Protocol Suite
M; Well, let me check again with Jane
名词从句(2).
Distance Vector vs Link State Routing Protocols
2 Number Systems, Operations, and Codes
怎樣把同一評估 給與在不同班級的學生 How to administer the Same assessment to students from Different classes and groups.
Hospitality English 酒店商务英语 讲师:罗云利 工商与公共管理学院.
研究发现: 绵羊记忆力惊人!.
Views on the News 不同的观点 选自《多维阅读第11级》.
二项式的分解因式 Factoring binomials
991 中大英語自學小組 English Study Group
Section 1 Basic concepts of web page
Presentation transcript:

第四章 IP地址 子网划分 VLSM CIDR Purpose: This chapter reviews the physical layer and describes how to cable various network devices. Timing: This chapter takes approximately 1 hour to present. Note: This section has a cabling laboratory exercise at the end. Contents: Objectives—This section explains what the student will be able to do at the end of this chapter. TCP/IP Overview—This section describes the TCP/IP protocol stack. TCP/IP Application Layer Overview—This section describes the application protocols. TCP/IP Transport Layer Overview—This section describes TCP and UDP. TCP/IP Internet Layer Overview—This section describes IP and other Internet layer protocols. TCP/IP Address Overview—This section describes IP addressing. Configuring IP Addresses—This section describes how to address an IOS device with IP Interconnecting Networks—This section describes how to interconnect separate VLANs and WANs With TCP/IP. Written Exercise—This section has students work with IP addresses in binary format.

本章目标 通过本章学习,您应该掌握以下内容: 掌握IP地址分类,子网掩码的作用,识别网络标识号、主机标识号,子网的数目、主机的数目, 掌握VLSM和CIDR的概念 Purpose: This figure states the chapter objectives. Emphasize: Read or state each objective so each student has a clear understanding of the chapter objectives.

十进制和二进制的转换 128 64 32 16 8 4 2 1 1 0 0 0 0 0 0 0 = 128 1 1 0 0 0 0 0 0 = 192 1 1 1 0 0 0 0 0 = 224 1 1 1 1 0 0 0 0 = 240 1 1 1 1 1 0 0 0 = 248 1 1 1 1 1 1 0 0 = 252 1 1 1 1 1 1 1 0 = 254 1 1 1 1 1 1 1 1 = 255 Purpose: This figure explains how subnet masks are converted to decimal addresses. Emphasize: Review binary-to-decimal conversion, bit weighting, and conversion. Explain logical AND. One possible explanation of logical AND follows: We will need to be able to perform a logical AND on the binary numbers. Just take two binary numbers and place one above the other. The ones in the bottom are like a pipe—the number above it just drops through. The zeros are like a clogged pipe, so nothing comes out in the answer. Presenting a truth table will help some students understand. You might need to give more than one explanation. Note: You might want to hand out a binary-to-decimal conversion sheet if you have not already done so. We have not included one in the lab section. It is more useful to have one that is on a separate page from the labs.

255 255 255 IP 地 址 255 32 bits Dotted Decimal Network Host Maximum Layer 1 of 3: Purpose: This figure show the general format of an IP address. In layer 1, the address is 32 bits with a network and host portion.

IP 地 址 32 bits Dotted Decimal Network Host 255 255 255 255 Maximum 1 8 9 16 17 24 25 32 11111111 11111111 11111111 11111111 Layer 3 of 3: In layer 2, one can convert the address to binary. Binary 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1

IP 地 址 32 bits Dotted Decimal Network Host 255 255 255 255 Maximum 1 8 9 16 17 24 25 32 11111111 11111111 11111111 11111111 Layer 3 of 3: In layer 3, an example of dotted-decimal format and binary are displayed. Emphasize: IP address format is dotted-decimal. Dotted-decimal makes it easy to work with IP addresses. However, in this course we will work with the addresses on the bit level, so we will convert these addresses into binary, make changes to them, and convert them back. The central authority for addresses is the Internet Assigned Numbers Authority. Note: This most common form of addressing reflects the widely used IP version 4. Faced with the problem of depleting available addresses, Internet Engineering Task Force (IETF) work is under way for a backward-compatible next generation of IP (IPng, also called IP 6). IP 6 will offer expanded routing and addressing capabilities with 128-bit addresses rather than the 32-bit addressing shown on the graphic. Addresses from both IP versions will coexist. Initial occurrences will probably be at locations with address translator software and firewalls. Binary 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 172 16 122 204 Example Decimal 10101100 00010000 01111010 11001100 Example Binary

IP 地址分类 Class A: Class B: Class C: Class D: 多播地址 Class E: 科研用 8 bits Network Host Network Host Network Host Purpose: This graphic describes the three most common classes of IP address. Emphasize: Discuss classes of addresses. Each address contains information about the network number and the host number of the device. Class A addresses are for very large organizations. Class B addresses are for smaller organizations, and Class C addresses for even smaller ones. As the number of networks grows, classes may eventually be replaced by another addressing mechanism, such as classless interdomain routing (CIDR). RFC 1467, Status of CIDR Deployment in the Internet, presents information about CIDR. RFC 1817, CIDR and Classful Routing, also presents CIDR information.

IP 地址分类 Class A: Class B: Class C: Class D: 1 8 9 16 17 24 25 32 Bits: 0NNNNNNN Host Host Host Class A: 范围 (1-126) 1 8 9 16 17 24 25 32 Bits: 10NNNNNN Network Host Host Class B: Emphasize: Highlight the fixed values that start each class address. The first octet rule states that when an address falls into a specified range, it belongs to a certain class. Students should soon be able to recognize the address class of any IP address on sight. Note: If time or interest permits, you can use the initial bit patterns in the first octet and show how a class of IP network derives the range of network numbers for that IP address class. 范围 (128-191) 1 8 9 16 17 24 25 32 Bits: 110NNNNN Network Network Host Class C: 范围 (192-223) 1 8 9 16 17 24 25 32 Bits: 1110MMMM Multicast Group Multicast Group Multicast Group Class D: 范围 (224-239)

特殊IP地址 一些特殊的IP 地址: 1.IP 地址127.0.0.1:本地回环(loopback)测试地址 2.广播地址:255.255.255.255 3.IP 地址0.0.0.0:代表任何网络 4.节点号全为1:代表该网段的所有主机 广播地址TCP/IP 协议规定,主机号部分各位全为1 的IP 地址用于广播.所谓广播地址指同时 向网上所有的主机发送报文,也就是说,不管物理网络特性如何,Internet 网支持广播传输.如136.78.255.255 就是B 类地址中的一个广播地址,你将信息送到此地址,就是将信息送给网络号为136.78 的所有主机.

私有IP地址 私有IP地址: 1.A 类地址中:10.0.0.0 到10.255.255.255 2.B 类地址中:172.16.0.0 到172.31.255.255 3.C 类地址中:192.168.0.0 到192.168.255.255

计算可用的主机地址 网络 主机 172 16 0 0 N 10101100 00010000 00000000 00000000 1 16 15 14 13 12 11 10 9 00000000 8 7 6 5 4 3 2 1 00000001 2 00000000 00000011 3 ... ... ... Purpose: This figure explains how to calculate the number of available hosts in a network. Emphasize: 2N-2 is the calculation to determine available hosts. N is the number of binary digits in the host field. Subtract 2 because a host cannot be all 0s or 1s. The same principal applies when determining the number of available networks. 11111111 11111101 65534 11111111 11111110 65535 11111111 11111111 65536 - 2 2N-2 = 216-2 = 65534 65534

IP地址分类练习 地址 类别 网络 主机 10.2.1.1 128.63.2.100 Layer 1 of 2: Purpose: This exercise verifies that the students understand IP address classes, network numbers, and host numbers. Give the students time to list the address class, network, and host number for each IP address in the table. Review the correct answers interactively. The answers are given in the following figure. 201.222.5.64 192.6.141.2 130.113.64.16 256.241.201.10

IP地址分类练习 (答案) 地址 类别 网络 主机 10.2.1.1 A 10.0.0.0 0.2.1.1 128.63.2.100 B 128.63.0.0 0.0.2.100 Layer 2 of 2: Purpose: This answers to the exercise are given in the figure. Note: Students can also find the answers to this exercise in the “Answers” appendix. 201.222.5.64 C 201.222.5.0 0.0.0.64 192.6.141.2 C 192.6.141.0 0.0.0.2 130.113.64.16 B 130.113.0.0 0.0.64.16 256.241.201.10 Nonexistent

子网划分的好处 1.缩减网络流量 2.优化网络性能 3.简化管理 4.更为灵活地形成打覆盖范围的网络

不设子网的地址 172.16.0.1 172.16.0.2 172.16.0.3 172.16.255.253 172.16.255.254 Purpose: This figure explains what networks look like without subnets. Without subnets, use of network addressing space is inefficient. The Class B network is like a highway with no exits—there is no place to exit, so all of the traffic is in one line. …... 172.16.0.0 网络 172.16.0.0

设置子网的地址 172.16.3.0 172.16.4.0 Purpose: This figure describes network structure when subnets are used. Emphasize: The host bits of an IP address can be subdivided into a subnetwork section and a host section. The subnetwork section in this example is the full third octet. Point out the difference in the addressing between the previous slide and this slide. A subnetted address space is like a highway with exits. A network device uses a subnet mask to determine what part of the IP address is used for the network, the subnet, and the device ID. A subnet mask is a 32-bit value containing a number of one bits for the network and subnet ID and a number of zero bits for the host ID. Given its own IP address and subnet mask, a device can determine if an IP packet is destined for 1) a device on its own subnet, 2) a device on a different subnet on its own network, or 3) a device on a different network. A device can determine what class of address the device has been assigned from its own IP address. The subnet mask then tells the device where the boundary is between the subnet ID and the host ID. 172.16.1.0 172.16.2.0 网络 172.16.0.0

缺省情况下的子网掩码 缺省情况下子网未划分 网络 主机 网络号 172.16.2.160 10101100 00010000 00000010 10100000 255.255.0.0 11111111 11111111 00000000 00000000 00000000 00000000 Purpose: This graphic explains how routers use addresses that have no subnet mask. Emphasize: Explain how masking works at the bit level. Zero bits mask host information. Note: This is an easy place to lose students. At this point, they need to learn several abstract mathematical concepts before we can show them how to lay out an IP-addressed network. To the novice these techniques may seem unrelated, making the presentation confusing. To a more experienced audience, these techniques will be familiar. 10101100 00010000 网络号 172 16 缺省情况下子网未划分

子网地址 172.16.2.200 172.16.3.5 172.16.3.1 E1 172.16.2.2 E0 172.16.3.100 172.16.2.1 172.16.2.160 172.16.3.150 Layer 1 of 2: Purpose: This figure shows what would happen if there were no subnetting. Emphasize: If networks could not be broken down into more granular, subnetworks few networks could exist, each with a capacity for many hosts. 新路由表 172.16 . 2 . 160 网络 端口 网络 主机 172.16.0.0 E0 E1

子网地址 172.16.2.200 172.16.3.5 172.16.3.1 E1 172.16.2.2 E0 172.16.3.100 172.16.2.1 172.16.2.160 172.16.3.150 Layer 1 of 2: Emphasize: By turning on more bits in the mask, we reserve some bits as network information and can use these bits to describe subnetworks. Describe how the router makes use of this technique. Point out that there is more information in the routing table now. Note: As you enter the discussion about subnet masks, a question might arise about whether it is legal to define a discontiguous subnet mask. A discontiguous subnet mask consists of intervening zeros, as in 101111011000, rather than all ones followed by zeros, as in 1111111100000000. The question has two answers. According to RFC 950 that describes IP, a discontiguous subnet mask is legal. However, the hardware expense to produce an interface that supports discontiguous masking is cost-prohibitive. Thus in practice it is not supported on most vendors’ equipment, including Cisco. Also, discontiguous masking has no benefit, and it is much more difficult to maintain a network based on this design. Later RFCs make noncontiguous subnet masks illegal because they are incompatible with future addressing schemes such as CIDR. 新路由表 172.16 . 2 . 160 网络 端口 网络 子网 主机 172.16.2.0 172.16.3.0 E0 E1

子网掩码 172 16 255 255 255 Network Host IP Address Network Host IP Address Network Host Default Subnet Mask 255 255 11111111 11111111 00000000 00000000 A:/8 10.0.0.0 255.0.0.0>10.0.0.0/8 172.16.0.0 255.255.0.0>172.16.0.0/16 “/16” 表示子网掩码有16位. Network Subnet Host 8-bit Subnet Mask 255 “/24”表示子网掩码有24位.

利用子网掩码划分子网 扩展了8位地址的网络 网络 子网 主机 网络号 172.16.2.160 10101100 00010000 00000010 10100000 255.255.255.0 11111111 11111111 11111111 00000000 Purpose: This figure shows how the router determines an address when subnetting is used. Emphasize: This example makes a Class B address space look like a collection of Class C address spaces. Now the logical AND allows us to extract the subnet number as well as the assigned network number. An exercise follows that tests the students’ understanding of subnet masks. 10101100 00010000 00000010 00000000 128 192 224 240 248 252 254 255 网络号 172 16 2 扩展了8位地址的网络

利用子网掩码划分子网 扩展了10位地址的网络 网络 子网 主机 网络号 172.16.2.160 10101100 00010000 00000010 10100000 255.255.255.192 11111111 11111111 11111111 11000000 Purpose: This figure shows how the router determines an address when subnetting is used. Emphasize: This example is different from the previous example in that the the subnet and host are divided within an octet. Transition: An exercise follows that tests the students’ understanding of subnet masks. 10101100 00010000 00000010 10000000 128 192 224 240 248 252 254 255 128 192 224 240 248 252 254 255 网络号 172 16 2 128 扩展了10位地址的网络

子网划分的核心思想 “借用”主机位来“制造”新的“网络”

划分子网方法 划分子网方法: 1.你所选择的子网掩码将会产生多少个子网?:2 的x 次方(x 代表掩码位数) 2.每个子网能有多少主机?: 2 的y 次方-2(y 代表主机位数) 3.有效子网是?:有效子网号=256-10 进制的子网掩码(结果叫做block size 或base number) 4.每个子网的广播地址是?:广播地址=下个子网号-1 5.每个子网的有效主机分别是?:忽略子网内全为0 和全为1 的地址剩下的就是有效主机地址. 最后有效1 个主机地址=下个子网号-2(即广播地址-1)

C类地址子网划分例子 网络地址192.168.10.0;子网掩码255.255.255.192(/26) 1.子网数=2*2=4 2.主机数=2 的6 次方-2=62 3. 有效子网?:block size=256-192=64; 所以第一个子网为192.168.10.0, 第二个为192.168.10.64,最后一个为192.168.10.192 4.广播地址:下个子网-1.所以第一个子网的广播地址是192.168.10.63,第二个是192.168.10.127,最后一个是192.168.10.255 5.有效主机范围是:第一个子网的主机地址是192.168.10.1 到192.168.10.62;第二个是192.168.10.65 到192.168.10.126;最后一个是192.168.10.193到192.168.10.254

B类地址子网划分例子1 例子1:网络地址:172.16.0.0;子网掩码255.255.192.0(/18) 1.子网数=2*2=4 2.主机数=2 的14 次方-2=16382 3.有效子网?:block size=256-192=64;所以第一个子网为172.16.0.0,第二个为172.16.64.0,最后1 个为172.16.192.0 4.广播地址:下个子网-1.所以第一个子网的广播地址是172.16.63.0,第二个为172.16.127.0,最后一个为172.16.255.0 5.有效主机范围是:第一个子网的主机地址是172.16.0.1 到172.16.62.254;第二个是172.16.64.1 到172.16.126.254;最后一个是172.16.192.1到172.16.254.254

B类地址子网划分例子2 B 类地址例子2:网络地址:172.16.0.0;子网掩码255.255.255.224(/27) 2.主机数=2 的5 次方-2=30 3. 有效子网?:block size=256-224=32; 所以第一个子网为172.16.0.0, 第二个为172.16.0.32,最后一 个为172.16.255.224 4.广播地址:下个子网-1.所以第一个子网的广播地址是172.16.0.31,第二个为172.16.0.63,最后一个为172.16.255.255 5.有效主机范围是:第一个子网的主机地址是172.16.0.1到172.16.0.30;第二个是172.16.0.33到172.16.0.62最后1 个是172.16.255.225 到172.16.255.254

变长子网掩码(VLSM) 变长子网掩码(Variable-Length Subnet Masks,VLSM)的出现是打破传统的以类(class)为标准的地址划分方法,是为了缓解IP 地址紧缺而产生的 作用:节约IP 地址空间;减少路由表大小. 注意事项:使用VLSM 时,所采用的路 由协议必须能够支持它,这些路由协议包括RIPv2,OSPF,EIGRP 和BGP.

VLSM预备知识-前缀 地址范围: 192.168.1.64 - 192.168.1.79 前缀长度为/28 192.168.1.64/28 第四个8位位组 64 01000000 65 01000001 66 01000010 67 01000011 68 01000100 69 01000101 70 01000110 71 01000111 72 01001000 73 01001001 74 01001010 75 01001011 76 01001100 77 01001101 78 01001110 79 01001111

VLSM的实现(1)

需求 1.D 需要2 个VLAN,然后每个VLAN 容纳200 个用户. 2.A,B 和C 连接3 个以太网,分别用1 个24 口的交换机相连 D—S0—172.16.1.0/24 D—S0—172.16.2.0/24 255.255.255.11100000 A—E0—172.16.0.0/27 B—E0—172.16.0.32/27 C—E0—172.16.0.64/27

VLSM的实现(2)

VLSM的实现(3)

VLSM的实现(4)

VLSM的实现(5)

VLSM的实现(6)

无类域间路由 (CIDR) CIDR的概念:忽略A、B、C类网络的规则,定义前缀相同的一组网络为一个块,即一条路由条目。(如:199.0.0.0/8)

CIDR的优点 减少了网络数目,缩小了路由选择表 从网络流量、CPU和内存方面说,开销更低 对网络进行编址时,灵活性更大

CIDR例子

CIDR计算方法

本章总结 通过本章学习,您应该掌握以下内容: 掌握IP地址分类,子网掩码的作用,识别网络标识号、主机标识号,子网的数目、主机的数目, 掌握VLSM和CIDR的概念 Purpose: This figure states the chapter objectives. Emphasize: Read or state each objective so each student has a clear understanding of the chapter objectives.