简体   繁体   中英

How does OSPF bind to multiple network interfaces?

The routing protocol OSPF has a configuration command as "network " to help determine which network interface to operate on. And this command can be used to multiple times on different networks. My question is if this means the OSPF socket, or, raw socket, can bind to multiple addresses? Per my understanding, each socket has only one protocol control block(PCB), and each PCB has only one address. I'm only looking for high level explanation. For example, if OSPF socket can have multiple PCBs, or, OSPF's PCB can have multiple addresses.

That depends on the implementation.

You don't need customized sockets to use different interfaces and you don't need to work only with one socket. The implementation can use N raw sockets each one bound to one of N interfaces. Then the implementation can have one or N threads handling those N sockets.

Also it could use packet sockets but it doesn't make much sense.

Additionally it could use libpcap for receiving messages and sending messages.

Look at Quagga: https://en.wikipedia.org/wiki/Quagga_(software)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM