Subnet Routing Examples

Routing Table

  • Each row in routing table contains:
    • Destination IP address
    • IP address of next-hop router
    • Physical address
    • Statistics information
    • Flags
      • H=1 (0) indicates route is to a host (network)
      • G=1 (0) indicates route is to a router (directly connected destination)

Routing Search and Actions

  • Routing table search order & action
    • Complete destination address; send as per next-hop & G flag
    • Destination network ID; send as per next-hop & G flag
    • Default router entry; send as per next-hop
    • Declare packet undeliverable; send ICMP “host unreachable error” packet to originating host

Example 1: A packet with 150.100.15.11 arrives at R1

  • Host5 want to send a packet to Rout1, it firstly searches 150.100.0.1 in the routing table, but not match.
  • So it send the packet to R2 as the default IP address.

Example 1: Subnetting Scheme

  • H and R find next hop in this way.
  • IP address 150.100.15.11 in binary string is
    10010110 01100100 00001111 00001011
  • Apply subnet mask to IP addresses to find corresponding subnet
    • IP address = 10010110 01100100 00001111 00001011
    • Mask = 11111111 11111111 11111111 10000000
    • AND = 10110110 01100100 00001111 00000000
    • Subnet = 150.100.15.0

Example 2: Host H5 sends packet to host H2

  • The routing table contains:destination next-hop,flags,default next-hop,physical interface.
  • H5 searches the routing table but doesn't find destination next-hop, so it send the packet as the default next-hop.

Example 2: Host H5 sends packet to host H2

  • 127.0.0.1 is the native address.

Example: Host H5 sends packet to host H2

  • It sned a packet so the network interface which delivers a packet to the local are network by broadcasting and host H2 receive the packet.

Discuss

  • Discuss the difficulties with using actual time in the Time-to-Live field
  • TTL restricts the max hops in the network, even if it was called "Time to live", but it is hops instead of time. The distance is different in all kinds of network, and the delay time in every stops is not the same. So it difficult to confirm the actual time, using hops to stand for time to live is a better choose.
posted @ 2017-10-13 08:55  范加索尔拉  阅读(257)  评论(1编辑  收藏  举报