Getting online?

Help with setting up network cards, including WiFi cards.

Getting online?

Postby uther » Sat Sep 19, 2015 10:38 am

I have been running GhostBSD MATE 10.1 and i couldn't get online. Would someone like to explain the procedure to a GhostBSD noob please.
uther
 
Posts: 1
Joined: Sat Sep 19, 2015 9:35 am
Has thanked: 0 time
Been thanked: 0 time

Getting online?


Re: Getting online?

Postby ericbsd » Sat Sep 19, 2015 10:43 pm

Please give us more info? You want to connect via wire of WIFI. and please give use ifconfig output.
ericbsd
Developer
 
Posts: 921
Joined: Mon Nov 19, 2012 11:54 pm
Has thanked: 13 times
Been thanked: 23 times

Re: Noob instructions for getting online with Wifi or Ethern

Postby wb7odyfred » Fri Dec 30, 2016 9:29 am

Re: Noob instructions for getting online with Wifi or Ethernet
You need to know your installed networking hardware and installed kernel modules and your version and revision of FreeBSD.
Uname -a command and look for the revision number like r310386 and the Kernel version FreeBSD 12.0-CURRENT #1
Then check the PCI bus devices and the USB bus devices to see what you have for WiFi hardware in your computer.
Use the pciconf -lv and usbconfig list or usbconfig dump_device_desc commands.
http://wiki.ghostbsd.org/wiki/index.php/FAQ#Network Read this updated Network FAQ
http://www.wonkity.com/~wblock/docs/html/wireless.html This Wireless entry is helpful and even provides a PDF version file.
http://forums.ghostbsd.org/viewtopic.php?f=64&t=526 Read this forum post I created to help new users, by listing the outputs of commands run.
https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-wireless.html FreeBSD Handbook Network Wireless section

:
Code: Select all
uname -a

fred@kliktel ~> uname -a
FreeBSD kliktel.ghostbsd-pc.home 12.0-CURRENT FreeBSD 12.0-CURRENT #1 r310386M: Thu Dec 22 19:08:02 PST 2016 fred@kliktel.ghostbsd-pc.home:/usr/obj/usr/src/sys/GENERIC amd64
fred@kliktel ~>

:
Code: Select all
 kldstat

fred@kliktel ~> kldstat
Id Refs Address Size Name
1 68 0xffffffff80200000 1d3f000 kernel
2 2 0xffffffff8222d000 c894 opensolaris.ko
3 1 0xffffffff8223b000 392db1 zfs.ko
4 1 0xffffffff82821000 a7dd linprocfs.ko
5 3 0xffffffff8282c000 7a2b linux_common.ko
6 1 0xffffffff82834000 12a2b geom_mirror.ko
7 1 0xffffffff82847000 fe29 geom_journal.ko
8 1 0xffffffff82857000 1110c geom_eli.ko
9 1 0xffffffff82869000 4042a linux.ko
10 1 0xffffffff828aa000 3afad linux64.ko
11 1 0xffffffff828e5000 1032c iscsi.ko
12 1 0xffffffff828f6000 97f41 i915kms.ko
13 1 0xffffffff8298e000 55088 drm2.ko
14 4 0xffffffff829e4000 273b iicbus.ko
15 1 0xffffffff829e7000 1cf7 iic.ko
16 1 0xffffffff829e9000 1e6b iicbb.ko
17 2 0xffffffff829eb000 1c048 if_rtwn.ko
18 1 0xffffffff82a08000 bf38 if_rtwn_pci.ko
fred@kliktel ~>

:
Code: Select all
 kldload if_rtwn.ko if_rtwn_pci.ko
Manually Load kernel modules into kernel memory for RTL8188CE PCI Device.
:
Code: Select all
 sudo pciconf -lv
List the PCI Bus Devices. The RealTek RTL8188CE is what I am working to make operational.
Password:
alc0@pci0:1:0:0: class=0x020000 card=0xff1e1179 chip=0x20621969 rev=0xc1 hdr=0x00
vendor = 'Qualcomm Atheros'
device = 'AR8152 v2.0 Fast Ethernet'
class = network
subclass = ethernet
none2@pci0:2:0:0: class=0x028000 card=0x818110ec chip=0x817610ec rev=0x01 hdr=0x00
vendor = 'Realtek Semiconductor Co., Ltd.'
device = 'RTL8188CE 802.11b/g/n WiFi Adapter'
class = network
fred@kliktel ~>


:
Code: Select all
 usbconfig  list


