Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The following configuration is used for testing that involves remote peers and routing:

PeerAPeerBGateway1Gateway2
two nids on tcptwo nids on tcp2two nids on tcp, two nids on tcp2two nids on tcp, two nids on tcp2
Code Block
lnetctl net show
net:
    - net type: lo
      local NI(s):
        - nid: 0@lo
          status: up
    - net type: tcp
      local NI(s):
        - nid: 192.168.122.103@tcp
          status: up
          interfaces:
              0: eth0
        - nid: 192.168.122.154@tcp
          status: up
          interfaces:
              0: eth1
Code Block
lnetctl route show
route:
    - net: tcp2
      gateway: 192.168.122.132@tcp
    - net: tcp2
      gateway: 192.168.122.102@tcp
Code Block
lnetctl net show
net:
    - net type: lo
      local NI(s):
        - nid: 0@lo
          status: up
    - net type: tcp2
      local NI(s):
        - nid: 192.168.122.110@tcp2
          status: up
          interfaces:
              0: eth0
        - nid: 192.168.122.253@tcp2
          status: up
          interfaces:
              0: eth1
Code Block
lnetctl 
net
route show
net
route:
    - net
type
: 
lo
tcp
      
local NI(s):
gateway: 192.168.122.26@tcp2
    
- 
nid
net: 
0@lo
tcp
      
status: up
gateway: 192.168.122.200@tcp2
Code Block
lnetctl net show
net:
    - net type: lo
      local NI(s):
        - nid: 0@lo
          status: up
    - net type: tcp
      local NI(s):
        - nid: 192.168.122.102@tcp
          status: up
          interfaces:
              0: eth0
        - nid: 192.168.122.252@tcp
          status: up
          interfaces:
              0: eth1
    - net type: tcp2
      local NI(s):
        - nid: 192.168.122.237@tcp2
          status: up
          interfaces:
              0: eth2
        - nid: 192.168.122.200@tcp2
          status: up
          interfaces:
              0: eth3
Code Block
lnetctl net show
net:
    - net type: lo
      local NI(s):
        - nid: 0@lo
          status: up
    - net type: tcp
      local NI(s):
        - nid: 192.168.122.132@tcp
          status: up
          interfaces:
              0: eth0
        - nid: 192.168.122.150@tcp
          status: up
          interfaces:
              0: eth1
    - net type: tcp2
      local NI(s):
        - nid: 192.168.122.26@tcp2
          status: up
          interfaces:
              0: eth2
        - nid: 192.168.122.244@tcp2
          status: up
          interfaces:
              0: eth3

Gateway Preference For Source

Preferred Gateway

...

For Source Net

UDSPBehaviour
On PeerB, designate Gateway1 as preferred on tcp2All sends from PeerB use Gateway1
Code Block
lnetctl udsp add --src tcp2 --rte 192.168.122.102@tcp

lnetctl udsp show
udsp:
    - idx: 0
      src: tcp2
      dst: NA
      rte: 192.168.122.102@tcp

Use "lnetctl stats show" on Gateway1 and Gateway2. On every send from PeerB to PeerA, "route_count" should increase only on Gateway1. On PeerB, Gateway1 should be listed as preferred for every nid on tcp2:

Code Block
lnetctl net show -v 4

