ip address and subnetting for new users - 015-DM
锐捷交换机实验手册

锐捷交换机实验手册四川华迪信息技术有限公司baby lai交换机配置新手篇:正确连接和初级配置第一步:利用电脑超级终端与交换机建立连接可进行网络管理的交换机上有一个“Console”端口,它是专门用于对交换机进行配置和管理的。
可以通过Console端口连接和配置交换机。
用Cisco自带的Console线,RJ-45端接入Cisco交换机Console口,Com口端接入电脑Com1或Com2口,必须注意的是要记清楚接入的是那个Com口。
按照步骤开启超级终端:开始-程序-附件-通讯-超级终端(图2)点击文件-新建连接(图3)输入超级终端名称,选择数据线所连端口(注意选择Com口时候要对应Console线接入电脑的Com口):图4确定-点击还原为默认值(图5)确定后开启交换机此时交换机开始载入IOS,可以从载入IOS界面上看到诸如IOS版本号,交换机型号,内存大小等数据当屏幕显示Press RETURN to get started的时候按回车就能直接进入交换机。
第二步:学习交换机的一些初级命令首先我们要知道Cisco配置界面分两种,一种是基于CLI(Command-line Interface命令行界面),一种是基于IOS(Internetwork Operting System互联网操作系统)。
暂时我们先探讨基于IOS的Cisco交换机。
基于IOS的交换机有三种模式,“>”用户模式,“#”特权模式,“(CONFIG)#”全局模式,在用户模式输入enable进入特权模式,在特权模式下输入disable回到用户模式,在特权模式下输入configure terminal进入全局模式。
在特权模式下输入disable回到特权模式下。
刚进入交换机的时候,我们处于用户模式,如:switch>。
在用户模式我们可以查询交换机配置以及一些简单测试命令。
在用户模式输入?号可以查询可以运行的命令。
出现命令过多不能全部显示可以用Enter键逐行显示,空格键整页翻动。
IP地址、子网掩码和域名知识

很明显,这些数字对于人来说不太好记忆。人们为了方便记忆,就将组成计算机的IP地址的32位二进制分成四段,每段8位,中间用小数点隔开,然后将每八位二进制转换成十进制数,这样上述计算机的IP地址就变成了:210.73.140.2。
二、IP地址的分类
*有限广播
前面提到的广播地址包含一个有效的网络号和主机号,技术上称为直接广播(directed boradcasting)地址。在网间网上的任何一点均可向其他任何网络进行直接广播,但直接广播有一个缺点,就是要知道信宿网络的网络号。
有时需要在本网络内部广播,但又不知道本网络网络号。TCP/IP规定,32比特全为"1"的网间网地址用于本网广播,该地址叫做有限广播地址(limited broadcast address)。
三、IP的寻址规则
1、网络寻址规则
A、网络地址必须唯一。
B、网络标识不能以数字127开头。在A类地址中,数字127保留给内部回送函数。
C、网络标识的第一个字节不能为255。数字255作为广播地址。
D、网络标识的第一个字节不能为"0","0"表示该地址是本地主机,不能传送。
2、主机寻址规则
A、主机标识在同一网络内必须是唯一的。
因此,迫切需要寻求新的技术,以应付网间网规模增长带来的问题。仔细分析发现,网间网规模的增长在内部主要表现为网络地址的增减,因此解决问题的思路集中在:如何减少网络地址。于是IP网络地址的多重复用技术应运而生。通过复用技术,使若干物理网络共享同一IP网络地址,无疑将减少网络地址数。
子网编址(subnet addressing)技术,又叫子网寻径(subnet routing),英文简称subnetting,是最广泛使用的IP网络地址复用方式,目前已经标准化,并成为IP地址模式的一部分。
如何设置局域网的IP地址和子网掩码

如何设置局域网的IP地址和子网掩码一、局域网的IP地址和子网掩码的概念和作用在探索如何设置局域网的IP地址和子网掩码之前,我们需要先了解局域网、IP地址和子网掩码的概念和作用。
1. 局域网(Local Area Network,LAN):局域网是指在一个相对较小的范围内,例如办公室、学校或家庭中的一组计算机和网络设备互相连接并共享资源的计算机网络。
它可以用于实现内部办公、文件共享、打印等功能。
2. IP地址(Internet Protocol Address):IP地址是计算机在互联网上的唯一标识,用于确定计算机之间的通信。
它由32位(IPv4)或128位(IPv6)二进制数组成,通常以点分十进制表示(例如192.168.0.1)。
在局域网中,每台计算机都需要有一个独立的IP地址,以便在局域网内进行通信。
IP地址由网络部分和主机部分组成,其中网络部分用于区分不同的网络,主机部分用于标识局域网中的具体计算机。
3. 子网掩码(Subnet Mask):子网掩码用于确定IP地址中哪部分是网络部分,哪部分是主机部分。
它和IP地址一起使用,用于在局域网中进行IP地址的分类和划分。
子网掩码也是32位(IPv4)或128位(IPv6)二进制数,通常与IP地址以同样的格式表示(例如255.255.255.0)。
子网掩码通过与IP地址进行逻辑与运算,可以将IP地址划分为网络地址和主机地址两部分,以便于路由器在局域网中正确转发数据包。
二、设置局域网的IP地址和子网掩码的步骤接下来,我们将介绍如何设置局域网的IP地址和子网掩码的步骤。
1. 确定网络需求和规划:在设置IP地址和子网掩码之前,我们需要先确定局域网的具体需求和规划。
例如,确定局域网所使用的IP地址范围、需要分配给每台计算机的IP地址数量等。
2. 登录网络设备管理界面:在设置IP地址和子网掩码之前,我们需要登录到网络设备的管理界面。
这通常需要使用路由器的登录用户名和密码。
网络IP地址的自动化配置技术

