Sunday 19 August 2007

Biquad Sector antenna for 2.4 GHz / 802.11b / WiFi / WLAN

Construction

The connector - N-type
N-type socket round "through bulkhead" came from
R.S. number 112-0773. Packaging says Telegartner (Manufacturer presumably) Type N-Einbaubuchse J01021A1084 Tel +49 (0) 7157/125-0 Fax -120

The biquad ("bow-tie" bit)
The "bowtie" section was made from a length of copper at least 400 mm (0.4 metre) long. The wire came from standard twin-and-earth stiff household mains wiring. By holding either end of the wire with a pair of pliers and giving it a sharp tug the wire was straightened. Leaving about 20 mm before starting, the bowtie shape was folded into the wire using the pliers, with the side of each square being 32 mm. The edge of the pliers was useful to obtain right angles. Both ends of the wire end up in the same place once the "bowtie" is formed. These were soldered together and bent 90 degrees out of the plane of the bowtie, ready to be soldered to the casing of the N-type connector. The "bowtie" then had an extending piece of wire soldered to it at the point where there is a 90 degree bend joining the two squares together, ready to be soldered to the centre pin (solder bucket) of the N-type connector.
Soldering
We worked out where the rear disc (groundplane) would sit when the N-type connector was affixed to it, and then both extending wires we cut so as to stand the "bowtie" off the back plate by 18 mm. The centre pin was easy to solder because it has been tinned by the manufacturer. Soldering the other extending wire to the casing was not so easy. It required the surface roughing with sandpaper, and then tinning with a lot of heat until the solder flows. Once the casing and the end of the wire extension was tinned soldering was easy, while the connector body was still hot. At this point the dialectric (the white bit around the centre pin) started to go a bit soft. We were careful not to move the pin, and ensure it was straight before it cooled.


link for completer articel : http://flakey.info/antenna/biquad/

802.11b WLAN Waveguide Antennas

Waveguides? Aren't they a bit complicated?
In a word, Yes! Microwave technology is pretty esoteric, and it used to be reserved for the "spooks" designing electronic warfare systems, radars, and the like.
But microwave equipment has been steadily penetrating into mainstream applications. Microwave ovens (operating at 2.4GHz) have already been with us for several decades. These have been joined by satellite dishes and LNBs operating at 10GHz and more recently, multichannel 2.4GHz cordless phones.
Microwave technology seems complex because we have left the boffins in charge for too long. Microwave text books have been written by academics who revel in every detailed equation. But you don't really need to know about Poynting vectors or Maxwell's
equations to deploy a really effective Wireless LAN. Let me show you how simple it really is...


How I Produced These Designs and Charts
These slotted waveguide designs are the result of lengthy simulation using Zeland Software's Fidelity and IE3D electromagnetic simulators. Fidelity is much better at modelling waveguide structures than my favorite simulator, NEC2, but it is quite an expensive package, with a long learning curve...
Simulation can give you much more information about the performance of a microwave antenna than you get from building it. This is because there are severe limitations in the accuracy of measurements at microwave frequencies. Simulation makes it easier to see subtle interdependencies that would be very difficult to measure. In this case, I used the simulation to tell me how the antennas should behave, and then verified the performance both in my lab and on my antenna 'test range'. The results were surprisingly accurate - and attest to the quality of the Zeland Fidelity software.
How a Waveguide Antenna Works
A waveguide is a very low loss transmission line. It allows us to propagate signals to a number of smaller antennas (slots). The signal is coupled into the waveguide with a simple coaxial probe, and as it travels along the guide it traverses the slots. Each of these slots allows a little of the energy to radiate. The slots are in a linear array pattern, and the total of all the radiated signals adds up to a very significant power gain over a small range of angles close to the horizon. In other words, the waveguide antenna transmits almost all of its energy at the horizon, usually exactly where we want it to go. Its exceptional directivity in the elevation plane gives it quite high power gain. Additionally, unlike vertical colinear antennas, the slotted waveguide transmits its energy using HORIZONTAL polarization, the best type for distance transmission.
At left we can see a graphical representation of the E field intensity shortly after starting excitation of an 8 slot waveguide. The slots are to the left of the image. The coaxial probe is at the lower end of the image, and the field can be seen to be clumped at maxima every half wavelength as they travel up the waveguide. The waveguide airspace takes up the middle 1/2 of the bluespace, the rest is air infront of (to the left) and behind (to the right) the antenna.
If you click here you can bring up a Windows Media Format Movie version. An MPEG-1 version is at this link. You can see the wave travelling up the waveguide from the probe. The intensity of the E field is given by the color. Here we have primarily blue colors, about -40dB on the final (red) intensity which is achieved once the resonance is fully excited. When the signal first gets to the top and starts reflecting back down the air column it is still green, about -30dB from its ultimate intensity. Reflections are also occuring from the plug at the bottom of the airspace, and the sum effect of all these, including continual drive from the coaxial probe, allows the intensity to build up through yellow and red (0db) signal levels. You can see the signal radiating out the slots at the left of the image. The radiation intensity is less at the top than at the bottom in an 8 slot design, it is hard to radiate perfectly with such a limited number of slots.

