By Craig Hunt
Price: $44.95 USD
£31.95 GBP
Cover | Table of Contents | Colophon
route command with the -n
option to display the routing table. The -n option
prevents route from converting IP addresses to
hostnames, which gives a clearer display. Here is a routing table
from a sample Red Hat system:
# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
172.16.55.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
172.16.50.0 172.16.55.36 255.255.255.0 UG 0 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 172.16.55.1 0.0.0.0 UG 0 0 0 eth0
route
-n
command displays the routing table with the following fields:
Destination
Gateway
arp
command displays the contents of the
ARP table. To display the entire ARP table, use the arp
-a command. Individual entries can be displayed by
specifying a hostname on the arp command line. For
example, to check the entry for rodent in the
ARP table on crab, enter:
% arp rodent
rodent (172.16.12.2) at 0:50:ba:3f:c2:5e
-a
option produces the following output:
% arp -a
Net to Media Table: IPv4
Device IP Address Mask Flags Phys Addr
------ -------------------- --------------- ----- ---------------
dnet0 rodent 255.255.255.255 00:50:ba:3f:c2:5e
dnet0 crab 255.255.255.255 SP 00:00:c0:dd:d4:da
dnet0 224.0.0.0 240.0.0.0 SM 01:00:5e:00:00:00http://www.iana.org
. Unix systems
define protocol and port numbers in two simple text files.
#. An
/etc/protocols file is shown below:
%
A name indicates what we seek. An address indicates where it is. A route indicates how to get there.
A name indicates what we seek. An address indicates where it is. A route indicates how to get there.
% telnet 172.16.12.2
% telnet rodent.wrotethebook.com
telnet
rodent.wrotethebook.com is expected to work correctly on
every host that's connected to the network. If
rodent.wrotethebook.com is connected to the
Internet, hosts all over the world should be able to translate the
name rodent.wrotethebook.com into the proper
address. Therefore, some facility must exist for disseminating the
hostname information to all hosts on the network.
#.
# # Table of IP addresses and hostnames # 172.16.12.2 rodent.wrotethebook.com rodent 127.0.0.1 localhost 172.16.12.1 crab.wrotethebook.com crab loghost 172.16.12.4 jerboas.wrotethebook.com jerboas 172.16.12.3 horseshoe.wrotethebook.com horseshoe 172.16.1.2 ora.wrotethebook.com ora 172.16.6.4 linuxuser.articles.wrotethebook.com linuxuser
syslogd to direct their output to the host that
has a certain generic name. You can direct the output to any host you
choose by assigning it the appropriate generic name as an alias.
Other commonly used generic hostnames are
lprhost, mailhost, and
dumphost.
|
Command
|
Syntax
|
Function
|
|---|---|---|
|
Hello
|
HELO <sending-host>
|