Subject: Re: ping A->B != ping B->A ?
To: Manuel Bouyer <bouyer@antioche.eu.org>
From: Ian Zagorskih <ianzag@megasignal.com>
List: tech-net
Date: 07/08/2004 02:33:49
On Thursday 08 July 2004 02:09, Manuel Bouyer wrote:
> On Wed, Jul 07, 2004 at 10:55:44PM +0700, Ian Zagorskih wrote:
> > [...]
>
> And tcpdump on a shows that A aserws properly. A tcpdump on B at the same
> time could be usefull, but see below.

Ok, let's ping it again: B->A

A: tcpdump icmp
B: tcpdump -c30 icmp 2>&1 >dump &
     ping -c15 -n 192.168.100.37 | tee ping

---cut dump A---
# tcpdump icmp
tcpdump: listening on rtk0
02:26:02.623284 192.168.100.250 > 192.168.100.37: icmp: echo request seq 0
02:26:02.623313 192.168.100.37 > 192.168.100.250: icmp: echo reply seq 0
02:26:04.525965 192.168.100.250 > 192.168.100.37: icmp: echo request seq 1
02:26:04.525993 192.168.100.37 > 192.168.100.250: icmp: echo reply seq 1
02:26:05.856013 192.168.100.250 > 192.168.100.37: icmp: echo request seq 2
02:26:05.856041 192.168.100.37 > 192.168.100.250: icmp: echo reply seq 2
02:26:05.857972 192.168.100.250 > 192.168.100.37: icmp: echo request seq 3
02:26:05.857981 192.168.100.37 > 192.168.100.250: icmp: echo reply seq 3
02:26:05.946089 192.168.100.250 > 192.168.100.37: icmp: echo request seq 4
02:26:05.946117 192.168.100.37 > 192.168.100.250: icmp: echo reply seq 4
02:26:05.946439 192.168.100.250 > 192.168.100.37: icmp: echo request seq 5
02:26:05.946447 192.168.100.37 > 192.168.100.250: icmp: echo reply seq 5
02:26:05.950215 192.168.100.250 > 192.168.100.37: icmp: echo request seq 6
02:26:05.950224 192.168.100.37 > 192.168.100.250: icmp: echo reply seq 6
02:26:06.326101 192.168.100.250 > 192.168.100.37: icmp: echo request seq 7
02:26:06.326131 192.168.100.37 > 192.168.100.250: icmp: echo reply seq 7
02:26:06.326471 192.168.100.250 > 192.168.100.37: icmp: echo request seq 8
02:26:06.326480 192.168.100.37 > 192.168.100.250: icmp: echo reply seq 8
02:26:06.330091 192.168.100.250 > 192.168.100.37: icmp: echo request seq 9
02:26:06.330100 192.168.100.37 > 192.168.100.250: icmp: echo reply seq 9
02:26:06.696128 192.168.100.250 > 192.168.100.37: icmp: echo request seq 10
02:26:06.696157 192.168.100.37 > 192.168.100.250: icmp: echo reply seq 10
02:26:06.698555 192.168.100.250 > 192.168.100.37: icmp: echo request seq 11
02:26:06.698564 192.168.100.37 > 192.168.100.250: icmp: echo reply seq 11
02:26:06.701943 192.168.100.250 > 192.168.100.37: icmp: echo request seq 12
02:26:06.701971 192.168.100.37 > 192.168.100.250: icmp: echo reply seq 12
02:26:06.705136 192.168.100.250 > 192.168.100.37: icmp: echo request seq 13
02:26:06.705158 192.168.100.37 > 192.168.100.250: icmp: echo reply seq 13
02:26:06.756116 192.168.100.250 > 192.168.100.37: icmp: echo request seq 14
02:26:06.756144 192.168.100.37 > 192.168.100.250: icmp: echo reply seq 14
^C
506 packets received by filter
0 packets dropped by kernel
---cut dump A---

