Re: [click] FromHost
- Antonie Henning
- 2014-05-30 @ 20:39
Maybe I misunderstand your objective/config, but based on the routing
table the only useful route is the last default one. In other words the
first four routes would only match traffic if the destination is on the
same subnet e.g. fake1 would only match traffic going to 192.168.103.0/24.
Besides the smaller eth2 and eth3 subnets, pretty much everything else is
going out the default route via fake0.
On Friday, May 30, 2014 8:23 PM, sri <email@example.com> wrote:
Two questions around FromHost element. My click config is as below
(showing only the FromHost part)
discard :: Discard;
pktclassifer :: Classifier(12/0800,
intermQ :: Queue(4000);
toEth1Device :: ToDevice(eth1, BURST 8, QUIET 1);
FromHost(fake0, 192.168.102.1/0.0.0.0) -> pktclassifier;
FromHost(fake1, 192.168.103.1/255.255.255.0) -> pktclassifier;
FromHost(fake2, 192.168.103.3/0.0.0.0) -> discard;
FromHost(fake3, 192.168.103.3/0.0.0.0) -> intermQ -> toEth1Device;
FromHost(fake4, 192.168.102.3/0.0.0.0) -> discard;
1) Here I have 5 FromHost entries but I can only see routes for fake0 and
fake1 on my device.
Why the routes for other devices are not shown?
Routing table in my device:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.200.252 0.0.0.0 255.255.255.252 U 0 0 0 eth3
192.168.100.252 0.0.0.0 255.255.255.252 U 0 0 0 eth2
192.168.102.0 0.0.0.0 255.255.255.0 U 0 0 0 fake0
192.168.103.0 0.0.0.0 255.255.255.0 U 0 0 0 fake1
0.0.0.0 192.168.102.254 0.0.0.0 UG 0 0 0 fake0
2) Sometimes I see that a packet processed by element for fake0 and some
times by element for fake1. From definition of fromhost, "FromHost
captures pkt from linux kernel"? Based on what criteria, a FromHost
element captures pkt from kernel?
I have two different setups (same topology) at two regions.
The above understandings are curcial for me, as in one setup the pkt emits
from fake0 and in other setup pkt emits from fake1. It was difficult for
me to identify based on the MAC, as the both carry the default MAC given
by FromHost (00:01:02:03:04:05).