Archive

Archive for the ‘Information Technology’ Category

WiFi SSIDs on different VLANs

January 27th, 2019 No comments

It’s been 10 years or so since I’ve posted anything meaningful to the si-ka.net network so I decided to it might be nice to start cross posting some of my technical or interesting topics from my personal blog here. Original.


I thought I’d do a quick write-up covering WiFi SSIDs on multiple VLANs, something that might be useful in a home setup, separating SSIDs better from one another. While I usually prefer the CLI, a lot of the devices mentioned here only (or mainly) use a web GUI for configuration management, so this posting will include a lot more screenshots than my usual postings. This posting won’t contain anything exciting for people who run and support networks professionally (mostly just a “so what options are available on SOHO hardware?”), and may even be overly simple and assume settings you wouldn’t do in a professional setup. But it is useful for homelab enthusiasts looking to build a more complex setup than “everything on the same VLAN/network” or trying to figure out “how do I use VLANs, give me an example”.

Ubiquiti and Netgear have some reasonable priced network gear that I’ve written about in the past that behave decent in home networks. For out little setup today we will have a WiFi access point with multiple SSIDs, two switches, and a firewall/router. We will be focusing on the configuration of the WiFi Access Point (UniFi AP) , the two Netgear switches (GS105Ev2 / GS108Ev3) and the Ubiquiti Router (Edgerouter X).

Our goal is to have two SSIDs on the access point, one for the “normal” devices (VLAN 1), and one for separate devices (VLAN 178). Since the router to VLAN 178 is on a different switch than the access point we also need to trunk both VLANs across the network. Another way of looking at it, is that we are expanding Subnet/VLAN 178 into our network (but limiting it to the WiFi Access points). 178 doesn’t hold any special meaning, you can use any VLAN number you want, just chose 178 because the subnet in this test setup was 10.0.178.0/24.

Here is a diagram of our test setup:

VLAN 1: The management and main client VLAN
VLAN 178: Subnet 178, 2nd WiFi network

Netgear 1

Port 1: Connection to Netgear 2
Port 5: Access Point

Netgear 2

Port 1: Connection to Netgear 1
Port 8: Edgerouter

Edgerouter

eth0: Connection to Subnet 178
eth1: Connection to Netgear 2

 

Wireless Configuration

In the UniFi controller go to Settings->Wireless Networks either create a new network or edit an existing one. If you go into the advanced options area, you will find the VLAN setting for that SSID. Activating the option and setting a value means the access point will tag all packets from that SSID to the specified VLAN number.

In the network overview below we see that packets from one network are tagged with VLAN 178, and packets from the other network are untagged (the switch configuration will take care of deciding which VLAN untagged packets are part of).

Netgear Configuration

The Netgear devices only have a VLAN 1 defined by default, so the first step will be to add VLAN 178 to both of them. Enable Advanced 802.1q (VLAN->802.1Q->Advanced->VLAN Configuration), enter the VLAN ID 178 in the box and click on “Add” at the top.

Now let’s move on to the VLAN Membership configuration. To switch settings, just click on the port and it will switch from tagged->untagged->none.

Netgear 1 device

For VLAN 1 we want port 1 to be (T)agged since it is the trunk to the next switch, and all other ports (U)ntagged since they will be dealing with untagged VLAN 1 traffic. The PVID will also be set to 1 for all ports.

For VLAN 178 we want port 1 to be (T)agged since it is the trunk to the next switch, port 5 (T)agged since it is the connection to the access point, and all other ports “none” since none of those ports are part of VLAN 178.

 

 

VLAN overview after changing all the settings:

 

For this scenario it is sane to leave the Port PVID configuration to PVID 1 on all ports. You could change a port to 178 if you are expecting untagged traffic on that port that needs to be in VLAN 178.

Netgear 2 device