---dump B---
02:25:56.142363 192.168.100.250 > 192.168.100.37: icmp: echo request seq 0
02:25:56.143042 192.168.100.37 > 192.168.100.250: icmp: echo reply seq 0
02:25:57.151991 192.168.100.250 > 192.168.100.37: icmp: echo request seq 1
02:25:57.158842 192.168.100.37 > 192.168.100.250: icmp: echo reply seq 1
02:25:59.067633 192.168.100.250 > 192.168.100.37: icmp: echo request seq 2
02:25:59.108094 192.168.100.37 > 192.168.100.250: icmp: echo reply seq 2
02:25:59.578852 192.168.100.250 > 192.168.100.37: icmp: echo request seq 3
02:25:59.611499 192.168.100.37 > 192.168.100.250: icmp: echo reply seq 3
02:26:21.206721 192.168.100.250 > 192.168.100.37: icmp: echo request seq 4
02:26:21.247170 192.168.100.37 > 192.168.100.250: icmp: echo reply seq 4
02:26:21.298334 192.168.100.250 > 192.168.100.37: icmp: echo request seq 5
02:26:21.330824 192.168.100.37 > 192.168.100.250: icmp: echo reply seq 5
02:26:22.285743 192.168.100.250 > 192.168.100.37: icmp: echo request seq 6
02:26:22.317556 192.168.100.37 > 192.168.100.250: icmp: echo reply seq 6
02:27:07.251609 192.168.100.250 > 192.168.100.37: icmp: echo request seq 7
02:27:07.292308 192.168.100.37 > 192.168.100.250: icmp: echo reply seq 7
02:27:07.350448 192.168.100.250 > 192.168.100.37: icmp: echo request seq 8
02:27:07.381427 192.168.100.37 > 192.168.100.250: icmp: echo reply seq 8
02:27:08.295757 192.168.100.250 > 192.168.100.37: icmp: echo request seq 9
02:27:08.327413 192.168.100.37 > 192.168.100.250: icmp: echo reply seq 9
02:27:51.988934 192.168.100.250 > 192.168.100.37: icmp: echo request seq 10
02:27:52.028174 192.168.100.37 > 192.168.100.250: icmp: echo reply seq 10
02:27:52.624867 192.168.100.250 > 192.168.100.37: icmp: echo request seq 11
02:27:52.656308 192.168.100.37 > 192.168.100.250: icmp: echo reply seq 11
02:27:53.419694 192.168.100.250 > 192.168.100.37: icmp: echo request seq 12
02:27:53.556430 192.168.100.37 > 192.168.100.250: icmp: echo reply seq 12
02:27:54.342352 192.168.100.250 > 192.168.100.37: icmp: echo request seq 13
02:27:54.388528 192.168.100.37 > 192.168.100.250: icmp: echo reply seq 13
02:28:07.094151 192.168.100.250 > 192.168.100.37: icmp: echo request seq 14
02:28:07.152392 192.168.100.37 > 192.168.100.250: icmp: echo reply seq 14
---dump B---

---ping B---
PING 192.168.100.37 (192.168.100.37): 56 data bytes
64 bytes from 192.168.100.37: icmp_seq=0 ttl=255 time=2.804 ms
64 bytes from 192.168.100.37: icmp_seq=1 ttl=255 time=23.717 ms
64 bytes from 192.168.100.37: icmp_seq=2 ttl=255 time=140.364 ms
64 bytes from 192.168.100.37: icmp_seq=3 ttl=255 time=114.035 ms
64 bytes from 192.168.100.37: icmp_seq=4 ttl=255 time=232.239 ms
64 bytes from 192.168.100.37: icmp_seq=5 ttl=255 time=569.915 ms
64 bytes from 192.168.100.37: icmp_seq=6 ttl=255 time=134.675 ms
64 bytes from 192.168.100.37: icmp_seq=7 ttl=255 time=225.968 ms
64 bytes from 192.168.100.37: icmp_seq=8 ttl=255 time=506.654 ms
64 bytes from 192.168.100.37: icmp_seq=9 ttl=255 time=130.346 ms
64 bytes from 192.168.100.37: icmp_seq=10 ttl=255 time=144.205 ms
64 bytes from 192.168.100.37: icmp_seq=11 ttl=255 time=214.833 ms
64 bytes from 192.168.100.37: icmp_seq=12 ttl=255 time=254.370 ms
64 bytes from 192.168.100.37: icmp_seq=13 ttl=255 time=261.995 ms
64 bytes from 192.168.100.37: icmp_seq=14 ttl=255 time=172.053 ms

----192.168.100.37 PING Statistics----
15 packets transmitted, 15 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 2.804/208.545/569.915/154.095 ms
---ping B---

So looks like nothing is changed :)

> >
> > According to BIOS output at boot time NIC is pre-configured to use IRQ 15
> > same as USB controller. Maybe shared PCI IRQs is the problem ?
>
> I've got problems with shared IRQ in the past, with ohci involved.
> Can you try disabling ohci in the BIOS ?

I disabled all peripherials in BIOS including USB, IDE and so on - all except 
LAN. Now dmesg is quite short and looks like:

---cut---
NetBSD 2.0_BETA (EmCORE-n513-nfs) #3: Thu Jul  8 02:17:48 NOVST 2004
        ianzag@IANZAG:/usr/src/sys/arch/i386/compile/EmCORE-n513-nfs
total memory = 30844 KB
avail memory = 28600 KB
BIOS32 rev. 0 found at 0xfaf10
mainbus0 (root)
cpu0 at mainbus0: (uniprocessor)
cpu0: Cyrix MMX-enhanced MediaGX (GXm) (586-class), 300.69 MHz, id 0x540
cpu0: features 808131<FPU,TSC,MSR,CX8>
cpu0: features 808131<CMOV,MMX>
cpu0: I-cache 12K uOp cache 8-way
pci0 at mainbus0 bus 0: configuration mode 1
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
pchb0 at pci0 dev 0 function 0
pchb0: Cyrix Corporation MediaGX Built-in PCI Host Controller (rev. 0x00)
rtk0 at pci0 dev 10 function 0: Realtek 8139 10/100BaseTX
rtk0: interrupting at irq 15
rtk0: Ethernet address 00:05:b7:00:2a:f6
ukphy0 at rtk0 phy 7: Generic IEEE 802.3u media interface
ukphy0: OUI 0x000000, model 0x0000, rev. 0
ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
pcib0 at pci0 dev 18 function 0
pcib0: Cyrix Corporation Cx5530 I/O Companion Multi-Function South Bridge 
(rev. 0x30)
Cyrix Corporation Cx5530 I/O Companion (SMI Status and ACPI Timer) 
(miscellaneous bridge) at pci0 dev 18 function 1 not configured
Cyrix Corporation Cx5530 I/O Companion (IDE Controller) (IDE mass storage) at 
pci0 dev 18 function 2 not configured
Cyrix Corporation Cx5530 I/O Companion (XpressAUDIO) (audio multimedia) at 
pci0 dev 18 function 3 not configured
vga0 at pci0 dev 18 function 4: Cyrix Corporation Cx5530 I/O Companion (Video 
Controller) (rev. 0x00)
wsdisplay0 at vga0 kbdmux 1: console (80x25, vt100 emulation)
wsmux1: connecting to wsdisplay0
isa0 at pcib0
pckbc0 at isa0 port 0x60-0x64
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
dsp0 at isa0 port 0x250-0x25f irq 5: id=0x350 sn=0x123 cap=0x3
bbm0 at isa0 port 0x2a0-0x2a7 irq 7
regs0 at isa0 port 0x240-0x24f ID 0202h serial 0000h
dosc0 at isa0 port 0x230-0x238
dosc0: select channel 00h
dosc0: set buffer offset 00h
dosc0: select freq divider 0000h
dosc0: set trigger control 00h level 0000h
dosc0: set device start bit
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
sysbeep0 at pcppi0
npx0 at isa0 port 0xf0-0xff: using exception 16
apm0 at mainbus0: Power Management spec V1.2
boot device: rtk0
root on rtk0
nfs_boot: trying DHCP/BOOTP
nfs_boot: DHCP next-server: 192.168.100.5
nfs_boot: my_name=MAKS
nfs_boot: my_addr=192.168.100.250
nfs_boot: my_mask=255.255.255.0
root on 192.168.100.5:/home/maks
---cut---

PS: non-standard custom stuff like dsp0 or bbm0 does completely nothing.

// wbr