Benutzer-Werkzeuge

Webseiten-Werkzeuge


raspberry-pi-aufsetzen

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen RevisionVorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
raspberry-pi-aufsetzen [2016/08/20 11:24] bennyraspberry-pi-aufsetzen [2024/06/09 10:29] (aktuell) – Externe Bearbeitung 127.0.0.1
Zeile 206: Zeile 206:
 Optional Optional
 (smcroute) (smcroute)
 +
 +===== IPv6 deaktivieren (wahlweise) =====
 +
 +<code bash>
 +echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6
 +</code>
 +
 +bzw. in der sysctl.conf
 +<code bash>
 +net.ipv6.conf.all.disable_ipv6 = 1
 +</code>
 +
 +===== iptables für NAT zwischen wlan0 und eth0 =====
 +
 +<code bash>
 +sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE  
 +sudo iptables -A FORWARD -i eth0 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT  
 +sudo iptables -A FORWARD -i wlan0 -o eth0 -j ACCEPT  
 +sudo sh -c "iptables-save > /etc/iptables.ipv4.nat"
 +# In /etc/network/interfaces o.ae. irgendwo unten
 +up iptables-restore < /etc/iptables.ipv4.nat  
 +</code>
  
 ===== Multicast am OmniSwitch 6450 (6.7.1.86.R03) + Raspberry Pi ===== ===== Multicast am OmniSwitch 6450 (6.7.1.86.R03) + Raspberry Pi =====
Zeile 344: Zeile 366:
 pi@pi2:~ $ sudo smcroute -j eth0 239.0.10.1 pi@pi2:~ $ sudo smcroute -j eth0 239.0.10.1
 </code> </code>
 +
 +> Startet den Prozess als Daemon (Superuser Rechte sind Muss!)
 +>> sudo smcroute -d
 +> Sendet einen "IGMP-Join" über die angegebene Schnittstelle und registriert dies lokal auch im Kernel
 +>> sudo smcroute -j eth0 239.0.10.1
 +> Sendet einen IGMP-Leave" über die angegebene Schnittstele
 +>> sudo smcroute -l eth0 239.0.10.1 
 +> Beendet den Prozess
 +>> sudo smcroute -k
 +
 +Alternativ kann man das Paket "socat" verwenden (mir gefällt smcroute derzeit besser):
 +> Registriert die Adresse 239.0.10.1 auf der Schnittstelle eth0
 +>> pi@pi2:~ $ socat STDIO UDP4-RECV:1234,ip-add-membership=239.0.10.1:eth0
  
 **Pi2 SSH Session 2** **Pi2 SSH Session 2**
Zeile 491: Zeile 526:
 ---------------+---------------+-----+-----+--------+-------+------+-----+------ ---------------+---------------+-----+-----+--------+-------+------+-----+------
 239.0.10.1      0.0.0.0          1    1/3   exclude  no      7      173        239.0.10.1      0.0.0.0          1    1/3   exclude  no      7      173       
 +
 +-> show ip multicast group
 +
 +Total 1 Groups
 +
 +Group Address   Source Address  VLAN  Port  Mode     Static  Count  Life  RVLAN
 +---------------+---------------+-----+-----+--------+-------+------+-----+------
 +239.0.10.1      0.0.0.0          1    1/3   exclude  no      5      259       
  
 ->  -> 
