beautypg.com

Learning router – Echelon LonWorks Router User Manual

Page 20

background image

A forwarding table is used for each domain on each side of the router. Each

forwarding table contains a forwarding flag for each of the 255 subnets and 255

groups in a domain. As shown in Figure 4 and Figure 5, these flags determine

whether or not a message should be forwarded or dropped based on the

destination subnet or group address of the message.
A network management tool initializes the forwarding tables using the network

management messages described in Chapter 7, Network Management Messages,.

By configuring the routing tables based on network topology, a network

management tool can optimize network performance and make the most efficient

use of available bandwidth. Configured routers should be used for looping

topologies; see Loop Topology.
For a L

ON

W

ORKS

router, there are two sets of forwarding tables, one in non-

volatile memory (typically EEPROM) and one in RAM. The non-volatile table is

copied to the RAM table when the router is initially powered-up, after a reset,

and when the router receives the Set Router Mode command with the Initialize

Routing Table option. The RAM table is used for all forwarding decisions.
Several of the operations in shown in Figure 4 and Figure 5 help prevent

message loops for service-pin messages. Service-pin messages require special

handling because they are broadcast to all nodes on the zero-length domain, and

have a source subnet ID of zero. When a router receives a service-pin message

with a source subnet ID of zero, the router modifies the source subnet field of the

message to be the router’s subnet on the receiving side. If the receiving side is

installed in two domains, two service-pin messages are forwarded, one for each

domain. Thus, the router can drop the service-pin message if a loop causes the

message to be received again on the same side.

Learning Router

A Learning Router, like a configured router, determines which packets to forward

based on internal routing tables. A learning router forwards only those messages

which are received on either of the router’s domains and which meet the

forwarding rules shown in Figure 4 and Figure 5. A learning router always

forwards all group-addressed messages. Learning routers maintain their routing

tables in non-volatile memory, and thus retain them after a reset. These tables

control forwarding of subnet and group-addressed messages, and are updated

automatically by the router firmware, rather than their being configured by a

network management tool. The group forwarding tables are configured to always

forward (flood) all messages with group destination addresses.
When a router receives a packet with a destination address using a subnet ID, it

uses the subnet ID to determine whether to forward the packet. Learning

routers learn network topology by examining the source subnet of all messages

received by the router. Whenever a learning router receives a packet from one of

its channels, it uses the source subnet ID to learn the network topology. It sets

the corresponding routing table entries to indicate that the subnet in question is

to be found in the direction from which the packet was received. Because subnets

cannot span two channels connected to an intelligent router, the router can learn

which side a subnet is on whenever that subnet ID appears in the source address.
The subnet forwarding tables are initially configured to forward all messages

with subnet destination addresses. Each time a new subnet ID is observed in the

source address field of a message, its corresponding flag is cleared (that is,

forwarding is disabled) in the subnet forwarding table. The forwarding flag for

10

Introduction to LONWORKS Routers