Quantcast

raspberry pi & wifi

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

raspberry pi & wifi

Tuyosi Takesima
Hi all .
i am very happy for being able to connect internet by wifi ,

-----------------------
starting network

DHCPREQUEST on run0 to 255.255.255.255

DHCPREQUEST on run0 to 255.255.255.255

DHCPDISCOVER on run0 - interval 1

DHCPDISCOVER on run0 - interval 2

DHCPOFFER from 192.168.12.103 (00:13:ef:c0:04:40)

DHCPREQUEST on run0 to 255.255.255.255

DHCPACK from 192.168.12.103 (00:13:ef:c0:04:40)

bound to 192.168.12.84 -- renewal in 43199 seconds.

smsc0: no link ........... sleeping

--------------------
and
--------------------
$ ping -c 1 www.goole.com

PING www.goole.com (87.106.83.127): 56 data bytes

64 bytes from 87.106.83.127: icmp_seq=0 ttl=42 time=273.819 ms



--- www.goole.com ping statistics ---

1 packets transmitted, 1 packets received, 0.0% packet loss

round-trip min/avg/max/std-dev = 273.819/273.819/273.819/0.000 ms

---
regards
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: raspberry pi & wifi

Tuyosi Takesima
continued

i reversely follow
http://www.bsdguides.org/2012/a-wireless-access-point-hotspot-using-openbsd/
.
because this article is
PC1--wifi-->openbsd--wired lan --> internet

my case is
PC1--wired lan-->openbsd--wifi-->intenet

this may be useful , and arm of openbsd has happy future .


internet
|
wifi
|
run0
<openbsd Rpi3>
smsc0
|
wired lan
|
PC1


i  succeed that PC1 access the internet via openbsd .

the details in next .

1) about run0

/etc/hostname.run0
nwid Mypoint

wpakey 1122334455

dhcp


/etc/pf.conf
ext=run0

icmp_types = "{echoreq, unreach}"

set block-policy return

set loginterface $ext

set skip on lo0

match in all scrub (no-df max-mss 1440)

match out on $ext inet from !($ext:network) to any nat-to ($ext:0)

block log all

pass out quick

pass in quick inet proto { tcp udp gre } from any to any

pass in quick inet proto icmp all icmp-type $icmp_types keep state

pass out quick

pass in quick inet proto { tcp udp gre } from any to any

pass in quick inet proto icmp all icmp-type $icmp_types keep state


2) about smmc0

/etc/dhcpd.interfaces                                        <
smsc0




/etc/dhcpd.conf
option domain-name "my.domain";

option domain-name-servers 8.8.8.8;

subnet 10.0.3.0 netmask 255.255.255.0 {

option routers 10.0.3.1;

range 10.0.3.100 10.0.3.150;

}


3) shell script
accesspoint.bat
sysctl net.inet.ip.forwarding=1

ifconfig smsc0 inet 10.0.3.1  netmask 255.255.255.0 up

dhcpd smsc0



4) the other
ls -l /etc/hostname.smsc0

ls: /etc/hostname.smsc0: No such file or directory

# route show

Routing tables



Internet:

Destination        Gateway            Flags   Refs      Use   Mtu  Prio
Iface
default            192.168.12.1       UGS        3     3063     -    12
run0
BASE-ADDRESS.MCAST localhost          URS        0        3 32768     8 lo0

10.0.3/24          10.0.3.1           Cn         0        0     -     4
smsc0
10.0.3.1           b8:27:eb:c3:cc:1a  UHLl       0        1     -     1
smsc0
10.0.3.255         10.0.3.1           Hb         0        0     -     1
smsc0
loopback           localhost          UGRS       0        0 32768     8 lo0

localhost          localhost          UHhl       1        2 32768     1 lo0

192.168.12/24      jp                 UCn        1        0     -     8
run0
192.168.12.1       00:13:ef:c0:04:40  UHLch      1       30     -     7
run0
jp                 00:13:ef:bb:00:78  UHLl       0       26     -     1
run0
192.168.12.255     jp                 UHb        0        0     -     1
run0


Internet6:

Destination        Gateway            Flags   Refs      Use   Mtu  Prio
Iface
::/96              localhost          UGRS       0        0 32768     8 lo0

::/104             localhost          UGRS       0        0 32768     8 lo0

localhost          localhost          UHhl      14       28 32768     1 lo0

::127.0.0.0/104    localhost          UGRS       0        0 32768     8 lo0

::224.0.0.0/100    localhost          UGRS       0        0 32768     8 lo0

::255.0.0.0/104    localhost          UGRS       0        0 32768     8 lo0

::ffff:0.0.0.0/96  localhost          UGRS       0        0 32768     8 lo0

2002::/24          localhost          UGRS       0        0 32768     8 lo0

2002:7f00::/24     localhost          UGRS       0        0 32768     8 lo0

2002:e000::/20     localhost          UGRS       0        0 32768     8 lo0

2002:ff00::/24     localhost          UGRS       0        0 32768     8 lo0

fe80::/10          localhost          UGRS       0        0 32768     8 lo0

fec0::/10          localhost          UGRS       0        0 32768     8 lo0

fe80::1%lo0        fe80::1%lo0        UHl        0        0 32768     1 lo0

ff01::/16          localhost          UGRS       0        0 32768     8 lo0

ff01::%lo0/32      localhost          Um         0        1 32768     4 lo0

ff02::/16          localhost          UGRS       0        0 32768     8 lo0

ff02::%lo0/32      localhost          Um         0        1 32768     4 lo0


---
regards
Loading...