Similar configuration as the first switch so I’ll skip the screenshots. Port 1 is the connection to the Netgear 1 device, port 8 is connected to the Edgerouter.

    • all ports PVID 1
    • VLAN 1 Tagged port 1 and 8, all other ports untagged
    • VLAN 178 Tagged port 1 and 8, all other ports none

Edgerouter Configuration:

Make sure the interface switch0 spans all ports you want to use VLANs on. Add the two VLANs 1 and 178. They should show up in the list as switch0.1 and switch0.178, and you can apply firewall rules to these interfaces to restrict traffic if you are doing any routing between the two networks.
We will want to tag everything from Subnet 178 as VLAN 178 on the interface connected to that network (eth0 in our setup), and allow VLAN 178 on the outgoing interface (eth1 in our setup). The Edgerouter doesn’t need us to specifically allow VLANs already set by the PVID, only additional VLANs need to be specified in the vid field.

Where to go from here?

You could put servers or virtual machines in their own subnet/VLAN and then use a firewall to restrict access between the different networks.

Adding more Access Points is straightforward, UniFi automatically applies the wireless configuration to all Access Points it manages, so all you need to do is take care of the switch port configuration.

Cisco 4410N: strange solution for ‘Found beacon stuck’ or ‘stuck beacon; resetting’

April 10th, 2014 No comments

We have three Cisco 4410n (WAP4410N-E V02 to be precise) access points delivering wireless lan in our offices. All of them serve the same SSID on different channels. This way we don’t need a roaming controller and have a cheap, simple setup. This worked quite well in the past months. But now and then two of the three boxes stop working for no apparent reason. They can’t be reached over the wired interface and they don’t accept any clients (though connected clients still seem to work).
Using a syslog daemon I found many many of the following two lines:
User.Info host3 Apr 10 17:28:25 host3 syslog: Found beacon stuck, down and up the VAP interface.
Local0.Info host3 Apr 10 17:28:22 host3 kernel: ath_bstuck_tasklet: stuck beacon; resetting (bmiss count 36)
According to sources on the internet these messages are related to the problem.

All access points are alreay up-to-date regarding the firmware release (2.0.6.1). Obviously Cisco doesn’t put any more efforts into a new firmware for this product.

I started experimenting with different settings. Some sources suggest increasing the beacon interval time. But this didn’t change anything. Then I compared the settings between the three boxes: all settings are the same besides the wifi channel. So I changed the channels and suddenly the error messages on the syslogd disappeared. As it turned out the errors start as soon as I configure an ap for wifi channel 9 or higher. I don’t understand how a different frequency makes a difference on things like dma and interrupts. So, lets see how things turn out in the next few days.

Categories: Information Technology Tags:

Windows Server 2003 – NTFS Vererbungen reparieren mittels ICACLS.exe

October 6th, 2011 No comments

Zugegeben: das Thema Rechte-Vererbungen unter NTFS ist nicht gerade prickelnd, aber trotzdem ist dies kein Grund es nicht korrekt einzusetzen. Leider bringen manche selbsterkorenen IT-Pro’s recht wenig Wissen in diesem (eigentlich recht wichtigem) Thema mit.

Bei meinem derzeitigen Arbeitgeber hatte ich das Problem das in praktisch der gesamten Dateiablage (aka Fileserver) die Vererbung unterbrochen wurde. Das entsteht entweder beim Verschieben von Daten (im Gegensatz zum Kopieren) oder aber beim Einrichten von NTFS Rechten wo entsprechende Rückfrage pauschal mit “Ja” beantwortet wird (Abbildung rechts).

Falls dieser Dialog mit “Kopieren” beantwortet wird, ist für diese Ebene (sprich Ordner) die NTFS Vererbung dauerhaft unterbrochen. Egal was weiter höher im Dateisystem als Vererbung eingerichtet wird, es endet hier. Darüber hinaus wurden die bisher vererbten Rechte nun als “lokale” Recht eingetragen. Wenn die “Administratoren”-Gruppe vorher per Vererbung berechtigt war (und auch nur beim Ursprung der Vererbung entfernt werden konnte), ist sie nun quasi “lokal” auf dem Ordner/Datei in der ACL eingetragen.

