Discussion:
[qpimd-users] querry realted with vifs and ifs in pimd
b***@iitb.ac.in
2009-09-09 14:28:20 UTC
Permalink
Hello friends,

Can you please tell me am i right or wrong as far as my abstarct
level understanding of vifs and ifs in pimd?

-> Each interface which is known as interface in pimd has pim_interface
and they have ifindex(interface's) and vifindex(pim_interface's)
respectively. Every interface as well as pim_inteface has primary
address.

if i am correct then can anyone tell me why are we duplicating same
information in both interface and pim_interface? Is it due to dependance
of quagga on other moduels or is it standarda way of defining inteface
for each daemon?

Regards,
Bhavin
Everton Marques
2009-09-09 17:20:33 UTC
Permalink
Hi,
Post by b***@iitb.ac.in
-> Each interface which is known as interface in pimd has pim_interface
and they have ifindex(interface's) and vifindex(pim_interface's)
respectively.  Every interface as well as pim_inteface has primary
address.
 if i am correct then can anyone tell me why are we duplicating same
information in both interface and pim_interface? Is it due to dependance
of quagga on other moduels or is it standarda way of defining inteface
for each daemon?
Zebra lib creates an "struct interface" instance for *every* interface seen
by the operation system (even for those not running PIM). Those
interfaces are assigned an ifindex by the operating system. The
struct "interface" keeps a whole list of connected addresses (not just
one primary address), see the "connected" member.

pimd creates an "struct pim_interface" only for interfaces running
multicast (either PIM or IGMP). pimd needs to detect change in
the primary address of the interface, then it saves the current
primary address in "primary_address" under "struct pim_interface".

Also, in order to program the MFC, pimd needs to assign an unique
vif_index to an interface. Currently, such an unique vif_index is easily
allocated by copying the same value as interface->ifindex, but ifindex
and vif_index are not exactly the same thing, hence the apparent
duplication.

Everton
b***@iitb.ac.in
2009-09-10 14:55:49 UTC
Permalink
Hello friends,

Thanks Everton for your extremely helpful reply.
I have still some querry related with interface. I might be paraphrsing
the things said by Everton to make it clear for me.
let's say machine has 4 (eth 0,1,2,3) ethernet cards so it has 4 interfaces.
One struct interface for each means 4 struct interfaces in this case.
Then what is the connected list of addresses? In this case, is it
the remaining 3 interfaces addresses by each one i.e. eth0 will have
eth1,2,3 addresses plus it self's address in the connected list or eth0
it self may have several addresses and they are stored in the connected
addresses list? If second possibility then lowest ip address of the all
will be the primary address.

Regards,
Bhavin.
Post by Everton Marques
Hi,
Post by b***@iitb.ac.in
-> Each interface which is known as interface in pimd has pim_interface
and they have ifindex(interface's) and vifindex(pim_interface's)
respectively.  Every interface as well as pim_inteface has primary
address.
 if i am correct then can anyone tell me why are we duplicating same
information in both interface and pim_interface? Is it due to dependance
of quagga on other moduels or is it standarda way of defining inteface
for each daemon?
Zebra lib creates an "struct interface" instance for *every* interface seen
by the operation system (even for those not running PIM). Those
interfaces are assigned an ifindex by the operating system. The
struct "interface" keeps a whole list of connected addresses (not just
one primary address), see the "connected" member.
pimd creates an "struct pim_interface" only for interfaces running
multicast (either PIM or IGMP). pimd needs to detect change in
the primary address of the interface, then it saves the current
primary address in "primary_address" under "struct pim_interface".
Also, in order to program the MFC, pimd needs to assign an unique
vif_index to an interface. Currently, such an unique vif_index is easily
allocated by copying the same value as interface->ifindex, but ifindex
and vif_index are not exactly the same thing, hence the apparent
duplication.
Everton
Everton Marques
2009-09-10 15:12:44 UTC
Permalink
Hi,
    Thanks Everton for your extremely helpful reply.
I have still some  querry related with interface. I might be paraphrsing
the things said by Everton to make it clear for me.
let's say machine has 4 (eth 0,1,2,3) ethernet cards so it has 4 interfaces.
One struct interface for each means 4 struct interfaces in this case.
Then what is the connected list of addresses? In this case, is it
the remaining 3 interfaces addresses by each one i.e. eth0 will have
eth1,2,3 addresses plus it self's address in the connected list or eth0
it self may have several addresses and they are stored in the connected
addresses list? If second possibility then lowest ip address of the all
will be the primary address.
The interface's connected list keeps all addresses assigned to the
that interface. For instance, if you have 2 ethernet cards configured
as follows:

$ /sbin/ifconfig | egrep 'eth0|inet'
eth0 Link encap:Ethernet HWaddr 00:10:5A:AB:F9:4D
inet addr:1.1.1.1 Bcast:1.1.1.255 Mask:255.255.255.0
eth0:0 Link encap:Ethernet HWaddr 00:10:5A:AB:F9:4D
inet addr:2.2.2.2 Bcast:2.2.2.255 Mask:255.255.255.0
eth1 Link encap:Ethernet HWaddr 00:10:5A:F0:01:B2
inet addr:3.3.3.3 Bcast:3.3.3.255 Mask:255.255.255.0

Then the connected lists are:

eth0: connected list = 1.1.1.1/24, 2.2.2.2/24
eth1: connected list = 3.3.3.3/24

Everton

Loading...