Supposing I have several loopback interfaces:
/etc/rc.conf
And then I have an authoritative DNS server (for testing my zone) listening on an address associated with
That server can be access like that:
and it works just fine. What baffles me is that
So my question is: why does tcpdump see those packets on lo0, given that the packets are supposedly transmitted and received on lo1?
lo0 and lo1. lo0 is configured implicitly by the system, configuration of lo1 follows:/etc/rc.conf
Code:
cloned_interfaces="lo1:sticky"
ifconfig_lo1="inet 192.168.30.1 netmask 255.255.255.0"
ifconfig_lo1_alias0="inet 192.168.30.2/32"
ifconfig_lo1_alias1="inet 192.168.30.3/32"
ifconfig_lo1_alias2="inet 192.168.30.4/32"
And then I have an authoritative DNS server (for testing my zone) listening on an address associated with
lo1:
Code:
# sockstat | grep ":53"
bind named 1648 15 udp4 192.168.30.3:53 *:*
bind named 1648 16 udp4 192.168.30.3:53 *:*
bind named 1648 17 tcp4 192.168.30.3:53 *:*
bind named 1648 19 tcp4 192.168.30.3:53 *:*
That server can be access like that:
Code:
# dig @192.168.30.3 site-01.example.com
and it works just fine. What baffles me is that
tcpdump utility can't sniff interaction between dig and named on lo1, but instead can sniff the packets on lo0:
Code:
# tcpdump -ni lo1
tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
listening on lo1, link-type NULL (BSD loopback), snapshot length 262144 bytes
^C
0 packets captured
0 packets received by filter
0 packets dropped by kernel
# tcpdump -ni lo0
tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
listening on lo0, link-type NULL (BSD loopback), snapshot length 262144 bytes
01:05:17.318083 IP 192.168.30.3.18286 > 192.168.30.3.53: 16590+ [1au] A? site-01.example.com. (60)
01:05:17.318182 IP 192.168.30.3.53 > 192.168.30.3.18286: 16590*- 1/0/1 A 78.107.232.96 (92)
^C
2 packets captured
2 packets received by filter
0 packets dropped by kernel
So my question is: why does tcpdump see those packets on lo0, given that the packets are supposedly transmitted and received on lo1?