net:
    - net type: lo
      local NI(s):
        - nid: 0@lo
          status: up
          statistics:
              send_count: 0
              recv_count: 0
              drop_count: 0
          udsp info:
              net priority: -1
              nid priority: -1
          sent_stats:
              put: 0
              get: 0
              reply: 0
              ack: 0
              hello: 0
          received_stats:
              put: 0
              get: 0
              reply: 0
              ack: 0
              hello: 0
          dropped_stats:
              put: 0
              get: 0
              reply: 0
              ack: 0
              hello: 0
          health stats:
              health value: 0
              interrupts: 0
              dropped: 0
              aborted: 0
              no route: 0
              timeouts: 0
              error: 0
          tunables:
              peer_timeout: 0
              peer_credits: 0
              peer_buffer_credits: 0
              credits: 0
          dev cpt: 0
          tcp bonding: 0
          CPT: "[0]"
    - net type: tcp2
      local NI(s):
        - nid: 192.168.122.110@tcp2
          status: up
          interfaces:
              0: eth0
          statistics:
              send_count: 319
              recv_count: 319
              drop_count: 0
          udsp info:
              net priority: -1
              nid priority: -1
              Preferred gateway NIDs:
                  NID-0: 192.168.122.102@tcp
          sent_stats:
              put: 3
              get: 316
              reply: 0
              ack: 0
              hello: 0
          received_stats:
              put: 0
              get: 3
              reply: 313
              ack: 3
              hello: 0
          dropped_stats:
              put: 0
              get: 0
              reply: 0
              ack: 0
              hello: 0
          health stats:
              health value: 1000
              interrupts: 0
              dropped: 0
              aborted: 0
              no route: 0
              timeouts: 0
              error: 0
          tunables:
              peer_timeout: 180
              peer_credits: 8
              peer_buffer_credits: 0
              credits: 256
          dev cpt: -1
          tcp bonding: 0
          CPT: "[0]"
        - nid: 192.168.122.253@tcp2
          status: up
          interfaces:
              0: eth1
          statistics:
              send_count: 319
              recv_count: 319
              drop_count: 0
          udsp info:
              net priority: -1
              nid priority: -1
              Preferred gateway NIDs:
                  NID-0: 192.168.122.102@tcp
          sent_stats:
              put: 17
              get: 302
              reply: 0
              ack: 0
              hello: 0
          received_stats:
              put: 15
              get: 2
              reply: 300
              ack: 2
              hello: 0
          dropped_stats:
              put: 0
              get: 0
              reply: 0
              ack: 0
              hello: 0
          health stats:
              health value: 1000
              interrupts: 0
              dropped: 0
              aborted: 0
              no route: 0
              timeouts: 0
              error: 0
          tunables:
              peer_timeout: 180
              peer_credits: 8
              peer_buffer_credits: 0
              credits: 256
          dev cpt: -1
          tcp bonding: 0
          CPT: "[0]"

Preferred Gateway For Source NID

Current behaviour in this case is to make the specified gateway preferred for all nids on the same net as the specified nid.

Gateway Preference For Destination

Preferred Gateway For Destination NID

UDSPBehaviour

On PeerB, add UDSP that gives one of the PeerA nids highest priority

On PeerB, designate Gateway1 as preferred for the same PeerA nid.

All sends from PeerB go to the prioritized nid of PeerA through the preferred gateway 
Code Block
lnetctl udsp add --dst 192.168.122.103@tcp

lnetctl udsp add --dst 192.168.122.103@tcp --rte 192.168.122.102@tcp

lnetctl udsp show
udsp:
    - idx: 0
      src: NA
      dst: 192.168.122.103@tcp
      rte: NA
      action:
          priority: 0
    - idx: 1
      src: NA
      dst: 192.168.122.103@tcp
      rte: 192.168.122.102@tcp

Use "lnetctl stats show" on Gateway1 and Gateway2. On every send from PeerB to PeerA, "route_count" should increase only on Gateway1. On PeerA "send_count" and "recv_count" should increase only for the prioritised nid. On PeerB, Gateway1 should be listed as preferred for the specified nid of PeerA on tcp:


PeerB:

Code Block
lnetctl peer show -v 4

>>>>
        - nid: 192.168.122.103@tcp
          udsp info:
              net priority: -1
              nid priority: 0
              Preferred gateway NIDs:
                  NID-0: 192.168.122.102@tcp
<<<<


Preferred Gateway For Destination Net

UDSPBehaviour

On PeerB, designate Gateway1 as preferred for tcp remote network

 The preferred gateway for tcp is used for all traffic
Code Block
lnetctl udsp add --dst tcp --rte 192.168.122.102@tcp

lnetctl udsp show
udsp:
    - idx: 0
      src: NA
      dst: tcp
      rte: 192.168.122.102@tcp

Use "lnetctl stats show" on Gateway1 and Gateway2. On every send from PeerB to PeerA, "route_count" should increase only on Gateway1. On PeerB, Gateway1 should be listed as preferred for every nid on tcp:


PeerB:

Code Block
lnetctl peer show -v 4

>>>>
        - nid: 192.168.122.103@tcp
          udsp info:
              net priority: -1
              nid priority: -1
              Preferred gateway NIDs:
                  NID-0: 192.168.122.102@tcp
<<<<<
>>>>>
        - nid: 192.168.122.154@tcp
          udsp info:
              net priority: -1
              nid priority: -1
              Preferred gateway NIDs:
                  NID-0: 192.168.122.102@tcp

<<<<