fred@kliktel ~> usbconfig list
ugen1.1: <Intel EHCI root HUB> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen0.1: <Intel EHCI root HUB> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen0.2: <vendor 0x8087 product 0x0024> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen1.2: <vendor 0x8087 product 0x0024> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen1.3: <vendor 0x0bda product 0x8191> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)
ugen0.3: <Generic USB2.0-CRW> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)
ugen0.4: <Importek TOSHIBA Web Camera> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)
ugen1.4: <Maxtor OneTouch> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (2mA)
fred@kliktel ~>

<vendor 0x0bda product 0x8191> This is a RTL8192CU Realtek USB Device.

:
Code: Select all
 usbconfig  dump_device_desc | less

ugen1.3: <vendor 0x0bda product 0x8191> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)

bLength = 0x0012
bDescriptorType = 0x0001
bcdUSB = 0x0200
bDeviceClass = 0x0000 <Probed by interface class>
bDeviceSubClass = 0x0000
bDeviceProtocol = 0x0000
bMaxPacketSize0 = 0x0040
idVendor = 0x0bda
idProduct = 0x8191
bcdDevice = 0x0200
iManufacturer = 0x0001 <Realtek>
iProduct = 0x0002 <802.11n WLAN Adapter>
iSerialNumber = 0x0000 <no string>
bNumConfigurations = 0x0001



These are just the commands to interrogate the computer hardware to understand what WiFi hardware devices are in your system. Verify that FreeBSD supports these Wifi Hardware devices that you see in your computer, or go buy a WiFi nano usb dongle with Realtek RTL8192cu chip like TPLink W725 or Edimax EW-7811un that FreeBSD does support.

Code: Select all
kldstat
List kernel modules already loaded
Code: Select all
kldunload if_urtwn.ko
Unload old kernel module from kernel memory space
Code: Select all
kldload if_rtwn if_rtwn_pci
Load kernel modules for PCI Wi-Fi RTL8188CE hardware
Code: Select all
kldload if_rtwn if_rtwn_usb
Load kernel modules for USB nano Wi-Fi RTL9182CU hardware
Code: Select all
kldstat
#verify kernel modules got loaded into kernel memory space.

Create rtwn0 device
Code: Select all
ifconfig wlan0 create wlandev rtwn0


Bringing up the wifi device, will load the firmware automatically. Then scan for local WiFi access points.
Code: Select all
ifconfig wlan0 up scan


Now edit the files /boot/loader.conf, /etc/rc.conf, /etc/wpa_supplicant.conf

3 Files to add configuration lines inside them. First edit /boot/loader.conf file
vi /boot/loader.conf
Code: Select all
if_rtwn_load="YES"
if_rtwn_pci_load="YES"
legal.realtek.license_ack=1


2nd edit /etc/rc.conf add 2 lines for RTL8188CE
Code: Select all
wlans_rtwn0="wlan0"
ifconfig_wlan0="WPA DHCP"


3rd edit /etc/wpa_supplicant.conf for an Open Network connection to Wireless SSID name "innflux"
Code: Select all
network={
   ssid="innflux"
   key_mgmt=NONE
   }


# or this Network card configuration by Networkmgr added to /etc/rc.conf file
# I needed to set WiFi to channel 6, and WifiMgr application program looks for word "WPA" to determine wireless lan devices
Code: Select all
wlans_rtwn0="wlan0"
ifconfig_wlan0=" WPA channel 6 DHCP"


Manually issue the wpasupplicant and dhclient commands
Code: Select all
wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant.conf
dhclient wlan0

Problems running dhclient? Then kill the previously running dhclient.
Code: Select all
killall dhclient
dhclient wlan0


use Netstat commands to check out the new network interface connections. Check the socket status with a command.

Code: Select all
netstat -r
or
Code: Select all
netstat -i
or
Code: Select all
sockstat -4


Check connectivity with ping command
ping google DNS 3 times.
Code: Select all
ping -c 3 8.8.8.8

ping Hurricane Electric Internet Service Provider 3 times.
Code: Select all
ping -c 3 he.net

ping OpenNic server 3 times http://servers.opennicproject.org/edit.php?srv=ns4.wa.us.dns.opennic.glue
Code: Select all
ping -c 3  45.32.230.225




Sometimes you might need to restart the network service, after editing the /etc/rc.conf file or the /etc/wpa_supplicant.conf file.
Code: Select all
service netif restart
wb7odyfred
 
Posts: 6
Joined: Sat Nov 12, 2016 9:44 pm
Has thanked: 0 time
Been thanked: 0 time


Return to Networking

Who is online

Users browsing this forum: No registered users and 1 guest