Unable to obtain an IP address using DHCP with D-Link DI-704P router

Hey, been searching for an answer to what seems to be an interesting problem for quite sometime. Basically, I work in a physics lab in Toronto and use my laptop in a variety of different locations. At home I use an airport extreme router, and in my office I have a Belkin N1 vision. In the lab itself we use a D-Link DI-704P. At home I connect to the router (AEBS) via wireless without issue. In my office I connect directly via ethernet cable to the router and in the lab I again wire directly into the router. The major issue is that in the lab I am not assigned an IP address by the router. I obtain a self-assigned IP and renewing the lease does not change anything. Also, bringing the interface down using ifconfig in the terminal, waiting, and bringing the interface back up again doesn't help. If I move my computer from the lab to the office and leave all the settings alone when I connect to the Belkin router I get an IP no problem. Interestingly, if I reboot the computer while plugged into the lab (D-Link) router I finally get an IP address, though this often causes the entire network to go down, requiring a router reboot. This would suggest to me that there are some router issues, however, on my Eee PC running Ubuntu 8.10, I have no problem obtaining an IP via DHCP. There are three other desktops connected to the D-Link router, two running Windows XP and one running Red Hat Enterprise Linux, all without issue. I am quite knowledgeable about networking, UNIX command line, etc
., but this one has stumped me. It was suggested to me that I use tcpdump to analyze the traffic between the macbook and router. I will do this shortly and post the results.

Thanks

Macbook - Intel Core Duo 2.0 GHz, Mac OS X (10.5.4)

Posted on Jul 8, 2008 1:39 PM

Reply
4 replies

Jul 8, 2008 2:04 PM in response to ASutton

ASutton wrote:
., but this one has stumped me. It was suggested to me that I use tcpdump to analyze the traffic between the macbook and router. I will do this shortly and post the results.


I doubt there will be any traffic. Look at the router after you plug in and see if the light is on for your port. Usually this problem is because the router doesn't think there is anything connected. It could be a bad cable. It could be that need to adjust some speed or duplex settings in the Advanced Ethernet preferences. Unfortunately, it is most like just that the router and Mac aren't talking. You could bring in some cheap $10 router and hook that up between the work router and your Mac.

Jul 9, 2008 1:23 PM in response to etresoft

Hey, so I connected to the router again and checked the status light before and after connecting. The light on the router was not lit before, and became lit after plugging in the cable, leading me to believe that it knows I'm there. I also tried using a cable known to work, same results as before. I receive a self assigned IP in the range 169.254.x.x. After connecting I used tcpdump the results were as follows:

tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on en0, link-type EN10MB (Ethernet), capture size 96 bytes
16:15:05.968521 IP 0.0.0.0.bootpc > broadcasthost.bootps: BOOTP/DHCP, Request from 00:17:f2:28:9f:0c (oui Unknown), length 300
16:15:05.969624 IP 192.168.0.1.bootps > broadcasthost.bootpc: BOOTP/DHCP, Reply, length 308
16:15:10.178085 IP aaron-suttons-macbook-2.local.mdns > 224.0.0.251.mdns: 0*- [0q] 16/0/0 (Cache flush) SRV[|domain]
16:15:14.622449 IP 0.0.0.0.bootpc > broadcasthost.bootps: BOOTP/DHCP, Request from 00:17:f2:28:9f:0c (oui Unknown), length 300
16:15:14.623379 IP 192.168.0.1.bootps > broadcasthost.bootpc: BOOTP/DHCP, Reply, length 308
16:15:16.907838 IP 192.168.0.133.netbios-ns > 192.168.0.255.netbios-ns: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
16:15:18.907494 IP aaron-suttons-macbook-2.local.mdns > 224.0.0.251.mdns: 0 [1a] [5q] PTR (QM)? airport.tcp.local.[|domain]
16:15:23.435008 IP 0.0.0.0.bootpc > broadcasthost.bootps: BOOTP/DHCP, Request from 00:17:f2:28:9f:0c (oui Unknown), length 300
16:15:23.436059 IP 192.168.0.1.bootps > broadcasthost.bootpc: BOOTP/DHCP, Reply, length 308
16:15:31.437836 IP 0.0.0.0.bootpc > broadcasthost.bootps: BOOTP/DHCP, Request from 00:17:f2:28:9f:0c (oui Unknown), length 300
16:15:31.438811 IP 192.168.0.1.bootps > broadcasthost.bootpc: BOOTP/DHCP, Reply, length 308
16:15:42.191383 IP aaron-suttons-macbook-2.local.mdns > 224.0.0.251.mdns: 0*- [0q] 16/0/0 (Cache flush) SRV[|domain]
16:15:46.897467 arp who-has 17.151.16.20 tell aaron-suttons-macbook-2.local
^C13 packets captured
13 packets received by filter
0 packets dropped by kernel

At which point I left it for a minute and nothing change so I ended it with ctrl+c. I then tried to ping the router, I got:

PING 192.168.0.1 (192.168.0.1): 56 data bytes
ping: sendto: Permission denied
ping: sendto: Permission denied
ping: sendto: Permission denied
ping: sendto: Permission denied
ping: sendto: Permission denied
ping: sendto: Permission denied
ping: sendto: Permission denied
^C
--- 192.168.0.1 ping statistics ---
8 packets transmitted, 0 packets received, 100% packet loss
aaron-suttons-macbook-2:~ asutton$

I wonder why I am getting the permission denied error. Any thoughts?

Jul 9, 2008 3:08 PM in response to ASutton

I wonder why I am getting the permission denied error. Any thoughts?


That looks like a firewall issue. Make sure for testing purposes that your firewall is opened up. Also, have you been playing around with ipfw on your box?

The tcpdump output would probably be easier for you to analyze with something like wireshark. You probably also want to use the -s0 option to make sure you capture enough protocol data.

However, it certainly seems like a firewall/packet filtering issue might be your problem.

Jul 10, 2008 9:48 AM in response to glsmith

I have reconnected my computer to the lab router and used wireshark to analyze the network traffic. Basically what I did was as follows: I took my computer from my office, which had obtained an IP using DHCP from a Belkin router and connected it to the D-Link router in the lab, leaving all the settings alone. For the first few minutes I just connected the computer and left it alone, there was virtually no network traffic. Then I attempted to renew the DHCP, this caused much traffic, but there remained no connection to the internet. At various points throughout the log you can see traffic from the other computers on the network. Pinging the router again resulted in Permission Denied. My firewall is set to allow all incoming connections and I flushed the rule list from ipfw using:
$ ipfw -f flush
I waited about 5 minutes and then tried to configure the network manually. I gave myself the IP 192.168.0.108 and set the subnet mask to 255.255.255.0, router at 192.168.0.1 and DNS Server as 208.67.222.222 (OpenDNS). This appears to have worked, as after about 5 minutes I was able to surf the internet. Again, pinging the router returned Permission Denied. Attempts to use DHCP after this again failed. Here is the (very lengthy) log:

Oops... can't post it, it's apparently way too long to fit. If anyone wants to see the log I would be happy to send/email it to them.

Thanks

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Unable to obtain an IP address using DHCP with D-Link DI-704P router

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.