《软硬件系统编程PPT (29).pdf》由会员分享,可在线阅读,更多相关《软硬件系统编程PPT (29).pdf(15页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。
1、Computer Network01Lecture 31 Addresses on the Internet(1)Addresses on the InternetMACAddressIPAddressDomain NameUsed to identify a host in the InternetEasy for people to identify and Used to identify a host in the Internet-used at theInternet layerThe translation process of Domain name addressto IPa
2、ddress is called domain name resolutionThe translation is achieved through DNS services211.137.130.3used to identify a host in the local areanetwork-used at the data link layerThe translation process of IP address to MACaddress is calledAddress ResolutionThe translation is achieved through the ARPpr
3、otocol12-FA-9B-23-DB-11DNSARPIPAddressGlobally unique identifier for each host connected to the InternetIPv4 addresses are 32-bit words long,and are commonly used in dotted decimal notation.Such as:00001010 00000010 00000000 0000000110.2.0.1The IP address is logically divided into two parts:Network
4、address(network number):used to identify the networkHost address(host number):used to identify the host in the networkDifferent types of IP addresses have different length assignments for network numbers and host numbersNetwork numberHost numberClassification of IP addressesinto five categoriesA-E,O
5、ften used A、B、CCommon format:Network number is used to distinguish different networksThe host number is used to distinguish different hosts in the same networkThe host address cannot be all 0 or all 1Network numberHost numberClass C addressformatClass C network addresses can be allocated 221(2,097,1
6、52)The Number of host addresses:28-2(254)Address range:192.0.0.0223.255.255.25501 1Network numberHost number21bits8bitsThe data received by the host should be transferredto which application process?The port numberPort:a mechanism to identify different application processes in the same hostAn IP add
7、ress can correspond to multiple services:Web,FTP,SMTP etc.The host distinguishes different services by IP address+port number.An IP address can have 65536 ports.01023:Well-known port number(well-known port number)201549151:Registered port number4915265535:Temporary port numberCommon port numbersPort
8、 numberFTPTransport LayerHTTPPOP3SNMPTFTPSMTPApplication Layer21802511069161RIP520TCPUDPSubnetThe Problems of IPv4 For the entire Internet,all IP addresses have been allocated.For networkoperators,the obtained IPaddress is a scarce resource!Operator:How to effectively use the allocated IPaddress spa
9、ce?Solution:divide the subnet The host number part is divided into several digits as a part of the networknumber-the subnet number,and the remaining part is used as the hostnumber of the subnet,so that a network is divided into multiple subnets.After the subnet is divided,the IP address is divided i
10、nto three parts:network number-subnet number-host number.Network numberHost numberSubnet numberSubnettingPrerequisites for subnetting:The network scale is small-the IP address space is not fully utilized.For three LANs,the number of hosts is 20,25,and 48,are less than thenumber of hosts allowed for
11、Class C addresses.Obtaining three Class CIP addresses for these three LANs is obviously a wasteSuch as:There is a class C network address:192.10.1.0.Divide it into 6 subnetsUse the first 3 digits of the host address as the identification subnet11000000 00001010 00000001 xxxyyyyyNetwork numberThe New
12、 Host numberSubnet numberSubnet maskUsed to determine which hosts belong to the same subnet.Format:The network number(including subnet number)is all 1,and the hostnumber is all 0.Network Number+Subnet NumberHost Number11 1100.00Subnet mask-ExamplesSuch as:24 digits for network number and 3 digits fo
13、r subnet number.Then the subnet mask is:11111111 11111111 11111111 11100000255 .255 .255 .224Default subnet mask:A:255.0.0.0B:255.255.0.0C:255.255.255.0The network number is all 1,and the host number is all 0.Subnet mask-CalculationCorollary:If the network numbers of the two IP addresses are identic
14、al,they belong to the same network.If the IP address and subnet mask are known,the network address can beobtained by performing an AND operation with the subnet mask and IPaddress.For example:for the IP address 10.0.500.1 and the subnet mask255.255.192.0,we can calculate the network address of 10.0.
15、5.100.1 as00001010 00000101 01100000 00000001(10.5.100.1)11111111 11111111 11000000 00000000(255.255.192.0)00001010 00000101 01000000 00000000(10.5.64.0)Configure IP Open StartControl PanelNetwork and InternetNetwork Connections Right click on Local Area Connection Click Properties to open the Local
16、 Area Connection Properties window Double-click Internet Protocol Version 4(TCP/IP)in the list to open the protocol properties window Click Use the following IP address Enter the IP address in the IP address input box Enter the subnet mask in the Subnet Mask input box Enter the IP address of the router used to connect to the Internet in the Default Gateway input box Click the OK button to exit01Thanks