网络IP地址的自动化配置技术自动化配置网络IP地址是指通过使用特定的技术和协议,使计算机或其他网络设备能够自动获得可用的IP地址,并完成与网络的连接。
这项技术的发展和应用,大大简化了网络管理和配置的过程,提高了网络的灵活性和可扩展性。
本文将介绍几种常见的网络IP地址自动化配置技术。
一、动态主机配置协议(Dynamic Host Configuration Protocol,简称DHCP)DHCP是一种广泛使用的网络协议,用于分配和管理网络中计算机的IP地址、子网掩码、默认网关等网络配置信息。
通过DHCP服务器和客户端之间的通信,可以实现自动分配和更新IP地址的过程,极大地简化了网络管理员的工作。
DHCP客户端在启动时会发送DHCP请求,DHCP服务器则会回应并提供可用的IP地址。
这种方式可以有效避免IP地址冲突,使得网络设备能够快速地获得合适的IP地址,而无需手动配置。
二、零配置网络(Zeroconf)零配置网络也被称为“即插即用”网络,旨在使设备在无需网络管理员干预的情况下,能够自动发现、配置和连接到一个局域网或互联网。
零配置网络的核心技术是当设备加入网络时自动分配和配置IP地址。
比较常见的零配置网络技术有:1. 自动私有IP寻址(Automatic Private IP Addressing,简称APIPA):设备在未获取有效IP地址的情况下,会自动分配一个私有IP地址,例如在IPv4网络中的169.254.x.x网段。
这使设备能够在没有DHCP服务器的情况下进行通信。
2. 子网划分(Subnetting):在IPv6网络中,使用子网划分技术可以自动为设备分配唯一的IP地址,以适应网络拓扑结构的变化。
三、移动IP(Mobile IP)移动IP是一种网络协议,用于实现移动设备在不同网络之间切换时仍能保持连接不中断的功能。
该协议允许设备在切换网络时保持原有的IP地址,不会因网络切换而需要重新获取IP地址。
网络ip地址及子网划分(NetworkIPaddressandsubnetDivision)