for complete this articel you can read in http://trevormarshall.com/waveguides.htm

Queue with Masquerading and Internal Web-Proxy

Basic SetupThis page will tak about how to make QUEUE TREE in RouterOS that also running Web-Proxy and Masquerading. Several topics in forum say it's impossible to do.
First, let's set the basic setting first. I'm using a machine with 2 network interface:


[admin@instaler] > in pr
# NAME TYPE RX-RATE TX-RATE MTU
0 R public ether 0 0 1500
1 R lan wlan 0 0 1500

And this is the IP Address for each interface:
[admin@instaler] > ip ad pr

Flags: X - disabled, I - invalid, D - dynamic
# ADDRESS NETWORK BROADCAST INTERFACE
0 192.168.0.217/24 192.168.0.0 192.168.0.255 public
1 172.21.1.1/24 172.21.1.0 172.21.1.255 lan

Don't forget to set the transparant web-proxy
[admin@instaler] > ip web-proxy pr
enabled: yes
src-address: 0.0.0.0
port: 3128
hostname: "proxy"
transparent-proxy: yes
parent-proxy: 0.0.0.0:0
cache-administrator: "webmaster"
max-object-size: 4096KiB
cache-drive: system
max-cache-size: none
max-ram-cache-size: unlimited
status: running
reserved-for-cache: 0KiB
reserved-for-ram-cache: 154624KiB

Firewall NAT
Make 2 NAT rules, 1 for Masquerading, and the other for redirecting transparant proxy.
[admin@instaler] ip firewall nat> pr

Flags: X - disabled, I - invalid, D - dynamic
0 chain=srcnat out-interface=public src-address=172.21.1.0/24 action=masquerade
1 chain=dstnat in-interface=lan src-address=172.21.1.0/24 protocol=tcp dst-port=80 action=redirect to-ports=3128

