DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 25th July 2011
sepuku's Avatar
sepuku sepuku is offline
Real Name: Vizard Sepuku
Package Pilot
 
Join Date: Jun 2011
Location: Athens & Chania,Greece
Posts: 143
Default Trouble connecting to the internet

Hello people once again:I'm trying to connect my lenovo X60 via ethernet to the internet.I have the em0 interface and i want to use dhcp so i created
Code:
/etc/hostname.em0
and wrote in it
Code:
dhcp
yet on boot i see:

Code:
starting network
DHCPDISCOVER on em0 to 255.255.255.255 port 67 interval 2
DHCPDISCOVER on em0 to 255.255.255.255 port 67 interval 4
DHCPDISCOVER on em0 to 255.255.255.255 port 67 interval 10
DHCPDISCOVER on em0 to 255.255.255.255 port 67 interval 11
DHCPDISCOVER on em0 to 255.255.255.255 port 67 interval 14
DHCPDISCOVER on em0 to 255.255.255.255 port 67 interval 12
DHCPDISCOVER on em0 to 255.255.255.255 port 67 interval 6
No DHCPOFFERS recieved.
No working leases in persistent database - sleeping.
Any ideas?

And on my ifconfig em0 i see '(none)' in the 'media:Ethernet autoselect' section.I read the networking part on the FAQ but i can't make it work.I don't know what i'm doing wrong. :/
Reply With Quote
  #2   (View Single Post)  
Old 25th July 2011
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

Quote:
Originally Posted by sepuku View Post
Code:
starting network
DHCPDISCOVER on em0 to 255.255.255.255 port 67 interval 2
DHCPDISCOVER on em0 to 255.255.255.255 port 67 interval 4
DHCPDISCOVER on em0 to 255.255.255.255 port 67 interval 10
...
I sometimes get this at boot-time. DHCP does a four-way handshake when negotiating the IP address lease & DHCPDISCOVER is the first step issued by the client waiting for a DHCP server to reply. If the server does not respond before timing out, the simplest action to take next is simply initiate the handshake again via:

# dhclient em0
Reply With Quote
  #3   (View Single Post)  
Old 25th July 2011
sepuku's Avatar
sepuku sepuku is offline
Real Name: Vizard Sepuku
Package Pilot
 
Join Date: Jun 2011
Location: Athens & Chania,Greece
Posts: 143
Default

Hello once again ocicat.I have already tried that yet i get the same message with different intervals.My /etc/hostname.em0 has only "dhcp" nothing else.
could that be the problem?I tried the example on the FAQ and i also could not make it work.

I forgot to mention that the em0 interface is not the one used when i installed obsd.I had my hdisk attached to another pc(using an external case) to make the installation since my X60 has no cd drive.The interface that the system used to download and install obsd was nfe0.I hope this information helps.
Reply With Quote
  #4   (View Single Post)  
Old 25th July 2011
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

Quote:
Originally Posted by sepuku View Post
My /etc/hostname.em0 has only "dhcp" nothing else.
could that be the problem?
No.
Quote:
I forgot to mention that the em0 interface is not the one used when i installed obsd.
This shouldn't matter.

You can always run tcpdump(8) on em0 to watch the packet traffic coming into the interface, but I suspect what you are going to see is that the client is broadcasting its initial request, & no server response is coming back in a timely manner. Depending upon the hardware used & the time of day, DHCP servers may be overloaded servicing other requests.

Peripherally, I don't know how you are connecting to the Internet, but if you are attaching your laptop directly, you may want to reset the modem/router used to attach to your ISP. In particular, the cable modem I use caches the MAC address of whatever device is attached. If I change which computer is attached to the modem, I have to turn the modem off, wait ~8 seconds, then turn it back on to ensure that the previous MAC address is not still being used before I can connect to the Internet again.
Reply With Quote
  #5   (View Single Post)  
Old 25th July 2011
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