网络ip地址及子网划分(Network IP address and subnet Division)International rules: divide all IP addresses into A, B, C, D, E.Class a address: range 0~127, 0 is reserved and represents all IP addresses, and 127 is reserved address, and is used for testing loopback. Thus, the range of class a addresses is actually between 1~126. Such as: 10.0.0.1, the first paragraph number is the network number, and the remaining three paragraph number is the number of the local computer. Converted to 2, a class a IP address consists of 1 bytes of network address and 3 bytes of host address. The highest address of the network address must be "0", and the address ranges from 0.0.0.1 to 126.0.0.0. The available class a network has 126, each network capable of hosting more than 100 million hosts (2 of the 24 party hosts). Using subnet masks to make a distinction: 255.0.0.0.Class B address: ranges from 128-191, such as 172.168.1.1, the first and second segment numbers to network numbers, and the remaining 2 segment numbers are the numbers of the local computers. 2 hexadecimal conversion, consisting of a B class IP address by 2 bytes 2 bytes of the network address and the host address, the highest network address must be "10", the address range from 128.0.0.0 to 191.255.255.255. The available B class network has 16382, each network can accommodate more than 60 thousand hosts. Using subnet masks to make a distinction: 255.255.0.0.Class C address: ranges from 192-223, such as 192.168.1.1, first, second, and third. The number is the network number, and the last remaining number is the number of the local computer.Converted to 2, a C class IP address consists of 3 bytes of network address and 1 bytes of host address. The highest point of the network address must be "110"". Range from 192.0.0.0 to 223.255.255.255. C class network can reach more than 209, each network can accommodate 254 hosts. Using subnet masks to make a distinction: 255.255.255.0.Class D address: ranges from 224-239, class IP, D address, the first byte starts with '1110', and it is a reserved address. It does not point to specific networks, and this class of addresses is currently used in multicast (Multicast). A multicast address used to address a set of computers at a time that identifies a set of computers that share the same protocol.Class E address: ranges from 240-254 to 11110, reserved for future use. All zero ("0.0.0.0") addresses correspond to the current host. The full 1 IP address ("255.255.255.255") is the broadcast address of the current subnet.In the daily network environment, basically all use B, C two kinds of address, and ADE these 3 kinds of addresses are not playing, may be used.From the above description, you can see a lot of friends will make mistakes, is the beginning of the 192 set IP address B address, although the network communication in the LAN is not affected, but in fact is a division of behavior is not standardized.Brief description: subnet mask subnet mask is a 32 bit address, to shield a portion of the IP address to distinguish networkID and host identity, and that the IP address is in the LAN, or in remote online.With the above IP address as an example to illustrate, such as a C class, IP address 192.168.0.1, subnet mask for255.255.255.0 (conversion 2 hexadecimal, 255 in 2 hexadecimal, said 8 1, that is, all accounted for). The wording says that the network address of this C class IP address is 192.168.0, and the host address is 1.In so many network IP, the international regulation has a part of IP address is used for our local area network, that is, private network IP, not used in public network, their scope is:10.0.0.0 to 10.255.255.255172.16.0.0 to 172.31.255.255192.168.0.0 to 192.168.255.255Next, let's discuss the problem of network partitioning at once.If you give a C class of IP address segment:192.168.0.1-192.168.0.254, where 192.168.0 this belongs to the network number, and 1~254 indicates that the network segment can accommodate up to 254 mainframe computers. All we have to do now is to divide the 254 hosts again and distinguish them.The 192.168.0.1-192.168.0.254 default subnet mask used for 255.255.255.0, 0 of them in the 2 band said in 8, 0. so the 8position is not to occupy the network number, 8 times 2 is said to have 256 address, remove a header (network address) and a tail (host address), said there are 254 computer hosts, so we want to divide these 254 words, is to occupy the last 8 0 in a few.If the first 0. is occupied, then the subnet mask represented by the 2 hexadecimal is 11111111.11111111.11111111.10000000. Converting to 10 decimal is 255.255.255.128, so how much should the computer host be then? Is actually very simple, is the 7 of 2 (the original 2 is no longer the 8 times square), 7 =128 2, so if the subnet mask is 255.255.255.128, the class C address can be divided into 2 networks, each network has a maximum of 128 hosts. 192.168.0.1-192.168.0.127 is one, and192.168.0.128-192.168.0.255 is second.For example, if the IP or C address range is192.168.0.1-192.168.0.254, if the 255.255.255.192 subnet mask (which is the last 8 for the host, occupied 2, 2 hexadecimal 11111111.11111111.11111111.11000000), then the number of host computer that segment is 2 ^ 6 =64 Taiwan, a total of 2. 2 Party =4 segment. The first segment is 192.168.0.1-192.168.0.63, the second segment is 192.168.0.64-192.168.0.127, the third segment is 192.168.0.127-192.168.0.191, and the fourth segment is 192.168.0.192-192.168.0.254.From these 2 examples, we can sum up a rule, that is, the host is occupied by N digits, then there are 2 N sub networks, and there are 2 8-N times the number of hosts.Finally, a brief description of the B class address subnetdivision method. If you have a B class address segment and the 172.16.0.0-172.168.255.255 subnet mask is 255.255.0.0, you now need to segment this segment into subnets. Without dividing the subnet, there is only one network, which contains 2 of the 16 sides and more than 60 thousand hosts. Therefore, if you need to subnetting, network address host address needs to borrow.A caseThe first step is to convert 172.16.0.0 255.255.0.0 to binary, 1010110000010000, 00000000, 00000000128+32+8+4=172, 161111111111111111, 00000000, 00000000255.255.0.0.If the network address host address asked to borrow 2 bit words, then, the subnet mask is: 111111111111111100000000255.255.192.0 11000000, because by 2, there are 2 times of 2, is divided into 4 networks, each network had 14 times the 2 host addresses.172.16.0.1-172.16.63.254172.16.64.1-172.16.127.254172.16.128.1-172.16.191.254172.16.192.1-172.16.254.254In two casesIf the B class address 172.16.0.0-172.16.255.255 255.255.0.0 needs to be divided into smaller subnets, the network addressborrows a total of 10 digits from the host address,Decimal 172.16.0.0 255.255.0.0Binary 1010110000010000, 0000000000000000, 128+32+8+4=172 161111111111111111, 0000000000000000After borrowing 10 digits, the subnet mask in binary is: 11111111.11111111.11111111.11000000. In decimal notation, that's 255.255.255.192. Well, there are 2 of the 10 square networks in total, and 2 of the 6 addresses in each network. Using decimal to represent so many addresses, should be as follows (because there are 2 of the 10 party, too many, can not write one by one).6 in front:172.16.0.1-172.16.0.63172.16.0.64-172.16.0.127172.16.0.128-172.16.0.191172.16.0.192-172.16.0.254172.16.1.1---172.16.1.63172.16.1.64-172.16.1.127The last 6:172.16.254.128-172.16.254.191172.16.254.192-172.16.254.255172.16.255.1-172.16.255.63172.16.255.64-172.16.255.127One hundred and seventy-two16.255.128-172.16.255.191172.16.255.192-172.16.255.255从这2个例子中可以看出,划分B类子网地址,其实和划分C类子网地址是一样的,只不过划分C类的时候,是将第四段地址划分,而划分B类的时候,可以划分第三段,也可以划分第四段。
江西电信BRAS(华为ME60、MA5200G)配置规范

