Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Report-IP (原理 实验

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 7

原理部分

1. IP Address

IP address (Internet Protocol Address), abbreviated as IP Address, is an address format that


uniformly addresses hosts on the Internet, also known as an Internet Protocol (IP Protocol)
address. It assigns a logical address to each network and each host on the Internet. Common IP
addresses are divided into two categories: IPv4 and IPv6.

The IP address corresponds to the third network layer of the OSI reference model. The router
working in the network layer judges whether it belongs to the same network segment according to
the destination IP and the source IP. If it is a different network segment, it forwards the data
packet.

2. Format of IP addresses

An IP address (IPv4) consists of a 32-bit binary number, divided into 4 segments (4 bytes), each
segment is an 8-bit binary number (1 byte). Each segment of 8-bit binary is separated by
punctuation marks "."

Since the binary number is too long, in order to facilitate memory and identification, each segment
of 8-bit binary number is converted into decimal, and the size is 0 to 255. This representation of IP
addresses is called "dotted decimal notation". The IP address is represented as: xxx.xxx.xxx.xxx

3. Components of an IP Address

IP address = network address + host address


For example:

192.168.1.100
Network part Host part

The IP address of a computer consists of two parts. One part is the network identification, the
other part is the host identification. The computer network part in the same network segment is the
same, but the host part is different. Routers connect different network segments and are
responsible for data forwarding between different network segments. While switches connect
computers on the same network segment. By setting the network address and the host address, it is
ensured that the IP addresses of each host will not overlap each other in the entire network, that is,
the IP address is unique.
4. Classification of IP address

IP addresses are divided into five categories: A B C D and E. Among them, A B and C are
commonly used IP addresses, and categories D and E are special addresses.

a. Class A Address

ⅰ The first byte of a class A address is the network address (the highest bit is fixed at 0), and the
other 3 bytes are the host address.
ⅱ Class A address range: 1.0.0.0 - 126.255.255.255, with 0 and 127 as special addresses.
ⅲ The default subnet mask for a class A network is 255.0.0.0, which can also be written as /8.
ⅳ The maximum number of hosts in a class A network is 256×256×256-2=16777214 (minus 1
network address with 0 host bits and 1 broadcast address).

In a computer network, the address whose host ID is all 0 is the network address, and the address
whose host ID is all 1 is the broadcast address. These two addresses cannot be assigned to the
host.

b. Class B Address

ⅰ The first byte (the highest bit is fixed at 10) and the second byte of the class B address are the
network address, and the other two bytes are the host address.
ⅱ Class B address range: 128.0.0.0 - 191.255.255.255.
ⅲ The default subnet mask for Class B networks is 255.255.0.0, which can also be written as /16.
ⅳ The maximum number of hosts in a class B network is 256×256-2=65534.

c. Class C Address
ⅰ The first byte of the C class address (the highest bit is fixed at 110), the second byte, the third
byte, and the other 1 byte are the host address.
ⅱ Class C address range: 192.0.0.0 - 223.255.255.255.
ⅲ The default subnet mask of a Class C network is 255.255.255.0, which can also be written as
/24.
ⅳ The maximum number of hosts in a class C network is 256-2=254.

d. Class D Address

ⅰ Class D address is not divided into network address and host address. The highest bit of the first
byte is fixed at 1110.
ⅱ Class D address is used for multicast (also known as multicast) address without a subnet mask.
ⅲ Class D address range: 224.0.0.0 - 239.255.255.255.

e. Class E Address

ⅰ Class E address is also not divided into network address and host address. The highest bit of the
first byte is fixed at 11110.
ⅱ Class E address range: 240.0.0.0 - 255.255.255.255.
ⅲ Among them, 240.0.0.0-255.255.255.254 is the reserved address, mainly used for Internet
experiment and development. 255.255.255.255 is the broadcast address.

5. special IP address

The following special IP addresses cannot be assigned to hosts:

ⅰ The address whose host ID is all 0: refers to a certain network segment. For example:
192.168.10.0 255.255.255.0, refers to the 192.168.10.0 network segment.
ⅱ Addresses whose host ID are all 1: refer to all hosts in the network segment. For example:
192.168.10.255. If a computer sends data packets, using the IP address whose host ID is all 1, use
the broadcast address FF-FF-FF-FF-FF-FF for the data link layer address.
ⅲ 127.0.0.1 is the local loopback address, which refers to the local address and is generally used
for testing.
ⅳ 169.254.0.0-169.254.255.255 is actually an automatic private IP address.
ⅴ 0.0.0.0: If the computer's IP address conflicts with other computer address on the network, using
the ipconfig command will see 0.0.0.0. Besides, the subnet mask will also be 0.0.0.0.
实验部分
Part 1: IP Subnetting

1. Objectives
a. To study the characteristics of IP and Subnet.
b. To study the method of IP setting and subnet mask setting.

2. Equipment
a. Two 24-port Catalyst switch 2950
b. Four PCs
c. A router-PT

3. Description of laboratory experiment set-up

4. Procedure and questions

a. Verify the cable connections as shown in the experiment diagram.


b. Set two network segments(10.0.0.0&11.0.0.0). Router0 connects those different network
segments. Switch0 connects devices under 10.0.0.0, switch2 connects devices under 11.0.0.0.
How to set?
Result as follow:

c. Configure the IP network address and subnet mask on PC0, PC1, PC4 and PC5. Respectively,
as shown in the follow table. (Refer to Appendix C on how to configure a host).
PC0 PC1 PC4 PC5
IP Address 10.0.0.2 10.0.0.3 11.0.0.2 11.0.0.3
Subnet mask 255.0.0.0 255.0.0.0 255.0.0.0 255.0.0.0

How to configure?
Results as follows:
d. Verify to insure successful connects between the PCs by using the “ping” function from the
Command Prompt Window.

C:\>ping PC IP address

e. Ping from the PC0 to PC1.


Was ping successful?
Yes.
Why?
Because PC0 and PC1 are under the same subnet. So if the IP addresses are correct, ping will be
successful.

f. Ping from the PC0 to PC5.


Was ping successful?
No.
Why?
Because PC0 and PC1 are under different subnets. If we want to ping successful, we need to set
network connection of the Router0.

You might also like