We know that we can ping Localhost which means it can be used as Destination Address.
Why can't Loopback Address be used as Source Address inside packet?
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.
Sign up to join this communityWe know that we can ping Localhost which means it can be used as Destination Address.
Why can't Loopback Address be used as Source Address inside packet?
It can be used as the source address, and in fact it is the source address when you pinged localhost!
Network traffic to/from localhost is the same as any other network traffic except that it never leaves the host. The localhost address is both source and destination address.
127.0.0.0/8
block can never appear anywhere on any network, nor can any address in that block be used as a source or destination address for packets outside the host. RFC 3330, Special-Use IPv4 Addresses: "127.0.0.0/8 - This block is assigned for use as the Internet host loopback address. A datagram sent by a higher level protocol to an address anywhere within this block should loop back inside the host. This is ordinarily implemented using only 127.0.0.1/32 for loopback, but no addresses within this block should ever appear on any network anywhere [RFC1700, page 5]." – Ron Maupin Oct 28 '20 at 2:08