Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - tcpdump loopback interface: (9 Items)
   
tcpdump loopback interface  
Hi,

Is there a way to dump the IP traffic inside io-net?

On a PowerPC target with QNX632 we get this error:

    # tcpdump -i lo0
    tcpdump: BIOCSETIF: lo0: No such device or address

Thanks,   -Fernando
Re: tcpdump loopback interface  
What's the output of ifconfig?

On Thu, Jun 23, 2011 at 12:46:27PM -0400, Fernando Gonzalez wrote:
> Hi,
> 
> Is there a way to dump the IP traffic inside io-net?
> 
> On a PowerPC target with QNX632 we get this error:
> 
>     # tcpdump -i lo0
>     tcpdump: BIOCSETIF: lo0: No such device or address
> 
> Thanks,   -Fernando
> 
> 
> 
> _______________________________________________
> 
> Networking Drivers
> http://community.qnx.com/sf/go/post86800
> 
Re: tcpdump loopback interface  
Hi Khaled,

We have a lot of vlan's configured, but this is the beginning of the ifconfig output:

# ifconfig
lo0: flags=8009<UP,LOOPBACK,MULTICAST> mtu 33212
        capabilities=7<IP4CSUM,TCP4CSUM,UDP4CSUM>
        enabled=0<>
        inet 127.0.0.1 netmask 0xffffffff
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
        inet6 ::1 prefixlen 128
en0: flags=8c43<UP,BROADCAST,RUNNING,OACTIVE,SIMPLEX,MULTICAST> mtu 1504
        address: 00:0b:f8:20:b1:54
        media: Ethernet 100baseTX full-duplex
        status: active
        inet 0.0.0.0 netmask 0xffffffff broadcast 0.0.0.0
        inet6 fe80::20b:f8ff:fe20:b154%en0 prefixlen 64 scopeid 0x2
en1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1504
        address: 00:0b:f8:20:b1:55
        media: Ethernet 100baseTX full-duplex
        status: active
        inet 0.0.0.0 netmask 0xffffffff broadcast 0.0.0.0
        inet6 fe80::20b:f8ff:fe20:b155%en1 prefixlen 64 scopeid 0x3
vlan10: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        vlan: 10 parent: en0
        address: 00:0b:f8:20:b1:54
        inet 127.3.1.123 netmask 0xffff0000 broadcast 127.3.255.255
        inet alias 127.1.1.123 netmask 0xffff0000 broadcast 127.1.255.255
        inet alias 127.254.1.1 netmask 0xffff0000 broadcast 127.254.255.255
        inet6 fe80::20b:f8ff:fe20:b154%vlan10 prefixlen 64 scopeid 0x4
...
Re: tcpdump loopback interface  
I this is of any use (and to avoid confusion), we have modified our IP stack to disregard IP addresses 127.X.X.X as 
special. We make use of those IP addresses on vlans to communicate between targets.

We have no problem with tcpdump reporting the 127.X.X.X traffic. Now we are interested in analyzing the traffic inside 
each target, i.e. just the 127.0.0.1.
Re: tcpdump loopback interface  
I'm not sure why it's not working for you. Perhaps it is because of the modifications that you made.

Would this work for you:

tcpdump dst host 127.0.0.1 or src host 127.0.0.1

?
On Thu, Jun 23, 2011 at 01:09:34PM -0400, Fernando Gonzalez wrote:
> I this is of any use (and to avoid confusion), we have modified our IP
> stack to disregard IP addresses 127.X.X.X as special. We make use of
> those IP addresses on vlans to communicate between targets.
> 
> We have no problem with tcpdump reporting the 127.X.X.X traffic. Now we
> are interested in analyzing the traffic inside each target, i.e. just
> the 127.0.0.1.
> 
> 
> 
> _______________________________________________
> 
> Networking Drivers
> http://community.qnx.com/sf/go/post86804
> 
Re: tcpdump loopback interface  
bpf on 6.3.2 wasn't officially supported.  I don't
think it worked over localhost.

Regards,

-seanb

On Thu, Jun 23, 2011 at 02:55:34PM -0400, Khaled Mously wrote:
> I'm not sure why it's not working for you. Perhaps it is because of the
> modifications that you made.
> 
> Would this work for you:
> 
> tcpdump dst host 127.0.0.1 or src host 127.0.0.1
> 
> ?
> On Thu, Jun 23, 2011 at 01:09:34PM -0400, Fernando Gonzalez wrote:
> > I this is of any use (and to avoid confusion), we have modified our IP
> > stack to disregard IP addresses 127.X.X.X as special. We make use of
> > those IP addresses on vlans to communicate between targets.
> > 
> > We have no problem with tcpdump reporting the 127.X.X.X traffic. Now
> we
> > are interested in analyzing the traffic inside each target, i.e. just
> > the 127.0.0.1.
> > 
> > 
> > 
> > _______________________________________________
> > 
> > Networking Drivers
> > http://community.qnx.com/sf/go/post86804
> > 
> 
> 
> 
> _______________________________________________
> 
> Networking Drivers
> http://community.qnx.com/sf/go/post86806
> 
Re: tcpdump loopback interface  
Hi Khaled,

I get no output (while on another telnet session I execute 'ping 127.0.0.1')

# tcpdump src host 127.0.0.1
tcpdump: listening on en0
                                                           <<<< executed Ctrl+C here >>>>>>>
0 packets received by filter
0 packets dropped by kernel

# tcpdump dst host 127.0.0.1
tcpdump: listening on en0
                                                           <<<< executed Ctrl+C here >>>>>>>
0 packets received by filter
0 packets dropped by kernel

The modification to the IP stack was simply commenting out the lines of code in ip_input.c that would otherwise would 
drop input packets because "/* 127/8 must not appear on wire - RFC1122 */".

We are pretty confident of that modification. We applied it in the same way to 6.4.0, and we can successfully "tcpdump -
i lo0" on a QNX640 target.

The issue might well be where Sean is indicating, in the Berkley filter.

Thanks,

-Fernando
Re: tcpdump loopback interface  
Hi Sean,

Indeed we are using BPF, most likely unofficial. Do you think we can fiddle with it to attain the objective?

Thanks,  -Fernando
Re: tcpdump loopback interface  
On Thu, Jun 23, 2011 at 03:46:24PM -0400, Fernando Gonzalez wrote:
> Hi Sean,
> 
> Indeed we are using BPF, most likely unofficial. Do you think we can
> fiddle with it to attain the objective?
> 

If you have source anything is possible.

Regards,

-seanb