![]() Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name Lets see few applications running in my laptop and using loopback ip network-scripts]$ sudo netstat -tulnpĪctive Internet connections (only servers) Essentially, these are local applications which have to communicate with each other but they don’t need to send traffic outside or need rout-able traffic. Using the loopback interface bypasses any local network interface hardware. So, loopback interface/ip is used to access the network services that are running on the host via the loopback network interface. But still it is unclear what is its purpose in localhost system. Ok, so there is a loopback interface with its reserve ip and user can ping that ip or mapped domain name. ::1 localhost localhost.localdomain localhost6 ~]# So, why i am able to ping my localhost? Answer is, static local dns infrared]$ ping localhostĦ4 bytes from (127.0.0.1): icmp_seq=1 ttl=64 time=0.101 msĦ4 bytes from (127.0.0.1): icmp_seq=2 ttl=64 time=0.088 msĢ packets transmitted, 2 received, 0% packet loss, time 1000ms ![]() There is reserved ipv6 address for loopback and lets ping that as ~]# ping6 ::1Ħ4 bytes from ::1: icmp_seq=1 ttl=64 time=0.029 msĦ4 bytes from ::1: icmp_seq=2 ttl=64 time=0.014 msĦ4 bytes from ::1: icmp_seq=3 ttl=64 time=0.028 msģ packets transmitted, 3 received, 0% packet loss, time 2038ms ping statistics -Ģ packets transmitted, 2 received, 0% packet loss, time 1018ms Let me ping my hostname as infrared]$ infrared]$ ping IANA has reserved 127.0.0.0/8 ip address range for loopback interfaces in the localhost. Today, thought of a blog came in my mind where I shall explain more about loopback interfaces and try to find why and how it exist in the networking space. Until mr.Long time ago, around the beginning of my career, Once I was asked about loopback interface in an interview. Thanks mr.mkx while I hadn't notice these and these are indeed legit notable information, it doesn't explain why one can't ping the interface's IPv6 address from within one can not use double colon in same address more than once, this would make it non-deterministic as double colon serves as variable length zeros and it can be used only once) So if you want to use non-clashing IPv6 addresses (and you do want that), you have to assign addresses from different prefixes, e.g.Ģ001:0:0:1::/64 (or 2001::1:0:0:0:0. (parts highlited with green colour are prefixes). If one writes out the addresses in full (replacing that double colon with necessary number of zeroes), they are: These two IPv6 addresses are from the same /64 prefix. The thing is I cleared the routes of the previous configurations. On the ether4 interface I've set an IPv6 address 2001::1/64 and there is no ping to or from it!
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |