Ping from Host-1 to Host-2
@startuml
participant "Host1\n.11" as h1
control 172.16.1.X as n1
participant "Switch1\n.2" as s1
control 182.100.1.X as n2
participant "Router1\n.1" as r1
participant Internet
participant "Router2\n.1" as r2
control 192.100.1.X as n3
participant "Switch2\n.2" as s2
control 200.100.1.X as n4
participant "Host2\n.3" as h2
note over h1
Send Pkt to Host2
I have MAC of Host2?No
Send ARP pkt
end note
h1->s1: ARP Probe
s1->r1:ARP Req\n |srcIP=host1|dstIP=Host2|\nsrcMAC=self|dstMAC=fff|
note over r1
Send self MAC
end note
r1->s1:ARP Res
s1->h1:ARP Res
h1->s1: Ping Req\n|srcMac=h1|dstMac=r1\n|src|dst|SrcPort|\nDstPort|ICMP Hello|
s1->r1: Ping Req\n|srcMac=h1|dstMac=r1\n|src|dst|SrcPort|\nDstPort|ICMP Hello|
note over r1
Layer-2
if(dstMAC=MyMAC)
//Process it
Change MAC to
immediately connected
router
end note
note over r1
Layer-3
if(My Pkt)
consume
else
Change chksum
TTL -= 1
|src=172.16.1.11|dst=200.100.1.5|
- Send on outgoing
intf from routing
table
end note
r1->r2: Ping Req\n|srcMac=h1|dstMac=r1\n|src|dst|SrcPort|\nDstPort|ICMP Hello|
legend
= Routing Table(R1)
|N/WDestination | N/W Mask |Next Hop|Interface|Metric/Cost |Protocol|
|0.0.0.0|0.0.0.0 |172.16.1.1 |1 |46 |DEFAULT ROUTE \nSend Pkt to G/W If no specific Next Hop is Listed in Table.|
|255.255.255.255 |255.255.255.255 |172.16.2.1 |1 |296 |Direct |BROADCAST|
|127.0.0.1 |255.255.255.255 |127.0.0.1 |127.0.0.0.1 |4531 |Local |LOOPBACK|
|222.16.4.0 |255.255.255.0 |172.16.1.1 |0 |30 |STATIC |This is Manually Configured. Reach 222.16.4.X via default G/W|
|200.100.1.0 |255.255.255.0 |172.16.1.2 |1 |30 |OSPF |
|192.100.1.0 |255.255.255.0 |172.16.1.2 |1 |92 |OSPF |
end legend
@enduml