Hi,

In contrail-vrouter/utils/vtest/vhost/example/HOW_TO_TEST.README, there is a 
howto:

                ...
#addresses of uvhost are hardcoded in source code
vif --add 1 --mac "de:ad:be:ef:00:01" --type virtual --transport pmd --vrf 0 
--id 1
vif --add 2 --mac "de:ad:be:ef:00:02" --type virtual --transport pmd --vrf 0 
--id 2
vif -l

nh --create 12 --oif 2 --type 2 --smac "de:ad:be:ef:00:02" --dmac 
"de:ad:be:ef:00:01" --vrf 0 --el2
nh --list

rt -c -n 12 -e "de:ad:be:ef:00:01" -f 1 -v 0

After my check it might have some errors.
1. For nh of vif2, the above command seems encap a dmac of vif1, which seems 
wrong to me. IMO, it should be like this:
$ nh --create 12 --oif 2 --type 2 --smac "de:ad:be:ef:00:01" --dmac 
"de:ad:be:ef:00:02" --vrf 0 --el2

2. For the rt rule, we want to forward packets with dst mac "de:ad:be:ef:00:02" 
instead of "de:ad:be:ef:00:01" to oif 2. IMO, it should be like this:
$ rt -c -n 12 -e "de:ad:be:ef:00:02" -f 1 -v 0

Or if we really want to configure for oif 1, we can just change oif in nh to 1.

Can you help to confirm?

Thanks,
Jianfeng
_______________________________________________
Dev mailing list
[email protected]
http://lists.opencontrail.org/mailman/listinfo/dev_lists.opencontrail.org

Reply via email to