[9fans] first ping - Plan9

This is a discussion on [9fans] first ping - Plan9 ; 1/log:1: rtt 0 Ás, avg rtt 0 Ás, ttl = 255 on node 2: bind -a '#:' /dev echo bind treenet /dev/vc0 ip 12.0.0.2 255.255.255.255 > /net/ipifc/clone echo add 12.0.0.2 255.255.255.255 12.0.0.1 > /net/ipifc/1/ctl on node 1: bind -a '#:' ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: [9fans] first ping

  1. [9fans] first ping

    1/log:1: rtt 0 Ás, avg rtt 0 Ás, ttl = 255


    on node 2:
    bind -a '#:' /dev
    echo bind treenet /dev/vc0 ip 12.0.0.2 255.255.255.255 > /net/ipifc/clone
    echo add 12.0.0.2 255.255.255.255 12.0.0.1 > /net/ipifc/1/ctl

    on node 1:
    bind -a '#:' /dev
    echo bind treenet /dev/vc0 ip 12.0.0.1 255.255.255.0 > /net/ipifc/clone
    echo add 12.0.0.1 255.255.255.255 12.0.0.2 > /net/ipifc/1/ctl

    note that the mask on the bind seems meaningless. I am going to try io nodenow

    I keep having my head handed back to me every time I think I
    understand IP routing in plan 9. Seems so simple, but ... I just screw
    it up each time.

    So I am adding host links for now, but I feel I ought to be able to do
    this via commands to /net/iproute.

    ron

  2. Re: [9fans] first ping

    >echo bind treenet /dev/vc0 ip 12.0.0.2 255.255.255.255 > /net/ipifc/clone
    >echo add 12.0.0.2 255.255.255.255 12.0.0.1 > /net/ipifc/1/ctl


    yes, sorry, it turns out for my funny device i'd been using something closer to
    {echo bind medium device; echo add ip-parameters...} >/net/ipifc/clone
    which explains why the text "ip" ... things didn't produce an error earlier;
    as jmk says they are interpreted by the medium's bind. makes sense.

    > So I am adding host links for now, but I feel I ought to be able to do
    > this via commands to /net/iproute.


    adding the addresses to the interface by writing to the ctl file for the ipifc interface is right.

    routes (shared by all interfaces on the stack) are added by writing to /net/iproute

    echo add target mask gateway >/net/iproute
    so
    echo add 0 0 1.2.3.4 >/net/iproute
    sets the default route ipgw to 1.2.3.4

    in order for incoming packets not for the current node
    to be forwarded by a given interface you would use
    echo iprouting 1 >/net/ipifc/NNN/ctl

    BUT in this case, since every node is receiving every packet, you probably
    don't really want to do that, and probably don't need it. without it,
    packets not for the current node are discarded, which seems right.


  3. Re: [9fans] first ping

    On 5/16/07, Charles Forsyth wrote:
    >
    > in order for incoming packets not for the current node
    > to be forwarded by a given interface you would use
    > echo iprouting 1 >/net/ipifc/NNN/ctl
    >
    > BUT in this case, since every node is receiving every packet, you probably
    > don't really want to do that, and probably don't need it. without it,
    > packets not for the current node are discarded, which seems right.
    >


    That probably won't always be the case though right? We may want to
    use the tree and torus as alternate routes for each other to route
    around bad bits (primarily thinking of problems within the tree here)
    - but I suppose it all depends on how we are using the various
    networks.

    -eric

+ Reply to Thread