Coaxial cable
- different
PC computer
Between, can be usedCoaxial cable
Is connected, as shown in the following figure
1. Half duplex communication
- Coaxial cable is half-duplex communication, that is, only one communication can pass through the cable at a time, and one computer sends the communication, all the computers will receive the communication, and do different processing of the communication
- As follows, the second computer sends the communication, all the other computers receive the communication, and there is only one communication in the line
- Suppose it goes from the second computer to the fourth computer, and the other three computers receive the communication and discard it without processing it
- The fourth computer sends a response communication to the second computer, and all computers receive the communication from the fourth computer
- Each computer does different things based on the communication it receives
- The second computer receives the communication and processes it, while the other three computers receive the communication and discard it without processing it
2, easy to conflict
- Only one signal can exist in the coaxial cable at a time, such as from a second computer to a third
- If a fourth computer sends a signal to a third computer at this point, a signal collision occurs
3. Unsafe
- When the second computer sends a message to the fourth computer, the other computers can also receive the message. If the other computers have a packet capture tool installed, the second computer will receive the message
There was a break in the middle and the whole thing was paralyzed
- The communication travels through the cable, and the coaxial cable has terminal resistors at both ends that absorb the incoming communication
- If there is no termination resistor, when a communication arrives, it will backtrack and travel throughout the line, causing a collision
- As in the case above, without the termination resistor, the communication will bounce back
- When a cable is broken at one point, the communication may not be reached, and the communication will bounce back at the break point
- As shown in the figure below, there is a break between the second computer and the third computer. The third computer sends communication to the first computer. As a result, communication cannot be sent to the first computer
5. Conflict domains
- The number of computers connected to each other that conflict is also known as a conflict domain
Two, the hub
1. Application of the hub
- Hubs are basically the same as coaxial cables, too
Half duplex communication
,Easy to conflict
andunsafe
- However, if the connection between the hub and one computer is broken, it does not affect the communication between other computers
- The following figure,
Computer 1
andHubs 0
Between,Computer 3
andComputer 2
Communication is still normal
2. Packet Tracer uses a hub to communicate
- Let’s add three
PC computer
- Put one in the middle
A hub
- Using the line will be
PC computer
andA hub
Connect. If you don’t know what line to use, choose the first lightning bolt, okay
- Click on the
Computer 0
.Configure IP
- The input
The IP address
Later, clicktab
Key, automatically generatedSubnet mask
- You can use
notes
Function, annotationComputer 0
theThe IP address
- Same thing
Computer 1
andComputer 2
, the configurationThe IP address
withnotes
markThe IP address
- Click on the bottom right corner
The simulation
And then usemail
, fromComputer 0
Sent to theComputer 2
, you can see two generated in the simulation panelThe event
- The first is
ICMP Event
You can see that there areComputer 0
theThe source IP address
andComputer 2
theDestination IP address
- The second is
ARP event
You can see that there areComputer 0
theThe source MAC address
andDestination MAC address FF.FFff.ffff
I don’t know at this pointComputer 2
theThe MAC address
, so needARP protocol
To obtainComputer 2
theThe MAC address
- Click on the
The next step
.Computer 0
toA hub
sendARP protocol
Communicate and generate aThe event
- Click on the
The event
, you can see that the hub does not do data processing
- Click on the
The next step
.A hub
Will send toComputer 1
andComputer 2
Send one eachARP protocol
Communicate and claim two events
- Click on the first one
The event
As you can seeComputer 2
forARP communication
The processing of- contrast
Destination IP address
With his ownThe source IP address
Is it consistent? Is it consistent - to
Computer 0
Send your ownThe MAC address
- Information carrying:
Computer 2
theThe source IP address
,Source MAC
The address andComputer 0
theThe source IP address
,The source MAC address
- contrast
- Click the second one
The event
.Computer 1
receivedARP protocol
Communication, contrastDestination IP address
With his ownThe source IP address
Inconsistent, discarding information without processing
- Click on the
The next step
.Computer 2
toA hub
sendARP protocol
Communication, generating an event
- Click on the
The event
.A hub
No communication is processed
- Click on the
The next step
.A hub
willARP protocol
Communication sent toComputer 0
And computer1
And produces threeThe event
- Click on the first one
The event
.Computer 0
To receiveARP protocol
Communication, comparison of information, further processingDestination MAC Address
withComputer 0
theThe source MAC address
consistentDestination IP address
withComputer 0
theThe source IP address
consistent- The cache
Computer 2
theThe MAC address
- Click the second one
The event
.Computer 1
To receiveARP protocol
Communication, comparison of information, further processingDestination MAC Address
withComputer 1
theThe source MAC address
Don’t agree- Information is discarded without processing
- Click on the third one
The event
.Computer 0
Access to theComputer 2
theThe MAC address
Get under wayThe ICMP protocol
communication
- Click on the
The next step
.Computer 0
Began toA hub
sendThe ICMP protocol
Communicate and generate aThe event
- Click on the
The event
.A hub
Communication data is not processed
- Click on the
The next step
.A hub
To theComputer 1
andComputer 2
sendThe ICMP protocol
communication
- Click on the first one
The event
.Computer 2
receivedComputer 0
theThe ICMP protocol
Communication to process and compare data- contrast
Destination MAC Address
, with their ownThe MAC address
consistent - contrast
Destination IP address
, with their ownThe IP address
consistent - Processing data to
Computer 0
Sending response data
- contrast
- Click the second one
The event
.Computer 1
receivedComputer 0
theThe ICMP protocol
Communication to process and compare data- contrast
Destination MAC Address
, with their ownThe MAC address
Don’t agree - Discard data without processing
- contrast
- Click on the
The next step
.Computer 2
toA hub
sendThe ICMP protocol
Communicate and generate aThe event
- Click on the
The event
.A hub
Incoming communications are not processed
- Click on the
The next step
, the hub toComputer 0
andComputer 1
Send one eachThe ICMP protocol
Communicate and generate twoThe event
- Click on the first one
The event
.Computer 0
Received fromComputer 2
theThe ICMP protocol
Communicate, compare data- purpose
The MAC address
With his ownThe source MAC address
consistent - purpose
The IP address
With his ownThe source IP address
consistent - Process the data, pass it up
- purpose
- Click the second one
The event
.Computer 1
Received fromComputer 2
theThe ICMP protocol
Communicate, compare data- purpose
The MAC address
With his ownThe source MAC address
Don’t agree - Discard data without processing
- purpose
Note: This is the complete process of computer 0 sending data to computer 2 through the hub. As you can see, the hub does not have any “intelligence” during the whole process. It does not further process the received data and only sends the received traffic separately to all other connected computers
3. View the target MAC address of computer 0 cache
- Click on the
Computer 0
, the choice ofCommand prompt
- The input
arp -a
To view the cacheComputer 2
theThe IP address
andThe MAC address
4. Computers communicate through multiple hubs
- Before adding a
Hub 1
andComputer 3
, use the one in the lower right cornerThe simulation
, by email fromComputer 3
Sent to theComputer 1
The events of the whole process are shown in the figure below
- The generated
The event
In, the time of each step is different, the same stepThe event
At the same time0.000
The first:Computer 3
Prepare data to send toComputer 1
But it’s not clearComputer 1
theThe MAC address
0.000
Article 2:Computer 3
Ready to useARP broadcast protocol
To obtainComputer 1
theThe MAC address
- Carrying information:
Source IP address (IP address of Computer 3)
.Destination IP address
(The IP address of computer 1
),The source MAC address
(MAC address of computer 3
),Destination MAC Address
(FFFF.FFFF.FFFF
)
- Carrying information:
0.001
:Computer 3
willARP communication
Sent to theHubs 0
0.002
The first:Hubs 0
willARP communication
Sent to theComputer 0
Computer 0
contrastARP communication
In theDestination IP address
With his ownThe source IP address
Otherwise, the communication is discarded without processing
0.002
Article 2:Hubs 0
willARP communication
Sent to theHub 1
0.003
The first:Hub 1
willARP communication
Sent to theComputer 2
Computer 2
contrastARP communication
In theDestination IP address
With his ownThe source IP address
Otherwise, the communication is discarded without processing
0.003
The first:Hub 1
willARP communication
Sent to theComputer 1
Computer 1
contrastARP communication
In theDestination IP address
With his ownThe source IP address
Same, processing data, ready to passARP communication
toComputer 3
Send your ownThe MAC address
- Carrying information:
The source IP address
(The IP address of computer 1
),Destination IP address
(The IP address of computer 3
),The source MAC address
(MAC address of computer 1
),Destination MAC Address
(MAC address of computer 3
)
0.004
:Computer 1
willARP communication
Sent to theHub 1
0.005
The first:Hub 1
willARP communication
Sent to theHubs 0
0.005
Article 2:Hub 1
willARP communication
Sent to theComputer 2
Computer 2
contrastARP communication
In theDestination IP address
With his ownThe source IP address
Otherwise, the communication is discarded without processing
0.006
The first:Hubs 0
willARP communication
Sent to theComputer 0
Computer 0
contrastARP communication
In theDestination IP address
With his ownThe source IP address
Otherwise, the communication is discarded without processing
0.006
Article 2:Hubs 0
willARP communication
Sent to theComputer 3
Computer 3
contrastARP communication
In theDestination IP address
With his ownThe source IP address
The same,Destination MAC Address
With his ownThe source MAC address
Again, processing data
0.006
Article 3:Computer 3
receivedComputer 1
theThe MAC address
After, ready toComputer 1
sendICMP communication
- Carrying information:
The source IP address
(The IP address of computer 3
),Destination IP address
(The IP address of computer 1
),The source MAC address
(MAC address of computer 3
),Destination MAC Address
(MAC address of computer 1
)
- Carrying information:
0.007
:Computer 3
willThe ICMP communications
Sent to theHubs 0
0.008
The first:Hubs 0
willThe ICMP communications
Sent to theComputer 0
Computer 0
contrastDestination MAC Address
With his ownThe source MAC address
Otherwise, the communication is discarded without processing
0.008
Article 2:Hubs 0
willThe ICMP communications
Sent to theHub 1
0.009
The first:Hub 1
willThe ICMP communications
Sent to theComputer 2
Computer 2
contrastDestination MAC Address
With his ownThe source MAC address
Otherwise, the communication is discarded without processing
0.009
Article 2:Hub 1
willThe ICMP communications hair
Sent to theComputer 1
Computer 1
contrastDestination MAC Address
With his ownThe source MAC address
Identical, contrastDestination IP address
With his ownThe source IP address
Same, process data, prepare willResponse data after processing
Back to theComputer 3
- Carrying information:
The source IP address
(The IP address of computer 1
),Destination IP address
(The IP address of computer 3
),The source MAC address
(MAC address of computer 1
),Destination MAC Address
(MAC address of computer 3
)
0.010
:Computer 1
willThe ICMP communications
Sent to theHub 1
0.011
The first:Hub 1
willThe ICMP communications
Sent to theHubs 0
0.011
Article 2:Hub 1
willThe ICMP communications
Sent to theComputer 2
Computer 2
contrastDestination MAC Address
With his ownThe source MAC address
Otherwise, the communication is discarded without processing
0.012
The first:Hubs 0
willThe ICMP communications
Sent to theComputer 3
Computer 3
contrastDestination MAC Address
With his ownThe source MAC address
The same,Destination IP address
With his ownThe source IP address
Similarly, reading data in communication
0.012
Article 2:Hubs 0
willThe ICMP communications
Sent to theComputer 0
Computer 0
contrastDestination MAC Address
With his ownThe source MAC address
Otherwise, the communication is discarded without processing
To sum up: the hub has no “IQ”, it can only receive and send communication, but cannot process and save communication, and has no “memory” function. When there are 1000 computers, it has to send messages to 999 computers, resulting in great waste. The more devices, the lower the efficiency
Third, the bridge
1, the application of network bridge
- The bridge can learn the MAC address of each interface
- Thus play the role of isolating the conflict domain
- The bridge is intelligent, learning the MAC address of each interface and recording the computer as traffic comes in
The source IP address
andThe source MAC address
- The following figure,
Computer 6
Send out a communication,The bridge
The port on the left will recordComputer 6
theThe IP address
andThe MAC address
- When another
Computer 7
toComputer 6
When sending a communication,The bridge on the left side of the
It has been recordedComputer 6
theThe IP address
andThe MAC address
, the communication will no longer be passed to the right
2. Network bridge is used in Packet Tracer
- Place a bridge
- Configuration of PC
The IP address
And then carry out the configurationattachment
, as shown in the figure below
- if
The bridge
If there is an orange part on the line, switch to the one in the lower right cornerreal-time
andThe simulation
- use
mail
fromComputer 0
Sent to theComputer 1
And the wholeARP communication
The flow is shown in the figure below- when
Computer 0
Outgoing communication, throughHubs 0
And send it toThe bridge
When,Port on the left of the bridge
Will first recordComputer 0
theThe IP address
andThe MAC address
Check the communicationDestination MAC Address
isFFFF.FFFF.FFFF
, so the communication continues to the right - when
Computer 1
After receiving the message, start returning your ownThe MAC address
, will passHubs 0
And send it toThe bridge
- At this point,
Port on the left of the bridge
Record theComputer 0
theThe IP address
andThe MAC address
, compared with communicationDestination IP address
andDestination MAC Address
, found consistent, interrupted communication, no longer passed to the right - Colleagues,
The bridge
recordComputer 1
theThe IP address
andThe MAC address
- when
- Use the one in the lower right
The simulation
Function to use mail fromComputer 0
Sent to theComputer 1
, subdivision steps - As shown in the picture below,
Computer 0
useARP protocol
Communication, accessComputer 1
theThe MAC address
Computer 0
sendARP communication
arriveHubs 0
Hubs 0
sendARP communication
arriveComputer 1
Computer 1
Contrastive communicationDestination IP address
With his ownThe IP address
Has been,The MAC address
isFFFF.FFFF.FFFF
“, so ready toComputer 0
Send your ownThe MAC address
Hubs 0
sendARP communication
arriveThe bridge
The bridge
The left interface is recording the communicationComputer 0
theThe IP address
andThe MAC address
The bridge
The left interface is recording the communicationComputer 0
theThe IP address
andThe MAC address
After discovering communication inDestination MAC Address
isFFFF.FFFF.FFFF
, and sends it to the rightARP protocol
The bridge
willARP communication
Sent to theHub 1
Hub 1
willARP communication
Sent to theComputer 2
Computer 2
Contrast communicationDestination IP address
With his ownThe IP address
Different, not processed
Hub 1
willARP communication
Sent to theComputer 3
Computer 3
Contrast communicationDestination IP address
With his ownThe IP address
Different, not processed
Computer 1
toComputer 0
throughARP communication
Send your ownThe MAC address
Computer 1
sendARP protocol
toHubs 0
Hubs 0
toComputer 0
sendARP communication
Computer 0
Contrast communicationDestination IP address
,Destination MAC Address
With his ownThe IP address
,The MAC address
The same- so
Computer 0
Ready toComputer 1
sendThe ICMP communications
Hubs 0
toThe bridge
sendARP communication
The bridge
And by comparison,On the left side of the
The interface has been loggedARP communication
In theDestination IP address
andDestination MAC Address
- so
The bridge
Communication interrupted. No longer sending to the rightARP communication
- At the same time
The bridge
recordComputer 1
theThe IP address
andThe MAC address
Computer 0
Began toComputer 1
sendThe ICMP communications
Computer 0
toHubs 0
sendThe ICMP communications
Hubs 0
toComputer 1
sendThe ICMP communications
Computer 1
By comparing theThe ICMP communications,
theDestination IP address
andDestination MAC
Address with your ownThe IP address
andThe MAC address
The same- As a result,
Computer 1
Process the data and prepare the dataComputer 0
sendThe response data
Hubs 0
toThe bridge
sendThe ICMP communications
The bridge
And by comparison,The ICMP communications,
theDestination IP address
andDestination MAC
Address andOn the left side of the interface
In the recordComputer 1
theThe IP address
andThe MAC address
The same- As a result,
The bridge
The communication is interrupted and ICMP communication is not sent to the right side
Computer 1
processedComputer 0
Send theThe ICMP communications
afterThe response data
throughICMP
Communications sent toComputer 0
Computer 1
willThe ICMP communications
Sent to theHubs 0
Hubs 0
willThe ICMP communications
Sent to theComputer 0
Computer 0
By contrast, it is found thatThe ICMP communications
In theDestination IP address
And purposeThe MAC address
With his ownThe IP address
andThe MAC address
The same- As a result,
Computer 0
receiveThe response data
Hubs 0
willThe ICMP communications
Send to the bridgeThe bridge
By contrast, it is found thatThe ICMP communications
In theDestination IP address
And purposeThe MAC address
withPort on the left of the bridge
Recorded in theComputer 0
theThe IP address
andThe MAC address
The same- As a result,
The bridge
Communication interrupted. No longer sending to the rightThe ICMP communications
This is the computers 0 and 1 at the same network segment in the communication process The bridge is “intelligence”, will record in communication sent from the source IP address and source MAC address contrast communication if the destination IP address and the destination MAC address has been recorded If the record, it will interrupt the communication, no longer send other interface communication
Iv. Switch
1. Switch application
switches
Equivalent to more interfacesThe bridge
, can record each connected computerThe IP address
andThe MAC address
switches
It is full duplex communication, all computers in the entire connection can send communication at the same time
switches
Safer than the hub, when the switch recordsComputer 2
theThe IP address
andThe MAC address
And otherThe computer
giveComputer 2
Send the communication, the communication will not be sent to othersThe computer
2. Switch is used in Packet Tracer
- As shown in the picture below, place four on the desktop
PC computer
.Configure IP
And place another oneswitches
- in
PC computer
andswitches
Connection between
- use
mail
, fromComputer 0
Sent to theComputer 3
- The detailed steps are as follows
Computer 0
sendARP communication
toComputer 3
To obtainComputer 3
theThe MAC address
Computer 0
toswitches
sendARP communication
switches
recordARP communication
In theComputer 0
theThe IP address
andThe MAC address
switches
Prepare to send to all three computersARP communication
switches
toComputer 1
sendARP communication
Computer 1
Through comparison, the communication is foundDestination IP address
With his ownThe IP address
Otherwise, the communication is discarded without processing
switches
toComputer 2
sendARP communication
Computer 2
Through comparison, the communication is foundDestination IP address
With his ownThe IP address
Otherwise, the communication is discarded without processing
switches
toComputer 3
sendARP communication
Computer 3
Through comparison, the communication is foundDestination IP address
With his ownThe IP address
Same, ready forComputer 0
Send your ownThe MAC address
Computer 3
toComputer 0
sendARP communication
Carry,MAC address of computer 3
Computer 3
toswitches
sendARP communication
switches
recordARP communication
In theComputer 3
theThe IP address
andThe MAC address
switches
Know by comparisonARP communication
Sent to theIt has been recorded
theComputer 0
- As a result,
switches
Only toComputer 0
sendARP communication
, not toComputer 1
andComputer 2
Send a communication
switches
toComputer 0
sendARP protocol
Computer 0
Through comparison, the communication is foundDestination IP address
andDestination MAC Address
With his ownThe IP address
andThe MAC address
consistent- So, receive
Computer 3
theThe MAC address
, ready toComputer 3
sendICMP communication
Computer 0
toComputer 3
sendICMP communication
Computer 0
toswitches
sendICMP communication
switches
By contrast, it is found thatThe ICMP communications
In theDestination IP address
withDestination MAC Address
And already recordedComputer 3
theThe IP address
andThe MAC address
The same- As a result,
switches
Only toComputer 3
sendThe ICMP communications
switches
toComputer 3
sendICMP communication
Computer 3
Contrast, in communicationDestination IP address
andDestination MAC Address
With his ownThe IP address
andThe MAC address
The sameComputer 3
Handle the traffic. Get ready forComputer 0
sendThe response data
Computer 3
toComputer 0
sendICMP communication
To return toThe response data
Computer 3
toswitches
sendICMP communication
switches
By contrast, it is found thatThe ICMP communications
In theDestination IP address
withDestination MAC Address
And already recordedComputer 0
theThe IP address
andThe MAC address
The same- As a result,
switches
Only toComputer 0
sendThe ICMP communications
switches
toComputer 0
sendICMP communication
Computer 0
Contrast, in communicationDestination IP address
andDestination MAC Address
With his ownThe IP address
andThe MAC address
The same- As a result,
Computer 0
Receive and processComputer 3
From theThe response data
5. Router
1. Router application
- In the same network segment, it can be used
Cable directly connected
,Coaxial cable
,A hub
,The bridge
,switches
Transmit data - This parameter is required in different network segments
The router
Transmit data
- Cable direct connection, coaxial cable, hub, bridge, switch
- The connected devices must be on the same network segment
- For example,
192.168.1.10
and192.168.1.11
, includingThe IP address
In front of192.168.1
You can think of it as a network segment10
and11
It’s computerId no.
Both network segment192.168.1
In theId10 computer
andId11 computer
- For example,
- The connected devices are in the same broadcast domain
- Devices connected to the same network segment, for example
192.168.1.10
,192.168.1.11
,192.168.1.12
,192.168.1.13
, the four devices in the same network segment are connected - The broadcast will propagate in the same broadcast domain
- Devices connected to the same network segment, for example
- The connected devices must be on the same network segment
- The router
- Data can be forwarded between different network segments
- Isolated broadcast domain
- As shown below, the network segment on the left is
192.168.1
The network segment on the right is192.168.2
- When computer 0 sends a message to computer 1, the ARP broadcast is blocked from reaching the router and does not travel to the right
2. Use the router in Packet Tracer
(1) Configure the device
- As shown in the picture below, place four computers, two switches, and one router, and connect them with wires
- The configuration is shown in the following figure
Computer 0
theThe IP address
andThe default gateway
- IP address: 192.168.1.10
- Default gateway: 192.168.1.1
- configuration
Computer 1
theThe IP address
andThe default gateway
- IP address: 192.168.1.11
- Default gateway: 192.168.1.1
- configuration
Computer 2
theThe IP address
andThe default gateway
- IP address: 192.168.2.10
- Default gateway: 192.168.2.1
- configuration
Computer 3
theThe IP address
andThe default gateway
- IP address: 192.168.2.11
- Default gateway: 192.168.2.1
- In this case, the lines on both sides of the route are red, indicating that the route is not connected
- Click on the
The toolbar
On theoptions
, the choice ofPreferences...
- Check the
Port labels are always displayed in logical workspaces
- In this way, you can see the port name that each device uses when it is connected
- configuration
The router
Left side interfaceNetwork segment
for192.168.1.1
And open thePort state
- configuration
The router
Right-side interfaceNetwork segment
for192.168.2.1
And open thePort state
- The line is now connected
(2) Communication between computer 0 and computer 1
- Click on the bottom right corner
The simulation
And then use email fromComputer 0
Sent to theComputer 1
- when
Computer 0
Ready to sendARP broadcast
To obtainComputer 1
theThe MAC address
“, will judge firstDestination IP address
(The IP address of computer 1
) andThe source IP address
(The IP address of computer 0
(Is it inSame network segment
, if theSame network segment
.Computer 0
throughARP broadcast
To obtainComputer 1
theThe MAC address
Computer 0
toComputer 1
sendARP broadcast
To obtainComputer 1
theThe MAC address
- 1.
Computer 0
toSwitches 0
Send broadcastSwitches 0
recordComputer 0
theThe IP address
andThe MAC address
- 2.1,
Switches 0
toComputer 1
Send broadcastComputer 1
By contrast, the broadcast was foundDestination IP address
With his ownThe IP address
The same,Destination MAC Address
isFFFF.FFFF.FFFF
- As a result,
Computer 1
Ready toComputer 0
Send your ownThe MAC address
- 2.2,
Switches 0
toThe router 0
Send broadcastThe router 0
By contrast, the broadcast was foundNetwork segment
is192.168.1.1
And on the leftNetwork segment
The same- As a result,
The router 0
Block the broadcast. It doesn’t go right
- 1.
Computer 1
toComputer 0
sendARP broadcast
, sendComputer 1
theThe MAC address
- 3,
Computer 1
toSwitches 0
sendARP broadcast
Switches 0
By contrast, the broadcast was foundDestination IP address
andDestination MAC Address
With the record ofComputer 0
theThe IP address
andThe MAC address
The same- As a result,
Switches 0
Ready toComputer 0
sendARP broadcast
Do not broadcast to other devices - At the same time,
Switches 0
recordComputer 1
theThe IP address
andThe MAC address
- 4,
Switches 0
toComputer 0
sendARP broadcast
Computer 0
Access to theComputer 1
theThe MAC address
, ready toComputer 1
sendICMP communication
- 3,
Computer 0
toComputer 1
sendICMP communication
- 5,
Computer 0
toSwitches 0
sendICMP communication
Switches 0
By contrast, it is found thatcommunication
In theDestination IP address
andDestination MAC Address
With the record ofComputer 1
theThe IP address
andThe MAC address
The same- As a result,
Switches 0
Ready toComputer 1
Send a communication
- 6,
Switches 0
toComputer 1
sendICMP communication
Computer 1
By contrast, it is found thatcommunication
In theDestination IP address
andDestination MAC Address
With the record ofComputer 1
theThe IP address
andThe MAC address
The same- As a result,
Computer 1
Process the data and prepare the dataComputer 0
sendThe response data
- 5,
Computer 1
toComputer 0
sendICMP communication
- 7,
Computer 1
toSwitches 0
sendICMP communication
Switches 0
By contrast, it is found thatcommunication
In theDestination IP address
andDestination MAC Address
With the record ofComputer 0
theThe IP address
andThe MAC address
The same- As a result,
Switches 0
Ready toComputer 0
Send a communication
- Eight,
Switches 0
toComputer 0
sendICMP communication
Computer 0
By contrast, it is found thatcommunication
In theDestination IP address
andDestination MAC Address
With the record ofComputer 0
theThe IP address
andThe MAC address
The same- As a result,
Computer 0
To deal withThe response data
- 7,
(2) Communication between computer 0 and computer 3
Computer 0
toComputer 3
The data is sent, first checkedComputer 0
andComputer 3
Check whether they are on the same network segment- when
Computer 0
andComputer 3
If the routes are in different network segments, the routes are in different network segmentsThe router
So,Computer 0
To pass theThe router
Forwarding data sumComputer 3
communication - First of all,
Computer 0
To obtain aThe router
The network cardThe MAC address
Computer 0
toThe router 0
sendARP broadcast
To obtainThe router
The gatewayThe MAC address
- 1.
Computer 0
toSwitches 0
sendARP broadcast
Switches 0
recordComputer 0
theThe IP address
andThe MAC address
Switches 0
Prepared to giveComputer 1
andThe router 0
sendARP broadcast
- 2.1,
Switches 0
toComputer 1
sendARP broadcast
Computer 1
Received broadcast by contrast broadcastDestination IP address
And his ownThe IP address
Different, not processed
- 2.2,
Switches 0
toThe router 0
sendARP broadcast
The router
Received broadcast by contrast broadcastDestination IP address
And his ownThe IP address
Same, return gatewayThe MAC address
- 1.
The router 0
toComputer 0
sendARP broadcast
, sendThe router 0
theThe MAC address
- 3,
The router 0
toSwitches 0
sendARP broadcast
Switches 0
Has been recordedComputer 0
theThe IP address
andThe MAC address
By contrast, prepare itemsComputer 0
sendARP broadcast
Switches 0
recordThe router
The network cardThe IP address
andThe MAC address
- 4,
Switches 0
toComputer 0
sendARP broadcast
Computer 0
Access to theThe router 0
theThe MAC address
, ready toThe router 0
sendThe ICMP communications
- 3,
Computer 0
toThe router 0
sendThe ICMP communications
, the ultimate goal is toComputer 3
sendThe ICMP communications
- 5. Computer 0 sends ICMP communication to switch 0
Switches 0
Has been recordedThe router 0
The network cardThe IP address
andThe MAC address
, ready toThe router 0
sendThe ICMP communications
- 6,
Switches 0
toThe router 0
sendThe ICMP communications
The router 0
Received the communication, through comparison, found that there is no recordComputer 3
theThe IP address
andThe MAC address
, so ready to the network segment192.168.2.1
The direction to sendARP broadcast
To obtainComputer 3
theThe MAC address
- 5. Computer 0 sends ICMP communication to switch 0
The router 0
toComputer 3
sendARP broadcast
To obtainComputer 3
theThe MAC address
- 7,
The router 0
toSwitches 0
Sending ARP BroadcastsSwitches 0
There is no recordComputer 3
theThe IP address
andThe MAC address
- As a result,
Switches 0
Ready toComputer 2
andComputer 3
Send separatelyARP broadcast
- At the same time,
Switches 0
recordThe router 0
theThe IP address
andThe MAC address
- 8.1,
Switch 1
toComputer 2
sendARP broadcast
Computer 2
After receiving the broadcast, compare the broadcastDestination IP address
With his ownThe IP address
Different, not processed
- 8.2,
Switch 1
toComputer 3
sendARP broadcast
Computer 3
After receiving the broadcast, compare the broadcastDestination IP address
With his ownThe IP address
Same, ready forThe router 0
Return one’s ownThe MAC address
- 7,
Computer 3
toThe router 0
sendARP broadcast
, sendComputer 3
theThe MAC address
- 9,
Computer 3
toSwitch 1
sendARP broadcast
Switch 1
Record theThe router 0
theThe IP address
andThe MAC address
, ready toThe router 0
sendARP broadcast
- At the same time,
Switch 1
recordComputer 3
theThe IP address
andThe MAC address
- 10,
Switch 1
toThe router 0
sendARP broadcast
The router 0
receivedComputer 3
theThe MAC address
, ready toComputer 3
sendICMP communication
- 9,
The router 0
toComputer 3
sendICMP communication
- 11,
The router 0
toSwitch 1
sendICMP communication
Switch 1
Record theComputer 3
theThe IP address
andThe MAC address
- 12,
Switch 1
toComputer 3
sendICMP communication
Computer 3
Received message, compareDestination IP address
andDestination MAC Address
With his ownThe IP address
andThe MAC address
The same- As a result,
Computer 3
Process the data and prepare it forComputer 0
sendThe response data
- 11,
Computer 3
toThe router 0
sendICMP communication
Carry,The response data
Computer 3
toSwitch 1
sendICMP communication
Switch 1
recordedThe routing path 0
theThe IP address
andThe MAC address
, ready toThe router 0
Send a communication
Switch 1
toThe router 0
sendICMP communication
The router 0
To the network segment192.168.1.1
Directionally transmitted communication
The router 0
toComputer 0
sendThe ICMP communications
Carry,Computer 3
theThe response data
The router 0
toSwitches 0
sendThe ICMP communications
Switches 0
Record theComputer 0
theThe IP address
andThe MAC address
, ready toComputer 0
Send a communication
Switches 0
toComputer 0
sendThe ICMP communications
Computer 0
According to the correspondenceDestination IP address
andDestination MAC Address
With his ownThe IP address
andThe MAC address
Same, receiveThe response data
In the whole communication process, the router serves as a transit role, connecting two different network segments and transmitting the communication of computers in different network segments