home *** CD-ROM | disk | FTP | other *** search
- ===== NOSview [301]
- route
- =====
-
- _________________________________________________________________
- route
- _________________________________________________________________
- Display the IP routing table.
-
- >> Example of a 'route' display output:
-
- ..............................................................
- : Dest Len Interface Gateway Metric P Timer Use :
- : uk 32 tnc0 1 P man 1 :
- : ns9liz 32 tnc0 ns9gwb 1 man 3 :
- : region42 24 tnc0 ns9gwa 1 man 0 :
- : 192.1.2.0 24 sl0 1 P man 0 :
- : region41 24 tnc0 ns9bob 1 P man 0 :
- : default 0 tnc0 1 P man 4 :
- :............................................................:
-
- The 'P' entries are private entries which are not distributed to
- other hosts.
-
-
- _________________________________________________________________
- route add <target_host>[/bits] | default <interface>
- [<gateway_host>[<metric>]]
- _________________________________________________________________
- The 'route add' command adds an entry to the routing table. It
- requires at least two more arguments: the target host and the
- name of the interface to which its packets should be sent.
-
- If the target is not local, the gateway should also be specified.
- (If the interface is a point-to-point link, then <gateway_host>
- may be omitted even if the target is non-local, because this
- field is only used to determine the gateway's link level address,
- if any).
-
- If the destination is directly reachable, <gateway_host> is also
- unnecessary since the destination address is used to determine
- the interface link address.
-
- The optional '/bits' suffix to <target_host> specifies how many
- leading bits in the host IP address are to be considered
- significant in the routing comparisons. If not specified, 32
- bits (i.e. full significance) is assumed.
-
- With this option, a single routing table entry may refer to many
- hosts all sharing a common bit string prefix in their IP
- addresses. For example, ARPA Class A, B and C networks would use
- suffixes of /8, /16 and /24 respectively. Hence the command
- 'route add 44/8 sl0 44.64.0.2' causes any IP addresses beginning
- with '44' in the first 8 bits to be routed to 44.64.0.2; the
- remaining 24 bits are "don't-cares".
-
- To make displayed reports more meaningful, subnets can be given
- names in /domain.txt, and then used in the 'route' command. For
- example, if "region42" is defined as "44.191.42.0" in the hosts
- file, you can then give a command of the form 'route add
- region42/24 ...'
-
- When an IP address to be routed matches more than one entry in
- the routing table, the entry with largest bits parameter (i.e.
- the "best" match) is used. This allows individual hosts or
- blocks of hosts to be exceptions to a more general rule for a
- larger block of hosts.
-
- The special target 'default' is used to route datagrams to
- addresses not matched by any other entries in the routing table;
- it is equivalent to specifying a '/bits' suffix of '/0'. Care
- must be taken with 'default' entries since two nodes with default
- entries pointing at each other will route packets to unknown
- addresses back and forth in a loop until their time-to-live (TTL)
- fields expire. (Routing loops for specific addresses can also be
- created, but this is less likely to occur accidentally).
-
- >> Examples: route add default en0 192.5.6.7
- route add 44.191.42.0/24 tnc0 ns9gwa
- route add region42/24 tnc0 ns9gwa
- route add default tnc0
- route add ns9jim tnc0
- route add 192.3.4.5 sl0 (no gateway, as SLIP is
- point-to-point)
-
- _________________________________________________________________
- route addprivate <target_host>[/bits] | default <interface>
- [<gateway_host> [<metric>]]
- _________________________________________________________________
- The 'route addprivate' command is identical to 'route add' except
- that it also marks the new entry as private; it will never be
- included in outgoing RIP updates.
-
- >> Example: route addprivate region41/24 ns9bob
-
-
- _________________________________________________________________
- route drop <target_host>[/bits]
- _________________________________________________________________
- The 'route drop' command deletes an entry from the table. If a
- packet arrives for the deleted address and a default route is in
- effect, it will be used.
-
- >> Examples: route drop ns9liz
- route drop region42/24
-
-
- _________________________________________________________________
- route flush
- _________________________________________________________________
- Remove all automatically-entered entries from the IP routing
- table.
-
-
- _________________________________________________________________
- route lookup <target_host>
- _________________________________________________________________
- Display the routing table entry for <target_host>.
-
- >> Examples: route lookup region42
- route lookup ns9liz
-
-
-
- There are two built-in interfaces: loopback and encap.
-
- Loopback is for internal purposes only.
-
- The encap is an IP encapsulator interface. This is used to
- encapsulate a complete IP datagram into an IP datagram so that it
- gets "piggy-backed". It is often used to carry AMPRnet datagrams
- over the Internet. This way two sites can interchange AMPRnet
- datagrams with each other.
-
- Some extra notes: An Internet gateway has 2 IP addresses: one on
- AMPRnet and one on the Internet. You should make sure that the
- interface connected to the Internet has the 'ifconfig ipaddr' set
- correctly. Note: This previously only worked as gateway for
- other stations. There was some guessing done in picking an IP
- address when encap is used localy. The guessing takes the worst
- guess. The code now uses the local IP address as source when the
- route starts at the local station. If this is not what you want,
- you can overrule this by setting the IP address of the pseudo-
- encap interface to what you want it to be.
-
- [Additional notes from PA0GRI: I have 3 systems on an Ethernet
- with network 129.179.122.128/25. In the office I have another
- net linked to the Internet. The addresses there are in the
- 129.179.122.0/25 range. Now I have a radio link with 44.137.0.2
- and 44.137.1.2 on respective sites. On the 44.137.0.2 system I
- have 'route add 44.0.0.0/8 encap 44.137.1.1 99'. On a next
- system on my local Ethernet I have 44.137.0.1 / 129.179.122.129.
-
- To get from that system to say 44.62.0.1 I have to add an encap
- to my local gateway with:
- 'route add 44.0.0.0/8 encap 129.179.122.130'.
-
- A 'route add default ec0 129.179.122.130' gives me access to the
- Internet. Otherwise it will lookup the address for the interface
- to be used to reach 129.179.122.130 and will use 129.179.122.129.
- Now 44.62.0.1 will NEVER know where it came from. So
- adding the encap on the second system solves the problem].
-
-