Short summary: I'm running 3.9-current on a Thinkpad X40, and the
networking seems to be misbehaving: ``ifconfig $IF down'' doesn't clear
routes using $IF and ``dhclient $SOMEIF'' adds routes using $OTHERIF
even when $OTHERIF is down.
Below is a log of several network-related commands I invoked on my
laptop after a clean reboot, followed by dmesg's output (I editted the
lines that repeated many times at the bottom). My DHCP server is setup
to issue 192.168.0.50 to my em0's MAC address and 192.168.0.51 to my
iwi0's MAC address.
I setup iwi0 and ran dhclient, then brought iwi0 down, but routes using
it still existed. My understanding of ifconfig(8)'s description of the
down action is that they should have been cleared out. Why aren't they?
Next, I plugged in an ethernet cable and ran dhclient on em0. The
default route changed to em0, but my subnet routes were still directed
over iwi0, and I couldn't ping my gateway. Why didn't the subnet routes
change to em0 as well?
After that, I brought em0 back down, and re-dhclient'ed on iwi0. This
time, the default route stayed the same (still em0), but the subnet
routes changed back (from iwi0 to em0). Not only is this not what I
expected (all changing to iwi0), but it doesn't even seem consistant
with the previous step! What's going on?
Finally, trying to ping my gateway resulted in ``Network is down'' until
I brought em0 back up; Han from #openbsd said it should say ``No route
to host'' instead. (I'm not sure if this is an actual problem, but I
thought I'd mention it.)
Last time I brought this up on misc@ (in less detail), I was advised to
try using trunk(4), but I haven't had much luck with it either. I can
try it again if requested, however.
Thanks ahead of time for any assistance! I greatly appreciate it.
$ route -n show -inet
Routing tables
Internet:
Destination Gateway Flags Refs Use Mtu Interface
127/8 127.0.0.1 UGRS 0 0 33224 lo0
127.0.0.1 127.0.0.1 UH 1 0 33224 lo0
224/4 127.0.0.1 URS 0 0 33224 lo0
$ sudo ifconfig iwi0 nwid $NWID nwkey $NWKEY
$ sudo dhclient iwi0
DHCPDISCOVER on iwi0 to 255.255.255.255 port 67 interval 2
DHCPOFFER from 192.168.0.12
DHCPREQUEST on iwi0 to 255.255.255.255 port 67
DHCPACK from 192.168.0.12
bound to 192.168.0.51 -- renewal in 60 seconds.
$ route -n show -inet
Routing tables
Internet:
Destination Gateway Flags Refs Use Mtu Interface
default 192.168.0.1 UGS 0 0 - iwi0
127/8 127.0.0.1 UGRS 0 0 33224 lo0
127.0.0.1 127.0.0.1 UH 2 0 33224 lo0
192.168.0/24 link#2 UC 1 0 - iwi0
192.168.0.1 link#2 UHLc 1 0 - iwi0
192.168.0.51 127.0.0.1 UGHS 0 0 33224 lo0
224/4 127.0.0.1 URS 0 0 33224 lo0
$ sudo ifconfig iwi0 down
$ route -n show -inet
Routing tables
Internet:
Destination Gateway Flags Refs Use Mtu Interface
default 192.168.0.1 UGS 0 0 - iwi0
127/8 127.0.0.1 UGRS 0 0 33224 lo0
127.0.0.1 127.0.0.1 UH 2 0 33224 lo0
192.168.0/24 link#2 UC 1 0 - iwi0
192.168.0.1 link#2 UHLc 1 0 - iwi0
192.168.0.51 127.0.0.1 UGHS 0 0 33224 lo0
224/4 127.0.0.1 URS 0 0 33224 lo0
$ sudo dhclient em0
DHCPDISCOVER on em0 to 255.255.255.255 port 67 interval 2
DHCPDISCOVER on em0 to 255.255.255.255 port 67 interval 3
DHCPOFFER from 192.168.0.12
DHCPOFFER from 192.168.0.12
DHCPOFFER already seen.
DHCPREQUEST on em0 to 255.255.255.255 port 67
DHCPACK from 192.168.0.12
bound to 192.168.0.50 -- renewal in 60 seconds.
$ route -n show -inet
Routing tables
Internet:
Destination Gateway Flags Refs Use Mtu Interface
default 192.168.0.1 UGS 0 0 - em0
127/8 127.0.0.1 UGRS 0 0 33224 lo0
127.0.0.1 127.0.0.1 UH 3 0 33224 lo0
192.168.0/24 link#2 UC 1 0 - iwi0
192.168.0.1 link#2 UHLc 1 0 - iwi0
192.168.0.50 127.0.0.1 UGHS 0 0 33224 lo0
192.168.0.51 127.0.0.1 UGHS 0 0 33224 lo0
224/4 127.0.0.1 URS 0 0 33224 lo0
$ ping -c 1 192.168.0.1
PING 192.168.0.1 (192.168.0.1): 56 data bytes
ping: sendto: Network is down
ping: wrote 192.168.0.1 64 chars, ret=-1
--- 192.168.0.1 ping statistics ---
1 packets transmitted, 0 packets received, 100.0% packet loss
$ sudo ifconfig em0 down
$ sudo dhclient iwi0
DHCPDISCOVER on iwi0 to 255.255.255.255 port 67 interval 1
DHCPDISCOVER on iwi0 to 255.255.255.255 port 67 interval 1
DHCPOFFER from 192.168.0.12
DHCPOFFER from 192.168.0.12
DHCPOFFER already seen.
DHCPREQUEST on iwi0 to 255.255.255.255 port 67
DHCPACK from 192.168.0.12
bound to 192.168.0.51 -- renewal in 60 seconds.
$ route show -inet
Routing tables
Internet:
Destination Gateway Flags Refs Use Mtu Interface
default 192.168.0.1 UGS 0 0 - em0
localhost localhost UH 2 0 33224 lo0
192.168.0/24 link#1 UC 1 0 - em0
192.168.0.1 link#1 UHLc 1 0 - em0
192.168.0.50 localhost UGHS 0 0 33224 lo0
192.168.0.51 localhost UGHS 0 0 33224 lo0
$ ping -c 1 192.168.0.1
PING 192.168.0.1 (192.168.0.1): 56 data bytes
ping: sendto: Network is down
ping: wrote 192.168.0.1 64 chars, ret=-1
--- 192.168.0.1 ping statistics ---
1 packets transmitted, 0 packets received, 100.0% packet loss
$ sudo ifconfig em0 up
$ ping -c 1 192.168.0.1
PING 192.168.0.1 (192.168.0.1): 56 data bytes
64 bytes from 192.168.0.1: icmp_seq=0 ttl=127 time=0.447 ms
--- 192.168.0.1 ping statistics ---
1 packets transmitted, 1 packets received, 0.0% packet loss
round-trip min/avg/max/std-dev = 0.447/0.447/0.447/0.000 ms
$ dmesg
OpenBSD 3.9-current (GENERIC) #2: Fri Jun 9 17:56:59 CDT 2006
[EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: Intel(R) Pentium(R) M processor 1.10GHz ("GenuineIntel" 686-class) 1.10
GHz
cpu0:
FPU,V86,DE,PSE,TSC,MSR,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,TM,SBF,EST,TM2
cpu0: Enhanced SpeedStep 1100 MHz (940 mV): speeds: 1100, 1000, 900, 800, 600
MHz
real mem = 258437120 (252380K)
avail mem = 228384768 (223032K)
using 3180 buffers containing 13025280 bytes (12720K) of memory
mainbus0 (root)
bios0 at mainbus0: AT/286+(56) BIOS, date 06/15/05, BIOS32 rev. 0 @ 0xfd740,
SMBIOS rev. 2.33 @ 0xe0010 (56 entries)
bios0: IBM 2371BMU
apm0 at bios0: Power Management spec V1.2
apm0: battery life expectancy 87%
apm0: AC on, battery charge high, charging
apm0: flags 30102 dobusy 0 doidle 1
pcibios0 at bios0: rev 2.1 @ 0xfd6d0/0x930
pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xfdeb0/256 (14 entries)
pcibios0: PCI Interrupt Router at 000:31:0 ("Intel 82371FB ISA" rev 0x00)
pcibios0: PCI bus #2 is the last bus
bios0: ROM list: 0xc0000/0xc800! 0xcc800/0x1000 0xcd800/0x1000 0xdc000/0x4000!
0xe0000/0x10000
cpu0 at mainbus0
pci0 at mainbus0 bus 0: configuration mode 1 (no bios)
pchb0 at pci0 dev 0 function 0 "Intel 82852GM Hub-PCI" rev 0x02
"Intel 82852GM Memory" rev 0x02 at pci0 dev 0 function 1 not configured
"Intel 82852GM Configuration" rev 0x02 at pci0 dev 0 function 3 not configured
vga1 at pci0 dev 2 function 0 "Intel 82852GM AGP" rev 0x02: aperture at
0xe0000000, size 0x8000000
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
"Intel 82852GM AGP" rev 0x02 at pci0 dev 2 function 1 not configured
uhci0 at pci0 dev 29 function 0 "Intel 82801DB USB" rev 0x01: irq 11
usb0 at uhci0: USB revision 1.0
uhub0 at usb0
uhub0: Intel UHCI root hub, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
uhci1 at pci0 dev 29 function 1 "Intel 82801DB USB" rev 0x01: irq 11
usb1 at uhci1: USB revision 1.0
uhub1 at usb1
uhub1: Intel UHCI root hub, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
uhci2 at pci0 dev 29 function 2 "Intel 82801DB USB" rev 0x01: irq 11
usb2 at uhci2: USB revision 1.0
uhub2 at usb2
uhub2: Intel UHCI root hub, rev 1.00/1.00, addr 1
uhub2: 2 ports with 2 removable, self powered
ehci0 at pci0 dev 29 function 7 "Intel 82801DB USB" rev 0x01: irq 11
usb3 at ehci0: USB revision 2.0
uhub3 at usb3
uhub3: Intel EHCI root hub, rev 2.00/1.00, addr 1
uhub3: 6 ports with 6 removable, self powered
ppb0 at pci0 dev 30 function 0 "Intel 82801BAM Hub-to-PCI" rev 0x81
pci1 at ppb0 bus 1
cbb0 at pci1 dev 0 function 0 "Ricoh 5C476 CardBus" rev 0x8d: irq 11
sdhc0 at pci1 dev 0 function 1 "Ricoh 5C822 SD/MMC" rev 0x13: irq 11
sdmmc0 at sdhc0
em0 at pci1 dev 1 function 0 "Intel PRO/1000MT Mobile (82541GI)" rev 0x00: irq
11, address 00:0a:e4:37:61:6a
iwi0 at pci1 dev 2 function 0 "Intel PRO/Wireless 2200BG" rev 0x05: irq 11,
address 00:13:ce:58:8f:14
cardslot0 at cbb0 slot 0 flags 0
cardbus0 at cardslot0: bus 2 device 0 cacheline 0x0, lattimer 0xb0
pcmcia0 at cardslot0
ichpcib0 at pci0 dev 31 function 0 "Intel 82801DBM LPC" rev 0x01
pciide0 at pci0 dev 31 function 1 "Intel 82801DBM IDE" rev 0x01: DMA, channel 0
configured to compatibility, channel 1 configured to compatibility
wd0 at pciide0 channel 0 drive 0: <HTC426030G7AT00>
wd0: 16-sector PIO, LBA, 28615MB, 58605120 sectors
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 5
pciide0: channel 1 disabled (no drives)
ichiic0 at pci0 dev 31 function 3 "Intel 82801DB SMBus" rev 0x01: irq 11
iic0 at ichiic0
auich0 at pci0 dev 31 function 5 "Intel 82801DB AC97" rev 0x01: irq 11, ICH4
AC97
ac97: codec id 0x41445374 (Analog Devices AD1981B)
ac97: codec features headphone, 20 bit DAC, No 3D Stereo
audio0 at auich0
"Intel 82801DB Modem" rev 0x01 at pci0 dev 31 function 6 not configured
isa0 at ichpcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pms0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
pcppi0 at isa0 port 0x61
midi0 at pcppi0: <PC speaker>
spkr0 at pcppi0
aps0 at isa0 port 0x1600/31
npx0 at isa0 port 0xf0/16: using exception 16
biomask effd netmask effd ttymask ffff
pctr: 686-class user-level performance counters enabled
mtrr: Pentium Pro MTRR support
dkcsum: wd0 matches BIOS drive 0x80
root on wd0a
rootdev=0x0 rrootdev=0x300 rawdev=0x302
arp: attempt to add entry for 192.168.0.12 on iwi0 by 00:14:2a:b7:c9:17 on em0
[ occurs 39 times ]
arp: attempt to add entry for 192.168.0.1 on iwi0 by 00:13:46:06:3a:58 on em0
arp: attempt to add entry for 192.168.0.12 on iwi0 by 00:14:2a:b7:c9:17 on em0
[ occurs 3 times ]
arp: attempt to add entry for 192.168.0.1 on iwi0 by 00:13:46:06:3a:58 on em0 [
occurs 3 times ]
arp: attempt to add entry for 192.168.0.12 on iwi0 by 00:14:2a:b7:c9:17 on em0
[ occurs 18 times ]