Re: [LARTC] priorizing vlans in a bridge
Mensaje citado por Andy Furniss <[EMAIL PROTECTED]>: > [EMAIL PROTECTED] wrote: > > Hi, this is my Linux Box > > > > > >LAN 1 -|--eth1 <---br1--->eth0.1 | > > | \| > > |eth0--|- 802.1q tagged 1 Mbps link > > | /| > >LAN 2 -|--eth2 <---br2--->eth0.2 | > > > > > > I have to bridge the 2 lans in the left side of the diagram with my linux > box > > running as a bridge. I have to tag the traffic of each lan so I created the > 2 > > vlans interfaces on eth0 (tag 1 and tag 2). > > All works fine. But now I have to priorize LAN1 traffic so it leaves the > bridge > > before LAN2. Also I need to shape the traffic to the 1 Mbps link. > > > > I read about the "prio" qdisc but it honours the TOS field of the IP > packets, > > and I don't want to unless it was really necessary. > > I read about the "prio" option of the htb qdisc and made some scripts, but > they > > don't work as I expected. > > Prio in htb setup like this only really affects the borrowing of excess > - rate is guaranteed. Also you need to back off a bit from your link > speed to allow for overheads. > Ok, with htb the priority is for borrowing of the free bandwidth. So what Qdisc could help me to make a customized priority qdisc ?, so I could define for example 4 or 8 bands not based on the TOS field like the prio qdisc. Thanks for your answers > > > > HTB script: > > > > tc qdisc add dev eth0 root handle 1: htb > > tc class add dev eth0 parent 1: classid 1:1 htb rate 1000kbit > > > > tc class add dev eth0 parent 1:1 classid 1:11 htb rate 500kbit ceil > 1000kbit prio 1 > > I would use something like rate 850kbit ceil 900kbit here > > > tc filter add dev eth0 parent 1: prio 1 protocol ip handle 1 fw classid > 1:11 > > iptables -t mangle -A PREROUTING -i eth1 -j MARK --set-mark 1 > > > > tc class add dev eth0 parent 1:1 classid 1:12 htb rate 500kbit ceil 800kbit > prio 2 > > and rate 50kbit ceil 900kbit here. > > Andy. > > > tc filter add dev eth0 parent 1: prio 1 protocol ip handle 2 fw classid > 1:12 > > iptables -t mangle -A PREROUTING -i eth2 -j MARK --set-mark 2 > > > > What do you suggest me? > > Thanks in advance. > > ___ > > LARTC mailing list / LARTC@mailman.ds9a.nl > > http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/ > > > > > ___ > LARTC mailing list / LARTC@mailman.ds9a.nl > http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/ > ___ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] priorizing vlans in a bridge
If I use the vlans interfaces eth0.1 and eth0.2 in the tc statements, I would have two independent root qdiscs on each interface, and this won´t let me prioritize LAN1 over LAN2. That's why I set this up all on eth0, which is the interface that sees all the entire traffic. Any other idea? Thanks for your answers Mensaje citado por "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>: > > Hi, > > You should use eth0.1 and eth0.2 in your tc statements ... > > ciao > > charles > > > On Thu, 2005-02-10 at 23:05, [EMAIL PROTECTED] wrote: > > Hi, this is my Linux Box > > > > > >LAN 1 -|--eth1 <---br1--->eth0.1 | > > | \| > > |eth0--|- 802.1q tagged 1 Mbps link > > | /| > >LAN 2 -|--eth2 <---br2--->eth0.2 | > > > > > > I have to bridge the 2 lans in the left side of the diagram with my linux > box > > running as a bridge. I have to tag the traffic of each lan so I created the > 2 > > vlans interfaces on eth0 (tag 1 and tag 2). > > All works fine. But now I have to priorize LAN1 traffic so it leaves the > bridge > > before LAN2. Also I need to shape the traffic to the 1 Mbps link. > > > > I read about the "prio" qdisc but it honours the TOS field of the IP > packets, > > and I don't want to unless it was really necessary. > > I read about the "prio" option of the htb qdisc and made some scripts, but > they > > don't work as I expected. > > > > HTB script: > > > > tc qdisc add dev eth0 root handle 1: htb > > tc class add dev eth0 parent 1: classid 1:1 htb rate 1000kbit > > > > tc class add dev eth0 parent 1:1 classid 1:11 htb rate 500kbit ceil > 1000kbit prio 1 > > tc filter add dev eth0 parent 1: prio 1 protocol ip handle 1 fw classid > 1:11 > > iptables -t mangle -A PREROUTING -i eth1 -j MARK --set-mark 1 > > > > tc class add dev eth0 parent 1:1 classid 1:12 htb rate 500kbit ceil 800kbit > prio 2 > > tc filter add dev eth0 parent 1: prio 1 protocol ip handle 2 fw classid > 1:12 > > iptables -t mangle -A PREROUTING -i eth2 -j MARK --set-mark 2 > > > > What do you suggest me? > > Thanks in advance. > > ___ > > LARTC mailing list / LARTC@mailman.ds9a.nl > > http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/ > > ___ > LARTC mailing list / LARTC@mailman.ds9a.nl > http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/ > ___ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
[LARTC] priorizing vlans in a bridge
Hi, this is my Linux Box LAN 1 -|--eth1 <---br1--->eth0.1 | | \| |eth0--|- 802.1q tagged 1 Mbps link | /| LAN 2 -|--eth2 <---br2--->eth0.2 | I have to bridge the 2 lans in the left side of the diagram with my linux box running as a bridge. I have to tag the traffic of each lan so I created the 2 vlans interfaces on eth0 (tag 1 and tag 2). All works fine. But now I have to priorize LAN1 traffic so it leaves the bridge before LAN2. Also I need to shape the traffic to the 1 Mbps link. I read about the "prio" qdisc but it honours the TOS field of the IP packets, and I don't want to unless it was really necessary. I read about the "prio" option of the htb qdisc and made some scripts, but they don't work as I expected. HTB script: tc qdisc add dev eth0 root handle 1: htb tc class add dev eth0 parent 1: classid 1:1 htb rate 1000kbit tc class add dev eth0 parent 1:1 classid 1:11 htb rate 500kbit ceil 1000kbit prio 1 tc filter add dev eth0 parent 1: prio 1 protocol ip handle 1 fw classid 1:11 iptables -t mangle -A PREROUTING -i eth1 -j MARK --set-mark 1 tc class add dev eth0 parent 1:1 classid 1:12 htb rate 500kbit ceil 800kbit prio 2 tc filter add dev eth0 parent 1: prio 1 protocol ip handle 2 fw classid 1:12 iptables -t mangle -A PREROUTING -i eth2 -j MARK --set-mark 2 What do you suggest me? Thanks in advance. ___ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
[LARTC] iproute2 in a MIPS processor
Hi, i'm trying to do loadbalancing with a linux embedded with a MIPS procesor, but I'm in trouble. I have the kernel 2.4.20, and iproute2 ss010824. I compiled without errors, but when I executed the ip comand to install de mutipath default route I get the following error (all the previous commands have been executed according to the LARTC-HOWTO in section 4.2): linux# ip route add default scope global \ nexthop via 200.200.200.1 dev eth1 weight 1 \ nexthop via 100.100.100.1 dev eth2 weight 1 RTNETLINK answers: Invalid argument I don't understand the reason for this error. I've compiled the kernel with all the Advanced Router stuff. I have the uclibc library 0.9.19 instead of glibc to reduce the size of binaries, Could this be the reason? Anybody has port the advanced router stuff and iproute2 to a mips hardware? I will apreciate all your comments. Marcos ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
[LARTC] trouble with nexthop when I try to load balance
I have two internet lines and I want to do equal cost loadbalancing on the two uplinks to the internet. This is what I do: ip route add 200.200.200.0/24 dev eth2 table 200 ip route add default via 200.200.200.254 dev eth2 table 200 ip route add 100.100.100.0/24 dev eth1 table 100 ip route add default via 100.100.100.254 dev eth1 table 100 ip route add 200.200.200.0/24 src 200.200.200.1 dev eth2 ip route add 100.100.100.0/24 src 100.100.100.1 dev eth1 ip route add default scope global nexthop via 100.100.100.254 \ nexthop via 200.200.200.254 The last command fails with the message:"RTNETLINK answers: Invalid argument". I found a posts that says to fix the iproute2/ip/iproute.c:parse_nexthops() with change like this: rtnh->rtnh_ifindex = 0; + rtnh->rtnh_flags = 0; + rtnh->rtnh_hops = 0; rta->rta_len += rtnh->rtnh_len; I fixed the file, but get the same error "Invalid argument". I don't know why it fails. I have a 2.4.20 kernel with Julian Anastasov's patches. iproute2 version ss010824. I really need the solution to this issue. Please help me :( Thanks in advance ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] Two Adsl connections following lartc.rpdb.multiple-links.html instructions....
I think you don't have to add the default route via 200.138.255.254, that's why all the packets go out via ppp0. The rest of the configuration it's fine, - I have two adsl lines on my linux firewall box and i want to do some = load balance between them...i tried a lot of different things, but it = isn=B4t working...Following the instructions of = http://lartc.org/howto/lartc.rpdb.multiple-links.html i used the = configuration above. using "iptraf" I can see some few packets using the = ppp1 connection, but almost all the packets use ppp0 connection. I=B4m = doing something wrong? I=B4m forgetting something? Maybe my kernel = doesn=B4t support multipath? how can i check it? I use Mandrake 10 (kernel 2.6) 2 adsl connections with 600 KB down and 300 KB up (ppp0 and ppp1)=20 Tks in advance! ip route add 200.138.225.0/24 dev ppp0 src 200.215.125.195 table 10 ip route add default via 200.138.225.254 table 10 ip route add 201.3.196.0/24 dev ppp1 src 201.3.232.205 table 11 ip route add default via 201.3.196.254 table 11 ip route add 200.138.225.0/24 dev ppp0 src 200.215.125.195 ip route add 201.3.196.0/24 dev ppp1 src 201.3.219.25 =20 ip route add default via 200.138.225.254 ip rule add from 200.215.125.195 table 10 ip rule add from 201.3.232.205 table 11 ip route add default scope global nexthop via 200.138.225.254 dev ppp0 = weight 1 nexthop via 201.3.196.254 dev ppp1 weight 1 ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
[LARTC] "RTNETLINK answers: Invalid argument" when adding default multipath route
Hi everybody, I'm not so glad because of the error I describe in the subject. I have two internet lines and I want to do equal cost loadbalancing on the two uplinks to the internet. This is what I do: ip route add 200.200.200.0/24 dev eth2 table 200 ip route add default via 200.200.200.254 dev eth2 table 200 ip route add 100.100.100.0/24 dev eth1 table 100 ip route add default via 100.100.100.254 dev eth1 table 100 ip route add 200.200.200.0/24 src 200.200.200.1 dev eth2 ip route add 100.100.100.0/24 src 100.100.100.1 dev eth1 ip route add default scope global nexthop via 100.100.100.254 \ nexthop via 200.200.200.254 The last command fails with the message:"RTNETLINK answers: Invalid argument". I don't know why it fails. I have a 2.4.20 kernel with Julian Anastasov's patches. iproute2 version ss010824. Please, help me in this issue. What is exactly what i have to do? Marcos ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/