Mangle Setup
And now is the most important part in this case.
As we will make Queue for uplink and downlink traffic, we need 2 packet-mark. In this example, we use "test-up" for uplink traffic, and "test-down" for downlink traffic.
For uplink traffic, it's quite simple. We need only one rule, using SRC-ADDRESS and IN-INTERFACE parameters, and using PREROUTING chain. Rule number #0.
But for downlink, we have to make sevaral rules. As we use masquerading, we need Connection Mark, named as "test-conn". Rule no #1.
Then we have to make 2 more rules. First rule is for non-HTTP connection / direct connection. We use chain forward, as the data traveling through the router. Rule no #2.
The second rule is for data coming from web-proxy to the client. We use OUTPUT chain, as the data coming from internal process in the router itself. Rule no #3.
For both rules (no #2 and #3) we named it "test-down".
Please be aware, we use passthrough only for connection mark (rule no #1).


[admin@instaler] > ip firewall mangle print
Flags: X - disabled, I - invalid, D - dynamic
0 ;;; UP TRAFFIC
chain=prerouting in-interface=lan src-address=172.21.1.0/24 action=mark-packet new-packet-mark=test-up passthrough=no
1 ;;; CONN-MARK

chain=forward src-address=172.21.1.0/24 action=mark-connection new-connection-mark=test-conn passthrough=yes
2 ;;; DOWN-DIRECT CONNECTION

chain=forward in-interface=public connection-mark=test-conn action=mark-packet new-packet-mark=test-down passthrough=no
3 ;;; DOWN-VIA PROXY

chain=output out-interface=lan dst-address=172.21.1.0/24 action=mark-packet new-packet-mark=test-down passthrough=no

Queue Tree SetupAnd now, the queue tree setting. We need one rule for downlink and one rule for uplink. Be careful when choosing the parent. for downlink traffic, we use parent "lan", the interface name for local network. And for uplink, we are using parent "global-in".
[admin@instaler] > queue tree pr

Flags: X - disabled, I - invalid
0 name="downstream" parent=lan packet-mark=test-down l
limit-at=32000 queue=default priority=8
max-limit=32000 burst-limit=0
burst-threshold=0 burst-time=0s
1 name="upstream" parent=global-in

packet-mark=test-up limit-at=32000
queue=default priority=8
max-limit=32000 burst-limit=0
burst-threshold=0 burst-time=0s

(from http://wiki.mikrotik.com)

Saturday 18 August 2007

TransparentTrafficShaper

Introduction


This example shows how to configure a transparent traffic shaper. The transparent traffic shaper is essentially a bridge that is able to differentiate and prioritize traffic that passes through it.


<----------- Consider the following network layout:



will configure one queue limiting the total throughput to the client and three sub-queues that limit HTTP, P2P and all other traffic separately. HTTP traffic will have priority above all other traffic types.
Quick Start for ImpatientConfiguration snippet from the MikroTik router:



/ interface bridge
add name="bridge1"

/ interface bridge port
add interface=ether2 bridge=bridge1
add interface=ether3 bridge=bridge1

/ ip firewall mangle
add chain=prerouting protocol=tcp dst-port=80 action=mark-connection \
new-connection-mark=http_conn passthrough=yes
add chain=prerouting connection-mark=http_conn action=mark-packet \
new-packet-mark=http passthrough=no
add chain=prerouting p2p=all-p2p action=mark-connection \
new-connection-mark=p2p_conn passthrough=yes
add chain=prerouting connection-mark=p2p_conn action=mark-packet \
new-packet-mark=p2p passthrough=no
add chain=prerouting action=mark-connection new-connection-mark=other_conn \
passthrough=yes
add chain=prerouting connection-mark=other_conn action=mark-packet \
new-packet-mark=other passthrough=no

/ queue simple
add name="main" target-addresses=10.0.0.12/32 max-limit=256000/512000
add name="http" parent=main packet-marks=http max-limit=240000/500000add name="p2p" parent=main packet-marks=p2p max-limit=64000/64000
add name="other" parent=main packet-marks=other max-limit=128000/128000

Explanation
Each piece of code is followed by the explanation of what it actually does.

ExplanationEach piece of code is followed by the explanation of what it actually does.

Bridge
/ interface bridge
add name="bridge1"

/ interface bridge port
add interface=ether2 bridge=bridge1
add interface=ether3 bridge=bridge1

We create a new bridge interface and assign two ethernet interfaces to it. Thus the prospective traffic shaper will be completely transparent to the client.

Mangle
/ ip firewall mangle
add chain=prerouting protocol=tcp dst-port=80 action=mark-connection \
new-connection-mark=http_conn passthrough=yes
add chain=prerouting connection-mark=http_conn action=mark-packet \
new-packet-mark=http passthrough=no

All traffic destined to TCP port 80 is likely to be HTTP traffic and therefore is being marked with the packet mark http. Note, that the first rule has passthrough=yes while the second one has passthrough=no. (You can obtain additional information about mangle at http://www.mikrotik.com/docs/ros/2.9/ip/mangle)

/ ip firewall mangle
add chain=prerouting p2p=all-p2p action=mark-connection \
new-connection-mark=p2p_conn passthrough=yes
add chain=prerouting connection-mark=p2p_conn action=mark-packet \
new-packet-mark=p2p passthrough=no
add chain=prerouting action=mark-connection new-connection-mark=other_conn \
passthrough=yes
add chain=prerouting connection-mark=other_conn action=mark-packet \
new-packet-mark=other passthrough=no

Same as above, P2P traffic is marked with the packet mark p2p and all other traffic is marked with the packet mark other.

Queues

/ queue simple
add name="main" target-addresses=10.0.0.12/32 max-limit=256000/512000
We create a queue that limits all the traffic going to/from the client (specified by the target-address) to 256k/512k.
/ queue simple add name="http" parent=main packet-marks=http max-limit=240000/500000add name="p2p" parent=main packet-marks=p2p max-limit=64000/64000

add name="other" parent=main packet-marks=other max-limit=128000/128000

All sub-queues have the main queue as the parent, thus the aggregate data rate could not exceed limits specified in the main queue. Note, that http queue has higher priority than other queues, meaning that HTTP downloads are prioritized.

(This articel from : http://wiki.mikrotik.com/)