TCP/IP 详解 卷1 ch9 IP Routing

1. For the host which is not configured as router, datagrams received through the network interfaces that are not ours are dropped.

 

2. the steps that IP performs when it searches its routing table.
1) Search for a matching host address.
2) Search for a matching network address.
3) Search for a default entry. (The default entry is normally specified in the routing table as a network entry, with a network ID of 0.)
A matching host address is always used before a matching network address.

先匹配主机地址,然后匹配网络地址

 

3. netstat -rn

 

for a given route, the flag is like following,

 

4.  indirect route VS. direct route

A packet going out a direct route has both the IP address and the link-layer address specifying the destination (without G flag);

When a packet is sent out an indirect route, the IP address specifies the final destination but the link-layer address specifies the gateway (that is, the next-hop router).

 

5. The H flag, however, specifies that the destination address (the first column of netstat output) is a complete host address. The absence of the H flag means the destination address is a network address (the host ID portion will be 0).

如果没有H,说明是一个网络号,例如3中的最后一条

 

6. The ICMP "host unreachable" error message is sent by a router when it receives an IP datagram that it cannot deliver or forward.

 

for example,

 

7. ICMP Redirect Errors

ICMP redirects allow TCP/IP hosts to be dumb when it comes to routing, with all the intelligence in the routers

 

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值