Network protocol note day04: from the physical layer to the MAC layer | switch and the VLAN | ICMP of ping and | a Gateway | Routing Protocol

    1 from the physical layer to the MAC layer

        This lesson talking about something for me ...... more difficult to understand, briefly summarize, two computers via a network cable connected (two on two computers that plug in the network cable), configure IP address, subnet mask, default gateway, can constitute a minimal local area network (LAN) , you can play games online friends.

        Three or more computers through a hub (Hub) connected.

        The above said cable and a hub connected to the computer, is the first layer is a physical layer link protocol.

        The following is the second layer, data link layer , i.e., a MAC layer (Medium Access Control Medium Access Control).

        It addresses the following three questions:

        1. To whom package.

        Data packets on the link broadcast , MAC card can be found, this package is to it. Note that this process will be used ARP protocol .

        2. Everyone in the hair, will not produce confusion. Whoever latecomer who send?

        Multiple access rules: (1) channel is divided; (2) alternate protocol; (3) a random access protocol.

        3. Send the time there was a mistake how to do?

        CRC, cyclic redundancy check.

        When the increase in the number of computers, we use the switch . Switch the beginning do not know the MAC address corresponding to the computer which is the mouth, it will be broadcast, but it is very smart, learning ability, after a period of time, the basic need to broadcast, it will MAC address and the corresponding computer port down. The result of this study is forwarding .

        To summarize, there are three key points to remember:

        1.MAC layer is used to solve the traffic jam problem of multiple access.

        2.ARP goal is to find the MAC address by way of roar, roar End to remember after a period of time, this is called a cache.

        3. Switch is the MAC address learning ability, finished school where it knows who, do not broadcast.

    2 switch and VLAN

        When the number of switches more and more time, will encounter loops , so that network packets get lost, which requires the use STP protocol, Huashan Mountain contest by the way, there will be no loop diagram programming loop tree, so as to solve the loop problem.

        The number of switches and more will face security problems, this time they need to be isolated by VLAN form a virtual local area network , so as to solve the problem of broadcasting and security issues.

    3ICMP and ping

       ICMP (Internet Control Message Protocol Internet Control Message Protocol) is equivalent to the online world of scouts, its message is encapsulated in IP packets inside. This lesson learned two types of ICMP packets, one is actively investigating the query message , one is the exception reporting error message .

        Error message types are: end unreachable, source suppression, overtime, redirect , etc.

        Use ping query message, Traceroute use error message.

        ICMP ping request packet of two important fields: a type field, a sequence number .

        Tracerout first role is to intentionally particular the TTL , to track a router on the path to the destination ; the second function is deliberately not provided fragments , thereby determining the path MTU .

    4 Gateway

        If you leave the LAN address is the access to different network segments, you need to go through the gateway, the gateway is a network port router can be understood: A router is a device that has five Ethernet ports or network card, the equivalent of five hand, five were attached to the LAN. IP addresses are each hand and hold it's LAN IP address is the same network segment, each hand is its holding that the LAN gateway.

        A router is a Layer 3 device and there are rules on how to find the next hop.

        This lesson we learned static route: On the router, configure a rule . Dynamic routing back to learn ~

        After the router MAC header to be changed, if the IP the same, the equivalent of not-for-passports European tourism; if IP change, the equivalent of Xuan Zang westbound change passports (this process is the NAT , ie Network Address Translation).

    5 Routing Protocol

        Routing points static routing and dynamic routing, dynamic routing can configure complex routing strategies to control forwarding policy .   

        There are two main dynamic routing algorithm, distance vector algorithm and link state algorithm . It produced two algorithms based on two protocols, the BGP (external network by the protocol Border Gateway Protocol) protocol and the OSPF (Open Shortest Path First Open Shortest Path First) protocol .   

Reproduced in: https: //www.jianshu.com/p/1cb52318e9b7

Guess you like

Origin blog.csdn.net/weixin_33971205/article/details/91307461