Zeile 571: Zeile 614:
 </code> </code>
  
 +Nun wurde mir seitens eines geschätzten Business Partners berichtet dass es eine Herausforderung gibt, wenn der Client der den Multicast erhalten soll per "User-Network-Profile" (UNP) angebunden und per non-supplicant Authentifizierung ist. (Dann sollte kein Eintrag in der Ausgabe von "ip multicast group" auftauchen)
  
 +**Authentifizierung auf dem OmniSwitch einrichten**
 +<code>
 +-> aaa radius-server rad01 host 192.168.5.1 key verysecret
 +-> 
 +-> aaa test-radius-server rad01 type authentication user alcatel password alcatel method pap
 +Testing Radius Server <192.168.5.1/rad01>
 +Access-Accept from 192.168.5.1 Port 1812 Time: 2 ms
 +Returned Attributes
 +
 +-> vlan port mobile 1/3
 +-> vlan port 1/3 802.1x enable 
 +-> ! Durch folgendes Kommando halten wir uns nicht mit 802.1x auf sondern machen direkt "non-supplicant"
 +-> 802.1x 1/3 supp-polling retry 0
 +-> 
 +-> 802.1x 1/3 non-supplicant policy authentication pass default-vlan fail block 
 +-> 
 +-> aaa authentication mac rad01
 +->
 +-> ! Der häufigste Fehler ist die folgende Zeile nicht zu haben, also daher los!
 +-> aaa authentication 802.1x rad01
 +->
 +-> ! Gleich mal probieren, Pi2 abgezogen und aufgesteckt ...
 +-> show 802.1x non-supplicant     
 +
 +Slot  MAC               MAC Authent      Classification      Vlan      
 +Port  Address           Status           Policy              Learned   
 +-----+-----------------+----------------+-------------------+--------
 +01/03 b8:27:eb:61:78:ec Authenticated    Basic-Dft VLAN      1 
 +
 +-> ! Aber es ging ja um das UNP, daher ..
 +
 +-> aaa user-network-profile name "mcasttest" vlan 1 
 +
 +-> show 802.1x non-supplicant 
 +
 +Slot  MAC               MAC Authent      Classification      Vlan      
 +Port  Address           Status           Policy              Learned   
 +-----+-----------------+----------------+-------------------+--------
 +01/03 b8:27:eb:61:78:ec Authenticated    Basic-UNP-Auth Svr  1 
 +
 +-> show 802.1x non-supplicant unp 
 +
 +Slot  MAC               Vlan  HIC             Dynamic
 +Port  Address                 Status          UNP
 +-----+-----------------+-----+---------------+-----------------
 +01/03 b8:27:eb:61:78:ec     1 Not Started     mcasttest
 +
 +-> show ip multicast group
 +
 +Total 1 Groups
 +
 +Group Address   Source Address  VLAN  Port  Mode     Static  Count  Life  RVLAN
 +---------------+---------------+-----+-----+--------+-------+------+-----+------
 +239.0.10.1      0.0.0.0          1    1/3   exclude  no      2      155       
 +
 +</code>
 +
 +Der Ping läuft auch wie zuvor. Da scheint der Aufbau beim Partner doch irgendwie anders zu sein. :(
 +
 +**Das sagt der Freeradius (v2)**
 +<code>
 +rad_recv: Access-Request packet from host 192.168.5.104 port 1030, id=4, length=98
 + User-Name = "B827EB6178EC"
 + User-Password = "B827EB6178EC"
 + NAS-IP-Address = 192.168.5.104
 + NAS-Port = 77
 + NAS-Port-Type = Ethernet
 + Calling-Station-Id = "b827eb6178ec"
 + Service-Type = Call-Check
 +# Executing section authorize from file /etc/freeradius/sites-enabled/default
 ++group authorize {
 +++[preprocess] = ok
 +++[chap] = noop
 +++[mschap] = noop
 +++[digest] = noop
 +[suffix] No '@' in User-Name = "B827EB6178EC", looking up realm NULL
 +[suffix] No such realm "NULL"
 +++[suffix] = noop
 +[eap] No EAP-Message, not doing EAP
 +++[eap] = noop
 +[files] users: Matched entry B827EB6178EC at line 98
 +++[files] = ok
 +++[expiration] = noop
 +++[logintime] = noop
 +++[pap] = updated
 ++} # group authorize = updated
 +Found Auth-Type = PAP
 +# Executing group from file /etc/freeradius/sites-enabled/default
 ++group PAP {
 +[pap] login attempt with password "B827EB6178EC"
 +[pap] Using clear text password "B827EB6178EC"
 +[pap] User authenticated successfully
 +++[pap] = ok
 ++} # group PAP = ok
 +# Executing section post-auth from file /etc/freeradius/sites-enabled/default
 ++group post-auth {
 +++[exec] = noop
 ++} # group post-auth = noop
 +Sending Access-Accept of id 4 to 192.168.5.104 port 1030
 + Framed-Filter-Id = "mcasttest"
 +Finished request 0.
 +Going to the next request
 +Waking up in 4.9 seconds.
 +Cleaning up request 0 ID 4 with timestamp +23
 +</code>
raspberry-pi-aufsetzen.1471692243.txt.gz · Zuletzt geändert: 2024/06/09 10:29 (Externe Bearbeitung)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki