The difference between hubs, switches, routers

Hubs:

  • A plurality of computers connected to complete. Form a network.
  • Any data sent in the form of broadcast, causing network congestion.

switch:

  • A plurality of computers connected to complete. Form a network.
  • Learning is broadcast before, after learning unicast.

router

  • Connect different networks, so that the interworking between different network. Also known as the gateway device.
  • tcp / ip agreement: network numbers are different (inter-network) does not allow direct communication. Take the network cable between different communication network will not directly on the two switches connected. We need a middleman to complete the data exchange.
  • Routers have at least two network cards . A network card and data in a network A, B and B network card in the same network, A card received by the memory to B, cross-network communication is realized.

 

 

arp: Find mac address based on ip

rarp: Find ip address from the mac address

ICMP: ping protocol used

cmd window> arp -a query the current ip and mac address correspondence table

cmd window> arp -d to clear the current correspondence table

 

ping process: if ip and mac address corresponding to the table can not find any mac, arp request is sent first, and then send a query to the mac icmp packets

Gateway: This machine destined for other network data number, this requires a network via NIC. This card is called the gateway. 

Next hop: configured in the router. Data packet corresponding to the destination IP network routing number is sent to the next router. That is the next hop router through the router to jump to the next, and the next router that this router, the LAN address of the same network. See the figure it

ping 192.168.2.13 on the host 192.168.1.10, issuing a ping request via the router. 1 is not in direct communication with the router network 192.168.2.0, configure the next hop. Configuration rule is: all data sent to the 192.168.2.0 network are starting to 192.168.3.2

RIP and static routing: There is a specialized routing protocol between routers that RIP is the Routing Information Protocol (Routing Information Protocol) for short. To learn where to use static routes.

数据包在传输过程中:每经过一个路由器,原MAC地址和目的MAC都会变化、原IP和目的IP始终不变。

访问www.baidu.com过程详细描述:

Guess you like

Origin www.cnblogs.com/LiuYanYGZ/p/12227768.html