
1. Complete the intercommunication between hosts in the two network segments; understand the role of layer 2 forwarding and gateway;

1. Set the IP address of pc1-pc2: used for PC communication within the second layer
2. Set the gateway address between pc1 to pc4: for communication forwarding between different network segments

3. Use pc1ping-pc3 to capture packets and learn


When the ping packet is sent to the layer 2 switch, it is found that it is not on the same network segment and sends an arp request packet to the gateway 192.168.1.254.
After receiving it, the gateway replies with its mac address of g0/0/0
4.



After receiving the reply, pc1 sends the icmp protocol ping request packet again. The mac address is g0/0/0 port and the destination IP address is 2.1.
5.

The 2.0 network segment sends the arp broadcast of this network segment.
2.1 Receive the broadcast confirmation reply with its mac address and receive the mac address of the g0/0/1 port of the network segment
At this time, the three-layer router forms a routing table

The destination network segment is 192.168.1, which is port 1.254. The next hop exit of the destination network segment is 2.1 is port 2.254.
At this point, the connection is successful. PC1 sends the data packet to the Layer 2 switch to parse the mac address as g0/0/0 and forward it to the Layer 3 gateway. The routing table is parsed and the destination address of the 2.0 network segment is 2.254, and the source destination MAC is re-encapsulated for forwarding. pc3 replied as above.
2. The original Class C address is 192.168.10.0/24, borrowing 2 bits from the host bit, and writing the network number, new mask, broadcast address and number of hosts respectively;
Network address: 192.168.10.0/26 192.168.10.64/26 192.168.10.128/26 192.168.10.192/26
New mask: 255.255.255.192
Broadcast address: 192.168.10.63/26 192.168.10.127/26 192.168.10.191/26
192.168.10.255/26
Number of hosts: 2^6*4-8
