Community discussions

MikroTik App
 
macbook168
just joined
Topic Author
Posts: 3
Joined: Thu Nov 27, 2008 12:28 pm

shape only internet connection @ bridge mode

Wed Dec 08, 2010 6:30 am

hi , can some one @ mikrotik forum help me.
i'm running mikrotik for qos @ bridge mode.

here is my topology & mikrotik config

WAN---- eth1#Router linux#eth 0------ mikotik ----switch---- user network 1 ( 192.168.1.0/24 )
...................................|
...................................|
..................user network 2 ( 192.168.2.0/24 )

# linux config ----------------------------------------------------------------------------------------

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 100
link/ether 00:e0:81:4c:59:16 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.1/24 brd 192.168.25.255 scope global eth0
inet 192.168.2.1/24 brd 192.168.1.255 scope global eth0:1
inet6 fe80::2e0:81ff:fe4c:5916/64 scope link
valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 10
link/ether 00:e0:81:4c:59:17 brd ff:ff:ff:ff:ff:ff
inet6 fe80::2e0:81ff:fe4c:5917/64 scope link
valid_lft forever preferred_lft forever
10: ppp0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1492 qdisc pfifo_fast state UNKNOWN qlen 3
link/ppp


here is my mirotik config..
#-------------------------------------------------------------------------------------------------------------------
/ interface bridge
add name="bridge1"
/ interface bridge port
add interface=ether2 bridge=bridge1
add interface=ether3 bridge=bridge1
/ interface bridge settings
set use-ip-firewall=yes

/ 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=192.168.1.0/24 max-limit=768000/2048000
add name="http" parent=main packet-marks=http max-limit=512000/1024000 priority=1
add name="p2p" parent=main packet-marks=p2p max-limit=128000/128000 priority=8
add name="other" parent=main packet-marks=other max-limit=128000/128000 priority=4


all shape are running well , but when my user from network 192.168.1.0/24 upload/download file to network 192.168.2.0/24 the connection get shape also. my question is simple , how to exclude all connection from being shape from network 1 to network 2 , or network 2 to network 1.

sorry for my beginner question.
 
Feklar
Forum Guru
Forum Guru
Posts: 1726
Joined: Tue Dec 01, 2009 11:46 pm

Re: shape only internet connection @ bridge mode

Wed Dec 08, 2010 6:44 am

There are two basic things that are going on here.

1.) Your mangle rules are also marking connections going to the other subnet because you don't specify for them not to, hence the packets get marked and processed through your queues.
2.) You are probably going to want to move from simple queues to queue trees. Simple queues are very simple like their name says. Once a rule fits they fire, with a queue tree you get much better control over what you want to queue and how to divide up the available bandwidth. It just takes more work to set up and understand what is going on, but the end result is a system that works better and uses less CPU.

Who is online

Users browsing this forum: AndyBern, Bing [Bot], gary115, Google [Bot] and 169 guests