DaemonForums  

Go Back   DaemonForums > NetBSD > NetBSD General

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

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 29th November 2021
Zielonykid123 Zielonykid123 is offline
Fdisk Soldier
 
Join Date: Nov 2021
Posts: 69
Default Network configuration

I can't auto config my wireless network interface so I tried to configure it by myself, I really don't know what I'm doing wrong, but I have no network. As device type or anything it was I selected auto, as IP address 192.168.1.2, mask 255.255.255.0, gateway 192.168.0.1, dns domain local.domain and dns1 1.1.1.1.
Reply With Quote
  #2   (View Single Post)  
Old 29th November 2021
Head_on_a_Stick's Avatar
Head_on_a_Stick Head_on_a_Stick is offline
Real Name: Matthew
Bitchy Nerd Elitist
 
Join Date: Dec 2015
Location: London
Posts: 461
Default

Quote:
Originally Posted by Zielonykid123 View Post
I can't auto config my wireless network interface
Why not? What have you tried and how does it fail, exactly? Have you read hostname.if(5)?

Quote:
Originally Posted by Zielonykid123 View Post
as IP address 192.168.1.2, mask 255.255.255.0, gateway 192.168.0.1, dns domain local.domain and dns1 1.1.1.1.
The IP address and the gateway should be on the same subnet so if the gateway address is correct then the IP address should be 192.168.0.2 (or so) — the first three numbers should be the same.

You can use Linux to check workable values, here's my system as an example:
Code:
$ ip r 
default via 192.168.0.1 dev wlan0 proto static metric 304 
192.168.0.0/24 dev wlan0 proto static scope link src 192.168.0.11 
$
So the IP address ("src") is 192.168.0.11 and the gateway ("default") is 192.168.0.1; in this output the subnet mask is given in CIDR notation with 255.255.255.0 expressed as a /24 suffix appended to the IP address.
__________________
Are you infected with Wetiko?
Reply With Quote
  #3   (View Single Post)  
Old 29th November 2021
Zielonykid123 Zielonykid123 is offline
Fdisk Soldier
 
Join Date: Nov 2021
Posts: 69
Default

Well, i cant auto detect it due to some errors. I forgot to connect to a wifi ndtwork,how can i do it at network configuration in the sysinst?

Last edited by J65nko; 30th November 2021 at 03:08 AM. Reason: Removed full quote ......
Reply With Quote
  #4   (View Single Post)  
Old 29th November 2021
Head_on_a_Stick's Avatar
Head_on_a_Stick Head_on_a_Stick is offline
Real Name: Matthew
Bitchy Nerd Elitist
 
Join Date: Dec 2015
Location: London
Posts: 461
Default

Ah, another superfluous full quote. Lovely.

Quote:
Originally Posted by Zielonykid123 View Post
i cant auto detect it due to some errors
If you shared the errors we might be able to help.

Quote:
Originally Posted by Zielonykid123 View Post
how can i do it at network configuration in the sysinst?
Not sure what you mean by "in the sysinst" but you should probably read the man page to which I linked above.

EDIT: oops, I've just noticed this is the NetBSD sub-forum. I have no idea how NetBSD works and the OpenBSD man page link is clearly not relevant. Sorry about that.
__________________
Are you infected with Wetiko?

Last edited by Head_on_a_Stick; 29th November 2021 at 05:09 PM.
Reply With Quote
  #5   (View Single Post)  
Old 29th November 2021
Zielonykid123 Zielonykid123 is offline
Fdisk Soldier
 
Join Date: Nov 2021
Posts: 69
Default

Quote:
Originally Posted by Head_on_a_Stick View Post
Ah, another superfluous full quote. Lovely.
I'm sorry for that, I just wrote the message using a phone with alphanumeric keypad, it's so annoying.

Also, by sysinst i mean the NetBSD installer. I've copied the /etc/hostname.if from my OpenBSD root to the NetBSD root, rebooted but didn't worked.
Reply With Quote
  #6   (View Single Post)  
Old 29th November 2021
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,503
Default

Quote:
Originally Posted by Zielonykid123 View Post
I've copied the /etc/hostname.if from my OpenBSD root to the NetBSD root, rebooted but didn't worked.

OpenBSD manages it's own encryption and networking and the default does not use wpa_supplicant. NetBSD uses wpa_supplicant exclusively. NetBSD, as does FreeBSD, recommends you setup wireless in /etc/rc.conf:

24.2.1. Connecting using IEEE 802.11 (Wi-Fi)

You are all over this forum hopping from FreeBSD <-> OpenBSD <-> NetBSD. Each of these projects has documentation on how to accomplish different tasks.

FreeBSD Handbook

OpenBSD FAQ

The NetBSD Guide

If you would have utilized these resources, you would have had copy/paste setup guides.

There is one helpful suggestion that is in the Arch wiki on appending a network to /etc/wpa_supplicant.conf.

The command wpa_passphrase(8) takes your SSID followed by the WPA key and outputs the necessary information for /etc/wpa_supplicant.conf.

You can redirect the output from the terminal to the file /etc/wpa_supplicant.conf with ">" or ">>".
">" overwrites the file while ">>" appends the output to the file.
For NetBSD do not us ">" as it already contains
Code:
# Allow wpa_cli(8) to configure wpa_supplicant
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel
update_config=1
Instead
wpa_passphrase discord passphrase >> /etc/wpa_supplicant.conf
which will result in

Code:
# Allow wpa_cli(8) to configure wpa_supplicant
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel
update_config=1

# Automatically connect to the protected network "discord" using the password "passphrase".
network={
        ssid="discord"
        #psk=passphrase
        psk="******************************************"
}
The Arch wiki is also an excellent source of information, particularly for userland applications like wpa_supplicant, mpd, etc....
ArchLinux Wiki wpa_supplicant

Last edited by shep; 5th December 2021 at 04:44 PM. Reason: clarity
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 configuration for a USB broadband device PapaParrot OpenBSD General 50 16th April 2018 08:28 PM
Plan 9 network configuration gpatrick Other OS 1 27th January 2015 02:06 AM
KVM Virtual Machine network configuration J65nko Other BSD and UNIX/UNIX-like 3 2nd December 2014 06:00 AM
Network Card Configuration Freeco FreeBSD Installation and Upgrading 6 8th May 2010 11:11 AM
Network configuration issue (gateway(s)) amorphousone OpenBSD General 3 25th November 2009 04:53 AM


All times are GMT. The time now is 03:09 PM.


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