Das Ergebnis ist in der Produktion eher kontra-produktiv. Im nachhinein “mal eben” Rechte bequem von “oben runter” durchreichen funktioniert nicht mehr. In so einer Hierarchie muss jeder Ordner für sich mit Rechten versehen werden. Kurzum : bei großem Umfang ist das kaum noch zu stemmen

Die Korrektur gestaltet sich mittels der GUI relativ einfach : den Haken setzen und schon ist die Vererbung für diesen Ordner wieder aktiv. Problem : nun hat man u.U. manche Gruppen doppelt. Die oben schon besagte “Administratoren”-Gruppe ist nun zweimal berechtigt. Einmal durch die Vererbung und einmal durch die “lokalen” Rechte. Also muss die lokale Berechtigung entfernt werden. An dieser Stelle (aber nicht nur) kommt bei mir ICACLS.exe ins Spiel. Mittels ICACLS.exe können unter Windows XP/Windows Server 2003 (ab SP2) aber auch Windows 7 oder Windows Server 2008 NTFS Rechte auf der Konsole bearbeitet werden. Darüber hinaus finde ich die Darstellung von Rechten auf der Konsole für solche Aufgaben weitaus effektiver als das herum-geklicke in der GUI. Hier ein Beispiel :

NTFS_TEST
VORDEFINIERT\Administratoren:(OI)(CI)(F)
VORDEFINIERT\Benutzer:(CI)(S,WD,AD)
VORDEFINIERT\Benutzer:(OI)(CI)(RX)
ERSTELLER-BESITZER:(OI)(CI)(IO)(F)
NT-AUTORITÄT\SYSTEM:(OI)(CI)(F)
VORDEFINIERT\Administratoren:(I)(OI)(CI)(F)
NT-AUTORITÄT\SYSTEM:(I)(OI)(CI)(F)
ERSTELLER-BESITZER:(I)(OI)(CI)(IO)(F)
VORDEFINIERT\Benutzer:(I)(OI)(CI)(RX)
VORDEFINIERT\Benutzer:(I)(CI)(AD)
VORDEFINIERT\Benutzer:(I)(CI)(WD)

In der ersten Zeile wird der Name des Ordners oder der Datei angezeigt. Darunter stehen zeilenweise die einzelnen Berechtigungen. Zu Beginn jeweils die Gruppe oder der Benutzer und dahinter (nach dem Doppelpunkt) die exakte Berechtigung. In Klammer jeweils die Eigenschaften dieser Berechtigung. (OI) bedeutet diese Berechtigung wir auf alle Dateien unterhalb dieses Ordners vererbt (Object Inheritance). (CI) steht hierbei für die Vererbung auf Unterordner (Container-Inheritance). Am Ende der Zeile steht die Berechtigung an sich. Zum Beispiel (F) für “Full control” oder “M” für “Modify” (Ändern-Recht). Spannend ist hierbei das (I) hinter der Gruppe : diese Berechtigung steht für ein vererbtes Recht (inherited). So ist in unserem Beispiel deutlich zu sehen das die Berechtigungen doppelt vorhanden sind. Einmal lokal und einmal durch die Vererbung aus einem übergeordnetem Ordner.

Mittels ICACLS lassen sich nun recht einfach die Berechtigungen entfernen mit

ICACLS.exe <Ordner/Datei> /remove <Gruppe/Benutzer>

oder um bei unserem Beispiel zu bleiben :

ICACLS.exe NTFS_TEST /remove VORDEFINIERT\Administratoren

Da vererbte Rechte nur am Ursprung entfernt werden können wird somit automatisch die “lokale” Berechtigung entfernt. Das Ergebnis danach (Darstellung mit “ICACLS.exe NTFS_TEST”)

