shaper: je na tom neco spatne?

David Rohleder davro na ics.muni.cz
Pátek Září 17 16:34:30 CEST 1999


snajdr na firma.seznam.cz (Petr Snajdr) writes:

> On 16 Sep 1999, David Rohleder wrote:
> > > IP="192.168.2.4" 
> > > NET="192.168.2.0"
> > > NETMASK="255.255.255.0"
> > > BCAST="192.168.2.255"
> > > GW="192.168.2.1"
> > > 
> > > ifconfig eth1    $IP netmask $NETMASK broadcast $BCAST up
> > > shapecfg attach  shaper0  eth1
> > > shapecfg speed   shaper0  256000
> > > ifconfig shaper0 $IP netmask $NET     broadcast $BCAST up
> > > 
> > > route  del -net $NET netmask $NETMASK  dev eth1
> > > route  del default
> > 
> > route add -net $NET netmask $NETMASK dev shaper0 ?
> 
> Bohuzel ne.
>  
> > > route  add default gw $GW dev shaper0
> 
> takto vypadaji routy kdyz to funguje bez shaperu:
> 
> Kernel IP routing table
> Destination   Gateway     Genmask         Flags Metric Ref    Use   Iface
> 192.168.3.0   0.0.0.0     255.255.255.0   U     0       0     0     eth2
> 192.168.2.0   0.0.0.0     255.255.255.0   U     0       0     0     eth1
> 192.168.0.0   0.0.0.0     255.255.255.0   U     0       0     0     eth0
> 0.0.0.0       192.168.2.1 0.0.0.0         UG    1       0     0     eth1
> 
> a takto se shaperem (to, ale nefunguje):
> 
> Kernel IP routing table
> Destination     Gateway   Genmask         Flags Metric Ref    Use  Iface
> 192.168.3.0     0.0.0.0   255.255.255.0   U     0      0        0   eth2
> 192.168.2.0     0.0.0.0   255.255.255.0   U     0      0        0   shaper0
> 192.168.0.0     0.0.0.0   255.255.255.0   U     0      0        0   eth0
> 0.0.0.0         192.168.2.1   0.0.0.0     UG    0      0        0   shaper0
> 
> Ovsem nevim zdali se to nemuze "mlatit" s necim dalsim. S IP
> forwarding zrejme ne :), co maskarada? Jeste jsem
> podezrival ipchains, ze je tam nekde pravidlo povolujici
> neco pouze na eth1 (nevim zdali by to vadilo), ale stejne tam
> nic tak konkretniho neni.
> 
> Jadro: 2.2.12

Nestacilo by nemazat tu sit na eth1 a siti na shaper0 dat mensi
metriku, nebo jenom presmerovat default gw bez odstraneni site na eth1.

Nebo jeste dalsi moznost :-) 

Rozdelit si sit na dve mensi (prodlouzime netmask) a posleme je pres
shaper0. Routovani se ridi podle nejdelsi netmasky, takze:

route add -net 194.169.2.0 netmask 255.255.255.128 dev shaper0
route add -net 194.169.2.128 netmask 255.255.255.128 dev shaper0


-- 
-------------------------------------------------------------------------
David Rohleder						davro na ics.muni.cz
Institute of Computer Science, Masaryk University
Brno, Czech Republic
-------------------------------------------------------------------------


Další informace o konferenci Linux