DHCP is not going to work unless the physical network connection is operating. From your brief description, it does not appear to be.
Reply With Quote
  #6   (View Single Post)  
Old 25th July 2011
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

Quote:
Originally Posted by jggimi View Post
DHCP is not going to work unless the physical network connection is operating. From your brief description, it does not appear to be.
sepuku, post the output of the following command:

$ ifconfig em0

With an Ethernet cable connected to both the modem & laptop, if you don't see a light on the em0 interface lit, you don't yet have Layer 1 (physical layer) connectivity.

Last edited by ocicat; 25th July 2011 at 02:42 PM.
Reply With Quote
  #7   (View Single Post)  
Old 25th July 2011
sepuku's Avatar
sepuku sepuku is offline
Real Name: Vizard Sepuku
Package Pilot
 
Join Date: Jun 2011
Location: Athens & Chania,Greece
Posts: 143
Default

I'm not sure what do you mean with that. :/ And how can i make it work?I see no "psysical network connection" in the networking part of the faq.

edit:I 'm gonna try another cable and test if the cable is the problem.

Last edited by sepuku; 25th July 2011 at 02:24 PM.
Reply With Quote
  #8   (View Single Post)  
Old 25th July 2011
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

By physical connectivity, I mean functioning Ethernet cables/connectors, and functioning NICs. You need bits to be able to flow along wires, before DHCP will work.

1) Are there status indicator LEDs for the NIC at either end of your Ethernet connection? If so, that will show whether the NICs are seeing electrical connections. 2) Check your Ethernet cabling -- bad cables/connectors are not uncommon. 3) Use an alternate port on your hub/switch/router if available, as NICs on such equipment can fail. 4) Swap NICs on your computer, if you can.
Reply With Quote
  #9   (View Single Post)  
Old 25th July 2011
sepuku's Avatar
sepuku sepuku is offline
Real Name: Vizard Sepuku
Package Pilot
 
Join Date: Jun 2011
Location: Athens & Chania,Greece
Posts: 143
Default

OK i'm embarased! :$ it was just the cable! :/ I bought a new one and everything is fine.Thank you for your patience and your time once again.I got one more question though:

If i reset my router,after i set the username and password, do i have to do anything else to have a working interface?Or just by re-entering username and password everything's ok?
Reply With Quote
Old 25th July 2011
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

Quote:
Originally Posted by sepuku View Post
If i reset my router,after i set the username and password, do i have to do anything else to have a working interface?Or just by re-entering username and password everything's ok?
I can only assume you are talking about setting the username & password on your router. This isn't something standardized, so you will have to either read the documentation coming with the router or experiment on your own.
Reply With Quote
Old 25th July 2011
sepuku's Avatar
sepuku sepuku is offline
Real Name: Vizard Sepuku
Package Pilot
 
Join Date: Jun 2011
Location: Athens & Chania,Greece
Posts: 143
Default

Quote:
Originally Posted by ocicat View Post
I can only assume you are talking about setting the username & password on your router. This isn't something standardized, so you will have to either read the documentation coming with the router or experiment on your own.
Yeap,that's what i'm talking about.I 'll take a look to the documentation just to be ready.
Reply With Quote
Reply

Tags
ethernet, interface settings

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Connecting to internet via adsl router michaelrmgreen FreeBSD General 3 9th August 2009 12:29 PM
pkgsrc pkg_add problems not connecting Mr-Biscuit NetBSD Package System (pkgsrc) 30 14th June 2009 11:28 AM
pkg_add problems with connecting Mr-Biscuit NetBSD Package System (pkgsrc) 2 26th May 2009 11:44 AM
Connecting to router wirelessly guitarscn OpenBSD General 16 21st January 2009 03:47 AM
Connecting to wireless router TomAmundsen FreeBSD General 19 25th August 2008 10:14 PM


All times are GMT. The time now is 07:16 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick