The article directories

  • First, network related overview
    • 1. Network development
    • 2. IP address
    • 3, the network card
    • 4, cable
    • 5. Switch
    • 6. Router
    • 7. Topology Diagram (Extended)
  • Two, network related commands
    • 1, ping
    • 2, netstat
    • 3, traceroute
    • 4, arp
    • 5. Tcpdump (understand)

First, network related overview

1. Network development

Information transfer

  • In ancient times, people exchanged information through simple language, paintings and other ways
  • For thousands of years, people have been sending messages with words, symbols, bells and drums, fireworks, bamboo slips, paper books and so on
  • Ancient beacon fire smoke, flying pigeon message, post horse post
  • In modern society, traffic police command sign language, nautical flag language, etc
  • These basic ways of information transmission are dependent on human vision and hearing

The generation of electricity

  • In 1831, Faraday made the world’s first electric generator
  • In 1866, The German Siemens (Siemens) made the world’s first high-power generator
  • In 1837, American Samuel Morris succeeded in developing the world’s first electromagnetic telegraph
  • On May 24, 1844, Morales sent the first telegram “in Morse code” from the Supreme Court chamber in the Capitol building, thus realizing long-distance telegraph communication

The birth of the network

  • In 1957, the Soviet Union shocked the United States by launching the first Sputnik
  • In 1958, the United States established the Advanced Research Projects Agency (ARPA) of Defense Department to deal with the cold War situation. ARPA was a management Agency without laboratories and scientists

  • In 1969, ARPANET (ARPANET) came online, so 1969 is known as the first year of the Internet

Network classification

  • A Local Area Network (LAN) is a computer Network that connects computers in office buildings or campuses within hundreds of meters to tens of kilometers. (3) Metropolitan Area Network (MAN) technologies are basically similar to lans, but on a larger scale. Man can cover several office buildings not far apart, also can cover a city.
  • Wide Area Networks (Wans) typically span a large physical Area, such as a country.
  • In addition, networks can be divided into public networks and private networks according to their owners. Public network access mode: A computer that accesses the Internet obtains a non-reserved IP address on the Internet. A computer on the public network can access other computers on the Internet at will. The reverse is true for private networks.

2. IP address

  • IP stands for Internet Protocol, a Protocol designed to connect computer networks to each other for communication.
  • An IP address can be a public address or a private address. Public Address Public addresses are managed by the Inter Network Information Center (NIC). These IP addresses are assigned to organizations that register and apply to Inter NIC. It provides direct access to the Internet.
  • Private Address A Private address is an unregistered address for internal use in an organization. The following lists the reserved internal private addresses: Class A 10.0.0.0 to 10.255.255.255 Class B 172.16.0.0 to 172.31.255.255 Class C 192.168.0.0 to 192.168.255.255
  • IP addresses can be classified into three types:
category Maximum number of networks IP address range Maximum host number Private IP address range
A 7, 126 (2 ^ 2) 1.0.0.0-127.255.255.255 16777214 10.0.0.0 – those
B 2 ^ 16384 (14) 128.0.0.0-191.255.255.255 65534 Along – 172.31.255.255
C 2 ^ 2097152 (21) 192.0.0.0-223.255.255.255 254 192.168.0.0-192.168.255.255
  • Network o&M skills: IP classification, subnet division, VLAN division, ACL, cabling, and various Serve setup.
  • 127.0.0.1 native IP

3, the network card

  • Network adapter is a network component, belonging to the category of hardware, mainly responsible for the encapsulation and unencapsulation of data between computers.
  • The MAC address: Physical address of the nic, number of the NIC device, which is globally unique by default.hexadecimal).

Differences with IP addresses:

  • The length is different. The IP address is 32 bits, and the MAC address is 48 bits.
  • Distribution depends on different basis.
  • Different network addressing modes. OSI reference model where IP addresses are based on layer 3 work (network layer) and MAC addresses are based on Layer 2 work (data link layer)

4, cable

  • The network cable is essential for the LAN connection. Common network cables in the LAN include twisted-pair cables (RJ45 interface), copper shaft cable, optical cable three.

5. Switch

  • A Switch, meaning “Switch”, is a network device used for electrical (optical) signal forwarding. A Switch can provide an exclusive electrical signal path for any two network nodes connected to the Switch.

  • At present, the well-known switch brands are: Huawei, H3C, Cisco, Ruijie.

6. Router

  • A Router is used to connect multiple logically separate and relatively independent networks.

7. Topology Diagram (Extended)

  • The so-called “topology” is the method of abstracting the entity into “points” independent of its size and shape, and abstracting the lines connecting the entity into “lines”, and then representing the relations between these points and lines in the form of a graph. Its purpose is to study the connected relations between these points and lines. A graph that shows the relationship between points and lines is called a topological graph.
  • Several common topology diagrams:







Two, network related commands

1, ping

  • Function: Check the connectivity between the current host and the destination host (not 100% accurate, some servers disable ping)
  • Ping host address (IP address, host name, domain name, etc.)
  • For example: Test connectivity between Baidu.com.

  • The command can be used cross-platform or in Windows, and has the same syntax. (The difference is that Linux sends all packets by default, Windows sends 4 packets by default)

2, netstat

  • Function: Displays network connection information
  • Grammar:# netstat -tnlp(-t: TCP protocol, -n: converts letters to numbers, -l: lists listening status, and -p: displays process information)
# netstat -an (-n: convert letters to numbers)Copy the code
  • This command is required for TCP/IP.

3, traceroute

  • Function: Searches for all gateways between the current host and the destination host (the router sends ICMP packets to all routers along the route, but the router may not respond).
  • This command is not a built-in command and needs to be installed, but the current one is already installed (the developer tool was selected earlier).
  • Grammar:Traceroute Host address

  • Similar to looking at tracking routes for delivery
  • Extensions: There are similar commands for Windows:Tracert Host address

  • The online tool is tool.chinaz.com

4, arp

  • Address Resolution Protocol (ARP) is a Protocol for obtaining physical addresses based on IP addresses.

  • When a host sends data, it checks whether the MAC address of the destination host is in the local MAC address cache. If yes, it uses the cached result. If no, ARP sends a broadcast packet asking for the MAC address corresponding to the IP address of the target host. The host sends a response containing the MAC address of the target host. In this way, the sender obtains the MAC address of the target host. If the destination host is not in the local subnet, the MAC address resolved by ARP is the MAC address of the default gateway.

Common syntax:

  • # arp -aView the local cache MAC address table
  • # arp -d Host addressDeletes the specified cache record

  • The command is also applicable on Windows.

5. Tcpdump (understand)

  • Function: capture packets and capture data tables
  • Common syntax:
Tcpdump port Indicates the port number. Tcpdump port Indicates the host address of the portCopy the code
  • Port 22 (SSH) :

  • 00:09:17.xxxx: Time and second of listening data
  • IP: indicates the protocol type
  • 192.168.21.1: One direction of the packet (from)
  • >: Data flow direction
  • 192.168.21.136: Another direction for packets (arriving)