InterWorks '96
San Diego, CA
Presented by:
Fred Mallett
FAME Computer Education
334 Haroldson Dr
Corpus Christi, TX 78412
512-991-3044
[email protected]
The model is a theoretical model and most network implementations do not follow it exactly, TCP/IP really has less "layers"
For a message to be "sent" (no guarantee that it gets there), the following three steps must be accomplished:
Host names:
Second level domains, usually represent a whole organization. Assigned (approved) by SRI-NIC
Third and below, represent organizational departments or subdivisions within an organization
[email protected] [email protected]
Right field, is the host number
The network portion is assigned by NIC, the host portion is assigned locally (if you will never go on the INTERNET, you may pick a network portion)
0 in the network portion is reserved for the default route
127 network is reserved for local loopback, or local host
0 in the host portion is reserved for this network
255 in the host portion is reserved for broadcast packets (BSD4.3) 0 was used for broadcast
packets under BSD4.2 and older
Nearly impossible to get assigned a class A address
Most sites with class B networks use the first host address byte for local subnets
Reserved for multicast and experimental purposes
Subnets allow you to present a simple address to the "rest of the world", yet divide your network logically into groups of administrative, physical, or organizational control
Using a netmask value, you tell tcp/ip to use a portion of the host address as a subnet address instead (the netmask is an argument to the ifconfig command)
Type B: N.N.H.H
Subnetted Type B2: N.N.S.H
A supernet is a collection of smaller networks. Supernetting is a technique of using the netmask to aggregate a collection of smaller networks into a supernet. This technique is particularly useful for class C networks. A Class C network can only have 254 hosts. This can be too restrictive for some companies. For these companies, a netmask that only contains a portion of the network part can be applied to the hosts in these class C networks to form a supernet.
This supernet netmask should be applied to those interfaces that connect to the supernet using the ifconfig command. For example, a host can configure its interface to connect to a class C supernet, 192.6, by configuring an IP address of 192.6.1.1 and a netmask of 255.255.0.0 to its interface.
Provides a dynamic method of mapping domain names to IP (Internet) addresses
Talks to other nameds to resolve names outside of it's area of authoritative (local) control
Each named only knows about names in it's local area of authoritative control
Recommended for large internets, internets with multiple areas of administrative control, and always when on the INTERNET (arpanet)
Two types of routing information, static and dynamic. Static works for small fixed internets, but requires that the configuration not change, and that the administrator know the configuration of all networks this network will talk to.
Usually a combination of both is used in an internet, local nets static, unknown network packets are sent to a host running routed or gated.
telnetd ftpd rexecd rlogind etc/rshd tftpd ntalkd comsat fingerd
Files that are usually the same on all hosts in the same network
Only needed in networks that contain a gateway that does not support RIP (Routing Information Protocol) and cannot run routed
Contains static routes loaded into routed's routing tables
Files that are often different on each host depending on network function
Displays and modifies Internet to Ethernet address translation tables. Used to enter in this nodes address map, the ip address and ethernet address pair of hosts that do not support ARP (most do).
routed - network routing daemon
SYNOPSIS
routed [ -g ] [ -s ] [ -q ] [ -t ] [ -n ] [ -f ] [ -h ] [logfile ]
DESCRIPTION
The routed daemon is invoked at boot time to manage the network routing tables. When routed is started, it uses the SIOCGIFCONF ioctl(2) to find those directly connected interfaces configured into the system and marked "up" (the software loopback interface is ignored). If multiple interfaces are present, it is assumed that the host will forward packets between networks. routed then transmits a request packet on each interface. When a request packet is received, routed formulates a reply based on the information maintained in its internal tables. The response packet generated contains a list of known routes, each marked with a "hop count" metric (a count of 16, or greater, is considered "infinite"). The metric associated with each route returned provides a metric relative to the sender.
OPTIONS
-g This flag is used on internetwork routers to offer a route to the "default"
destination. This option is typically used on a gateway to the Internet, or on a gateway that
uses another routing protocol whose routes are not reported to other local routers.
-s Forces routed to supply routing information whether it is acting as an
internetwork router or not. This is the default if multiple network interfaces are present,
or if a point-to-point link is in use.
-q This option is the opposite of the -s option. With this option, a host runs the
Routing Information Protocol. It listens for broadcast updates but does not broadcast.
The -q option is recommended for all non-gateway hosts.
-t If the -t option is specified, all packets sent or received are printed on the
standard output. In addition, routed will not divorce itself from the controlling terminal,
so that interrupts from the keyboard will kill the process.
gated is a routing daemon that handles the RIP, BGP, EGP, and HELLO routing protocols. The gated process can be configured to perform all routing protocols or any combination of the four (see WARNINGS below).
-c Parse the configuration file for syntax errors then exit. If there were no errors, leave a dump file in /usr/tmp/gated_dump. Running gated does not require super-user privilege when using the -c option, but gated may not be able to read the kernel's routing table unless it is run as super user. The -c option implies -tierk.
-n Do not modify the kernel's routing table. This option is used for testing gated configurations with actual routing data.
-ttrace_options Enable trace flags on startup.
trace_options can include one or more of the following values:
A all P protocol i internal u update e external R RIP k kernel H hello r route C icmp m mark p EGP t nostamp B BGP-f config_file Use an alternate configuration file. By default, gated uses /etc/gated.conf.
trace_file Trace file in which to place trace information.
SIGHUP Re-read configuration.
SIGINT Snapshot of current state.
The current state of all gated tasks, timers,
protocols, and tables are written to
/usr/tmp/gated_dump.
SIGTERM Graceful shutdown.
SIGUSR1 Toggle tracing.
NINGS
At HP-UX 8.07, the shipped version of gated did not require a config file. At 9.01 and above it does, or gated dies.
Also, gated is known for expiring it's own interface, but this can be fixed with an entry in the config file.
Here is a sample of the config file options most commonly used, use man gated.conf for the complete list:
martians { martian_list } ;Defines a list of martian addresses about which all routing information is ignored.
rip yes|no|on|off|quiet|pointopoint|supplier [ { preference preference ; defaultmetric metric ; interface interface_list [noripin] [noripout] ; ... trustedgateways gateway_list ; sourcegateways gateway_list ; } ] ;
quiet specifies that no RIP packets are to be generated. supplier specifies that RIP packets are to be generated. pointopoint specifies that RIP packets are to be sent only to gateways listed in the sourcegateways clause. If the RIP clause is not specified, the default is on.
The default metric is 16, the default preference is 100.
hello yes|no|on|off|quiet|pointopoint|supplier [ { preference preference ; defaultmetric metric ; interface interface_list [nohelloin] [nohelloout] ; ... trustedgateways gateway_list ; sourcegateways gateway_list ; } ] ;If yes or on is specified, HELLO assumes quiet if there is only one interface and supplier if there are two or more.
quiet specifies that no HELLO packets are to be generated. supplier specifies that HELLO packets are to be generated. Pointopoint specifies that HELLO packets are to be sent only to gateways listed in the sourcegateways clause. If the HELLO clause is not specified the default is off. The default metric is 30000, the default preference is 90.
egp yes|no|on|off [ { preference preference ; defaultmetric metric ; packetsize maxpacketsize ; group [asin autonomous_system] [asout autonomous_system] [maxup number] [preference preference] { neighbor host [metricout metric] [nogendefault] [acceptdefault] [propagatedefault] [gateway gateway] [interface interface] [sourcenet network] [minhello min_hello] [minpoll min_poll] ; ... } ; ... } ] ;
The default metric is 255, the default preference is 200.
Note that although BGP is available with this version of gated, it is currently not supported by HP.
bgp yes|no|on| off [ { preference preference ; defaultmetric metric ; peer host [linktype [up|down|horizontal|internal]] [metricout metric] [asin autonomous_system] [asout autonomous_system] [nogendefault] [gateway gateway] [interface interface] ; ... } ] ;
The default metric is 65535 and the default preference is 150 for external BGP and 250 for internal BGP.
redirect yes|no|on|off [ { preference preference ; interface interface_list [noicmpin] ; trustedgateways gateway_list ; } ] ;
static { destination gateway gateway [preference preference] ; ... destination interface interface [preference preference] ; ... } ;
The preference for static routes defaults to 50.
Luckily there are examples provided in the HP-UX 9.XX directory:
/etc/newconfig/gated/conf
Better still, this is what you will probably use on most hosts and gateways in a local internet:
rip yes ;
As well as some static routes possibly.
# Config file gated on Achilles # Gated Version 2.0.1.2 traceoptions internal external route rip update ; interface all passive ; # don't time out my interfaces! #rip yes ; rip supplier { interface fddi0 noripout ; #no rip onto CTD FDDI/don't want to be a router trustedgateways 130.202.64.5 ; # trust sungate } ; # need some static routes static { # default is via Sungate default gateway 130.202.64.5 ; # XMP via FDDI and Network Systems Corp 146.137.5.0 gateway 146.137.5.129 ; } ; propagate proto rip interface ie2 { proto static metric 1 { announce default ; } ; } ; propagate proto rip interface ie0 { proto direct { announce 130.202.60 metric 1 ; # announce path to VISNet } ; } ;
named - Internet domain name server
SYNOPSIS
named [ -d debuglevel ] [ -p port# ] [{ -b } bootfile ]
DESCRIPTION
Without any arguments, named will read the default boot file /etc/named.boot, read any initial data and listen for queries.
OPTIONS
-d debuglevel Print debugging information. A number after the "d"
determines the level of messages printed.
-p port# Use a different port number. The default is the standard port number as listed in /etc/services.
-b Use an alternate boot file. This is optional and allows you to specify a file with a leading dash.
Any additional argument is taken as the name of the boot file. The boot file contains information about where the name server is to get its initial data. If multiple boot files are specified, only the last is used.
EXAMPLE
The following example shows a boot file:
; boot file for name server
directory /usr/local/domain
; type domain source host/file backup file
cache . root.cache
primary Berkeley.EDU berkeley.edu.zone
primary 32.128.IN-ADDR.ARPA ucbhosts.rev
secondary CC.Berkeley.EDU 128.32.137.8 128.32.137.3 cc.zone.bak
secondary 6.32.128.IN-ADDR.ARPA 128.32.137.8 128.32.137.3 cc.rev.bak
primary 0.0.127.IN-ADDR.ARPA localhost.rev
forwarders 10.0.0.78 10.2.0.78
; slave
FILES
/etc/named.boot name server configuration boot file /etc/named.pid the process id /usr/tmp/named.run debug output /usr/tmp/named_dump.db dump of the database /usr/tmp/named.stats name server statistics data Configuration files read by /etc/named.boot: /etc/named.ca /etc/named.hosts /etc/named.local /etc/named.rev
inetd - internet "super-server"
SYNOPSIS
/etc/inetd [ -d ] [ configuration file ]
DESCRIPTION
Run at boot time by rc files. It listens for connections on certain internet sockets. When a connection is found on one of its sockets, it decides what service the socket corresponds to, and invokes a program to service the request. Essentially, inetd allows running one daemon to invoke several others, reducing load on the system.
Upon execution, inetd reads its configuration information from a configuration file which, by default, is /etc/inetd.conf. inetd rereads its configuration file when it receives a hangup signal, SIGHUP. (kill -hup pid) The fields of the configuration file are as follows:
service name socket type protocol wait/nowait user server program server program argumentsExample:
telnet stream tcp nowait root /etc/telnetd telnetd
hosts - host name database
DESCRIPTION
The hosts file contains information regarding the known DARPA Internet hosts with which your Domain node can communicate (usually via TCP/IP). For each host, a single line should be present with the following information:
Internet address official host name aliasesA "#" indicates the beginning of a comment.
When using the name server named(8), this file provides a backup when named is not running. For the name server, it is suggested that only a few addresses be included in this file. These include address for the local interfaces that ifconfig(8C) needs at boot time and a few machines on the local network.
Host names may contain any printable character other than a field delimiter, newline, or comment character.
EXAMPLE
The example below is for the network shown on an earlier page in the handout
# /etc/hosts Rev Date 6/9/90 by FAM 203.1.12.3 escort lynx.crp.fame.com 203.1.12.2 nine44 speedo 203.1.12.1 kerma1 151.2.3.1 cj5 trucker #gateway 151.2.3.2 beartooth 151.2.3.3 nacra5 151.2.3.4 kerma1 #gateway 192.2.2.1 giant 192.2.2.2 cj5 127.0.0.1 localhost ##!!!! NOTE: Do not use any leading spaces, or blank lines. #Do not "pretty-up" the columns with leading "0"'s
networks - network name database
DESCRIPTION
The /etc/networks file contains information regarding the known networks which comprise the DARPA Internet. For each network a single line should be present with the following information:
official network name network number aliasesA "#" indicates the beginning of a comment
Network numbers may be specified in the conventional "." notation. Network names may contain any printable character other than a field delimiter, newline, or comment character.
EXAMPLE
The example below is for the network shown on an earlier page in the handout
#/etc/networks Rev Date 5/10/90 by FAM net2 203.1.12 ring2 net3 151.2 ethernet net1 192.2.2 ring1 local 127.0.0
#! /bin/sh # @(#)netlinkrc: $Revision: 1.6.109.7 $ $Date: 92/07/13 08:21:12 $ # $Locker: $ # net_init flag is used for Instant Ignition. If net_init is set, # then netlinkrc return "exit 1". In order for Instant Ignition # to work correctly, netlinkrc needs to check the STATUS variable # after each program or scripts it calls. net_init=0 if [ -f /etc/clusterconf ] then ROOTSERVER=`/bin/cnodes -r` NODENAME=`/bin/cnodes -m` DOMAIN=`/bin/cnodes -r` ORGANIZATION=diskless else ROOTSERVER=`hostname` NODENAME=$ROOTSERVER DOMAIN=`/bin/uname -n` ORGANIZATION=standalone fi # Start logging daemon *before* any other networking initialization. # See nettl(1m) for more information. /etc/nettl -start STATUS=$? if [ ! $STATUS -eq 0 ] then net_init=1 fi # Remove the existing /etc/netstat_data file. The first time # netstat is executed, a new /etc/netstat_data file will be # created. /bin/rm -f /etc/netstat_data # Initialize networking interfaces. # (STEP 1) # The "case $NODENAME" construct below allows each node in a diskless cluster # to execute node specific calls if necessary. Add entries to # the case construct for specific nodes in the diskless cluster only if # needed. For example, if a specific node has more than one LAN interface, # the node must execute separate commands for each of the interfaces. # NOTE: If the ifconfig command line does not specify a subnet mask, # the subnet mask defaults to the network mask. # It is not necessary for both encapsulation methods to be turned on # for the LAN Interface. For further explanation see lanconfig(1m) # # The loopback interface must be explicitly configured for each address # family of interest. The following command assumes that the hostname # has already been set and is mapped to an IP Address in /etc/hosts. # # SEE ALSO: ifconfig(1m), lanconfig(1m) case $NODENAME in *) /etc/ifconfig lan0 inet `hostname` up STATUS=$? if [ ! $STATUS -eq 0 ] then net_init=1 fi /etc/lanconfig lan0 ether STATUS=$? if [ ! $STATUS -eq 0 ] then net_init=1 fi ;; esac /etc/ifconfig lo0 inet 127.0.0.1 up STATUS=$? if [ ! $STATUS -eq 0 ] then net_init=1 fi # # Initialize network routing. # # (STEP 2) (OPTIONAL, FOR NETWORKS WITH GATEWAYS ONLY) # # The route(1m) command manipulates the network routing tables. # The "case $NODENAME" construct below allows each node in a diskless # cluster to execute node specific route calls if necessary. Add entries # to the case construct for specific nodes in the diskless cluster if needed. # The STATUS checking is for Instant Ignition. # # # SEE ALSO: route(1m), routing(7) case $NODENAME in *) # add route commands for specific nodes here ;; esac # # Initialize the network node name. # # (STEP 3) # # The nodename(1m) command assigns an NS node name to the node. # Nodename takes an option of the form "nodename.domainname.orgname" where, # # nodename is the name of the local node # domainname is the name of the domain # orgname is the name of the organization # # Each name must start with an alphabetic character. # # It is strongly recommended that the string used for "nodename" above be # identical to the string used as an argument to the hostname(1) command, # which is typically invoked from the system initialization shell script # file "/etc/rc". The NS nodename used on each node in your network needs # to be unique within that network. The "case $NODENAME" construct below # allows each node in a diskless cluster to execute a node specific # nodename(1) call if necessary. Add entries to the case construct for # specific nodes in the diskless cluster only if needed. # # For example, # # case $NODENAME in # * ) /bin/nodename `/bin/uname -n`.mydomain.myorg # ;; # esac # # sets the NS nodename for all nodes (* is the wildcard) in domain # "mydomain" and organization "myorg". # # The nodename command line below sets the nodename field to the system # hostname, the domainname field to the rootserver's name, and the orgname # field to "diskless". # # SEE ALSO: nodename(1) if [ -x /bin/nodename ] then case $NODENAME in *) /bin/nodename `/bin/uname -n`.$DOMAIN.$ORGANIZATION STATUS=$? if [ ! $STATUS -eq 0 ] then net_init=1 fi ;; esac fi # # Start remote loop back daemon # if [ -f /usr/adm/rld.log ] then /bin/mv /usr/adm/rld.log /usr/adm/OLDrld.log fi if [ -x /etc/rlbdaemon ] then (/etc/rlbdaemon 2>&1 ) > /usr/adm/rld.log STATUS=$? if [ ! $STATUS -eq 0 ] then net_init=1 fi fi /bin/echo "Network Link started" # # Start NFS. This requires installation of the NFS product. # if [ -x /etc/netnfsrc ] then /etc/netnfsrc STATUS=$? if [ ! $STATUS -eq 0 ] then net_init=1 fi fi /bin/echo "ARPA/Berkeley daemons started: \c" # # Start the Internet daemon. # [ -x /etc/inetd ] && /etc/inetd && /bin/echo "inetd \c" STATUS=$? if [ ! $STATUS -eq 0 ] then net_init=1 fi # # Start ARPA/BSD networking services. # if [ -x /etc/netbsdsrc ] then /etc/netbsdsrc STATUS=$? if [ ! $STATUS -eq 0 ] then net_init=1 fi fi /bin/echo # # Do nfs mounts after inetd is running # if [ -x /etc/netnfsrc2 -a -f /etc/nfs.up ] then /etc/netnfsrc2 STATUS=$? if [ ! $STATUS -eq 0 ] then net_init=1 fi fi # # Start NS networking services. # if [ -x /etc/netnssrc ] then /etc/netnssrc STATUS=$? if [ ! $STATUS -eq 0 ] then net_init=1 fi fi # # Start HP Network Management Agent # if [ -x /etc/netnmrc ] then /etc/netnmrc STATUS=$? if [ ! $STATUS -eq 0 ] then net_init=1 fi fi # # Start HP LAN Manager/X. # if [ -x /etc/netlmrc ] then /etc/netlmrc STATUS=$? if [ ! $STATUS -eq 0 ] then net_init=1 fi fi # # Start NCS. This requires installation of the NCS product. # NCS must be started before any other NCS products are started. # if [ -x /etc/netncsrc ] then /etc/netncsrc STATUS=$? if [ ! $STATUS -eq 0 ] then net_init=1 fi fi # # Start NetLS. This requires installation of the NetLS product. # NCS must be started before NetLS is started. # if [ -x /etc/netlsrc ] then /etc/netlsrc STATUS=$? if [ ! $STATUS -eq 0 ] then net_init=1 fi fi # return exit code for Instant Ignition if [ $net_init -eq 0 ] then exit 0 else exit 1 fi
# netconf: configuration values for core networking subsystems # @(#) $Revision: 1.3.111.2 $ $Date: 95/01/25 11:35:38 $ # HOSTNAME: Name of your system for uname -S and hostname # OPERATING_SYSTEM: Name of operating system returned by uname -s # ---- DO NOT CHANGE THIS VALUE ---- # LOOPBACK_ADDRESS: Loopback address # ---- DO NOT CHANGE THIS VALUE ---- # IMPORTANT: for 9.x-to-10.0 transition, do not put blank lines between # the next set of statements HOSTNAME="puxy" OPERATING_SYSTEM=HP-UX LOOPBACK_ADDRESS=127.0.0.1 # Internet configuration parameters. See ifconfig(1m), lanconfig(1m) # INTERFACE_NAME: Network interface name (see lanscan(1m)) # IP_ADDRESS: Hostname (in /etc/hosts) or IP address in decimal-dot # notation (e.g., 192.1.2.3) # SUBNET_MASK: Subnetwork mask in decimal-dot notation, if different from default # BROADCAST_ADDRESS: Broadcast address in decimal-dot notation, if different from default # LANCONFIG_ARGS: Link-layer encapsulation methods (e.g., ieee, ether). See # lanconfig(1m) for details. # For each additional network interfaces, add a set of variable assignments # like the ones below, changing the index to "[1]", "[2]" et cetera. # IMPORTANT: for 9.x-to-10.0 transition, do not put blank lines between # the next set of statements INTERFACE_NAME[0]=lan0 IP_ADDRESS[0]="179.102.3.2" SUBNET_MASK[0]="" BROADCAST_ADDRESS[0]="" LANCONFIG_ARGS[0]="ether" # Internet routing configuration. See route(1m), routing(7) # ROUTE_DESTINATION: Destination hostname (in /etc/hosts) or host or network # IP address in decimal-dot notation, preceded by the word # "host" or "net"; or simply the word "default". # ROUTE_MASK: Subnetwork mask in decimal-dot notation, or C language # hexadecimal notation. This is an optional field. # A IP address, subnet mask pair uniquely identifies # a subnet to be reached. If a subnet mask is not given, # then the system will assign the longest subnet mask # of the configured network interfaces to this route. # If there is no matching subnet mask, then the system # will assign the default network mask as the route's # subnet mask. # ROUTE_GATEWAY: Gateway hostname (in /etc/hosts) or IP address in # decimal-dot notation. If local interface, must use the # same form as used for IP_ADDRESS above (hostname or # decimal-dot notation). # ROUTE_COUNT: An integer that indicates whether the gateway is a # remote interface (one) or the local interface (zero). # ROUTE_ARGS: Route command arguments and options. This variable # may contain a combination of the following arguments: # "-f", "-n" and "-p pmtu". # For each additional route, add a set of variable assignments like the ones # below, changing the index to "[1]", "[2]" et cetera. # IMPORTANT: for 9.x-to-10.0 transition, do not put blank lines between # the next set of statements ROUTE_DESTINATION[0]="default" ROUTE_MASK[0]="" ROUTE_GATEWAY[0]="179.102.3.2" ROUTE_COUNT[0]="0" ROUTE_ARGS[0]="" # Dynamic routing daemon configuration. See gated(1m) # GATED: Set to 1 to start gated daemon. # GATED_ARGS: Arguments to the gated daemon. GATED=0 GATED_ARGS="" # Router Discover Protocol daemon configuration. See rdpd(1m) # RDPD: Set to 1 to start rdpd daemon RDPD=0
ifconfig - configure network interface parameters
SYNOPSIS
/usr/sbin/ifconfig or /etc/ifconfig
ifconfig interface [address_family (inet)
[address[dest_addr]][parameters]]
ifconfig interface [address_family]
DESCRIPTION
ifconfig is used to assign an address to a network interface and/or configure network interface parameters. The second format shown above displays current status. ifconfig must be used at boot time to define the network address of each interface present on a machine.
ethernet on hpux lan0, lan1, lan2 (Use lanscan to get a list of devices) Apollo token ring on hpux atr1Addresses supplied can be names from the hosts/networks files or dotted decimal notation
PARAMETERS
up Mark an interface "up." This may be used to
enable an interface after an "ifconfig down."
down Mark an interface "down." When an interface is
marked "down,"the system will not attempt to
transmit messages through that interface.
trailers Request the use of a "trailer" link level
encapsulation when sending (default). If a network interface supports trailers, the
system will, when possible, encapsulate outgoing messages in a manner which
minimizes the number of memory to memory copy operations performed by the
receiver. On networks that support the Address Resolution Protocol (see arp(4P);
currently, only 10 MB ETHERNET), this flag indicates that the system should request
that other systems use trailers when sending to this host. Similarly, trailer
encapsulations will be sent to other hosts that have made such requests. Currently
used by Internet protocols only.
NOTE: If any host on the network is running bsd4.2, dis-able trailers on all hosts.
(No effect on HP-UX)
-trailers Disable the use of a "trailer"
arp Enable the use of the Address Resolution Protocol in mapping between
network level addresses and link level addresses (default). This is currently
implemented for mapping between DARPA Internet addresses and 10MB
ETHERNET addresses.
-arp Disable the use of the Address Resolution Protocol.
debug Enables extra logging to the console
-debug Default
metric n Set the routing metric of the interface to n, default 0. Higher metrics have
the effect of making a route less favorable; metrics are counted as addition hops to the
destination network or host.
debug Enable driver dependent debugging code; usually, this turns on
extra console error logging.
-debug Disable driver dependent debugging code.
netmask mask (Inet only) Specify how much of the address to reserve for
subdividing networks into subnetworks. The mask can be specified as a single
hexadecimal number with a leading 0x, with a dot-notation Internet address, or with a
netmask name
listed in the host table. The mask contains 1's for the bit positions to be used for the
network and subnet parts, and 0's for the host part. On Apollo hosts, if you use the
netmask name "defaultmask" with ifconfig, and "defaultmask" is listed in hosts(5)
with a subnet mask value, ifconfig succeeds and sets the subnet mask to the value
found in hosts. If "defaultmask" is not found in the hosts file, ifconfig still succeeds
but sets the mask to the default for the address class. For example, the default mask
for a Class C network is 255.255.255.0
netmask icmp-request Specifies that the host should obtain its subnet mask
from local gateways, using the ICMP Address Mask Request/Reply protcol. A node
will respond to this request only if it is a gateway (that is, it has more than one network
interface enabled) and if its own subnet mask was explicity set with the "netmask
mask" parameter (and it did not itself use the ICMP
request protocol). If the requesting host receives no
responses within 2 seconds, it assumes that subnets are not in use on the network. You
also can enable this ICMP Address Mask protocol by assigning the address
255.255.255.255 to the netmask name "defaultmask" in the hosts file.
dest_addr Specify the address of the correspondent on the other end of a point to
point link.
broadcast (Inet only) Specify the address to use to represent broadcasts to the network.
The default broadcast address is the address with a host part of all 1's. If the host must
interoperate with older TCP implementations that require the 0-form IP broadcast
address, specify "broadcast 0". You cannot specify this parameter when configuring
either a loopback or point-to-point interface.
The ifconfig lines used in the network depicted on page 11.
Gateway cj5(if interoperating with bsd4.2, use "broadcast 0 -trailers")
/etc/ifconfig atr0 192.2.2.2 up netmask 0xffffff00 trailers
/etc/ifconfig lo0 127.0.0.1 up
/etc/ifconfig lan0 151.2.3.1 up netmask 0xffff0000 trailers
Gateway kerma1
/etc/ifconfig atr0 203.1.12.1 up netmask 0xffffff00 trailers
/etc/ifconfig lo0 127.0.0.1 up
/etc/ifconfig lan0 151.2.3.4 up netmask 0xffff0000 trailers
Using ifconfig to check interface configuration
[135]$ /etc/ifconfig atr0
atr0: flags=43<UP,BROADCAST,RUNNING>
inet 203.1.12.2 netmask ffffff00 broadcast 203.1.12.255
# ifconfig lan0
lan0: flags=863<UP,BROADCAST,NOTRAILERS,RUNNING>
inet 179.102.3.2 netmask ffff0000 broadcast 179.102.255.255
route - manually manipulate the routing tables
SYNOPSIS
route [ -n ] [ -f ] [ -p pmtu ] [ cmd [ net | host ] args ]
DESCRIPTION
route is a program used to manually manipulate the network routing tables. It normally is
not needed, as the system routing table management daemon, routed or gated, should
tend to this task. When external routers are used, a default route is often needed, the
default route nost can be this host. route accepts two commands:
add add a route
delete delete a route
Routes can be displayed with the command netstat -r
COMMAND SYNTAX
All commands have the following syntax:
command [net|host] destination gateway [metric]
destination is the destination host or network
gateway is the next-hop gateway to which packets should be addressed
metric is a count indicating the number of hops to the destination.
The metric is required for add and addp commands; it must be zero if the destination is on
a directly-attached network, and nonzero if the route utilizes one or more gateways. If
adding a route with metric 0, the gateway given is the address of this host on the common
network, indicating the interface to be used for transmission.
The optional keywords net and host force the destination to be interpreted as a network or
a host, respectively. If the route is to a destination connected through a gateway, the metric
should be greater than 0.
Add a default route as follows:
/etc/route add default gateway_name [non-zero metric]
TCP/IP software will use the default route when other routes occurring earlier in the
routing table have failed, or when there are no other possible routes.
Only the super-user may modify the routing tables.
OPTIONS
-f "Flush" the routing tables of all gateway entries. Using this option in
conjunction with one of the commands described above flushes the tables prior to the
command's application.
-n Use dot notation instead of names.
DIAGNOSTICS
add [ host | network ] %s: gateway %s flags %x
This, when returned means the specified route is being added to the tables.
delete [ host | network ] %s: gateway %s flags %x
As above, but when deleting an entry.
%s %s done
When the -f flag is specified, each routing table entry deleted is indicated with a message
of this form.
Network is unreachable
An attempt to add a route failed because the gateway listed was not on a
directly-connected network. The next-hop gateway must be given.
not in table
A delete operation was attempted for an entry that wasn't present in the tables.
routing table overflow
An add operation was attempted, but the system was low on resources and was unable to
allocate memory to create the new entry.
If static routing is used in the network from an earlier diagram in this handout, here are some commands that would work:
SYNOPSIS
rwho [ -a ]
DESCRIPTION
The rwho command produces output similar to who, but for all machines on
the local network
NAME
telnet - user interface to the TELNET protocol
SYNOPSIS
telnet [ host [ port ] ]
DESCRIPTION
telnet is used to communicate with another host using the TELNET protocol.
NAME
rlogin - remote login
SYNOPSIS
rlogin rhost [ -ec ] [ -8 ] [ -L ] [ -l username ]
rhost [ -ec ] [ -8 ] [ -L ] [ -l username ]
DESCRIPTION
rlogin connects your terminal on the current local host system lhost to the remote host
system rhost.
NAME
ftp - ARPANET file transfer program
SYNOPSIS
ftp [ -v ] [ -d ] [ -i ] [ -n ] [ -g ] [ host ]
DESCRIPTION
ftp is the user interface to the ARPANET standard File Transfer Protocol (FTP). The
program allows you to transfer files to and from a remote network site.
NAME
tftp - trivial file transfer protocol
SYNOPSIS
tftp [ -g|g!|p|r|w ] localname host foreignname [mode]
DESCRIPTION
tftp is the front-end to the Trivial File Transfer Protocol. It enables you to copy files
among internet hosts without remote user-level access.
NAME
rcp - remote file copy
SYNOPSIS
rcp [ -p ] file1 file2
rcp [ -p ] [ -r ] file ... directory
DESCRIPTION
The rcp command copies files between machines. Each file or directory argument is
either a remote file name of the form rhost:path or a local filename containing no ":"
NAME
remsh - remote shell
SYNOPSIS
rsh host [ -l username ] [ -n ] command
host [ -l username ] [ -n ] command
DESCRIPTION
rsh connects to the specified host, and executes the specified command. rsh copies its
standard input to the remote command, the standard output of the remote command to its
standard output, and the standard error of
the remote command to its standard error. Interrupt, quit and terminate signals are
propagated to the remote command; rsh normally terminates when the remote command
does.
NAME
talk - talk to another user
SYNOPSIS
talk person [ttyname]
DESCRIPTION
talk is a visual communication program that copies lines from your terminal to that of
another user.
If you wish to talk to someone on your own machine, then person is just the person's
log-in name. If you wish to talk to a user on another host, then person is of the form
user@host
You either need more psuedo tty's, or the existing ones are corrupt. To see how many
exist, % ls /dev/*typ*
To create, use the /etc/crpty command
Connection refused
The tcp connection to the remote host is good! The remote host was not running the desired service daemon, or inetd, or inetd does not have that service enabled
Connection reset by peer
Network timeout
Connection timed out
Check to see if remote host tcpd is running, and check routes to host
Connection dead
Check if remote host crashed, or switched out
Network unreachable
Check for entry of network, and routes to network
Unknown host
Check /etc/hosts, or named
Unknown service
Check /etc/services, and /etc/protocols files
Ping a host on this net, using internet address, then host name
Ping the gateway host
Ping farther towards the unreachable destination, the problem may lie in another networks routes, not yours