NTFS_TEST
VORDEFINIERT\Benutzer:(CI)(S,WD,AD)
VORDEFINIERT\Benutzer:(OI)(CI)(RX)
ERSTELLER-BESITZER:(OI)(CI)(IO)(F)
NT-AUTORITÄT\SYSTEM:(OI)(CI)(F)
VORDEFINIERT\Administratoren:(I)(OI)(CI)(F)
NT-AUTORITÄT\SYSTEM:(I)(OI)(CI)(F)
ERSTELLER-BESITZER:(I)(OI)(CI)(IO)(F)
VORDEFINIERT\Benutzer:(I)(OI)(CI)(RX)
VORDEFINIERT\Benutzer:(I)(CI)(AD)
VORDEFINIERT\Benutzer:(I)(CI)(WD)

Zu guter letzt (und der eigentliche Grund für dieses Posting). Mit der ICACLS.exe von Windows Server 2003 (SP2) lässt sich die Vererbung leider nicht aktivieren. Die Version von Server 2008 unterstützt den Parameter “/inheritance:[e|d]”. Zum existiert eine aktuellere Version auch für Win2K3. Das ist ein Request-Hotfix und ist hier zu finden.

 

Categories: Information Technology Tags:

SQL “simulate” a DELETE statement

February 24th, 2011 No comments

Needed to simulate some DELETE’s on one of our production databases. After thinking about backup/restore and such time consuming things I found this :

CREATE TEMPORARY TABLE test_tbl SELECT * FROM table_to_test;

This table stays until you drop it or close your mysql-admin session.

Great….

Categories: Information Technology Tags: ,

UTF-8 Hölle

September 30th, 2010 No comments

Dachte eigentlich das es bei unserem firmeninternen CMS keine Probleme mit der UTF-8 Kodierung gäbe. Die DB spricht UTF-8, die Seiten werden in UTF-8 editiert, der ContentType ist korrekt etc.
Aus irgendwelchen Gründen interpretierte ausgerechnet der IE8 bestimmte statische HTML Seiten nicht in UTF-8 sondern in 8859-1 (obwohl der ContentType im HTML Kopf korrekt angegeben war). Der kleine aber feine Unterschied ist das der Webserver (hier Apache2) bereits beim Transport den korrekten ContentType angibt (kann man einfach testen mit wget -S URL). Abhilfe brachte dann die folgende Zeile in der VirtualHost Definition von Apache2.

AddDefaultCharset utf-8

Categories: Information Technology Tags:

htop für CentOS 5

February 28th, 2010 No comments

Mannomann, htop ist nicht im Standard-Repository von CentOS 5. Dieses zusätzliche RPM-Repo stellt dies (und zudem auch einige andere aktuellere RPMs bereit).

http://dag.wieers.com/rpm/

Categories: Information Technology Tags:

Vista/Win7 : cmd im Administrator Kontext starten

January 25th, 2010 1 comment

Netter Shortcut um unter Windows Vista und Windows 7 ein Programm im Admin-Kontext zustarten:

Im Startmenü in der Zeile wo man nach einem Programm suchen kann “cmd” eingeben und mit STRG+SHIFT+Enter starten. Das funktioniert natürlich auch mit anderen Befehlen wie z.B. der Management Console (“mmc”).

Categories: Information Technology Tags:

Druckprobleme (Dokument bleibt im Spooler “hängen”) mit Windows 7

December 12th, 2009 No comments

Bei meiner Windows 7 Installation konnte ich nach einer Weile nicht mehr auf meinen Netzwerkdrucker drucken. Die Dokumente blieben im Spooler liegen bis nach ein paar Minuten Windows meldete das der Drucker “nicht online” sei. Da ich bei meinem Netzwerkdrucker problemlos von diesem Rechner aus auf die Weboberfläche des Druckers (Canon 5050n) zugreifen konnte war wohl das offensichtlich nicht das Problem. Wenn man die Windows-Firewall deaktivert klappt der Druck auf Anhieb.

Was genau das Problem ist, ist mir nicht ganz klar. Scheinbar wird der Inbound-Traffic des Druckers von der Windows Firewall geblockt. Das Problem ist also nicht das Windows den Drucker erreicht sondern das die Antworten nicht mehr ankommen. Eine Lösung für mich war für die IP des Druckers eine Inbound-Regel zu definieren.

Die Schritte im einzelnen (von Windows 7 Home Edition deutsch ausgehend, angemeldet als Benutzer welcher nicht in der Admin-Gruppe ist) :

1. Windows-Menü -> “Systemsteuerung
2. “System und Sicherheit” anklicken
3. “Windows-Firewall” anklicken
4. links “Erweiterte Einstellungen” anklicken, nun muß man sich als Admin-Anmelden
5. “Eingehende Regeln” anklicken
6. rechte Maustaste auf “eingehende Regeln” -> “Neue Regel …” anklicken
7. “Benutzerdefiniert” anwählen und “Weiter” klicken
8. “Weiter” klicken
9. “Weiter” klicken
10. unter “Für welche Remote IP-Adressen gilt diese Regel” die IP-Adresse des Druckers hinzufügen und “Weiter” anklicken
11. “Weiter” klicken
12. “Weiter” klicken
13. ein Name für diese Regel eingeben und mit “Fertig stellen” abschließen

Sicher, man könnte die Regel noch eingrenzen (z.B. bei den Prokollen) also ist das nicht der Weisheit letzter Schluss. Die Abkürzung über das MMC-Plugin “wf.msc” greift hier leider nicht, da ein normaler Benutzer keinen Zugriff auf die FW-Regeln hat.
Letztlich druckt mein Drucker wieder und ich kann die Firewall aktiviert lassen.

Categories: -si.ka-, Information Technology Tags:

neuer Root-Server

July 4th, 2009 1 comment

War ja schon überfällig und nun endlich soweit : ich habe mir einen neuen Root-Server bestellt und werde den alten bei IPX-Server kündigen. Ich war mit IPX immer zufrieden, aber wenn ich nun auf aktuellere Hardware wechseln will (mein alter ist noch eine Celeron Maschine) müsste ich bald das doppelte zahlen wie bisher, selbst wenn ich nur minimalst-Austattung nehmen würde. Mein Anruf bei IPX mit dem dezenten Hinweis das ich doch langjähriger Kunde wäre wurde freundlich aber bestimmt abgebügelt.

So bin ich nun bei 1und1 und hoffe das das Peering für meine Zwecke ausreicht. Meine Hardware ist im Vergleich zu der alten geradezu traumhaft : Athlon 64 X2, 1 GB RAM, 160 GB HDD (RAID 1).

Seit Donnerstag läuft nun auch endlich VMware Server 2.0 auf der Kiste (dieser Link hat mir dabei sehr geholfen). Nun beginnt der Spaß mit der Migration der alten Daten aber erst…..

Categories: Information Technology Tags:

english transmogrified …

February 13th, 2009 No comments

Durch meinen Job muss ich öfters mal am Tag die Knowledgebase (Supportdatenbank) von Microsoft nach bestimmten Themen durchforsten. Eigentlich eine Supersache aber was hat Microsoft sich eigentlich bei der automatischen Übersetzung der englischen Artikel ins Deutsche gedacht ?
Nicht nur das die Artikel sehr oft an der Übersetzung leiden (und von daher unbrauchbar sind) teilweise kommen dann auch so witzige Sachen bei raus :

“Neue Lösung für Probleme mit Kerb-Eros-Authentifizierung, wenn Benutzer wie viele Gruppen angehören”

Hurra!

http://support.microsoft.com/kb/327825/de

Categories: Information Technology Tags: