The Foundation of computer Network (1)-- A brief introduction to the reference Model of Network Communication and IP address
I. reference model of network communication
OSI model:
Application layer: an interface between network services and end users
Presentation layer: data representation, security, compression
Session layer: establish, manage, and terminate a session
Transport layer: defines the protocol port number over which data is transmitted, as well as control and error checking
Network layer: logical address addressing to achieve path selection between different networks
Data link layer: functions such as establishing logical connection, hardware address addressing, error checking, etc.
Physical layer: establish, maintain, disconnect physical connection
TCP/IP model
TCP/IP five-tier model:
Application layer Transport layer Network layer data Link layer physical layer TCP/IP four-layer Model: application layer
Transport layer
Network layer network interface layer
2. Network cable
1, definition: 8 copper wires, in pairs, a total of four pairs, are all wound together at a certain angle, so the network wire also becomes a "twisted pair".
2. Network cable classification:
(1) based on transmission speed and anti-jamming ability, it can be divided into 5 categories, super 5 categories, 6 categories and 7 categories:
Category 5: 100Mbps
More than 5 categories (5e): 100Mbps
Category 6: 1000Mbps
(2) based on the line order, the network cable can be divided into:
Straight-through line: the line order on both sides is the same (when connecting different devices)
Crossed lines: different lines on both sides (when the same device is connected)
Reverse line: the order of the lines on both sides is completely opposite.
3. The wire sequence of the network cable:
Standard-568B: White orange, orange, white-green, blue, white-blue, green, white-brown, brown
Standard-568A: White green, green, white orange, blue, white blue, orange, white brown, brown
(difference: 1, 3, 2, 6)
Note: the reason why the crossing line is used to connect the same equipment:
Take PC as an example: the network card / port of each PC is fixed, port 1 and 2 are responsible for sending information, and port 3 and 6 are responsible for receiving information, so cross lines are needed for the connection between PCs. On the other hand, the network ports 1 and 2 of the router are responsible for receiving information, and ports 3 and 6 are responsible for sending information, so the router and PC should be connected by a straight line.
III. Brief introduction of TCP/IP protocol
TCP/IP is the most widely supported set of communication protocols
-including standard protocols in a large number of Internet applications
-support for communication across network architectures / operating system platforms
Three elements of communication between host and host
-IP address
-Subnet mask
-IP routing
1.ip address introduction
All devices that can surf the Internet must have an IP address. Every IP address means that everyone must have a name.
What the common IP address looks like: for example, the default address of TP-Link unlimited route: 192.168.1.1
Note: the IP address must be paired with the subnet mask, otherwise it is meaningless.
Check the IP address configuration of your Nic:
Click start-> run-> enter cmd to invoke the "Command Line window" (Quick call run: keyboard start key + r)
Enter the command in the command line window: ipconfig / / display the IP address information of the network card
Or: ipconfig / all / / View all the information of all the network cards of the device
two。 Connectivity testing tool-ping
How it works:
(1) send a "request packet"-request to the specified destination IP address
(2) the target device returns a "reply package"-reply
For example: ping succeeded!
PC > ping 192.168.1.2
Pinging 192.168.1.2 with 32 bytes of data:
Reply from 192.168.1.2: bytes=32 time=0ms TTL=128
Reply from 192.168.1.2: bytes=32 time=0ms TTL=128
Reply from 192.168.1.2: bytes=32 time=0ms TTL=128
Reply from 192.168.1.2: bytes=32 time=0ms TTL=128
Ping statistics for 192.168.1.2:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss)
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
For example: ping failed!
PC > ping 192.168.1.3
Pinging 192.168.1.3 with 32 bytes of data:
Request timed out. (default timeout is 2s=2000ms)
Request timed out.
Request timed out.
Request timed out.
Ping statistics for 192.168.1.3:
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss)
Reason for failure:
-the target may turn on the firewall
-two hosts are not connected to the same virtual network
Solution:
-- check and turn off the target host firewall
-- check whether two hosts are bridged to the same virtual network
Shortcut commands:
Press ctrl and c at the same time to quickly terminate the ping command
Special ping commands:
Ping 127.0.0.1
# the address represents the device itself
# this command indicates that you can send a packet to yourself; if it is passed, you can receive and send messages normally.
Usually use this command to check whether the network card / port function of the device itself is normal.
Problem: users find that the host can access QQ but cannot access Baidu website
Analyze the reason: DNS cannot resolve domain name
Solution: ping www.baidu.com test whether ping can be reached, if not ping, then check whether the local DNS server address configuration is correct.