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.
    1092889-20171012193541965-464828502.png

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.
    1092889-20171012193514637-1036765860.png

Example 2: Host H5 sends packet to host H2

  • 127.0.0.1 is the native address.
    1092889-20171012193456480-1892844253.png

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.
    1092889-20171012193442121-2049875078.png

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.

转载于:https://www.cnblogs.com/vancasola/p/7659348.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值