分享
 
 
 

RFC2075 - IP Echo Host Service

王朝other·作者佚名  2008-05-31
窄屏简体版  字體: |||超大  

Network Working Group C. Partridge

Request for Comments: 2075 BBN

Category: EXPerimental January 1997

IP Echo Host Service

Status of this Memo

This memo defines an Experimental Protocol for the Internet

community. This memo does not specify an Internet standard of any

kind. Discussion and suggestions for improvement are requested.

Distribution of this memo is unlimited.

Abstract

This memo describes how to implement an IP echo host. IP echo hosts

send back IP datagrams after exchanging the source and destination IP

addresses. The effect is that datagrams sent to the echo host are

sent back to the source, as if they originated at the echo host.

IntrodUCtion

An IP echo host returns IP datagrams to their original source host,

with the IP source and destination addresses reversed, so that the

returning datagram appears to be coming from the echo host to the

original source. IP echo hosts are tremendously useful for debugging

applications and protocols. They allow researchers to create looped

back conversations across the Internet, exposing their traffic to all

the vagaries of Internet behavior (congestion, cross traffic,

variable round-trip times and the like) without having to distribute

prototype software to a large number of test machines.

IP echo hosts were heavily used on the Internet in the late 1970s and

early 1980s to debug various Internet transport and application

protocols. But, for reasons unclear, at the current date there are

no echo hosts on the Internet and few people are even aware of the

concept. The goal of this memo is to document the concept in the

hopes it will be revived.

Implementation Details

While the basic idea of a echo host is simple, there are a few

implementation details that require attention. This section

describes those implementation details. The presentation works from

the simplest to most difficult issues.

The most straightforward situation is when an echo host receives an

IP datagram with no options and whose protocol field has a value

other than 1 (ICMP). In this case, the echo host modifies the header

by exchanging the source and destination addresses, decrements the

TTL by one and updates the IP header checksum. The host then

transmits the updated IP datagram back to the original source of the

datagram.

NOTE: If the TTL is zero or less after decrementing, the datagram

MUST not be echoed. In general, an echo host is required to do

all the various sanity checks that a router or host would do to an

IP datagram before accepting the datagram for echoing (see STD 3,

RFC1122, and RFC1812).

The TTL MUST be decremented for security reasons noted below.

Observe, however, that the effect is that hosts using an echo path

through an echo host SHOULD set their TTL to twice the normal

value to be sure of achieving connectivity over the echo path.

If an arriving IP datagram has options, the echo host's

responsibilities are more complex. In general, the IP source and

destination are always exchanged and TTL and checksum updated, but in

certain situations, other special actions may have to take place.

If the datagram contains an incomplete source route option (i.e. the

echo host is not the final destination), the datagram MUST be

discarded. If the datagram contains a complete source route option,

the source route option MUST be reversed, and the datagram (with

source and destination IP addresses exchanged and updated TTL) MUST

be sent back along the reverse source route.

More generally, the goal with any option is to update the option such

that when the echoed packet is received at the original source, the

option fields will contain data which makes sense for a datagram

originating at the echo host.

There is one option for which it is unclear what the correct action.

The timestamp option is sometimes used for round-trip time

estimation. If the option is reset at the echo host, then a history

of roughly half of the trip delay will be lost. But if the option is

not reset, then the timestamp option will appear inconsistent with

the source and destination addresses of the datagram. To try to

balance these two issues, the following rules are suggested:

1. If the first entry in the timestamp option contains the IP

address of the source host, the entry SHOULD be rewritten to

contain the IP address of the echo host, and the timestamp option

pointer SHOULD be truncated so that this timestamp is the only one

in the list. (This rewrite makes the option appear consistent

with the new source and destination IP addresses, and retains the

source timestamp, while losing information about the path to the

echo host).

2. If the first entry in the timestamp option does not contain the

IP address of the source host, the entry SHOULD be echoed back

unchanged. The echo host SHOULD NOT appear in the timestamp

option. (This approach retains the entire history of the path,

though observe that on a symmetric route, it means every router

may appear twice in the path).

Finally, if the IP datagram contains an ICMP packet (i.e. the IP

protocol field value is 1), the datagram SHOULD be discarded. The

reason for this rule is that the most likely reason for receiving an

ICMP datagram is that an echoed datagram has encountered a problem at

some router in the path and the router has sent back an ICMP

datagram. Echoing the ICMP datagram back to the router may confuse

the router and thus SHOULD be avoided. (This rule simply follows the

Internet maxim of being conservative in what we send).

However, in some cases the ICMP datagram will have useful information

for the source host which it would be desirable to echo. A

sophisticated echo host MAY choose to echo ICMP datagrams according

to the following rules:

1. Any ICMP datagram in which the destination address in the

encapsulated IP header (the header within the ICMP datagram)

matches the source address of the ICMP datagram MAY be safely

echoed.

2. ICMP Source Quench and ICMP Destination Unreachable with a code

of 4 (fragmentation needed and DF set) MAY be sent to the

*destination* of the encapsulated IP datagram if the source IP

address of the encapsulated IP datagram is that of the echo host.

When the ICMP message is sent on, it SHOULD be rewritten as an

ICMP message from the echo host to the source.

3. All other ICMP messages MUST be discarded.

These rules were chosen to try to ensure that end-to-end ICMP

messages are passed through, as are messages from routers which are

fairly safe and useful (or necessary) to the end system, but that

potentially dangerous messages such as Redirects are suppressed.

(The ICMP Destination Unreachable with code 4 is required for MTU

discovery under RFC-1191).

Security Considerations

Echo hosts pose a number of security concerns related to address

spoofing.

First, echo hosts provide obvious ways to extend attacks that make

use of address spoofing. A malevolent host can write an third

party's IP address as the source address of a datagram sent to an

echo host and thus cause the echo host to send a datagram to the

third party. In general, this trick does not create a new security

hole (the malevolent host could just as well have sent the datagram

with a forged source address straight to the third party host). But

there are some new twists to the problem.

One exception is if the echo host is a host inside a firewall that

accepts datagrams from hosts outside the firewall. In that case, a

malevolent host outside the firewall may be able to use the echo host

to make its packets appear to originate from inside the firewall

(from the echo host). In general, a good firewall will catch these

cases (the source address of the datagrams sent to the echo host will

be for a host inside the firewall and testing for interior source

addresses on datagrams arriving at an exterior interface is a

standard firewall filter) but since the primary purpose of echo hosts

is for wide scale Internet testing, there seems no reason to invite

danger. So we recommend that echo hosts SHOULD NOT be placed inside

firewalls.

Second, address spoofing can be used to cause flooding of the

network. In this case, a malevolent host sends a datagram to an echo

host with the source address of another echo host. This trick will

cause datagrams to circulate between the two echo hosts. The

requirement that the echo host decrement the TTL by one ensures that

each datagram will eventually die, but a sufficiently malevolent host

sending a large number of datagrams with high TTLs to an echo host

can cause considerable disruption. There are a number of possible

ways to repair this problem (such as requiring sources to

authenticate themselves before sending datagrams to be echoed). A

simple protection is simply to limit the number of packets echoed

back to any one source per second. For instance, one might limit a

source to a packet rate equal to 10% of the interface bandwidth (for

a 10 Mb/s Ethernet this would be about 75 maximum sized packets per

second).

One variation of this attack is to generate e-mail addressed to the

echo host (e.g., user@echo.xxx.com). This e-mail will loop over the

network a number of times until the SMTP server determines the

message has too many Received-From: lines.

A third variation of the flooding trick is to place a multicast or

broadcast address as the source of the IP datagram sent to an echo

server. Since this results in an illegal arriving IP datagram, the

echo server MUST discard the datagram. (This warning serves as a

reminder that echo servers MUST do the standard checks for an illegal

datagram before echoing).

Implementation Note

Echo hosts are often implemented as virtual interfaces on an existing

host or router. One can think of the echo host's IP address as a

second IP address for the host, with the semantics that all datagrams

sent to that address get echoed. Observe that when an echo host is

supported as a module within a larger host implementation, an easy

implementation mistake to make is to accidentally put the non-echo

address of a host into an echoed packet. For a variety of reasons

(including security and correct operation of echo paths) implementors

MUST ensure this NEVER happens.

Acknowledgements

This memo was stimulated by a conversation with Jon Crowcroft in

which we both lamented the demise of some beloved IP echo hosts

(e.g., goonhilly-echo.arpa). It has been considerably improved by

comments from various members of the End2End-Interest mailing list,

including Bob Braden, Mark Handley, Christian Huitema, Dave Mills,

Tim Salo, Vern Schryver, Lansing Sloan, and Rich Stevens.

The author is emphatically not the inventor of echo hosts. Enquiries

to the usual suspects suggest that echo hosts were created by persons

unknown (probably at BBN) very early in the development of IP. I'd

like to thank those persons who created echo hosts and apologize for

any errors in describing their invention.

Author's Address

Craig Partridge

BBN Corporation

10 Moulton St

Cambridge MA 02138

EMail: craig@bbn.com

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有