Re: [LARTC] multipath device round robin not working?

2007-01-14 Thread Alex Samad
On Sat, Jan 13, 2007 at 12:54:24PM +0100, [EMAIL PROTECTED] wrote:
 Hi,
 
 I have a linux server running kernel 2.6.19 that is connected with 2 
 seperate 100Mbit links to the same isp:
 
 
 +---+
  +---+  | I |
 +---+
  |   |  | S |
 |   |
  |eth0 --+--+ P |
 |   |
  |   |  | S |
 |   |
  | linux 2.6.19  |  | W ||  ISP 
 GATEWAY  |
  |   |  | I |
 |   |
  |eth1 --+--+ T |
 |   |
  |   |  | C |
 |   |
  +---+  | H |
 +---+
 +---+
 
 Both links have their own ip but have the same gateway. The problem is I 
 can't seem to get egress traffic load balanced over the 2 nics.
 
 IP config after boot (dhcp from isp)
 ip a:
 
 1: lo: LOOPBACK,UP,1 mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
 
 2: eth0: BROADCAST,MULTICAST,NOTRAILERS,UP,1 mtu 1500 qdisc 
 pfifo_fast qlen 1000
link/ether 00:00:00:00:00:0f brd ff:ff:ff:ff:ff:ff
inet 10.0.0.110/24 brd 10.0.0.255 scope global eth0
 
 3: eth1: BROADCAST,MULTICAST,NOTRAILERS,UP,1 mtu 1500 qdisc 
 pfifo_fast qlen 1000
link/ether 00:00:00:00:00:ed brd ff:ff:ff:ff:ff:ff
inet 10.0.0.120/24 brd 10.0.0.255 scope global eth1
 
 Default routing table after boot
 ip r:
 
 10.0.0.0/24 dev eth0  scope link
 10.0.0.0/24 dev eth1  scope link  metric 1
 127.0.0.0/8 dev lo  scope link
 default via 10.0.0.1 dev eth0
 default via 10.0.0.1 dev eth1  metric 1
 
 I enabled ip_forward and set arp_ignore to 1 for eth0 and eth1 to make 
 sure the correct nic answers to arp requests.
 
 I tried to get the egress load balancing to work by replacing the above 
 two default routes with:
 
 ip route add default mpath drr nexthop via 10.0.0.1 dev eth0 weight 1 
 onlink nexthop via 10.0.0.1 dev eth1 weight 1 onlink
 
 I assumed that with mpath device round robin both nics would be used 
 more or less equally, but the reality is only one of the nics actually 
 works and the second nic even stops responding to arp requests.
 
 Am I doing something totally wrong or impossible here or is the device 
 round robin code not working properly?

Curiosity but why use such a setup is your ISP link  2Gbp/s ?  Why not bond if
you want HA.

why its not round robining. I am going to guess but this line

default via 10.0.0.1 dev eth0

costs less to use than

default via 10.0.0.1 dev eth1  metric 1

so it should never use the second.  I say guess cause I don't know what the
default metric is if you do add one.

What you want it to look something like is

default  proto static  metric 5 
nexthop via 144.132.144.1  dev vlan2 weight 5
nexthop via 10.20.20.230  dev ppp0 weight 20

There is a link to a howto on the web site that steps out how to set this up

Alex


 ___
 LARTC mailing list
 LARTC@mailman.ds9a.nl
 http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
 


signature.asc
Description: Digital signature
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


Re: [LARTC] Linux as T1 router

2007-01-14 Thread Martin A. Brown

Greetings,

 : I am thinking about using a linux server as a T1 router. I have 
 : searched the list, but have not found a discussion about what I'm 
 : trying to do. I have a situation where the Cisco router I'm using 
 : will not handle the additional bandwidth I added recently. 
 : Unfortunately, I cannot afford the Cisco unit that will. I would 
 : like to know if anyone has successfully done this. I have been 
 : looking at the Sangoma T1 cards. Would anyone be so kind as to 
 : share their experience in this area. Any advice would be much 
 : appreciated.

I can recommend the Sangoma T1 cards.  I have been using the S508 
(ISA) and S514 (PCI) models since 1999.  These cards and the (open 
source) drivers and management software are easy to use.  The 
company is responsive and supportive of their product.

