Routing

Team-Fly    

Solaris™ Operating Environment Boot Camp
By David Rhodes, Dominic Butler
Table of Contents
Chapter 11.  Connecting to the Local Area Network


We have managed to communicate between two machines connected on our network, but how did helium know where to send and receive information about hydrogen? The answer lies in a mechanism named "routing."

The kernel maintains a structure known as a "routing table." This contains information about where packets need to be sent, or routed, to get to their destination. We can view the routing table with netstat:

 hydrogen# netstat -rn Routing Table:   Destination        Gateway       Flags  Ref   Use   Interface ----------------- ---------------- ----- ----- ------ --------- 192.168.22.0      192.168.22.1     U        3      5  hme0 127.0.0.1         127.0.0.1        UH       0      2  lo0 hydrogen# 

This shows us that any packets destined for the 192.168.22.0 network will be routed through a gateway with an IP address of 192.168.22.1 (i.e., the network interface that we defined earlier). It also shows that the loopback interface is routed, again through itself.

This is a fairly simple implementation of a routing table, but we will see how it can be expanded later.


    Team-Fly    
    Top
     



    Solaris Operating Environment Boot Camp
    Solaris Operating Environment Boot Camp
    ISBN: 0130342874
    EAN: 2147483647
    Year: 2002
    Pages: 301

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net