Packet format and IP address, network layer protocol and equipment

[Packet format and IP address, network layer protocol and equipment]


Function: Defines the logical address based on IP protocol, connects different media types, and selects the best path for data to pass through the network.
IP address = network bits + host bits.
The IP header format is 20bit.
Subnet mask (255.255.255.0): used to identify the host bit and network bit of the IP.
32 binary bits.
The network part corresponding to the IP address is represented by 1, and the host part is represented by 0.
Network ID (ABC0): The network address obtained by the logical AND operation of the network address and the subnet mask.
0 and any number = 0, 1 and any non-zero number = any number itself.
ARP Protocol (Address Resolution Protocol): arp -a resolves IP addresses to MAC addresses.
RARP protocol (Reverse Address Resolution Protocol): rarp -a resolves MAC addresses to IP addresses.
ICMP protocol (Internet Control Message Protocol): Transported by IP datagrams, it is used to send error and control information and to detect bidirectional path connectivity.
Ping [-t] [-a] [-l bytes] Destination IP or host name ------- Test connectivity
router function
to identify the destination IP address of the packet, identify the source IP address of the packet, and use it in the routing Find possible paths in the table, select the best path to reach the target in the table, maintain and check the routing information.

——Route configuration——
Configure static route
Route(config)# ip route target network ID subnet mask next hop IP------------- static route configuration, specify the destination network
Route to reach IP (config)# ip route target network ID subnet mask next hop IP number--floating route setting, number is the management distance
Route(config)# ip route 0.0.0.0 0.0.0.0 next hop IP ----- ------------ Default route (any IP, subnet mask, for end routers)
or Route(config)# ip route 0.0.0.0 0.0.0.0 f0/0 (outbound interface)
Router# show ip route View common configuration of routing table

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324936077&siteId=291194637