Ping Presentation
Upcoming SlideShare
Loading in...5
×

Like this? Share it with your network

Share
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
1,274
On Slideshare
1,198
From Embeds
76
Number of Embeds
2

Actions

Shares
Downloads
22
Comments
0
Likes
0

Embeds 76

http://iktfag.wordpress.com 75
http://www.youporn.com 1

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Simple net pinging Date 03/06/2007 Hanan Ohana
  • 2. Motivation
    • This presentation shows the flow of events for a PING request in a brand new net with static IP configured to the devices and blank ARP tables to begin with.
    • The PING request is sent from one computer in the IP net to another computer.
    • Taking in consideration: routers do not use buffers so IP packets get lost if ARP request needed.
  • 3. Net introduction
    • Net containing:
      • 4 end units
      • 2 switches
      • 2 routers
  • 4. Net introduction
    • The net is configured this way:
      • The circled letters A,…,H represents MAC ID’s of the devices when the routers have one MAC ID for each leg (port).
      • IP address and Gate Way for each station and device is written beside the unit.
      • The switches legs are numbered in circles 1,2,3.
    • The ARP and CAM tables are empty, as the initial condition of the devices.
    1 1 2 3 3 2 A B C D E F G H IP 10.0.0.1 GW 10.0.0.3 IP 10.0.0.2 GW 10.0.0.3 IP 10.0.0.3 IP 20.0.0.1 IP 20.0.0.2 IP 30.0.0.1 IP 30.0.0.2 GW 30.0.0.1 IP 30.0.0.3 GW 30.0.0.1 GW 20.0.0.2 GW 20.0.0.1 A ARP B ARP G ARP H ARP R ARP R ARP CAM CAM
  • 5. IP packet release algorithm
    • This block diagram describes the algorithm used by a network device for frame structure decision, when IP packet has to be sent.
    Local Destination IP? ARP Target MAC Known? Send to Gateway Send to destination Send to destination Yes No Yes No Decision needed
  • 6. PING chain of events
    • PING request from station A to station H:
    • Following PING request:
      • A:>ping 30.0.0.3
    1 1 2 3 3 2 A B C D E F G H IP 10.0.0.1 GW 10.0.0.3 IP 10.0.0.2 GW 10.0.0.3 IP 10.0.0.3 IP 20.0.0.1 IP 20.0.0.2 IP 30.0.0.1 IP 30.0.0.2 GW 30.0.0.1 IP 30.0.0.3 GW 30.0.0.1 GW 20.0.0.2 GW 20.0.0.1 A ARP B ARP G ARP H ARP R ARP R ARP CAM CAM
  • 7. PING chain of events
    • A:>ping 30.0.0.3
    • Ping request is to be released from station A, the “IP packet release algorithm” is used.
    • For non local destination IP and unknown target MAC, an ARP request is sent to GW, as a broadcast.
    1 1 2 3 3 2 A B C D E F G H IP 10.0.0.1 GW 10.0.0.3 IP 10.0.0.2 GW 10.0.0.3 IP 10.0.0.3 IP 20.0.0.1 IP 20.0.0.2 IP 30.0.0.1 IP 30.0.0.2 GW 30.0.0.1 IP 30.0.0.3 GW 30.0.0.1 GW 20.0.0.2 GW 20.0.0.1 A ARP B ARP G ARP H ARP R ARP R ARP CAM CAM
  • 8. PING chain of events
    • ARP request is sent from station A:
    • ARP packet:
    • The ARP packet is a broadcast so the left switch is flooding and send the same packet to the rest of the connected legs.
    • The left switch updates the CAM table with A-leg1 relation.
    FCS TRAILER 10.0.0.3 000000 10.0.0.1 A 0001 4 6 0800 1 0806 A FFFF 1 1 2 3 3 2 A B C D E F G H IP 10.0.0.1 GW 10.0.0.3 IP 10.0.0.2 GW 10.0.0.3 IP 10.0.0.3 IP 20.0.0.1 IP 20.0.0.2 IP 30.0.0.1 IP 30.0.0.2 GW 30.0.0.1 IP 30.0.0.3 GW 30.0.0.1 GW 20.0.0.2 GW 20.0.0.1 A ARP B ARP G ARP H ARP R ARP R ARP A-leg1 CAM CAM
  • 9. PING chain of events
    • ARP packet arrives to station B and green router:
    • Station B receives the ARP packet and updates the ARP table with A-10.0.0.1 relation. Station B does not send a reply.
    • The green router receives the ARP packet and updates the ARP table with A-10.0.0.1 relation, sends a reply and trashes the original packet.
    1 1 2 3 3 2 A B C D E F G H IP 10.0.0.1 GW 10.0.0.3 IP 10.0.0.2 GW 10.0.0.3 IP 10.0.0.3 IP 20.0.0.1 IP 20.0.0.2 IP 30.0.0.1 IP 30.0.0.2 GW 30.0.0.1 IP 30.0.0.3 GW 30.0.0.1 GW 20.0.0.2 GW 20.0.0.1 A ARP A-10.0.0.1 B ARP G ARP H ARP A-10.0.0.1 R ARP R ARP A-leg1 CAM CAM
  • 10. PING chain of events
    • ARP reply is sent from green router:
    • ARP packet:
    • ARP packet gets to the left switch. Switch recognizes destination MAC and pass it to leg1. CAM table is updated with C-leg3 relation.
    • Station A receives ARP response and updates its ARP table with C-10.0.0.3 relation.
    1 1 2 3 3 2 A B C D E F G H IP 10.0.0.1 GW 10.0.0.3 IP 10.0.0.2 GW 10.0.0.3 IP 10.0.0.3 IP 20.0.0.1 IP 20.0.0.2 IP 30.0.0.1 IP 30.0.0.2 GW 30.0.0.1 IP 30.0.0.3 GW 30.0.0.1 GW 20.0.0.2 GW 20.0.0.1 C-10.0.0.3 A ARP A-10.0.0.1 B ARP G ARP H ARP A-10.0.0.1 R ARP R ARP A-leg1 C-leg3 CAM CAM FCS TRAILER 10.0.0.3 C 10.0.0.1 A 0002 4 6 0800 1 0806 C A
  • 11. PING chain of events
    • PING packet is sent from station A:
    • Now that station A knows the MAC of station C (GW), a PING packet is sent.
    • PING packet:
    • PING packet is sent to GW because pinging to a non local IP.
    FCS PING 30.0.0.3 10.0.0.1 0800 A C 1 1 2 3 3 2 A B C D E F G H IP 10.0.0.1 GW 10.0.0.3 IP 10.0.0.2 GW 10.0.0.3 IP 10.0.0.3 IP 20.0.0.1 IP 20.0.0.2 IP 30.0.0.1 IP 30.0.0.2 GW 30.0.0.1 IP 30.0.0.3 GW 30.0.0.1 GW 20.0.0.2 GW 20.0.0.1 C-10.0.0.3 A ARP A-10.0.0.1 B ARP G ARP H ARP A-10.0.0.1 R ARP R ARP A-leg1 C-leg3 CAM CAM
  • 12. PING chain of events
    • PING packet is arrives to green router from side C:
    • Green router checks destination address and “IP packet release algorithm” is used.
    • For a non local destination IP and unknown target MAC, an ARP request is sent to GW as a broadcast through D.
    • REMARK: The routers in this example don’t have a buffer to keep the original PING request so it is lost.
    1 1 2 3 3 2 A B C D E F G H IP 10.0.0.1 GW 10.0.0.3 IP 10.0.0.2 GW 10.0.0.3 IP 10.0.0.3 IP 20.0.0.1 IP 20.0.0.2 IP 30.0.0.1 IP 30.0.0.2 GW 30.0.0.1 IP 30.0.0.3 GW 30.0.0.1 GW 20.0.0.2 GW 20.0.0.1 C-10.0.0.3 A ARP A-10.0.0.1 B ARP G ARP H ARP A-10.0.0.1 R ARP R ARP A-leg1 C-leg3 CAM CAM
  • 13. PING chain of events
    • ARP request is sent from green router through D:
    • ARP packet:
    • The ARP packet arrives to blue router. Blue router updates the ARP table with D-20.0.0.1 , sends reply and trashes the original packet.
    • The ARP reply arrives to green router. Green router updates the ARP table with E-20.0.0.2 .
    FCS TRAILER 20.0.0.2 000000 20.0.0.1 D 0001 4 6 0800 1 0806 D FFFF 1 1 2 3 3 2 A B C D E F G H IP 10.0.0.1 GW 10.0.0.3 IP 10.0.0.2 GW 10.0.0.3 IP 10.0.0.3 IP 20.0.0.1 IP 20.0.0.2 IP 30.0.0.1 IP 30.0.0.2 GW 30.0.0.1 IP 30.0.0.3 GW 30.0.0.1 GW 20.0.0.2 GW 20.0.0.1 C-10.0.0.3 A ARP A-10.0.0.1 B ARP G ARP H ARP A-10.0.0.1 E-20.0.0.2 R ARP D-20.0.0.1 R ARP A-leg1 C-leg3 CAM CAM
  • 14. PING chain of events
    • Another PING packet is sent from station A:
    • The packet goes through the left switch according to the CAM table to the green router.
    • In the green router, based on “IP packet release algorithm”, for non local IP destination and known target MAC, sends a continuation IP packet to blue router (same IP packet, different header).
    • The blue router checks MAC destination and recognizes as its own.
    1 1 2 3 3 2 A B C D E F G H IP 10.0.0.1 GW 10.0.0.3 IP 10.0.0.2 GW 10.0.0.3 IP 10.0.0.3 IP 20.0.0.1 IP 20.0.0.2 IP 30.0.0.1 IP 30.0.0.2 GW 30.0.0.1 IP 30.0.0.3 GW 30.0.0.1 GW 20.0.0.2 GW 20.0.0.1 C-10.0.0.3 A ARP A-10.0.0.1 B ARP G ARP H ARP A-10.0.0.1 E-20.0.0.2 R ARP D-20.0.0.1 R ARP A-leg1 C-leg3 CAM CAM
  • 15. PING chain of events
    • PING packet is arrives to blue router from side E:
    • Blue router checks destination address and “IP packet release algorithm” is used.
    • For a local destination IP and unknown target MAC, an ARP request is sent as a broadcast through F.
    1 1 2 3 3 2 A B C D E F G H IP 10.0.0.1 GW 10.0.0.3 IP 10.0.0.2 GW 10.0.0.3 IP 10.0.0.3 IP 20.0.0.1 IP 20.0.0.2 IP 30.0.0.1 IP 30.0.0.2 GW 30.0.0.1 IP 30.0.0.3 GW 30.0.0.1 GW 20.0.0.2 GW 20.0.0.1 C-10.0.0.3 A ARP A-10.0.0.1 B ARP G ARP H ARP A-10.0.0.1 E-20.0.0.2 R ARP D-20.0.0.1 R ARP A-leg1 C-leg3 CAM CAM
  • 16. PING chain of events
    • ARP request is sent from blue router through F:
    • ARP packet:
    • The ARP packet is a broadcast so the right switch is flooding and send the same packet to the rest of the connected legs.
    • The right switch updates the CAM table with F-leg3 relation.
    1 1 2 3 3 2 A B C D E F G H IP 10.0.0.1 GW 10.0.0.3 IP 10.0.0.2 GW 10.0.0.3 IP 10.0.0.3 IP 20.0.0.1 IP 20.0.0.2 IP 30.0.0.1 IP 30.0.0.2 GW 30.0.0.1 IP 30.0.0.3 GW 30.0.0.1 GW 20.0.0.2 GW 20.0.0.1 C-10.0.0.3 A ARP A-10.0.0.1 B ARP G ARP H ARP A-10.0.0.1 E-20.0.0.2 R ARP D-20.0.0.1 R ARP A-leg1 C-leg3 CAM F-leg3 CAM FCS TRAILER 30.0.0.3 000000 30.0.0.1 F 0001 4 6 0800 1 0806 F FFFF
  • 17. PING chain of events
    • ARP packet arrives to station G and station H:
    • Station G receives the ARP packet and updates the ARP table with F-30.0.0.1 relation. Station G does not send a reply.
    • Station H receives the ARP packet and updates the ARP table with F-30.0.0.1 relation, sends a reply and trashes the original packet.
    1 1 2 3 3 2 A B C D E F G H IP 10.0.0.1 GW 10.0.0.3 IP 10.0.0.2 GW 10.0.0.3 IP 10.0.0.3 IP 20.0.0.1 IP 20.0.0.2 IP 30.0.0.1 IP 30.0.0.2 GW 30.0.0.1 IP 30.0.0.3 GW 30.0.0.1 GW 20.0.0.2 GW 20.0.0.1 C-10.0.0.3 A ARP A-10.0.0.1 B ARP F-30.0.0.1 G ARP F-30.0.0.1 H ARP A-10.0.0.1 E-20.0.0.2 R ARP D-20.0.0.1 R ARP A-leg1 C-leg3 CAM F-leg3 CAM
  • 18. PING chain of events
    • ARP reply is sent from station H:
    • ARP packet:
    • ARP packet gets to the right switch. Switch recognizes destination MAC and pass it to leg3. CAM table is updated with H-leg2 relation.
    • Blue router receives ARP response and updates its ARP table with H-30.0.0.3 relation.
    1 1 2 3 3 2 A B C D E F G H IP 10.0.0.1 GW 10.0.0.3 IP 10.0.0.2 GW 10.0.0.3 IP 10.0.0.3 IP 20.0.0.1 IP 20.0.0.2 IP 30.0.0.1 IP 30.0.0.2 GW 30.0.0.1 IP 30.0.0.3 GW 30.0.0.1 GW 20.0.0.2 GW 20.0.0.1 C-10.0.0.3 A ARP A-10.0.0.1 B ARP F-30.0.0.1 G ARP F-30.0.0.1 H ARP A-10.0.0.1 E-20.0.0.2 R ARP D-20.0.0.1 H-30.0.0.3 R ARP A-leg1 C-leg3 CAM F-leg3 H-leg2 CAM FCS TRAILER 30.0.0.3 H 30.0.0.1 F 0002 4 6 0800 1 0806 H F
  • 19. PING chain of events
    • Another PING packet is sent from station A:
    • The packet goes through the left switch according to the CAM table to the green router. The green router sends a continuation IP packet to blue router. The blue router sends a continuation IP packet to station H.
    • The packet goes through the right switch according to the CAM table to station H.
    1 1 2 3 3 2 A B C D E F G H IP 10.0.0.1 GW 10.0.0.3 IP 10.0.0.2 GW 10.0.0.3 IP 10.0.0.3 IP 20.0.0.1 IP 20.0.0.2 IP 30.0.0.1 IP 30.0.0.2 GW 30.0.0.1 IP 30.0.0.3 GW 30.0.0.1 GW 20.0.0.2 GW 20.0.0.1 C-10.0.0.3 A ARP A-10.0.0.1 B ARP F-30.0.0.1 G ARP F-30.0.0.1 H ARP A-10.0.0.1 E-20.0.0.2 R ARP D-20.0.0.1 H-30.0.0.3 R ARP A-leg1 C-leg3 CAM F-leg3 H-leg2 CAM
  • 20. PING chain of events
    • PING reply packet is sent from station H to station A:
    • The packet goes through the right switch according to the CAM table to the blue router. The blue router sends a continuation IP packet to green router. The green router sends a continuation IP packet to station A.
    • The packet goes through the left switch according to the CAM table to station A.
    1 1 2 3 3 2 A B C D E F G H IP 10.0.0.1 GW 10.0.0.3 IP 10.0.0.2 GW 10.0.0.3 IP 10.0.0.3 IP 20.0.0.1 IP 20.0.0.2 IP 30.0.0.1 IP 30.0.0.2 GW 30.0.0.1 IP 30.0.0.3 GW 30.0.0.1 GW 20.0.0.2 GW 20.0.0.1 C-10.0.0.3 A ARP A-10.0.0.1 B ARP F-30.0.0.1 G ARP F-30.0.0.1 H ARP A-10.0.0.1 E-20.0.0.2 R ARP D-20.0.0.1 H-30.0.0.3 R ARP A-leg1 C-leg3 CAM F-leg3 H-leg2 CAM
  • 21. The net in steady state
    • After a little traffic the net should look like that:
    • All the ARP and CAM tables are full with the information that let them work correctly.
    1 1 2 3 3 2 A B C D E F G H IP 10.0.0.1 GW 10.0.0.3 IP 10.0.0.2 GW 10.0.0.3 IP 10.0.0.3 IP 20.0.0.1 IP 20.0.0.2 IP 30.0.0.1 IP 30.0.0.2 GW 30.0.0.1 IP 30.0.0.3 GW 30.0.0.1 GW 20.0.0.2 GW 20.0.0.1 C-10.0.0.3 B-10.0.0.2 A ARP A-10.0.0.1 C-10.0.0.3 B ARP F-30.0.0.1 H-30.0.0.3 G ARP F-30.0.0.1 G-30.0.0.2 H ARP A-10.0.0.1 E-20.0.0.2 B-10.0.0.2 R ARP D-20.0.0.1 H-30.0.0.3 G-30.0.0.2 R ARP A-leg1 C-leg3 B-leg2 CAM F-leg3 H-leg2 G-leg1 CAM
  • 22. Thank You