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 17th February 2009
guitarscn guitarscn is offline
Package Pilot
 
Join Date: Oct 2008
Posts: 166
Thanked 1 Time in 1 Post
Default Network settings

These are currently the network settings for my Windows computer:



I've set up a wireless ethernet bridge to connect to the internet.

Where in OBSD would I place these settings?
Reply With Quote
  #2   (View Single Post)  
Old 17th February 2009
guitarscn guitarscn is offline
Package Pilot
 
Join Date: Oct 2008
Posts: 166
Thanked 1 Time in 1 Post
Default

I'd like to add: I've only used DHCP so far, which is why I have no clue about how to do this...during the installation, it asks for the "Default route" which I have no idea what it is, so I just blindly set it to 192.168.1.1...I set the "IPv4 address" to 192.168.1.102, the "Netmask" to 255.255.255.0, and the "DNS nameserver" to 192.168.1.1. I suppose the "Default gateway" setting 192.168.1.1 goes into /etc/mygate.

Would all of these be the correct settings? (I tried the "dhclient rl0" command, but it didn't connect to the internet.)
Reply With Quote
  #3   (View Single Post)  
Old 17th February 2009
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 2,888
Thanked 190 Times in 160 Posts
Default

Quote:
Originally Posted by guitarscn View Post
Where in OBSD would I place these settings?
Although DHCP is discussed in Section 6.4 of the FAQ:

http://openbsd.org/faq/faq6.html#DHCP

You will be doing yourself a favor by studying all of Section 6.
Quote:
(I tried the "dhclient rl0" command, but it didn't connect to the internet.)
What is the contents of /etc/hostname.rl0? Again, this is discussed in Section 6 of the FAQ.
Reply With Quote
  #4   (View Single Post)  
Old 17th February 2009
guitarscn guitarscn is offline
Package Pilot
 
Join Date: Oct 2008
Posts: 166
Thanked 1 Time in 1 Post
Default

Inside /etc/hostname.rl0:

Quote:
inet 192.168.1.102 255.255.255.0 NONE
Reply With Quote
  #5   (View Single Post)  
Old 17th February 2009
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 2,888
Thanked 190 Times in 160 Posts
Default

Quote:
Originally Posted by guitarscn View Post
Inside /etc/hostname.rl0:
Code:
inet 192.168.1.102 255.255.255.0 NONE
These contents point out that you want a specific address assigned to the rl0 interface. If your goal is to have a DHCP server assign the IP address, default router, & DNS server name(s), then the contents of /etc/hostname.rl0 should be nothing more than:
Code:
dhcp
This is discussed in Section 6.4.1.
Reply With Quote
  #6   (View Single Post)  
Old 17th February 2009
guitarscn guitarscn is offline
Package Pilot
 
Join Date: Oct 2008
Posts: 166
Thanked 1 Time in 1 Post
Default

I've already tried that. DHCP doesn't work on Windows, either. I have to set all the numbers manually, and I've been trying to do that in OBSD like I did with Windows to make it work, but it's not I'm not sure how to set those on OBSD...
Reply With Quote
  #7   (View Single Post)  
Old 17th February 2009
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 2,888
Thanked 190 Times in 160 Posts
Default

Quote:
Originally Posted by guitarscn View Post
I've already tried that.
  • The IP address & netmask will be set in /etc/hostname.rl0.
  • The default router will be set in /etc/mygate.
  • DNS servers are set in /etc/resolv.conf.
As stated before, I would highly recommend that you study Section 6 of the FAQ.
Reply With Quote
  #8   (View Single Post)  
Old 17th February 2009
guitarscn guitarscn is offline
Package Pilot
 
Join Date: Oct 2008
Posts: 166
Thanked 1 Time in 1 Post
Default

Quote:
Originally Posted by ocicat View Post
  • The IP address & netmask will be set in /etc/hostname.rl0.
  • The default router will be set in /etc/mygate.
  • DNS servers are set in /etc/resolv.conf.
As stated before, I would highly recommend that you study Section 6 of the FAQ.
Isn't that exactly what I did before?

/etc/hostname.rl0:
Code:
inet 192.168.1.102 255.255.255.0 NONE
/etc/mygate:
Code:
192.168.1.1
/etc/resolv.conf:
Code:
lookup file bind
nameserver 192.168.1.1
These were the settings I had, and even after a reboot I re-checked the files and "dhclient rl0" still did not work. What am I doing wrong?
Reply With Quote
  #9   (View Single Post)  
Old 17th February 2009
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 2,888
Thanked 190 Times in 160 Posts
Default

Quote:
Originally Posted by guitarscn View Post
These were the settings I had, and even after a reboot I re-checked the files and "dhclient rl0" still did not work. What am I doing wrong?
Two things:
  • dhclient can only be executed as root.
  • Secondly, if you have already set the IP address, netmask, DNS server, & default router manually, why are you wanting to run dhclient at all?
If you have successfully set the standard networking parameters, you can verify that you are indeed connected by issuing ping to an arbitrary site:

$ ping google.com

Last edited by ocicat; 17th February 2009 at 11:09 PM.
Reply With Quote
Old 17th February 2009
guitarscn guitarscn is offline
Package Pilot
 
Join Date: Oct 2008
Posts: 166
Thanked 1 Time in 1 Post
Default

Yes, I always log in as root before issuing a dhclient command as habit. After I set all the settings, I thought I had to let dhclient connect to the router with the settings.

Code:
ping: unknown host: google.com
Reply With Quote
Old 17th February 2009
phoenix's Avatar
phoenix phoenix is offline
Risen from the ashes
 
Join Date: May 2008
Posts: 699
Thanked 90 Times in 81 Posts
Default

Start with the basics.

Make sure ifconfig rl0 shows that the IP and netmask have been configured correctly.

Check the output of netstat -rn to make sure the default gateway has been set correctly.

Then try to ping something locally via IP: ping 192.168.1.1

Then try to ping something locally via DNS (if you have a local DNS server): ping whatever

Then try to ping something remote via IP: ping x.x.x.x

Then try to ping something remote via DNS: ping google.de

The one that fails will tell you where the problem is.
__________________
Freddie

Help for FreeBSD: Handbook, FAQ, man pages, mailing lists.
Reply With Quote
Old 18th February 2009
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Helpful companion
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Thanked 193 Times in 184 Posts
Default

guitarscn, are you positive that rl0 is the correct interface? please provide more information..

Things we know so far,
  • Your router's LAN IP is 192.168.1.1, it is your default gateway and the IP of your local DNS forwarder.
  • 192.168.1.102 is the IP you wish to use, your router has DHCP disabled currently.
  • 255.255.255.0 is the netmask, range in CIDR format would be 192.168.1.0/24 (..254 unique hosts)
At this point, we know nothing else about your setup.. nor do we know if rl0 is the proper interface name, it might be something you gleamed from a man page or tutorial.

Please provide us a dmesg and the output from ifconfig.
Reply With Quote
Old 18th February 2009
guitarscn guitarscn is offline
Package Pilot
 
Join Date: Oct 2008
Posts: 166
Thanked 1 Time in 1 Post
Default

Errr...I don't know what happened, but I swear I did not change any settings. I just booted into OBSD, and began to run the commands phoenix posted to test what was wrong, and when I got to pinging google.com, it just started working all of the sudden...I swear I did not even change any settings. While this is generally good news, I guess these things just happen sometimes
Reply With Quote
Old 18th February 2009
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 2,888
Thanked 190 Times in 160 Posts
Default

Quote:
Originally Posted by guitarscn View Post
Errr...I don't know what happened, but I swear I did not change any settings. I just booted into OBSD, and began to run the commands phoenix posted to test what was wrong, and when I got to pinging google.com, it just started working all of the sudden...
Granted, none of us are there, but I suspect that the reboot -- or more specifically running netstart.sh -- is what was needed. For more information on how to activate changes, study Section 6.2.5 of the FAQ:

http://openbsd.org/faq/faq6.html#Setup.activate
Reply With Quote
Reply

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
Network Sniffing jleal FreeBSD Security 5 25th January 2010 07:11 PM
please help me understand wpa settings gosha OpenBSD General 1 14th July 2009 11:37 AM
Network bottleneck mapcorp OpenBSD General 2 29th June 2009 08:24 PM
where are start up settings on KDE Never mind i found them whispersGhost Solaris 2 12th June 2008 09:30 PM
How do I get network logs? Johnny2Bad FreeBSD General 2 22nd May 2008 05:37 PM


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


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