3.2.2.1 GE 用做上连接口....................................................... 23 3.2.2.2 GE 用做下联接口....................................................... 23 3.2.2.3 GE 拨号下联子接口(dot1Q) .............................................. 24 3.2.2.4 GE 拨号下联子接口(QinQ) ............................................... 24 3.2.2.5 GE 专线下联子接口..................................................... 25 3.2.2.6 接口 uRPF ............................................................ 26 3.2.2.7 hold-time 配置 ......................................................... 26 3.2.2.8 配置范例 ............................................................. 27 3.3 MULTI-VR(CONTEXT)配置 ......................................................................................................... 28
IP地址与网络上的其他系统有冲突解决方案

IP地址与网络上的其他系统有冲突怎么办?1.IP地址与网络上的其它系统有冲突. 设置成为由DHCP自动获取出现您所描述的错误提示,应该是网卡所设置的IP地址与网络上的另外一台电脑,或者其他网络设备的IP地址发生冲突,所谓冲突也就是使用了相同的地址,错误提示中的00:20:ED:9E:55:B6就是另外那台电脑或者网络设备的MAC地址。
如果您的电脑在一个局域网内,并且网卡IP地址是通过局域网的服务器自动分配的,在Windows 2000等操作系统上,可以单击“开始”按钮,选择“附件”中的“命令提示符”,在命令行状态下输入“ipconfig /renew”,让系统释放当前的IP地址,重新获得一个新的地址。
在Windows 98中,则可以单击“开始”按钮,选择“运行”,键入“winipcfg”,并在出现的对话框上选择释放当前IP,然后重新获取一个。
若您的IP地址是设置为固定IP地址的,如果是您自己设置的,可以另外设置一个,如果是由管理员分配的,那么您需要联系管理员,报告IP地址冲突的问题,要求更换IP地址或找出产生冲突的电脑进行修正。
如果您在单机情况下使用电脑,那么您需要检查自己所使用的设备中哪一个设备是冲突的原因,例如ADSL调制解调器的IP地址是否与您的网卡IP地址相同等。
IP地址在每个网络中只能是唯一的,如果重复了则发生IP冲突,就无法正常连入网络了。
你可以手动进行修改,步骤如下:在windowsXP或windows2000中:单击开始--设置--网络和拨号连接,在出现的网络和拨号连接窗口中右键单击“本地连接”,在出现的快捷菜单里选择“属性”命令,出现“本地连接”属性对话框,在“常规”选项卡中,中间的“此连接使且下列组件”列表框,选中“Internet协议(TCP/IP)”单击“属性”按钮,在出现的“Internet协议(TCP/IP)属性”对话框中选择“常规”选项卡中的“使用下列IP地址”单选按钮,然后就可以在下面的文本框中填写需要的IP地址,子网埯码及默认网关了。
IP地址的子网划分和子网掩码

IP地址的子网划分和子网掩码IP地址是互联网中常用的网络协议,用于标识网络上的设备。
网络管理员需要将IP地址分配给各个设备,以实现网络通信。
在这个过程中,子网划分和子网掩码扮演着重要的角色。
本文将详细介绍IP地址的子网划分和子网掩码的概念、原理及应用。
一、IP地址的基本概念IP地址(Internet Protocol Address)是一个用于标识通信节点或者主机地址的数值,由32位二进制数组成。
为了方便人们使用,IP地址通常被表示为四组用点分隔的十进制数(例如192.168.0.1)。
二、子网划分的概念与原理子网划分(Subnetting)是指将一个大的IP地址空间划分成若干个较小的子网,以便更有效地管理和利用IP地址。
通过子网划分,可以将网络划分成不同的子网,每个子网可以包含一定数量的IP地址。
子网划分的原理基于IP地址的二进制表示。
在IPv4中,32位的IP地址被分为网络部分和主机部分,其中网络部分用于标识网络,主机部分用于标识设备。
子网掩码则决定了IP地址中哪些位属于网络部分,哪些位属于主机部分。
三、子网掩码的概念与作用子网掩码(Subnet Mask)是一个32位的二进制数,用于将IP地址中的网络部分和主机部分进行分隔。
在二进制表示中,子网掩码中的1表示网络部分,0表示主机部分。
子网掩码的作用是定义了网络地址的范围,以及主机地址在网络中的唯一性。
通过与IP地址进行AND运算,可以判断一个IP地址属于哪一个子网。
四、子网划分和子网掩码的应用子网划分和子网掩码在网络管理和划分中发挥着重要的作用。
通过合理地划分子网,可以提高网络的安全性、管理性和性能。
在实际应用中,通过合理地选择子网掩码,网络管理员可以根据需求将IP地址按照不同的规模分配给各个子网。
例如,一个较大的网络可以划分成多个子网,不同的子网可以服务于不同的部门或者地区。
此外,子网划分和子网掩码还可以用于实现网络隔离和VLAN的划分。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
Cisco − IP Addressing and Subnetting for New UsersTable of ContentsIP Addressing and Subnetting for New Users (1)Document ID: 13788 (1)Introduction (1)Prerequisites (1)Requirements (1)Components Used (1)Additional Information (1)Conventions (2)Understanding IP Addresses (2)Network Masks (3)Understanding Subnetting (4)Examples (5)Sample Exercise 1 (6)Sample Exercise 2 (6)VLSM Example (7)VLSM Example (8)CIDR (9)Appendix (9)Sample Config (9)Host/Subnet Quantities Table (10)NetPro Discussion Forums − Featured Conversations (11)Related Information (11)IP Addressing and Subnetting for New Users Document ID: 13788IntroductionPrerequisitesRequirementsComponents UsedAdditional InformationConventionsUnderstanding IP AddressesNetwork MasksUnderstanding SubnettingExamplesSample Exercise 1Sample Exercise 2VLSM ExampleVLSM ExampleCIDRAppendixSample ConfigHost/Subnet Quantities TableNetPro Discussion Forums − Featured ConversationsRelated InformationIntroductionThis document will give you basic information you will need to configure your router for routing IP, such as how addresses are broken down and how subnetting works. You will learn how to assign each interface on the router an IP address with a unique subnet. And do not worry, we will show you lots of examples to help tie everything together.PrerequisitesRequirementsThere are no specific prerequisites for this document.Components UsedThis document is not restricted to specific software and hardware versions.Additional InformationIf definitions are helpful to you, use these vocabulary terms to get you started:Address T he unique number ID assigned to one host or interface in a network.••Subnet A portion of a network sharing a particular subnet address.Subnet mask A 32−bit combination used to describe which portion of an address refers to the subnet •and which part refers to the host.•Interface A network connection.If you have already received your legitimate address(es) from the InterNIC (Internet Network Information Center), you are ready to begin. If you are not planning on connecting to the Internet, we strongly suggest that you use reserved addresses from RFC 1918 .ConventionsFor more information on document conventions, see the Cisco Technical Tips Conventions.Understanding IP AddressesAn IP address is an address used to uniquely identify a device on an IP network. The address is made up of 32 binary bits which can be divisible into a network portion and host portion with the help of a subnet mask. The 32 binary bits are broken into four octets (1 octet = 8 bits). Each octet is converted to decimal and separated by a period (dot). For this reason, an IP address is said to be expressed in dotted decimal format (for example, 172.16.81.100). The value in each octet ranges from 0 to 255 decimal, or 00000000 − 11111111 binary.Here is how binary octets convert to decimal: The right most bit, or least significant bit, of an octet will hold a value of 20. The bit just to the left of that will hold a value of 21. This continues until the left−most bit, or most significant bit, which will hold a value of 27. So if all binary bits are a one, the decimal equivalent would be 255 as shown here:1 1 1 1 1 1 1 1128 64 32 16 8 4 2 1 (128+64+32+16+8+4+2+1=255)Here is a sample octet conversion when not all of the bits are set to 1.0 1 0 0 0 0 0 10 64 0 0 0 0 0 1 (0+64+0+0+0+0+0+1=65)And this is sample shows an IP address represented in both binary and decimal.10. 1. 23. 19 (decimal)00001010.00000001.00010111.00010011 (binary)These octets are broken down to provide an addressing scheme that can accommodate large and small networks. There are five different classes of networks, A to E. This document focuses on addressing classes A to C, since classes D and E are reserved and discussion of them is beyond the scope of this document. Note: Also note that the terms "Class A, Class B" and so on are used in this document to help facilitate the understanding of IP addressing and subnetting. These terms are rarely used in the industry anymore because of the introduction of classless interdomain routing (CIDR).Given an IP address, its class can be determined from the three high−order bits. Figure 1 shows the significance in the three high order bits and the range of addresses that fall into each class. For informational purposes, Class D and Class E addresses are also shown.Figure 1In a Class A address, the first octet is the network portion. Octets 2, 3, and 4 (the next 24 bits) are for the network manager to divide into subnets and hosts as he/she sees fit. Class A addresses are used for networks that have more than 65,536 hosts (actually, up to 16777214 hosts!).In a Class B address, the first two octets are the network portion. Octets 3 and 4 (16 bits) are for local subnets and hosts. Class B addresses are used for networks that have between 256 and 65534 hosts.In a Class C address, the first three octets are the network portion. Octet 4 (8 bits) is for local subnets and hosts − perfect for networks with less than 254 hosts.Network MasksA network mask helps you know which portion of the address identifies the network and which portion of the address identifies the node. Class A, B, and C networks have default masks, also known as natural masks, as shown here:Class A: 255.0.0.0Class B: 255.255.0.0Class C: 255.255.255.0An IP address on a Class A network that has not been subnetted would have an address/mask pair similar to: 8.20.15.1 255.0.0.0. To see how the mask helps you identify the network and node parts of the address, convert the address and mask to binary numbers.8.20.15.1 = 00001000.00010100.00001111.00000001255.0.0.0 = 11111111.00000000.00000000.00000000Once you have the address and the mask represented in binary, then identifying the network and host ID is easier. Any address bits which have corresponding mask bits set to 1 represent the network ID. Any address bits that have corresponding mask bits set to 0 represent the node ID.8.20.15.1 = 00001000.00010100.00001111.00000001255.0.0.0 = 11111111.00000000.00000000.00000000−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−net id | host idnetid = 00001000 = 8hostid = 00010100.00001111.00000001 = 20.15.1Understanding SubnettingSubnetting allows you to create multiple logical networks that exist within a single Class A, B, or C network. If you do not subnet, you will only be able to use one network from your Class A, B, or C network, which is unrealistic.Each data link on a network must have a unique network ID, with every node on that link being a member of the same network. If you break a major network (Class A, B, or C) into smaller subnetworks, it allows you to create a network of interconnecting subnetworks. Each data link on this network would then have a unique network/subnetwork ID. Any device, or gateway, connecting n networks/subnetworks has n distinct IP addresses, one for each network / subnetwork that it interconnects.To subnet a network, extend the natural mask using some of the bits from the host ID portion of the address to create a subnetwork ID. For example, given a Class C network of 204.15.5.0 which has a natural mask of 255.255.255.0, you can create subnets in this manner:204.15.5.0 − 11001100.00001111.00000101.00000000255.255.255.224 − 11111111.11111111.11111111.11100000−−−−−−−−−−−−−−−−−−−−−−−−−−|sub|−−−−By extending the mask to be 255.255.255.224, you have taken three bits (indicated by "sub") from the original host portion of the address and used them to make subnets. With these three bits, it is possible to create eight subnets. With the remaining five host ID bits, each subnet can have up to 32 host addresses, 30 of which can actually be assigned to a device since host ids of all zeros or all ones are not allowed (it is very important to remember this). So, with this in mind, these subnets have been created.204.15.5.0 255.255.255.224 host address range 1 to 30204.15.5.32 255.255.255.224 host address range 33 to 62204.15.5.64 255.255.255.224 host address range 65 to 94204.15.5.96 255.255.255.224 host address range 97 to 126204.15.5.128 255.255.255.224 host address range 129 to 158204.15.5.160 255.255.255.224 host address range 161 to 190204.15.5.192 255.255.255.224 host address range 193 to 222204.15.5.224 255.255.255.224 host address range 225 to 254Note: There are two ways to denote these masks. First, since you are using three bits more than the "natural" Class C mask, you can denote these addresses as having a 3−bit subnet mask. Or, secondly, the mask of 255.255.255.224 can also be denoted as /27 as there are 27 bits that are set in the mask. This second method is used with CIDR. Using this method, one of thse networks can be described with the notation prefix/length. For example, 204.15.5.32/27 denotes the network 204.15.5.32 255.255.255.224. When appropriate theprefix/length notation is used to denote the mask throughout the rest of this document.The network subnetting scheme in this section allows for eight subnets, and the network might appear as:Figure 2Notice that each of the routers in Figure 2 is attached to four subnetworks, one subnetwork is common to both routers. Also, each router has an IP address for each subnetwork to which it is attached. Each subnetwork could potentially support up to 30 host addresses.This brings up an interesting point. The more host bits you use for a subnet mask, the more subnets you have available. However, the more subnets available, the less host addresses available per subnet. For example, a Class C network of 204.17.5.0 and a mask of 255.255.255.224 (/27) allows you to have eight subnets, each with 32 host addresses (30 of which could be assigned to devices). If you use a mask of 255.255.255.240 (/28), the break down is:204.15.5.0 − 11001100.00001111.00000101.00000000255.255.255.240 − 11111111.11111111.11111111.11110000−−−−−−−−−−−−−−−−−−−−−−−−−−|sub |−−−Since you now have four bits to make subnets with, you only have four bits left for host addresses. So in this case you can have up to 16 subnets, each of which can have up to 16 host addresses (14 of which can be assigned to devices).Take a look at how a Class B network might be subnetted. If you have network 172.16.0.0 ,then you know that its natural mask is 255.255.0.0 or 172.16.0.0/16. Extending the mask to anything beyond 255.255.0.0 means you are subnetting. You can quickly see that you have the ability to create a lot more subnets than with the Class C network. If you use a mask of 255.255.248.0 (/21), how many subnets and hosts per subnet does this allow for?172.16.0.0 − 10101100.00010000.00000000.00000000255.255.248.0 − 11111111.11111111.11111000.00000000−−−−−−−−−−−−−−−−−| sub |−−−−−−−−−−−You are using five bits from the original host bits for subnets. This will allow you to have 32 subnets (25). After using the five bits for subnetting, you are left with 11 bits for host addresses. This will allow each subnet so have 2048 host addresses (211), 2046 of which could be assigned to devices.Note: In the past, there were limitations to the use of a subnet 0 (all subnet bits are set to zero) and all ones subnet (all subnet bits set to one). Some devices would not allow the use of these subnets. Cisco Systems devices will allow the use of these subnets when the ip subnet zero command is configured. ExamplesSample Exercise 1Now that you have an understanding of subnetting, put this knowledge to use. In this example, you are given two address / mask combinations, written with the prefix/length notation, which have been assigned to two devices. Your task is to determine if these devices are on the same subnet or different subnets. You can do this by using the address and mask of each device to determine to which subnet each address belongs.DeviceA: 172.16.17.30/20DeviceB: 172.16.28.15/20Determining the Subnet for DeviceA:172.16.17.30 − 10101100.00010000.00010001.00011110255.255.240.0 − 11111111.11111111.11110000.00000000−−−−−−−−−−−−−−−−−| sub|−−−−−−−−−−−−subnet = 10101100.00010000.00010000.00000000 = 172.16.16.0Looking at the address bits that have a corresponding mask bit set to one, and setting all the other address bits to zero (this is equivalent to performing a logical "AND" between the mask and address), shows you to which subnet this address belongs. In this case, DeviceA belongs to subnet 172.16.16.0.Determining the Subnet for DeviceB:172.16.28.15 − 10101100.00010000.00011100.00001111255.255.240.0 − 11111111.11111111.11110000.00000000−−−−−−−−−−−−−−−−−| sub|−−−−−−−−−−−−subnet = 10101100.00010000.00010000.00000000 = 172.16.16.0From these determinations, DeviceA and DeviceB have addresses that are part of the same subnet. Sample Exercise 2Given the Class C network of 204.15.5.0/24, subnet the network in order to create the network in Figure 3 with the host requirements shown.Figure 3Looking at the network shown in Figure 3, you can see that you are required to create five subnets. The largest subnet must support 28 host addresses. Is this possible with a Class C network? and if so, then how?You can start by looking at the subnet requirement. In order to create the five needed subnets you would need to use three bits from the Class C host bits. Two bits would only allow you four subnets (22).Since you need three subnet bits, that leaves you with five bits for the host portion of the address. How manyhosts will this support? 25 = 32 (30 usable). This meets the requirement.Therefore you have determined that it is possible to create this network with a Class C network. An example of how you might assign the subnetworks is:netA: 204.15.5.0/27 host address range 1 to 30netB: 204.15.5.32/27 host address range 33 to 62netC: 204.15.5.64/27 host address range 65 to 94netD: 204.15.5.96/27 host address range 97 to 126netE: 204.15.5.128/27 host address range 129 to 158VLSM ExampleIn all of the previous examples of subnetting you will notice that the same subnet mask was applied for all the subnets. This means that each subnet has the same number of available host addresses. You may need this in some cases, but, in most cases, having the same subnet mask for all subnets ends up wasting address space. For example, in the Sample Exercise 2 section, a class C network was split into eight equal−size subnets; however, each subnet did not utilize all available host addresses, which results in wasted address space. Figure 4 illustrates this wasted address space.Figure 4Figure 4 illustrates that of the subnets that are being used, NetA, NetC, and NetD have a lot of unused host address space. This may have been a deliberate design accounting for future growth, but in many cases this is just wasted address space due to the fact that the same subnet mask is being used for all the subnets.Variable Length Subnet Masks (VLSM) allows you to use different masks for each subnet, thereby using address space efficiently.VLSM ExampleGiven the same network and requirements as in Sample Exercise 2 develop a subnetting scheme using VLSM, given:netA: must support 14 hostsnetB: must support 28 hostsnetC: must support 2 hostsnetD: must support 7 hostsnetE: must support 28 hostDetermine what mask allows the required number of hosts.netA: requires a /28 (255.255.255.240) mask to support 14 hostsnetB: requires a /27 (255.255.255.224) mask to support 28 hostsnetC: requires a /30 (255.255.255.252) mask to support 2 hostsnetD*: requires a /28 (255.255.255.240) mask to support 7 hostsnetE: requires a /27 (255.255.255.224) mask to support 28 hosts* a /29 (255.255.255.248) would only allow 6 usable host addressestherefore netD requires a /28 mask.The easiest way to assign the subnets is to assign the largest first. For example, you can assign in this manner: netB: 204.15.5.0/27 host address range 1 to 30netE: 204.15.5.32/27 host address range 33 to 62netA: 204.15.5.64/28 host address range 65 to 78netD: 204.15.5.80/28 host address range 81 to 94netC: 204.15.5.96/30 host address range 97 to 98This can be graphically represented as shown in Figure 5:Figure 5Figure 5 illustrates how using VLSM helped save more than half of the address space.CIDRClassless Interdomain Routing (CIDR) was introduced to improve both address space utilization and routing scalability in the Internet. It was needed because of the rapid growth of the Internet and growth of the IP routing tables held in the Internet routers.CIDR moves way from the traditional IP classes (Class A, Class B, Class C, and so on). In CIDR , an IP network is represented by a prefix, which is an IP address and some indication of the length of the mask. Length means the number of left−most contiguous mask bits that are set to one. So network 172.16.0.0 255.255.0.0 can be represented as 172.16.0.0/16. CIDR also depicts a more hierarchical Internet architecture, where each domain takes its IP addresses from a higher level. This allows for the summarization of the domains to be done at the higher level. For example, if an ISP owns network 172.16.0.0/16, then the ISP can offer 172.16.1.0/24, 172.16.2.0/24,and so on to customers. Yet, when advertising to other providers, the ISP only needs to advertise 172.16.0.0/16.For more information on CIDR, see RFC 1518 and RFC 1519 .AppendixSample ConfigRouters A and B are connected via serial interface.Router Ahostname routera!ip routing!int e 0ip address 172.16.50.1 255.255.255.0!(subnet 50)int e 1 ip address 172.16.55.1 255.255.255.0!(subnet 55)int t 0 ip address 172.16.60.1 255.255.255.0!(subnet 60) int s 0ip address 172.16.65.1 255.255.255.0 (subnet 65)!S 0 connects to router Brouter ripnetwork 172.16.0.0Router Bhostname routerb!ip routing!int e 0ip address 192.1.10.200 255.255.255.240!(subnet 192)int e 1ip address 192.1.10.66 255.255.255.240!(subnet 64)int s 0ip address 172.16.65.2 (same subnet as router A's s 0)!Int s 0 connects to router Arouter ripnetwork 192.1.10.0network 172.16.0.0Host/Subnet Quantities TableClass B Effective Effective# bits Mask Subnets Hosts−−−−−−− −−−−−−−−−−−−−−− −−−−−−−−− −−−−−−−−−1 255.255.128.02 327662 255.255.192.0 4 163823 255.255.224.0 8 81904 255.255.240.0 16 40945 255.255.248.0 32 20466 255.255.252.0 64 10227 255.255.254.0 128 5108 255.255.255.0 256 2549 255.255.255.128 512 12610 255.255.255.192 1024 6211 255.255.255.224 2048 3012 255.255.255.240 4096 1413 255.255.255.248 8192 614 255.255.255.252 16384 2Class C Effective Effective# bits Mask Subnets Hosts−−−−−−− −−−−−−−−−−−−−−− −−−−−−−−− −−−−−−−−−1 255.255.255.1282 1262 255.255.255.192 4 623 255.255.255.224 8 304 255.255.255.240 16 145 255.255.255.248 32 66 255.255.255.252 64 2*Subnet all zeroes and all ones included. Thesemight not be supported on some legacy systems.*Host all zeroes and all ones excluded.NetPro Discussion Forums − Featured Conversations Networking Professionals Connection is a forum for networking professionals to share questions, suggestions, and information about networking solutions, products, and technologies. The featured links are some of the most recent conversations available in this technology.NetPro Discussion Forums − Featured Conversations for RPService Providers: MPLSVirtual Private Networks: ServicesVirtual Private Networks: SecurityRelated Information•IP Subnet Calculator ( registered customers only)•IP Routing Protocols Support PageSubnet Zero and the All−Ones Subnet••Host and Subnet QuantitiesIP Subnet Calculation & Design Online Documentation••Technical Support − Cisco SystemsAll contents are Copyright © 1992−2005 Cisco Systems, Inc. All rights reserved. Important Notices and Privacy Statement. Updated: Sep 26, 2005Document ID: 13788。