The Sangoma crew have worked over the years to contribute their 
drivers into the stock kernel, so it is likely (unless the card you 
choose is a newly released card) that your card will be supported by 
your default distribution of choice.

The software management tools are provided by a separate package, 
including tools for configuring the (optional) onboard CSU/DSU and 
diagnosing the frames received by the unit.

Best of all, I can report that I have only ever found one bug in 
working with their software and drivers, and this was a corner-case 
bug that they had identified before I reported it to them (several 
years ago).  In short, the software and hardware is very reliable.

-Martin

-- 
Martin A. Brown
http://linux-ip.net/
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


[LARTC] Linux as a multicast router

2007-01-14 Thread Emin Gencpinar

Hi all,

We want linux (ubuntu) with 2.6 kernel to act as multicast router and to
pass multicast packets between different subnets. And linux machine as
router has two network cards having two different subnets assigned onto. We
first worked
sysctl -w net.ipv4.ip_forward=1
line on linux shell that made linux to work as unicast router. (like host,
the multicast packets were discarded at NIC). Then at weekend we heard about

sysctl -w net.ipv4.conf.all.mc_forward=1
line that is said to satisfy multicast routing requirement, but we did not
try this yet. Is this last line enough to work linux as multicast router ?

There is also one alternative we found: XORP ( Open Source IP Router )
http://www.xorp.org/livecd.html#getting
But this works from live cd. We want to also use linux shell at the same
time. And also we did not try this tool yet.

It is enough to use the linux as router, we do not consider the router
algorithms or any other thing.

Thanks in advance...
Emin
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


Re: [LARTC] dst cache overflow (bridged wan interfaces) [appears to be SOLVED]

2007-01-14 Thread ArcosCom Linux User
Yes, the problem appears to be in the http://www.ssi.bg/~ja/#routes patch.
Perhaps this patch is to any purposes and break the routes table or
something about it.

I tested for 2 days now with 4 pcs and amule/azureus configured very
agressively to enable connections quickly and monitorized with rtstat
util (as someone point to me) and I had seen how is working the routing in
the linux box more numerically.

I had take sense on all the comments about this problem and how to
optimize the routing, ¡¡THANKS TO ALL!!

Appears I can run fine with this configuration and use in production
environment, but I'll wait for 2 or 3 weeks before pass it into
production.

Thanks to all!!

El Vie, 12 de Enero de 2007, 2:13, ArcosCom Linux User escribió:
 The problem appears to be in the routes patch (after 1 day with 1
 workstation with amule configured very agresively).

 I'm trying now the 2.6.19.2 kernel with the configuration exposed here,
 I'll tell you if the problem were (or not) the patch for
 dead-gw-detection/multipath-routes from nano-howto. Perhaps this patch is
 for specific configuration and need more accurate routes config (don't
 know).

 As I said: I'll say if I the problem persist in some days.

 Thank you very much.

 Regards

 El Mie, 10 de Enero de 2007, 21:14, ArcosCom Linux User escribió:
 I recompiled yet 2.6.19.1 kernel (using iptables with the same patches
 too).

 The configuration for this test is:
1) linux box with 2.6.19.1 kernel (SMP machine) with these
 patches/modules:
   a) l7-filter
   b) ipp2p
   c) connlimit
   d) set
2) 4 ethernet interfaces:
   a) 2 external (eth1 and eth3) interfaces with balanced links (as
 described in nato-howto) bridged as wan0 with static IPs assigned to
 wan0 and wan0:1
   b) 2 internal ineterfaces (eth0 and eth2) in bridge zlan0 with STP
 enabled and configured.

 IPTABLES relevant configuration:
 # iptables -t nat -vn -L POSTROUTING
 Chain POSTROUTING (policy ACCEPT 185 packets, 16649 bytes)
  pkts bytes target prot opt in out source
 destination
26  1529 MASQUERADE  0--  *  wan010.1.1.0/27
 0.0.0.0/0
 0 0 MASQUERADE  0--  *  wan0:1  10.1.1.0/27
 0.0.0.0/0


 ROUTES CONFIGURATION:
 # service rt status
 === REGLAS DE ENRUTAMIENTO ===
 0:  from all lookup local
 50: from all lookup main
 151:from NET_PUB1 lookup 151
 152:from NET_PUB2 lookup 152
 220:from all lookup 220
 32766:  from all lookup main
 32767:  from all lookup default
 === TABLAS DE RUTAS ===
 === MAIN ===
 NET_PUB1/26 dev wan0  proto kernel  scope link  src IP_PUB1
 NET_PUB2/24 dev wan0  proto kernel  scope link  src IP_PUB2
 192.168.3.0/24 dev zlan0  proto kernel  scope link  src 192.168.3.247
 192.168.2.0/24 dev zlan0  proto kernel  scope link  src 192.168.2.247
 192.168.1.0/24 dev zlan0  proto kernel  scope link  src 192.168.1.247
 10.1.1.0/24 dev zlan0  proto kernel  scope link  src 10.1.1.6
 169.254.0.0/16 dev zlan0  scope link
 239.0.0.0/8 dev zlan0  scope link
 === wan0 TABLA 151 ===
 default via GW_PUB1 dev wan0  proto static  src IP_PUB1
 prohibit default  proto static  metric 1
 === wan0 TABLA 152 ===
 default via GW_PUB2 dev wan0  proto static  src IP_PUB2
 prohibit default  proto static  metric 1
 === TABLA 220 (defecto) ===
 default  proto static
 nexthop via GW_PUB1  dev wan0 weight 1
 nexthop via GW_PUB2  dev wan0 weight 1

 ROUTING parameters configuration:
 # grep . /proc/sys/net/ipv4/route/*
 /proc/sys/net/ipv4/route/error_burst:5000
 /proc/sys/net/ipv4/route/error_cost:1000
 grep: /proc/sys/net/ipv4/route/flush: Operación no permitida
 /proc/sys/net/ipv4/route/gc_elasticity:8
 /proc/sys/net/ipv4/route/gc_interval:60
 /proc/sys/net/ipv4/route/gc_min_interval:0
 /proc/sys/net/ipv4/route/gc_min_interval_ms:500
 /proc/sys/net/ipv4/route/gc_thresh:32768
 /proc/sys/net/ipv4/route/gc_timeout:300
 /proc/sys/net/ipv4/route/max_delay:10
 /proc/sys/net/ipv4/route/max_size:524288
 /proc/sys/net/ipv4/route/min_adv_mss:256
 /proc/sys/net/ipv4/route/min_delay:2
 /proc/sys/net/ipv4/route/min_pmtu:552
 /proc/sys/net/ipv4/route/mtu_expires:600
 /proc/sys/net/ipv4/route/redirect_load:20
 /proc/sys/net/ipv4/route/redirect_number:9
 /proc/sys/net/ipv4/route/redirect_silence:20480
 /proc/sys/net/ipv4/route/secret_interval:600

 When I test it along some weeks with intensive traffic I'll put here
 more
 info about this test.

 If somebody has any idea on how to solve the problem, please, tell us.
 I'm
 a bit desesperate with this issue.

 Regards

 ___
 LARTC mailing list
 LARTC@mailman.ds9a.nl
 http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc







___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


[LARTC] Re: Example on using fwmark with masks. Please help!!

2007-01-14 Thread ArcosCom Linux User
Any help?

El Vie, 12 de Enero de 2007, 21:26, ArcosCom Linux User escribió:
 Hi,
could anyone provides any example about the use of ip route command to
 force the use of one route using masks in the mark?

 The configuration is:
1 LAN (zlan0) iface
N WAN (wan0 ... wanN) ifaces with static IPs and load balanced.
iptables 1.3.7
kernel 2.6.19.2
iproute 2.6.19

 I'm yet setting marks into packets for QoS and its working, I now want to
 set some bits (OR) at the end of the mark.

 For example, I want to use 0x8000 to add another mark to the packet for
 routing. The packet is market yet with a QoS mark (--set-mark), 0x5 (for
 example).

 I need:
1) The packet been marked with 0x8000 OR 0x0005 = 0x8005
2) Route the packet with 0x8005 AND 0x8000 = 0x8000 over wan0 (for
 example)
3) Classify the packet with 0x8005 AND 0x0005 into wan0 1:4 class (for
 example)

 I know how to do this not having sense about MASKs, but ... Could anybody
 put here how to do it with them?

 Another question: What is the length of the mask? 16bit? 32bit?

 Thanks!!








___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc