Solaris 10 Network Administration - Student Guide
Solaris 10 Network Administration - Student Guide
Student Guide
This product or document is protected by copyright and distributed under licenses restricting its use, copying, distribution, and
decompilation. No part of this product or document may be reproduced in any form by any means without prior written authorization of
Sun and its licensors, if any.
Third-party software, including font technology, is copyrighted and licensed from Sun suppliers.
Sun, Sun Microsystems, the Sun logo, Solaris, Java, JumpStart, OpenBoot, Sun BluePrints, Sun Fire, and Sun StorEdge are trademarks or
registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries.
All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. in the U.S. and
other countries. Products bearing SPARC trademarks are based upon an architecture developed by Sun Microsystems, Inc.
UNIX is a registered trademark in the U.S. and other countries, exclusively licensed through X/Open Company, Ltd.
The OPEN LOOK and Sun Graphical User Interface was developed by Sun Microsystems, Inc. for its users and licensees. Sun acknowledges
the pioneering efforts of Xerox in researching and developing the concept of visual or graphical user interfaces for the computer industry.
Sun holds a non-exclusive license from Xerox to the Xerox Graphical User Interface, which license also covers Sun’s licensees who
implement OPEN LOOK GUIs and otherwise comply with Sun’s written license agreements.
Federal Acquisitions: Commercial Software – Government Users Subject to Standard License Terms and Conditions
Export Laws. Products, Services, and technical data delivered by Sun may be subject to U.S. export controls or the trade laws of other
countries. You will comply with all such laws and obtain all licenses to export, re-export, or import as may be required after delivery to
You. You will not export or re-export to entities on the most current U.S. export exclusions lists or to any country subject to U.S. embargo
or terrorist controls as specified in the U.S. export laws. You will not use or provide Products, Services, or technical data for nuclear, missile,
or chemical biological weaponry end uses.
DOCUMENTATION IS PROVIDED “AS IS” AND ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS, AND
WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
OR NON-INFRINGEMENT, ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD TO BE
LEGALLY INVALID.
THIS MANUAL IS DESIGNED TO SUPPORT AN INSTRUCTOR-LED TRAINING (ILT) COURSE AND IS INTENDED TO BE
USED FOR REFERENCE PURPOSES IN CONJUNCTION WITH THE ILT COURSE. THE MANUAL IS NOT A STANDALONE
TRAINING TOOL. USE OF THE MANUAL FOR SELF-STUDY WITHOUT CLASS ATTENDANCE IS NOT RECOMMENDED.
Please
Recycle
Copyright 2005 Sun Microsystems Inc. 4150 Network Circle, Santa Clara, California 95054, Etats-Unis. Tous droits réservés.
Ce produit ou document est protégé par un copyright et distribué avec des licences qui en restreignent l’utilisation, la copie, la distribution,
et la décompilation. Aucune partie de ce produit ou document ne peut être reproduite sous aucune forme, par quelque moyen que ce soit,
sans l’autorisation préalable et écrite de Sun et de ses bailleurs de licence, s’il y en a.
Le logiciel détenu par des tiers, et qui comprend la technologie relative aux polices de caractères, est protégé par un copyright et licencié
par des fournisseurs de Sun.
Sun, Sun Microsystems, the Sun logo, Solaris, Java, JumpStart, OpenBoot, Sun BluePrints, Sun Fire, et Sun StorEdge sont des marques de
fabrique ou des marques déposées de Sun Microsystems, Inc. aux Etats-Unis et dans d’autres pays.
Toutes les marques SPARC sont utilisées sous licence sont des marques de fabrique ou des marques déposées de SPARC International, Inc.
aux Etats-Unis et dans d’autres pays. Les produits portant les marques SPARC sont basés sur une architecture développée par Sun
Microsystems, Inc.
UNIX est une marques déposée aux Etats-Unis et dans d’autres pays et licenciée exclusivement par X/Open Company, Ltd.
L’interfaces d’utilisation graphique OPEN LOOK et Sun™ a été développée par Sun Microsystems, Inc. pour ses utilisateurs et licenciés.
Sun reconnaît les efforts de pionniers de Xerox pour larecherche et le développement du concept des interfaces d’utilisation visuelle ou
graphique pour l’industrie de l’informatique. Sun détient une licence non exclusive de Xerox sur l’interface d’utilisation graphique Xerox,
cette licence couvrant également les licenciés de Sun qui mettent en place l’interface d’utilisation graphique OPEN LOOK et qui en outre
se conforment aux licences écrites de Sun.
Législation en matière dexportations. Les Produits, Services et données techniques livrés par Sun peuvent être soumis aux contrôles
américains sur les exportations, ou à la législation commerciale dautres pays. Nous nous conformerons à lensemble de ces textes et nous
obtiendrons toutes licences dexportation, de ré-exportation ou dimportation susceptibles dêtre requises après livraison à Vous. Vous
nexporterez, ni ne ré-exporterez en aucun cas à des entités figurant sur les listes américaines dinterdiction dexportation les plus courantes,
ni vers un quelconque pays soumis à embargo par les Etats-Unis, ou à des contrôles anti-terroristes, comme prévu par la législation
américaine en matière dexportations. Vous nutiliserez, ni ne fournirez les Produits, Services ou données techniques pour aucune utilisation
finale liée aux armes nucléaires, chimiques ou biologiques ou aux missiles.
LA DOCUMENTATION EST FOURNIE “EN L’ETAT” ET TOUTES AUTRES CONDITIONS, DECLARATIONS ET GARANTIES
EXPRESSES OU TACITES SONT FORMELLEMENT EXCLUES, DANS LA MESURE AUTORISEE PAR LA LOI APPLICABLE, Y
COMPRIS NOTAMMENT TOUTE GARANTIE IMPLICITE RELATIVE A LA QUALITE MARCHANDE, A L’APTITUDE A UNE
UTILISATION PARTICULIERE OU A L’ABSENCE DE CONTREFAÇON.
CE MANUEL DE RÉFÉRENCE DOIT ÊTRE UTILISÉ DANS LE CADRE D’UN COURS DE FORMATION DIRIGÉ PAR UN
INSTRUCTEUR (ILT). IL NE S’AGIT PAS D’UN OUTIL DE FORMATION INDÉPENDANT. NOUS VOUS DÉCONSEILLONS DE
L’UTILISER DANS LE CADRE D’UNE AUTO-FORMATION.
Please
Recycle
Table of Contents
About This Course ............................................................Preface-xvii
Course Goals....................................................................... Preface-xvii
Course Map........................................................................ Preface-xviii
Topics Not Covered............................................................. Preface-xix
How Prepared Are You?...................................................... Preface-xx
Introductions ........................................................................ Preface-xxi
How to Use Course Materials ...........................................Preface-xxii
Conventions ........................................................................Preface-xxiii
Icons ............................................................................Preface-xxiii
Typographical Conventions ................................... Preface-xxiv
Additional Conventions........................................... Preface-xxv
Introducing the TCP/IP Model .........................................................1-1
Objectives ........................................................................................... 1-1
Introducing Network Model Fundamentals.................................. 1-2
Network Protocols .................................................................... 1-2
Network Model Concepts........................................................ 1-3
Introducing the Layers of the TCP/IP Model................................ 1-4
Network Interface Layer ......................................................... 1-5
Internet Layer ............................................................................ 1-6
Transport Layer......................................................................... 1-7
Application Layer ..................................................................... 1-8
Describing Basic Peer-to-Peer Communication,
Encapsulation, and Decapsulation ............................................. 1-10
Peer-to-Peer Communication ................................................ 1-10
Encapsulation and Decapsulation ........................................ 1-11
TCP/IP Protocols ............................................................................. 1-12
Exercise: Reviewing the TCP/IP Model ....................................... 1-16
Preparation............................................................................... 1-16
Tasks ......................................................................................... 1-16
Exercise Summary............................................................................ 1-18
Exercise Solutions ............................................................................ 1-19
vii
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
Introducing LANs and Their Components..................................... 2-1
Objectives ............................................................................................ 2-1
Introducing Network Topologies .................................................... 2-2
Bus Topologies .......................................................................... 2-2
Star Topologies ......................................................................... 2-3
Ring Topologies......................................................................... 2-4
VLAN Topologies .................................................................... 2-5
Introducing LAN Media ................................................................... 2-8
IEEE Identifiers.......................................................................... 2-8
IEEE 802.3 Types ....................................................................... 2-9
Introducing Network Devices........................................................ 2-12
Repeaters .................................................................................. 2-12
Hubs.......................................................................................... 2-12
Bridges ...................................................................................... 2-12
Switches.................................................................................... 2-12
Exercise: Reviewing LANs and Their Components ................... 2-14
Preparation............................................................................... 2-14
Tasks ......................................................................................... 2-14
Exercise Summary............................................................................ 2-16
Exercise Solutions ............................................................................ 2-17
Describing Ethernet Interfaces....................................................... 3-1
Objectives ........................................................................................... 3-1
Introducing Ethernet Concepts........................................................ 3-2
Major Ethernet Elements.......................................................... 3-2
CSMA/CD Access Method ..................................................... 3-2
Full-Duplex and Half-Duplex Mode...................................... 3-4
Ethernet Statistics...................................................................... 3-4
Introducing Ethernet Frames ........................................................... 3-6
Ethernet Addresses................................................................... 3-6
Setting a Local Ethernet Address........................................... 3-8
Ethernet-II Frame Analysis................................................... 3-10
Maximum Transmission Units............................................. 3-12
Ethernet Frame Errors ............................................................ 3-13
Using Network Utilities .................................................................. 3-14
Using the snoop Utility .......................................................... 3-14
Using the netstat Command ............................................. 3-17
Using the ndd Command ....................................................... 3-18
Exercise: Reviewing Ethernet Interfaces....................................... 3-21
Preparation............................................................................... 3-21
Tasks ......................................................................................... 3-21
Exercise Summary............................................................................ 3-25
Exercise Solutions ............................................................................ 3-26
ix
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
Configuring IP Network Multipathing............................................. 6-1
Objectives ............................................................................................ 6-1
Increasing Network Availability ..................................................... 6-2
Limitations of Network Interfaces.......................................... 6-2
Configuring IP Network Multipathing........................................... 6-3
Introducing IPMP ..................................................................... 6-3
Probe-based IPMP Configuration........................................... 6-4
Configuring Probe-based IPMP by Using
Configuration Files ................................................................ 6-6
Configuring Probe-based IPMP on the
Command Line.................................................................... 6-12
Link-based IPMP Configuration.......................................... 6-20
Configuring Link-based IPMP by Using
Configuration
Files ....................................................................................... 6-21
Configuring a Singleton IPMP Group ................................. 6-26
Viewing IPMP Operation ..................................................... 6-28
Troubleshooting an IPMP Configuration........................... 6-30
Exercise: Configuring IPMP ........................................................... 6-32
Preparation............................................................................... 6-32
Tasks ........................................................................................ 6-34
Exercise Summary............................................................................ 6-39
Exercise Solutions ............................................................................ 6-40
Configuring Routing ........................................................................ 7-1
Objectives ............................................................................................ 7-1
Identifying the Fundamentals of Routing ...................................... 7-3
Purpose of Routing ................................................................... 7-3
Types of Routes ......................................................................... 7-4
Introducing the Routing Table......................................................... 7-6
Static Routes............................................................................... 7-6
Dynamic Routes ....................................................................... 7-7
Introducing Routing Protocol Types............................................... 7-8
Autonomous Systems............................................................... 7-8
Interior Gateway Protocols...................................................... 7-9
Exterior Gateway Protocols ................................................... 7-10
Working With the Routing Table .................................................. 7-12
Displaying the Routing Table ............................................... 7-12
Introducing Routing Table Information .............................. 7-13
Searching the Routing Table................................................. 7-14
Associating Names and Network Numbers ....................... 7-16
Configuring Static Routes............................................................... 7-18
Configuring Static Direct Routes .......................................... 7-18
Configuring the /etc/defaultrouter File ...................... 7-19
Configuring the /etc/gateways File ................................. 7-20
Configuring Static Routes on the Command Line ............ 7-21
Configuring Dynamic Routing ...................................................... 7-25
xi
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
Purpose of Multicast Addresses ........................................... 8-15
Scope Bits................................................................................. 8-16
ICMPv6 Group Membership................................................. 8-17
Enabling IPv6.................................................................................... 8-18
The in.ndpd Daemon on a Non-Router.............................. 8-18
Configuring IPv6 on Non-Routers ....................................... 8-19
Troubleshooting a Non-Router Configuration................... 8-22
The in.ndpd Daemon on the Router ................................... 8-23
IPv6 Routing Information Protocol ...................................... 8-23
Configuring an IPv6 Router ................................................. 8-24
Configuring an IPv6 6to4 Router.......................................... 8-30
Configuring a 6to4 Boundary Router.................................. 8-31
Troubleshooting a Router Configuration ............................ 8-33
Managing IPv6 ................................................................................. 8-35
Displaying the State of IPv6 Interfaces ................................ 8-35
Modifying the Configuration of an IPv6 Interface............. 8-35
Configuring Logical Interfaces.............................................. 8-36
Troubleshooting IPv6 Interfaces ........................................... 8-36
Displaying the IPv6 Routing Table ...................................... 8-36
Exercise 1: Configuring IPv6 .......................................................... 8-37
Preparation............................................................................... 8-37
Task 1 – Configuring IPv6 on the Local Subnet ................. 8-37
Task 2 – Configuring 6to4 Routing...................................... 8-39
Task 3 – Configuring IPv6 Across the Whole
Network................................................................................ 8-41
Exercise Summary............................................................................ 8-44
Exercise 1 Solutions ......................................................................... 8-45
Task 1 – Configuring IPv6 on the Local Subnet ................. 8-45
Task 2 – Configuring 6to4 Routing...................................... 8-48
Task 3 – Configuring IPv6 Across the Whole
Network................................................................................ 8-52
Configuring IPv6 Multipathing ..................................................... 8-58
Configuring IPMP Manually................................................. 8-58
Configuring IPMP at Boot Time .......................................... 8-68
Configure a Singleton IPMP Group in IPv6........................ 8-73
Exercise 2: Configuring IPv6 Multipathing.................................. 8-74
Preparation............................................................................... 8-74
Tasks ......................................................................................... 8-74
Exercise Summary............................................................................ 8-77
Exercise 2 Solutions ......................................................................... 8-78
Task Solutions.......................................................................... 8-78
xiii
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
Troubleshooting the DNS Server by Using Basic
Utilities.......................................................................................... 10-33
Implementing named Logging............................................. 10-33
Examining the/var/adm/messages File........................... 10-35
Using the dig Utility ........................................................... 10-36
Dumping a Snapshot of the DNS Database by
Using the rndc Utility ...................................................... 10-39
Forcing the named Daemon to Reread the
Configuration and Changed Zone Files ......................... 10-44
Managing a DNS Server by Using the rndc
Utility .................................................................................. 10-45
Exercise: Configuring DNS.......................................................... 10-50
Preparation............................................................................. 10-50
Task Summary....................................................................... 10-51
Tasks ....................................................................................... 10-51
Exercise Summary.......................................................................... 10-57
Exercise Solutions .......................................................................... 10-58
Task Solutions........................................................................ 10-58
Configuring DHCP ......................................................................... 11-1
Objectives .......................................................................................... 11-1
Introducing the Fundamentals of DHCP ..................................... 11-2
Purpose of DHCP.................................................................... 11-2
DHCP Client Functions.......................................................... 11-3
DHCP Server Functions ......................................................... 11-4
Configuring a DHCP Server........................................................... 11-7
Configuring DHCP by Using Different Methods ............. 11-8
Performing Initial DHCP Server Configuration by
Using the dhcpmgr Utility.................................................. 11-9
Adding Addresses by Using the dhcpmgr Utility ............ 11-21
Using the dhcpconfig Command..................................... 11-28
Introducing DHCP Network Files...................................... 11-30
Using the pntadm Command .............................................. 11-31
Introducing the dhcptab Table........................................... 11-34
Configuring and Managing DHCP Clients................................ 11-39
Configuring a DHCP Client ................................................ 11-39
Troubleshooting a DHCP Server ................................................. 11-42
Troubleshooting DHCP Clients ................................................... 11-45
Exercise: Configuring a DHCP Server and Client..................... 11-46
Preparation............................................................................. 11-46
Task Summary...................................................................... 11-47
Task 1 – Configuring the DHCP Server............................. 11-47
Task 2 – Configuring the DHCP Client ............................ 11-48
Task 3 – Using the snoop Utility to View DHCP
Client-Server Interaction................................................... 11-48
Exercise Summary.......................................................................... 11-50
Exercise Solutions .......................................................................... 11-51
Task 1 – Configuring the DHCP Server............................. 11-51
xv
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
Exercise: Configuring the Solaris IP Filter Firewall .................. 13-19
Preparation............................................................................. 13-19
Task Summary....................................................................... 13-19
Task 1 – Configuring Firewall Rules ................................. 13-20
Task 2 – Disabling Services................................................. 13-26
Exercise Summary.......................................................................... 13-31
Exercise Solutions .......................................................................... 13-32
Task 1 Solutions..................................................................... 13-32
Task 2 Solutions..................................................................... 13-41
Bibliography ................................................................. Bibliography-1
Sun Microsystems Publications ................................. Bibliography-1
Books.............................................................................. Bibliography-2
Online References ........................................................ Bibliography-3
RFCs ............................................................................... Bibliography-4
Glossary/Acronyms ............................................................Glossary-1
Index.................................................................................................. 1-1
Course Goals
Upon completion of this course, you should be able to:
● Configure the Network Interface layer
● Configure the network (Internet and Transport layers)
● Configure and manage network applications
Preface-xvii
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
Course Map
Course Map
The course map enables you to see what you have accomplished and
where you are going in reference to the instructional goals.
Configuring IP
Configuring Configuring
Network
IP Routing
Multipathing
Describing
Configuring the Transport
IPv6 Layer
Configuring the
Configuring Configuring Configuring Solaris™ IP
DNS DHCP NTP Filter Firewall
Refer to the Sun Educational Services catalog for specific information and
registration.
Introductions
Now that you have been introduced to the course, introduce yourself to
the other students and the instructor, addressing the following items:
● Name
● Company affiliation
● Title, function, and job responsibility
● Experience related to topics presented in this course
● Reasons for enrolling in this course
● Expectations for this course
Conventions
The following conventions are used in this course to represent various
training elements and alternative learning resources.
Icons
Note – Indicates additional information that can help students but is not
crucial to their understanding of the concept being described. Students
should be able to understand the concept or complete the task without
this information. Examples of notational information include keyword
shortcuts and minor system adjustments.
Typographical Conventions
Courier is used for the names of commands, files, directories, user
names, host names, programming code, and on-screen computer output;
for example:
Use the ls -al command to list all files.
host1# cd /home
Courier bold is used for characters and numbers that you type; for
example:
To list the files in this directory, type the following:
# ls
Palatino italics is used for book titles, new words or terms, or words that
you want to emphasize; for example:
Read Chapter 6 in the User’s Guide.
These are called class options.
Additional Conventions
Java™ programming language examples use the following additional
conventions:
● Method names are not followed with parentheses unless a formal or
actual parameter list is shown; for example:
“The doIt method...” refers to any method called doIt.
“The doIt() method...” refers to a method called doIt that takes
no arguments.
● Line breaks occur only where there are separations (commas),
conjunctions (operators), or white space in the code. Broken code is
indented four spaces under the starting code.
● If a command used in the Solaris OS is different from a command
used in the Microsoft Windows platform, both commands are
shown; for example:
If working in the Solaris OS
$ cd $SERVER_ROOT/bin
If working in Microsoft Windows
C:\> cd %SERVER_ROOT%\bin
Objectives
This module describes the fundamentals of the Transmission Control
Protocol/Internet Protocol (TCP/IP) model, including network protocols
and concepts. This module also describes the layers of the TCP/IP model,
including the Network Interface, Internet, Transport, and Application
layers. In addition, this module describes basic peer-to-peer
communication and some common TCP/IP protocols.
The course map in Figure 1-1 shows how this module fits into the current
instructional goal.
1-1
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
Introducing Network Model Fundamentals
Network Protocols
Computer networks use protocols to communicate. Protocols define the
procedures to be followed by the systems involved in the communication
process. A data communication protocol is a set of rules that must be
followed for two electronic devices to communicate with each other.
These rules describe:
● Syntax – Data format and coding
● Semantics – Control information and error handling
● Timing – Speed matching and sequencing
Functions of Protocols
RFCs are a frame of reference for describing the protocol architecture and
functions specific to the TCP/IP protocol stack. For a complete listing of
RFCs, visit http://www.ietf.org/rfc.html.
TCP/IP Layers
Application Layer
Transport Layer
Internet Layer
Packet
data unit Network Interface Layer
Hardware Layer
Internet Layer
The Internet layer attempts to ensure that messages reach their
destination system using the most efficient route. Figure 1-4 shows the
position of the Internet layer in the TCP/IP network model. The primary
functions of the Internet layer are:
● Routing data between networks
● Fragmenting and reassembly of data
TCP/IP Layers
Application Layer
Transport Layer
Hardware Layer
Using routing information, the Internet layer determines the next directly
accessible node in the path to a packet’s destination. This node is either
the destination itself if the destination is on the local network, or the next
gateway node in the route if the destination is on another network. The
Internet layer uses the Internet Protocol (IP) and Internet Control Message
Protocol (ICMP). IP is responsible for fragmenting and routing data, and
ICMP assists routing and performs error detection and other network
management tasks. IP encapsulates data in datagrams, which in turn are
encapsulated inside Network Interface layer PDUs.
Transport Layer
The Transport layer manages the transfer of application data between
communicating hosts. It also controls the flow of data and defines the
transport quality of the data transmission. Figure 1-5 shows the position
of the Transport layer in the TCP/IP network model.
TCP/IP Layers
Application Layer
Segment
or Transport Layer
datagram
Internet Layer
Hardware Layer
Application Layer
The top layer of the TCP/IP stack is the Application layer. Figure 1-6
shows the position of the Application layer in the TCP/IP network model.
TCP/IP Layers
Stream Layer 4
or Application Layer
Message
Layer 3
Transport Layer
Layer 2
Internet Layer
Layer 1
Network Interface Layer
Hardware Layer
The Application layer includes all of the protocols that use Transport layer
protocols to deliver data to the Internet layer. There are many application
protocols, and new protocols are frequently included in the Solaris OS
TCP/IP stack.
Peer-to-Peer Communication
Peer-to-peer communication occurs when one layer on a system
communicates with a corresponding layer on another system. Figure 1-7
illustrates the peer-to-peer communications between the layers at either
end of a network interaction. For example, the Application layer on the
source system interacts with the Application layer on the destination
system.
Encapsulation Decapsulation
Application Message
Message or
or
Application
Layer User Data
Stream
Stream
User Data
Layer
Network Network
Interface Layer NH I-PDU NT Frame
Frame NH I-PDU NT
Interface Layer
Communication Path
Physical Transmission Medium
Figure 1-7 on page 1-10 shows data encapsulation occurring on the source
system.
TCP/IP Protocols
The following tables describe briefly the common TCP/IP protocols.
826 ARP Address Resolution Protocol defines the method used to map a
32-bit IP address to a 48-bit Ethernet address.
903 RARP Reverse Address Resolution Protocol defines the method used to
map a 48-bit Ethernet address to a 32-bit IP address.
791, 950, IP Internet Protocol determines the path that a datagram must take,
919, 922 based on the destination host’s IP address.
792 ICMP Internet Control Message Protocol communicates error messages
and other controls within IP datagrams.
2401, IPSec- • Internet Protocol Security Architecture
2406, related
2402, RFCs • Encapsulating Security Payload (ESP)
2407, • IP authentication header
2408
• Internet IP security domain of interpretation for the Internet
Security Association and Key Management Protocol (ISAKMP)
Preparation
There is no preparation for this exercise.
Tasks
Perform the following steps:
1. List the layers of the TCP/IP network model by their name and
function.
Name:_______________________________________________________
Function: ____________________________________________________
Name:_______________________________________________________
Function: ____________________________________________________
Name:_______________________________________________________
Function: ____________________________________________________
Name:_______________________________________________________
Function: ____________________________________________________
2. In your own words, define the term peer-to-peer.
_____________________________________________________________
_____________________________________________________________
3. In your own words, define the term protocol.
_____________________________________________________________
_____________________________________________________________
_____________________________________________________________
_____________________________________________________________
_____________________________________________________________
Exercise Summary
Exercise Solutions
Solutions to the exercise are as follows:
1. List the layers of the TCP/IP network model by their name and
function.
Name: Application
Function: Consists of user-accessed application programs and network
services. This layer is also responsible for defining the way in which
cooperating networks represent data.
Name: Transport
Function: Manages the transfer of data using connection-oriented and
connectionless transport protocols.
Name: Internet
Function: Manages data addressing and delivery between networks, as well
as fragmenting data for the Network Interface layer.
Name: Network Interface
Function: Manages the delivery of data across the physical network. This
layer provides error detection and packet framing.
2. In your own words, define the term peer-to-peer.
Peer-to-peer communication is the ability of a specific layer to communicate
with a corresponding layer on another host.
3. In your own words, define the term protocol.
A protocol is set of rules governing the exchange of data between two
entities. These rules describe:
● Syntax – Data format and coding
● Semantics – Control information and error handling
● Timing – Speed matching and sequencing
Objectives
This module describes LANs and their components. This module also
introduces LAN media, including IEEE LAN media identifiers and
Ethernet media. In addition, this module introduces network devices,
including shared hubs, bridges, and switches.
The course map in Figure 2-1 shows how this module fits into the current
instructional goal.
2-1
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
Introducing Network Topologies
Bus Topologies
The bus configuration was the typical LAN topology for the original
Ethernet network specification. A typical bus configuration has coaxial
cables running through an area. Systems are attached at points along the
cable to enable communication with each other. The bandwidth of the
cable is shared between all the systems connected to the cable. Figure 2-2
shows an example of a bus configuration.
Star Topologies
The LAN topology in a star configuration uses a central location, or hub,
from which a number of signal-carrying cables extend to each individual
device on a branch. Star configurations are well suited to many of today’s
LAN network methodologies.
Note – A non-intelligent hub does not make any decisions about which
ports to send data. This essentially makes star configurations behave
exactly like bus configurations from the point of view of the nodes. A
benefit of the star configuration is that a fault on the cable to a node
affects only that node.
Hub
Ring Topologies
In a ring configuration, the output of one node connects to the input of the
next node. Each node in the ring is between two other nodes. In a ring
network, if one node stops functioning the ring can be broken, which
affects communication on the network.
With the invention of the intelligent central hub, a ring configuration can
be implemented with the reliability of a star configuration. The reliability
is a result of the intelligent hub’s ability to bypass a non-functioning node
in the ring. Figure 2-4 shows a star-wired ring configuration.
VLAN Topologies
Virtual local area network (VLAN) topologies are becoming increasingly
popular. A VLAN topology is implemented with a central device that
supports VLAN technology. All systems are physically connected to the
same device; however, the device is configured with multiple logical
networks (the VLANs) that have one or more ports on the switch assigned
to them. For example, on an 8-port switch, ports 1, 2, 5, and 6 can be
assigned to network A, while ports 3, 4, 7, and 8 can be assigned to
network B. The traffic on network A is separated from the traffic on
network B, and traffic does not pass between the two networks. Ports can
be assigned to different VLANs based on port number, the hardware or
software address of the systems, or the protocols used by the systems.
Using VLANs reduces the size of broadcast domains. You can move
computer systems between VLANs without any hardware configuration.
Although the term VLAN is in common use, every vendor provides their
own VLAN implementation and enhancements. This makes the task of
defining the term VLAN difficult.
Figure 2-5 shows an example of a network with all systems on the same
broadcast domain.
Figure 2-6 shows how a single switch can be configured into three VLANs
so that there are three separate, smaller broadcast domains.
Figure 2-7 shows, through shading, how the three VLANs are configured
by using software on the switch to which all systems are connected.
IEEE Identifiers
For the various types of LANs, the IEEE identifier indicates the types of
media used. These identifiers include three pieces of information:
● The first piece of information, 10, 100, or 1000, represents a media
speed of 10 megabits per second (Mbps), 100 Mbps, or 1000 Mbps,
respectively.
● The second piece of information, BASE, stands for baseband, which is
a type of signalling. Baseband signalling uses the entire bandwidth
of the cable for one signal. Two systems cannot transmit signals at
the same time.
● The third piece of information indicates the segment type or the
approximate segment length. For thick coaxial cable, 5 indicates the
500-meter maximum length allowed for individual segments. For
thin coaxial cable, 2 indicates 200 meters, which is rounded up from
the 185-meter maximum length for individual thin coaxial segments.
The designation T indicates that the segment type is twisted-pair,
and the designation F stands for fiber-optic cable.
Type of Media
10 BASE-T
= Twisted Pair
The thick coaxial cable media segment was the first media segment to be
defined in the Ethernet specifications. The thin coaxial cable media
segment was defined next, followed by the twisted-pair and fiber-optic
media segments. The twisted-pair segment type is widely used today for
making network connections to the desktop.
The 10BASE-T media type uses twisted-pair cables. The specifications for
this media type were published in 1990. This is one of the most widely
used media types for connections to the desktop.
The 10BASE-T media type uses two pairs of wires: one pair receives data
signals, and the other pair transmits data signals. The two wires in each
pair must be twisted together for the entire length of the segment. This is
a standard technique that improves the signal-carrying characteristics of a
wire pair. Multiple twisted-pair segments communicate using a multiport
hub or switch. You can implement 10BASE-T over Category 3 (two to
three twists per foot) or Category 5 (two to three twists per inch)
twisted-pair cable.
The 100BASE-T4 media type operates over four pairs of wires. The
signaling system makes it possible to provide fast Ethernet signals
(100 megaHertz (MHz)) over any existing standard voice-grade
Category 3 or 4 unshielded twisted-pair cable that might be installed. One
pair of wires transmits data (TX), one pair receives data (RX), and two
pairs are bidirectional (BI) data pairs.
In 1998, the IEEE Standards Board approved the gigabit Ethernet standard
for 1000 Mbps over multimode fiber (MMF) and single-mode fiber.
Gigabit Ethernet is an extension of the successful 10-Mbps and 100-Mbps
802.3 standards. Gigabit Ethernet provides a raw bandwidth of 1000 Mbps
and maintains full compatibility with the installed base of over 100
million Ethernet nodes. Gigabit Ethernet includes both full-duplex and
half-duplex operating modes.
In 1999, the IEEE Standards Board approved the standard for the
1000BASE-T media system, for data transmissions of 1000 Mbps. This
standard is for gigabit Ethernet over four pairs of Category 5 unshielded
twisted-pair (UTP) cable.
Repeaters
Repeaters are devices that amplify and regenerate the data signal, bit by
bit, to extend the distance of the transmission. A repeater does not read or
interpret the data.
Hubs
Shared hubs are the central devices of a star topology network. The hubs
connect all the hosts in a twisted-pair Ethernet installation. Hubs are
typically used in small LANs in which network performance is not
critical. Collisions commonly occur on a network implementing hubs
because the collision domain consists of all systems connected to the hub.
Bridges
A bridge is a network-layer device that reads and interprets addresses for
filtering or forwarding packets. Bridges connect two or more network
segments. Collisions commonly occur on a bridged network because the
collision domains often consist of more than one system.
Switches
Switches are multiport devices that control the logical dynamic
connection and disconnection between any two cable segments. Switches
are high-bandwidth devices because multiple data paths can be
established and used simultaneously.
Figure 2-9 shows how you can use an Ethernet switch to interconnect
shared hubs. Interconnecting the hubs increases intranet transfer rates
greatly and makes connections more economical. Because connecting
multiple subnets to an intranet using a switch requires no protocol
changes, the cost of a speed increase is minimized.
Hub
Hub
10BASE-T 10BASE-T
Ethernet Switch
10BASE-T
Hub
100BASE-T
10BASE-T 10BASE-T
Hub
Hub
Preparation
Refer to the lecture notes as necessary to perform the tasks listed.
Tasks
To test your knowledge about common LAN terminology, answer the
following questions:
1. Match the terms to their definition.
Exercise Summary
Exercise Solutions
Solutions to the exercise are as follows:
1. Match the terms to their definition.
Objectives
This module describes Ethernet’s Carrier Sense Multiple Access/Collision
Detect (CSMA/CD) access method. This module also describes the
Ethernet frame, including addresses, frame fields, encapsulation,
maximum transmission units (MTUs), and errors. In addition, this
module describes network utilities that assist in configuring and
troubleshooting the system’s network interfaces.
The course map in Figure 3-1 shows how this module fits into the current
instructional goal.
3-1
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
Introducing Ethernet Concepts
Figure 3-2 shows how CSMA/CD accesses the network. The figure
represents the CSMA/CD developed for the original Ethernet topology.
Ethernet originally consisted of a single-wire, bidirectional backbone. The
theory of operation is still the same today, but Ethernet topologies use
more advanced components that permit a higher transmission rate.
Access a message.
Carrier Is there
Yes
network?
No
a message.
Detect a collision?
Yes
Success.
Send the
jam signal.
exponentially.
Ethernet Statistics
The netstat command provides statistics on network-related
information, such as the collision rate. In a shared-media topology,
collisions occur frequently. The more transmitting nodes there are on a
network, the greater the likelihood that collisions occur because of an
increase in network traffic. The collision rate increases exponentially until
there is almost no throughput of data.
Collision Rates
For example, assume that the netstat command reports 12 collisions and
1302 output packets. Calculate the collision rate as follows:
In general:
● Collision rates higher than 5 percent on a 10-Mbps Ethernet network,
and 10 percent on a 100-Mbps Ethernet network, are the first
indication of network overload.
● Faulty network cabling frequently causes collisions through electrical
problems. Technical experts use special electronic equipment to
detect the elements that cause a collision and to provide a solution.
● Switches minimize collisions by limiting the collision domain to one
system.
Ethernet Addresses
An Ethernet address is the device’s unique hardware address. An
Ethernet address is sometimes referred to as a media access control
(MAC) address. An Ethernet address is 48 bits long and is displayed as
12 hexadecimal digits (six groups of two digits) separated by colons. An
example of an Ethernet address is 08:00:20:1e:56:7d.
● The IEEE administers unique Ethernet addresses. IEEE designates
the first three octets as vendor-specific. Sun has various Ethernet
prefixes, which include 08:00:20, 00:00:be, and 00:03:ba. Sun
assigns the last three octets to the products it manufactures to ensure
that each node on an Ethernet network has a unique Ethernet
address.
The list of vendor specific Ethernet addresses can be found at:
http://standards.ieee.org/regauth/oui/oui.txt
● The IEEE specification enables the vendor to decide whether to use
the host-based addressing approach or the port-based addressing
approach. By default, Sun uses host-based addressing on its
networks interface cards (NICs).
The network interface drivers in Sun systems obtain the Ethernet
address for the Ethernet interface from a system’s hardware. For
example, desktop systems use the address in the nonvolatile random
access memory (NVRAM) chip, while some large server systems
obtain their address from a special board installed in the system. By
default, all interface addresses on a system use just one Ethernet
address, either the NVRAM or the special board, even though each
Ethernet interface controller has a built-in Ethernet address.
For systems configured to have more than one interface on the same
physical subnet, you need a unique Ethernet address that is different from
the primary host-based assigned Ethernet address.
Unicast Addresses
Broadcast Addresses
Multicast Addresses
You can also use the ifconfig ether command to configure port-based
addressing. This might be necessary if the interface card cannot supply its
own unique Ethernet address. You can change the interface Ethernet
address of 8:0:20:b9:72:23 from an Ethernet address assigned globally
to an address of 0a:0:20:f0:ac:61 assigned locally by changing the
seventh bit to 1, and assigning a local unique number to the last three
bytes.
This change of Ethernet address is effective until you reboot the system.
To make the change persistent across reboots, modify the
/etc/hostname.interface file.
Oc
tet
Loc
atio
n:
1-6
7-1
2
13-
Pre 14
am
ble
64 D ad 15-
151
Bits
dr 4 (M
48 B S ad a xim
its dr um
)
48 Las
Bits Typ t 4
e Oc
16 tets
Bits
(Ma Da
xim ta
um
150
0 Byt
es) CR
C
32
Bits
Note – There are two common Ethernet frame formats: the Ethernet-II
format and the logical link control (802.3) format. The primary difference
between these formats is that in the Ethernet-II format, the fourth field is
a type field, while in the 802.3 format, the fourth field is a frame length
field. In the TCP/IP environments, typically the Ethernet-II frame format
is used.
Field Description
Figure 3-4 shows how application data is broken down according to the
maximum frame size across the LAN.
Application
Layer Application Data
Transport
Layer Transport Datagram
Internet
Layer Internet Datagram
Network
Interface 1500-byte Payload
Layer
Hardware Layer
Error Definition
Runts Packets that are less than 64 bytes, including the header, are
too short and are discarded. Runts are usually caused by
collisions. These can be formed by poor wiring and
electrical interference.
Jabbers Frames that are greater than 1518 bytes, including the
header, are too long and are discarded. These indicate that a
device has electrical problems.
Long A frame that is between 1518 bytes and 6000 bytes in length,
including the header, is too long. These are often caused by
faulty hardware or software on the sending system.
Giant A frame that is more than 6000 bytes long, including the
header, is too long. These are often caused by faulty
hardware or software on the sending system.
Bad CRC If the received packet fails the CRC, the packet is corrupted
and discarded. This is also known as a frame check sequence
(FCS) error.
To filter out specific protocols or portions of the network trace, pipe the
output from the snoop -i command through the egrep command.
To display the current usage of the Ethernet interfaces, use the netstat
command with the -i option:
# netstat -i
Name Mtu Net/Dest Address Ipkts Ierrs Opkts Oerrs Collis Queue
lo0 8232 loopback localhost 83505 0 83505 0 0 0
hme0 1500 sys11 sys11 21775 0 53541 0 0 0
#
Table 3-3 shows the descriptions of the output fields from the netstat
command.
Field Description
To list the parameters for the hme driver, perform the command:
# ndd /dev/hme \?
? (read only)
transceiver_inuse (read only)
link_status (read only)
link_speed (read only)
link_mode (read only)
ipg1 (read and write)
...
...
...
instance (read and write)
lance_mode (read and write)
ipg0 (read and write)
#
You can adjust most parameters accessible through the ndd command
without rebooting the system.
The following example shows how to use the ndd command to examine
the value of the link_speed parameter for the hme0 interface. Because
multiple hme interfaces might exist, use the ndd command to set the
instance parameter first. The instance parameter determines which
hme interface is addressed by subsequent ndd commands.
To view the current link speed of the hme0 interface, type the command:
# ndd /dev/hme link_speed
1
#
You can set device driver parameters in two ways: by using the ndd
command or by creating a Service Management Facility (SMF) service.
● Use the ndd command to set parameters that are valid until you
reboot the system. A good way to test parameter settings is by using
the ndd command on the command line.
● You can also create an SMF service.
Preparation
Refer to the lecture notes as necessary to perform the tasks listed.
Tasks
Perform the following steps:
1. Match the terms to their definition.
Now you use different options of the snoop utility to provide different
amounts of output.
6. Stop the snoop utility that is currently running, and restart the snoop
utility in verbose mode. Capture only broadcast frames.
Write the command that you use:
_____________________________________________________________
7. In the terminal window logged in to the remote host, execute the rup
command again. Observe the format of the output from the snoop
utility running in verbose mode.
8. Stop the snoop utility, and execute the snoop utility in verbose
summary mode, capturing only broadcast frames.
Write the command that you use:
_____________________________________________________________
9. In the terminal window that is logged in to the remote host, execute
the rup command again. How do the two formats differ?
_____________________________________________________________
_____________________________________________________________
_____________________________________________________________
_____________________________________________________________
_____________________________________________________________
_____________________________________________________________
_____________________________________________________________
10. Log off of the remote host, and quit all instances of the snoop utility
that you are running.
Note – While you might not understand everything that you see in this
section of the exercise, you should at least become familiar with the
command syntax, options, and output format of the ndd command. The
results of the exercise vary, depending on the type of network interface in
the system.
Exercise Summary
Exercise Solutions
Solutions to the exercise are as follows:
1. Match the terms to their definition.
Now you use different options of the snoop utility to provide different
amounts of output.
6. Stop the snoop utility that is currently running, and restart the snoop
utility in the verbose mode. Capture only the broadcast frames.
# snoop -v broadcast
7. In the terminal window logged in to the remote host, execute the rup
command again. Observe the format of the output from the snoop
utility running in the verbose mode.
8. Stop the snoop utility, and execute the snoop utility in verbose
summary mode, capturing only broadcast frames.
# snoop -V broadcast
Note – While you might not understand everything that you see in this
section of the exercise, you should at least become familiar with the
command syntax, options, and output format of the ndd command. The
results of the exercise vary, depending on the type of network interface in
the system.
13. What command do you use to make the ndd command set your
system’s link_status parameter to 0?
# ndd -set /dev/hme link_status 0
14. Use the ndd command to determine the read and write attributes of
ndd parameters for your interface driver. For example, if your
system’s interface is an hme0 interface, use /dev/hme as the
parameter.
# ndd /dev/device_of_interest \?
Do you expect your command from Step 13 to work if you entered it
at the command line as the root user? Why?
The command would fail because the link_status parameter is read only.
Objectives
This module describes the Address Resolution Protocol (ARP) and the
Reverse Address Resolution Protocol (RARP). Additionally, this module
describes the ARP table, the in.rarpd RARP daemon, and the
/etc/inet/hosts and /etc/ethers databases.
The course map in Figure 4-1 shows how this module fits into the current
instructional goal.
4-1
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
Introducing ARP
Introducing ARP
ARP is the method used to map a 32-bit IP address to a 48-bit Ethernet
address.
Purpose of ARP
The ARP function occurs between the Internet and Network Interface
layers of the TCP/IP model. Figure 4-2 shows the location of the ARP
function in the model.
TCP/IP Layers
Application Layer
Transport Layer
Internet Layer
ARP
Network Interface Layer
Hardware Layer
When two systems need to communicate, they need each other’s Ethernet
addresses. ARP supplies the destination Ethernet address information if
the sending system does not already know the destination address.
Operation of ARP
If the final destination (receiving system) of the message being sent is on
the same LAN as the sending system, only one address resolution is
required. If the final destination is on a different network, an address
resolution might be required on each network that the message traverses
on the path to its final destination.
192.168.1.3 is 8:00:20:c0:78:73
2
For example, assume that the sys11 system must communicate with the
sys13 system:
1. The sys11 system sends an ARP request to the local network by
using the Ethernet broadcast address (ff:ff:ff:ff:ff:ff). The
ARP request includes the IP address of the sys13 system.
2. The broadcast is seen by the sys12 and sys13 systems.
3. The sys12 and sys13 systems recognize that the ARP request
contains the IP address and the Ethernet address of the sys11
system, and add this information to their ARP tables if it is not
already present. This type of entry is known as an unsolicited entry
because the information was not explicitly requested.
4. The sys13 system identifies its own IP address in the ARP request
and sends an ARP reply to the sys11 system. The ARP reply
includes the Ethernet address of the sys13 system, and it is sent
using the unicast Ethernet address of the sys11 system
(8:0:20:b9:72:23).
5. The sys11 system receives the ARP reply and stores the information
about sys13 in its ARP table. This type of entry is a solicited entry
because the sys11 system requested the information.
ARP Table
ARP responses are stored in the ARP table so that the information is
available if it is required again in the near future. The ARP table, held in
memory, stores IP addresses and Ethernet addresses. This table is read
each time a destination Ethernet address is required to prepare an
Ethernet frame for transmission. If an Ethernet address does not appear in
the ARP table, an ARP request is sent to the local network. Other hosts
that see the ARP request also update their ARP table with the IP and
Ethernet addresses of the requesting host.
Solicited entries are those for which an Ethernet address was asked
specifically by a host, whereas unsolicited entries are a result of storing
information learned about a host that was performing an ARP request on
the local network.
The arp command displays and controls the ARP table entries that map
IP addresses to Ethernet addresses. Complete entries map an IP address to
an Ethernet address. Incomplete entries contain an IP address only.
For example, to examine all entries in the ARP table type the command:
# arp -a
Net to Media Table: IPv4
Device IP Address Mask Flags Phys Addr
------ -------------------- --------------- ----- ---------------
hme0 sys13 255.255.255.255 08:00:20:c0:78:73
hme0 sys11 255.255.255.255 SP 08:00:20:b9:72:23
hme0 224.0.0.0 240.0.0.0 SM 01:00:5e:00:00:00
#
The fields displayed in the output from the arp -a command are shown
in Table 4-1.
Field Description
Device The network device (network interface) for this entry. This
is the interface connected to the network on which this
system resides.
IP The IP address or host name of the system to which this
Address entry applies.
Mask The host mask value applied. This indicates whether the
entry refers to a host or the multicast address range.
Flags The status of the ARP entry:
● S is a static entry. Static entries do not time out.
● P is a published entry. A system can be configured to
publish (advertise) an ARP entry on behalf of
systems that cannot respond to ARP requests.
● M is a mapped entry. This is used for the 224.0.0.0
multicast entry only.
● U is an unresolved or incomplete entry.
Phys Addr The physical address for the entry, also known as the MAC
or the Ethernet address.
To add a static (until reboot) ARP table entry, type the command:
# arp -s hostname ethernet_address
The preceding command overrides the default time-to-live (TTL) value for
ARP table entries by creating a static entry. For example, to add a host’s
Ethernet address manually to the ARP table, type the command:
# arp -s 192.168.1.99 1:2:3:4:5:6
Use the arp and grep commands to search for the new table entry:
# arp -a | grep 99
hme0 192.168.1.99 255.255.255.255 S 01:02:03:04:05:06
#
Use a published ARP entry when you want a host to answer an ARP
request on behalf of another host. This is a useful option for
heterogeneous environments and for some SLIP or PPP configurations in
which some hosts cannot respond to ARP requests for themselves.
For example, to remove the static entry that was added, type the
command:
# arp -d 192.168.1.99
192.168.1.99 (192.168.1.99) deleted
#
To view the network traffic generated by an ARP request, use the snoop
utility:
# snoop -v -d hme0 arp
In a second window, use the ping utility to contact another system on the
network that is not listed currently in the system’s ARP table:
# ping sys12
sys12 is alive
#
<Control>-C#
Introducing RARP
RARP is the method used to map a 48-bit Ethernet address to a 32-bit IP
address.
Purpose of RARP
RARP is one of the protocols that a system can use when it needs to
determine its IP address.
Operation of RARP
A system sends a RARP request to the Ethernet broadcast address when
the system is booting and does not have any way to determine what its IP
address will be without requesting the information over the network. Any
system on the subnet running the RARP server daemon (in.rarpd), and
that also has appropriately configured files or network naming service
information, responds with the booting system’s IP address.
<Control>-C#
The RARP reply is reported as a REVARP reply by the snoop utility. For
example:
# snoop -v -d hme0 rarp
Using device /dev/hme (promiscuous mode)
ETHER: ----- Ether Header -----
ETHER:
ETHER: Packet 1 arrived at 12:52:19.00053
ETHER: Packet size = 42 bytes
ETHER: Destination = 8:0:20:90:b5:c7, Sun
ETHER: Source = 8:0:20:b9:72:23, Sun
ETHER: Ethertype = 8035 (RARP)
ETHER:
ARP: ----- ARP/RARP Frame -----
ARP:
ARP: Hardware type = 1
ARP: Protocol type = 0800 (IP)
ARP: Length of hardware address = 6 bytes
ARP: Length of protocol address = 4 bytes
ARP: Opcode 4 (REVARP Reply)
ARP: Sender’s hardware address = 8:0:20:b9:72:23
ARP: Sender’s protocol address = 192.168.1.1, sys11
ARP: Target hardware address = 8:0:20:90:b5:c7
ARP: Target protocol address = 192.168.1.2, sys12
ARP:
<Control>-C#
The in.rarpd RARP daemon must be running (as the root user) on
systems that provide RARP responses to requests. The
svc:/network/rarp SMF service enables the in.rarpd RARP daemon.
Note – Before the Solaris 10 OS, the in.rarpd RARP daemon was started
by the /etc/rc3.d/S16boot.server start script if either the /tftpboot
directory or the /rplboot directory existed. Before the Solaris 9 OS, the
in.rarpd RARP daemon was started by the /etc/rc3.d/
S15nfs.server start script.
Preparation
Refer to the lecture notes as necessary to perform the tasks listed.
Be sure to write, in the space provided, any commands that you use
during the exercise so that you can use this exercise as a reference after
you have completed this course.
Work with other students to make sure that you all can see the expected
results in the next part of this exercise.
Tasks
Perform the following steps:
1. In a terminal window, display the current contents of the ARP table
on your host.
_____________________________________________________________
Explain why the table contents contain the entries reported by the
arp command.
_____________________________________________________________
_____________________________________________________________
To communicate with another host, the system must first learn the
Ethernet address of that host.
2. Issue the ping command to a host in your local network that is not
currently in your ARP table.
_____________________________________________________________
3. Examine the ARP table again. Observe the new ARP entry for the
host with which your system just communicated.
_____________________________________________________________
4. Use the arp command to delete all host entries except for the
multicast entry (224.0.0.x) and your host’s own entries.
_____________________________________________________________
5. In another window, start the snoop utility in verbose summary mode
to filter out all but the broadcast frames.
_____________________________________________________________
6. Open a terminal on your local host, and check the contents of your
ARP table for another host in your subnet that is not currently listed.
____________________________________________________________
7. Use the ping command to communicate with a host that is not in
your system’s ARP table.
____________________________________________________________
8. Examine the output from the snoop utility.
Why did you receive this result?
____________________________________________________________
____________________________________________________________
Exercise Summary
Exercise Solutions
Solutions to the exercise are as follows:
1. In a terminal window, display the current contents of the ARP table
on your host.
# arp -a
Net to Media Table: IPv4
Device IP Address Mask Flags Phys Addr
------ -------------------- --------------- ----- ---------------
hme0 sys13 255.255.255.255 08:00:20:c0:78:73
hme0 sys11 255.255.255.255 SP 08:00:20:b9:72:23
hme0 224.0.0.0 240.0.0.0 SM 01:00:5e:00:00:00
#
Explain why the table contents contain the entries reported by the
arp command.
If the system has previously contacted another system on the LAN, an entry
is present. Locally configured interfaces have their own static, published
entries and multicast entries by default. Unsolicited entries generated by
ARP requests from other hosts might also be present.
To communicate with another host, the system must first learn the
Ethernet address of that host.
2. Issue the ping command to a host in your local network that is not
currently in your ARP table.
# ping sys12
sys12 is alive
#
3. Examine the ARP table again. Observe the new ARP entry for the
host with which your system just communicated.
# arp -a
Net to Media Table: IPv4
Device IP Address Mask Flags Phys Addr
------ -------------------- --------------- ----- ---------------
hme0 sys13 255.255.255.255 08:00:20:c0:78:73
hme0 sys12 255.255.255.255 08:00:20:90:b5:c7
hme0 sys11 255.255.255.255 SP 08:00:20:b9:72:23
hme0 224.0.0.0 240.0.0.0 SM 01:00:5e:00:00:00
#
4. Use the arp command to delete all host entries except for the
multicast entry (224.0.0.x) and your host’s own entries.
# arp -d sys12
sys12 (192.168.1.2) deleted
# arp -d sys13
sys13 (192.168.1.3) deleted
#
5. In another window, start the snoop utility in verbose summary mode
to filter out all but the broadcast frames.
# snoop -V broadcast
Using device /dev/hme (promiscuous mode)
6. Open a terminal on your local host, and check the contents of your
ARP table for another host in your subnet that is not currently listed.
# arp -a
Configuring IP
Objectives
This module describes the features of IP, including the purpose of IP, the
IP datagram, and IP address types. This module also describes subnetting
and the variable length subnet mask (VLSM). Additionally, this module
explains the purpose of interface configuration files and describes how to
configure logical interfaces.
5-1
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
Objectives
The course map in Figure 5-1 shows how this module fits into the current
instructional goal.
Configuring IP
Configuring Network Configuring
IP Routing
Multipathing
Describing
Configuring the Transport
IPv6
Layer
Purpose of IP
IP is provided by a loadable kernel module and has two main functions.
IP provides:
● Connectionless delivery of datagrams on the network
● Fragmentation and reassembly of data to accommodate data links
that implement different sizes of MTUs
Application data must fit in the data portion of an Ethernet frame. The
upper limit on the amount of data in the Ethernet frame is defined by the
MTU of the Network Interface layer. If the amount of application data is
larger than the MTU, fragments are created as units of data that are
broken into smaller units for transmission. Internet Protocol version 4
(IPv4) specifies that fragmentation occur at each router, based on the MTU
of the interface through which the IP datagrams must pass.
Configuring IP 5-3
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
Introducing the Internet Layer Protocols
Purpose of ICMP
ICMP enables IP on one system to send control and error messages to IP
on other systems. This communication can include a control message,
such as a routing redirect, or an error message, such as Network is
unreachable. Network administrators and system utilities, such as the
traceroute command, use this error messaging feature as a diagnostic
tool.
ICMP messages are defined in RFC 792. The ICMP header appears after
the IP header and varies depending on the type of ICMP message. For
example, Figure 5-2 shows an ICMP header when the destination is
unreachable.
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
Type Code Checksum
Unused
Figure 5-4 shows an ICMP header for an echo request or echo reply
message.
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
Type Code Checksum
Configuring IP 5-5
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
Introducing the IP Datagram
4 Bits
4 Bits
Versio
4 Bits
n Heade 4 Bits
Lengt r Type
4 Bits
h
Servicof
4 Bits
e 4 Bits
Datag Datag
4 Bits
ram Id ram L
entifie ength
r
Time t Flags
o Live
Fragm
Protoc ent Of
ol fset
Check
sum
Sourc
e IP A
ddres
s
Destin
ation I
P Add
ress
IP Op
tions a
nd Pa
dding
If Req
uired
Field Description
Refer to RFC 791 for detailed information about the header fields.
Configuring IP 5-7
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
Introducing the IP Datagram
IP Datagram Payload
The IP datagram payload can contain any one of the following: a UDP
datagram, a TCP segment, an ICMP message, or an Internet Group
Management Protocol (IGMP) message.
Unicast Addresses
Unicast addresses identify a single interface on a network. Unicast
addresses are used when a system needs to communicate with another
system. There are three classes of unicast addresses: Class A, Class B, and
Class C. The value of the high-order bits (first three bits) determines which
portion of the IPv4 address is the network number and which portion is
the host number. This addressing scheme is called classful IPv4 addressing.
Class A Addresses
Class A addresses are for very large networks and provide 16,777,214 host
addresses. Figure 5-6 shows the beginning of the address in binary format.
If the first bit is 0, that bit and the next seven bits define the network
number, and the remaining 24 bits define the host number. This makes
possible up to 128 Class A networks.
Configuring IP 5-9
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
Introducing IP Address Types
Class B Addresses
Class B addresses are for large networks and provide 65,534 host
addresses. Figure 5-7 shows the beginning of the address in binary format.
10
If the first two bits are 10, those two bits and the next 14 bits define the
network number, and the remaining 16 bits define the host number. This
makes possible 16,384 Class B networks. The IANA has reserved the
Class B networks 172.16.0.0–172.31.255.255 for private networks.
These addresses are not routed in the Internet. Refer to RFC 1918 for
additional details.
Class C Addresses
110
If the first three bits are 110, those three and the next 21 bits define the
network number, and the remaining eight bits define the host number.
This makes possible up to 2,097,152 Class C networks. The IANA has
reserved the Class C networks 192.168.0.0–192.168.255.255 for
private networks. These addresses are not routed in the Internet. Refer to
RFC 1918 for additional details.
Broadcast Addresses
A broadcast address is the address that reaches all systems on a particular
network. A broadcast means that data is sent to all of the hosts on the
LAN. In the Solaris 10 OS, the default broadcast address is an address that
has a host number of all ones when represented in binary. An example of
a broadcast address is 192.168.1.255. You use the ifconfig command
to configure an interface’s broadcast address.
Multicast Addresses
Multicasting is a very efficient way to send large amounts of data to many
systems at the same time. A multicast address identifies interfaces that
belong to a specific multicast group. Packets that are sent to a multicast
address are received by all interfaces that are associated with the multicast
address. Figure 5-9 shows the beginning of a multicast address in binary
format.
1110
Example: 224.0.1.8
If the first four bits are 1110, which makes the first field an integer value
between 224 and 239, the address is a multicast address. The remaining
28 bits comprise a group identification number for a specific multicast
group. An IPv4 multicast address is a destination address for one or more
hosts, while a Class A, B, or C address is an address for an individual
host. The IPv4 multicast address maps to an Ethernet multicast address so
that the network interface listens for a multicast traffic. The low-order
23 bits of the IPv4 multicast address are placed into the low-order 23 bits
of the Ethernet multicast address. Therefore, an IPv4 multicast address of
224.0.0.1 maps to 01:00:5e:00:00:01.
Configuring IP 5-11
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
Introducing Subnetting and VLSM
Subnetting
You can divide a network into subnets to do the following:
● Isolate network traffic within local subnets, therefore reducing
contention for network bandwidth
● Secure or limit access to a subnet
● Enable localization of specific network protocols to a subnet
● Permit the association of a subnet with a specific geography or a
department
● Enable administrative work to be broken into logical units
Figure 5-10 shows the basic idea of subnetting, which is to divide the
standard host number field into two parts: the subnet number and the
host number on that subnet.
Two-level Hierarchy
Three-level Hierarchy
Netmasks
An IP address contains both the network on which the Solaris OS is
located and the host number on the network assigned to that system. In a
subnet environment, you need to be able to determine how much of the IP
address represents the network and how much of the IP address
represents the host number. The netmask is the mechanism by which this is
determined.
A netmask which has the first twenty bits set to 1 and the last twelve bits
set to 0 is written:
255.255.240.0
There are standard netmasks for the three classes of unicast address. The
netmask for a Class A network is 255.0.0.0. The netmask for a Class B
network is 255.255.0.0. The netmask for a Class C network is
255.255.255.0.
Configuring IP 5-13
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
Introducing Subnetting and VLSM
If you choose to divide this single network into, for example, eight smaller
networks, you can do so by changing the netmask. To do this, you first
need to know what power of 2 the number 8 is. (Netmasks always create
a total number of networks that is a power of 2.) The power of 2 value
determines how many extra 1s are required in the netmask.
The additional 1s are placed in the netmask next to the existing 1s to give:
11111111 11111111 11100000 00000000
This netmask creates eight new, smaller networks, each with 8190 hosts.
The network numbers and broadcast addresses of the eight new networks
are listed in Table 5-2.
172.16.0.0 172.16.31.255
172.16.32.0 172.16.63.255
172.16.64.0 172.16.95.255
172.16.96.0 172.16.127.255
172.168.128.0 172.16.159.255
172.168.160.0 172.16.191.255
172.168.192.0 172.16.223.255
172.168.224.0 172.16.255.255
Contiguous Netmasks
Noncontiguous Netmasks
Although RFC 950 recommends the use of contiguous subnet masks only,
nothing prevents the use of noncontiguous subnet masks. For example:
11111111 11111111 11111111 01001010
Configuring IP 5-15
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
Introducing Subnetting and VLSM
For example:
# ifconfig -a
lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
hme0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 192.168.1.1 netmask ffffff00 broadcast 192.168.1.255
ether 8:0:20:b9:72:23
# ifconfig hme0 down
# ifconfig hme0 netmask 255.255.240.0
# ifconfig hme0 up
# ifconfig -a
lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
hme0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 192.168.1.1 netmask fffff000 broadcast 192.168.1.255
ether 8:0:20:b9:72:23
#
Note – Before the Solaris 10 OS, the network interfaces were configured at
boot time during the execution of the /etc/rcS.d/S30network.sh in
the Solaris 9 OS while earlier releases were configured as part of the
S30rootusr.sh script.
Configuring IP 5-17
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
Introducing Subnetting and VLSM
For example:
# cat /etc/inet/netmasks
#
# The netmasks file associates Internet Protocol (IP) address
# masks with IP network numbers.
#
# network-number netmask
#
# The term network-number refers to a number obtained from the Internet
Network
# Information Center.
#
# Both the network-number and the netmasks are specified in
# "decimal dot" notation, e.g:
#
# 128.32.0.0 255.255.255.0
#
192.168.1.0 255.255.255.0
#
The netmask value in the netmask file can be specified when configuring
the network interface by using the + (plus) argument with the netmask
argument:
# ifconfig -a
lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
hme0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 192.168.1.1 netmask fffff000 broadcast 192.168.15.255
ether 8:0:20:b9:72:23
# ifconfig hme0 down
# ifconfig hme0 netmask + broadcast +
# ifconfig hme0 up
# ifconfig -a
lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
hme0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 192.168.1.1 netmask ffffff00 broadcast 192.168.1.255
ether 8:0:20:b9:72:23
#
Configuring IP 5-19
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
Introducing Subnetting and VLSM
VLSM
RFC 950 specifies how an IP network could use subnet masks. When an IP
network is assigned more than one subnet mask, it is considered a
network with VLSMs because the extended-network numbers have
different lengths at each subnet level.
Two of the main advantages to assign more than one subnet mask to a
given IP network number are:
● Multiple subnet masks permit more efficient use of an organization’s
assigned IP address space.
● Multiple subnet masks permit route aggregation, which can
significantly reduce the amount of routing information at the
backbone level within an organization’s routing domain.
Note – VLSM subnet masks’ syntax has been recognized since the
Solaris 2.6 OS.
12.3.1.0
12.3.2.0
12.1.0.0 12.3.3.0
12.2.0.0 .
12.3.0.0 . 12.3.254.0
. . 12.3.254.32
12.0.0.0 . 12.3.252.0 12.3.254.64
. 12.3.253.0 .
12.252.0.0 12.3.254.0 .
12.253.0.0 .
12.254.0.0 12.3.254.192
12.3.254.224
One of the major problems with supporting only a single subnet mask
across a given network number is that once the mask is selected, it locks
the organization into a fixed number of fixed-sized subnets. For example,
a Class B subnet that is masked with 255.255.252.0 yields additional
subnet and host addresses.
Figure 5-12 shows the breakdown of the number of networks and the
number of hosts as a result of a fixed subnet mask being applied to the
address.
11111111 11111111 11111100 00000000
64 Subnets
Configuring IP 5-21
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
Introducing the Interface Configuration Files
In this example, the IPv4 address 127.0.0.1 is the loopback address, the
reserved network address that supports interprocess communication by
permitting the local system to send packets to itself. Every system on a
TCP/IP network must use the IP address 127.0.0.1 for the local host.
Configuring IP 5-23
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
Administering Logical Interfaces
To view the number of logical addresses that can be configured, type the
command:
# ndd /dev/ip ip_addrs_per_if
256
#
This represents the physical interface and a further 255 logical interfaces.
The ndd command can be used to change this value up to a maximum of
8192.
For example:
hme0
qfe3
For example:
hme0:1
qfe3:1
Figure 5-13 shows how a system with one interface can appear as two
different systems.
Configuring IP 5-25
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
Administering Logical Interfaces
To view the changes made to the interface, use the ifconfig command:
# ifconfig -a
lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
hme0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 192.168.1.1 netmask ffffff00 broadcast 192.168.1.255
ether 8:0:20:b9:72:23
hme0:1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 192.169.1.1 netmask ffffff00 broadcast 192.169.1.255
#
It can be tedious to increment the logical interface number each time you
add logical interfaces. The ifconfig command includes the addif
option, which causes the command to use the next available logical
interface.
To view the changes made to the interface, use the ifconfig command:
# ifconfig -a
lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
hme0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 192.168.1.1 netmask ffffff00 broadcast 192.168.1.255
ether 8:0:20:b9:72:23
hme0:1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 192.168.55.1 netmask ffffff00 broadcast 192.168.55.255
#
Configuring IP 5-27
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
Administering Logical Interfaces
When you know the logical interface’s IP address, but you do not know to
which logical interface the address is assigned, use the ifconfig
command with the removeif option. For example;
# ifconfig hme0 removeif 192.168.55.1
#
Caution – If you are logged in remotely and are using this interface for
your connection, you will lose your connectivity to the system.
Exercise: Reviewing IP
In this exercise, you define logical interfaces in two ways: by explicitly
naming the logical interface and by using a command to automatically
add the next available logical interface.
Preparation
Refer to the lecture notes as necessary to perform the tasks listed.
Task Summary
In this exercise, you accomplish the following:
● Use the ifconfig command to define and configure a hme0:1
interface on a different network to the hme0 interface.
● Define the RFC 1918-compliant address by replacing the 192.168
part of your system’s address with 172.18/24. The /24 means that
the first 24 bits of the address represent the network address, and the
remaining 8 bits represent the host portion of the address.
● Configure the interface to use a Class C broadcast address. For
example, if your hme0 interface has an address of 192.168.1.2,
configure the hme0:1 interface to have an IP address of 172.18.1.2,
a netmask of 255.255.255.0, and a broadcast address of
172.18.1.255.
Configuring IP 5-29
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
Exercise: Reviewing IP
Tasks
Complete the following steps:
1. Use the ifconfig command to view the system’s interface
configuration before making any changes, so that you can easily
restore your system to its original state if needed.
Write the command that you use:
_____________________________________________________________
2. Use the ifconfig command to configure the hme0:1 interface with
the appropriate IP address and a netmask of 255.255.255.0. For
example, if your IP address begins with 192.168, then change it so
that it begins with 172.18. Use the appropriate command to cause
the interface to function properly.
Write the command that you use:
_____________________________________________________________
3. View the configuration of the interfaces on the system. Notice that
the index for the new logical interface is the same as the physical
interface and that no Ethernet address is listed under the new logical
interface.
Write the command that you use:
_____________________________________________________________
4. Use the ifconfig command with the appropriate option to
configure the next available logical interface with an IP address that
is incremented by 1 in the second octet. For example if you used
172.18.1.2 in the previous step, use 172.19.1.2 for this interface.
Configure a netmask of 255.255.255.0 and a broadcast address of
172.19.1.255. Be sure to use the appropriate command to cause the
interface to function properly.
Write the command that you use:
_____________________________________________________________
5. View the configuration of the interfaces on the system. Notice that
the next sequential logical interface was defined (hme0:2 in this
example). Also notice that the index for the new logical interface is
the same as the physical interface and that no Ethernet address is
listed under the new logical interface.
Write the command that you use:
_____________________________________________________________
Configuring IP 5-31
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
Exercise Summary
Exercise Summary
Exercise Solutions
Solutions to the exercise are as follows:
1. Use the ifconfig command to view the system’s interface
configuration before making any changes, so that you can easily
restore your system to its original state if needed.
# ifconfig -a
lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
hme0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 192.168.1.1 netmask ffffff00 broadcast 192.168.1.255
ether 8:0:20:b9:72:23
#
2. Use the ifconfig command to configure the hme0:1 interface with
the appropriate IP address and a netmask of 255.255.255.0. For
example, if your IP address begins with 192.168, then change it so
that it begins with 172.18. Use the appropriate command to cause
the interface to function properly.
# ifconfig hme0:1 plumb 172.18.1.2 netmask 255.255.255.0 broadcast 172.18.1.255 up
#
3. View the configuration of the interfaces on the system. Notice that
the index for the new logical interface is the same as the physical
interface and that no Ethernet address is listed under the new logical
interface.
# ifconfig -a
lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
hme0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 192.168.1.1 netmask ffffff00 broadcast 192.168.1.255
ether 8:0:20:b9:72:23
hme0:1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 172.18.1.2 netmask ffffff00 broadcast 172.18.1.255
#
Configuring IP 5-33
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
Exercise Solutions
Configuring IP 5-35
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
Module 6
Objectives
This module describes how to configure IP Network Multipathing
(IPMP). This module also describes the limitations of network interfaces,
IPMP requirements, configuration of IPMP on the command line and at
system boot, and troubleshooting.
The course map in Figure 6-1 shows how this module fits into the current
instructional goal.
Configuring the Network
Configuring IP
Configuring Configuring
Network
IP Routing
Multipathing
Describing
Configuring the Transport
IPv6 Layer
6-1
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
Increasing Network Availability
Figure 6-2 shows how a system can have multiple interfaces on the same
LAN.
qfe0
qfe1
qfe2
qfe3
Server
Client
Introducing IPMP
IPMP enables the Solaris 10 OS to recover from network path failures.
IPMP also provides increased throughput by spreading the outbound
load across interfaces when multiple network adapters are connected to
the same IP network, such as to the same Ethernet switch.
There are two methods for configuring IPMP: probe-based and link-based.
Probe-based IPMP utilizes test addresses to monitor the health of
interfaces. Link-based IPMP does not utilize test addresses. Instead, the
interface kernel driver performs this function.
To detect the failure or repair of interfaces that belong to the IPMP group,
the in.mpathd daemon sends ICMP echo requests from the test addresses
on the IPMP interfaces to targets connected to the local network. The
in.mpathd daemon determines which targets to probe dynamically. If five
consecutive probes do not receive replies, the interface is considered
failed. Adjust the failure detection time by editing the
FAILURE_DETECTION_TIME variable from the default value of 10,000
milliseconds (10 seconds) in the /etc/default/mpathd file.
When responses to the ICMP echo requests are not received and a specific
time period has elapsed, the physical interface is considered failed. The IP
address that is associated with the failed address is moved to a new
logical interface associated with another physical interface in the same
IPMP group. Communications that were taking place continue to function
as though the original interface is still working properly.
ICMP echo requests are still attempted through the failed NIC to detect if
a physical interface is repaired.
If all the NICs or targets appear to fail at the same time, this is a group
failure, and no fail over is performed. The in.mpathd daemon flushes all
of the current targets and attempts to discover new targets. You cannot
configure the targets because the in.mpathd daemon determines
dynamically which targets to probe. Default routers connected to the link
are chosen as targets for probing. If no routers exist on the link, arbitrary
hosts on the link are chosen by sending a multicast packet to the all hosts
multicast address. When you configure IPMP, be sure to have at least one
additional system on the network that can act as a target.
The data address for the hme0 interface remains as 192.168.1.1, and the
data address for the qfe1 interface is 192.168.1.21.
You must know the state of the system if you need to restore it. Before
making any changes to the system, view the system’s interface
configuration by executing the command:
# ifconfig -a
lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
hme0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 192.168.1.1 netmask ffffff00 broadcast 192.168.1.255
ether 8:0:20:b9:72:23
#
The preceding output indicates that the system is still in its default mode
and uses the same MAC address for every interface. This is indicated by
the setting of the local-mac-address? variable to false. Use the eeprom
command to change the local-mac-address? variable to true:
# eeprom "local-mac-address?=true"
#
Add the data and test IP addresses to the /etc/inet/hosts file for the
sake of clarity. After editing the /etc/inet/hosts file, use the cat
command to view the new information:
# cat /etc/inet/hosts
#
# Internet host table
127.0.0.1 localhost
192.168.1.1 sys11 loghost # Data address for hme0
# Modifications made for IPMP
192.168.1.21 sys11-data-qfe1 # Data address for qfe1
192.168.1.51 sys11-test-hme0 # Test address for hme0
192.168.1.71 sys11-test-qfe1 # Test address for qfe1
#
Entry Purpose
You should ensure that all of the interfaces that are part of the IPMP
configuration have cables connecting them to the same IP link.
Note – In versions of the Solaris OS before the Solaris 10 OS, at this point
in the procedure, you had to disable the automatic configuration of the
system as a router. For example, if your host does not act as a router
currently, rebooting it with two interfaces configured causes it to be
configured as a router after the reboot. For a system that runs IPMP and is
connected to a single IP link, this is undesirable. To prevent this, type the
command touch /etc/notrouter.
To view the configuration of the interfaces when the system is booted, use
the ifconfig command:
# ifconfig -a
lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
hme0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 192.168.1.1 netmask ffffff00 broadcast 192.168.1.255
groupname mpgrp-one
ether 8:0:20:b9:72:23
hme0:1: flags=9040843<UP,BROADCAST,RUNNING,MULTICAST,DEPRECATED,IPv4,NOFAILOVER>
mtu 1500 index 2
inet 192.168.1.51 netmask ffffff00 broadcast 192.168.1.255
qfe1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
inet 192.168.1.21 netmask ffffff00 broadcast 192.168.1.255
groupname mpgrp-one
ether 8:0:20:ac:9b:21
qfe1:1: flags=9040843<UP,BROADCAST,RUNNING,MULTICAST,DEPRECATED,IPv4,NOFAILOVER>
mtu 1500 index 3
inet 192.168.1.71 netmask ffffff00 broadcast 192.168.1.255
#
The data address for the hme0 interface remains 192.168.1.1, and the
data address for the qfe1 interface is 192.168.1.21.
You must know what state the system is in if you need to restore it. Before
making any changes to the system, view the system’s interface
configuration by typing the command:
# ifconfig -a
lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232
index 1
inet 127.0.0.1 netmask ff000000
hme0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 192.168.1.1 netmask ffffff00 broadcast 192.168.1.255
ether 8:0:20:b9:72:23
#
The preceding output indicates that the system is still in its default mode
and uses the same MAC address for each interface. This is indicated by
the setting of the local-mac-address? variable to false. Use the eeprom
command to change the EEPROM’s local-mac-address? variable to
true. Type the command:
# eeprom "local-mac-address?=true"
#
You can add the data and test IP addresses to the /etc/inet/hosts file
for the sake of clarity. After editing the /etc/inet/hosts file, use the cat
command to view the new information:
# cat /etc/inet/hosts
#
# Internet host table
#
127.0.0.1 localhost
192.168.1.1 sys11 loghost # Data address for hme0
# Modifications made for IPMP
192.168.1.21 sys11-data-qfe1 # Data address for qfe1
192.168.1.51 sys11-test-hme0 # Test address for hme0
192.168.1.71 sys11-test-qfe1 # Test address for qfe1
#
Next, you configure a test address for the hme0 interface. You can assign
an alias name to this address by using the /etc/inet/hosts file. Do not
use this address for any purpose other than using it for the in.mpathd
daemon. When you define the address, mark it so that the in.mpathd
daemon recognizes it as a test address that must not fail over (-failover)
and must not be used by the system for any application data transmission
(deprecated). Type the command:
# ifconfig hme0 addif 192.168.1.51 deprecated netmask + \
broadcast + -failover up
Created new logical interface hme0:1
Setting netmask of hme0:1 to 255.255.255.0
#
Now, you configure the qfe1 interface and make it part of the same IPMP
group as the hme0 interface. Type the commands:
# ifconfig qfe1 plumb sys11-data-qfe1 netmask + broadcast +
Setting netmask of qfe1 to 255.255.255.0
# ifconfig qfe1 group mpgrp-one up
Now, you configure a test address for the qfe1 interface. You can alias this
address to a name by using the /etc/inet/hosts file. Do not use this
address for any purpose other than using it for the in.mpathd daemon.
When you define the address, mark it so that the in.mpathd daemon
recognizes it as a test address that must not fail over (-failover) and
must not be used by the system for any application data transmission
(deprecated).
Note – Before the Solaris 10 OS, the in.mpathd daemon was started
during the execution of the /etc/rc2.d/S69inet start script.
The data address for the hme0 interface remains 192.168.1.1, and the
data address for the hme1 interface is 192.168.1.21.
You must know the state of the system if you need to restore it. Before
making any changes to the system, view the system’s interface
configuration by executing the command:
# ifconfig -a
lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
hme0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 192.168.1.1 netmask ffffff00 broadcast 192.168.1.255
ether 8:0:20:b9:72:23
#
The preceding output indicates that the system is still in its default mode
and uses the same MAC address for every interface. This is indicated by
the setting of the local-mac-address? variable to false. Use the eeprom
command to change the local-mac-address? variable to true:
# eeprom "local-mac-address?=true"
#
Add the IP addresses to the /etc/inet/hosts file for the sake of clarity.
After editing the /etc/inet/hosts file, use the cat command to view
the new information:
# cat /etc/inet/hosts
#
# Internet host table
127.0.0.1 localhost
192.168.1.1 sys11 loghost # Data address for hme0
# Modifications made for IPMP
192.168.1.21 sys11-hme1 # Data address for hme1
#
You should ensure that all of the interfaces that are part of the IPMP
configuration have cables connecting them to the same IP link.
To view the configuration of the interfaces when the system is booted, use
the ifconfig command:
# ifconfig -a
lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232
index 1
inet 127.0.0.1 netmask ff000000
hme0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 192.168.1.1 netmask ffffff00 broadcast 192.168.1.255
groupname ipmp_group0
ether 8:0:20:b9:72:23
hme1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
inet 192.168.1.21 netmask ffffff00 broadcast 192.168.1.255
groupname ipmp_group0
ether 8:0:20:ac:9b:21
#
To verify that the IPMP daemon is running, use the following command:
# pgrep -fl mpathd
119 /usr/lib/inet/in.mpathd -a
The message on the console indicates that the failover was successful:
Dec 16 13:24:31 sys11 in.mpathd[119]: Successfully failed over from NIC hme0 to NIC hme1
To view the current status of the network interfaces, use the ifconfig
command:
# ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
hme0: flags=89000842<BROADCAST,RUNNING,MULTICAST,IPv4,NOFAILOVER,OFFLINE> mtu 0 index 2
inet 0.0.0.0 netmask 0
groupname ipmp_group0
ether 8:0:20:b9:72:23
hme1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
inet 192.168.1.21 netmask ffffff00 broadcast 192.168.1.255
groupname ipmp_group0
ether 8:0:20:ac:9b:21
hme1:1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
inet 192.168.1.1 netmask ffffff00 broadcast 192.168.1.255
Notice, that the IP address of the hme0 interface is 0.0.0.0, and a new
logical interface hme1:1 is created on the remaining physical interface
hme1. The new logical interface has the IP address (192.168.1.1) that
was assigned to the physical hme0 interface before it failed.
The message on the console indicates that the failback was successful:
Dec 16 13:41:47 sys11 in.mpathd[119]:Successfully failed back to NIC hme0
To view the current status of the network interfaces, use the ifconfig
command:
# ifconfig -a
lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232
index 1
inet 127.0.0.1 netmask ff000000
hme0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 192.168.1.1 netmask ffffff00 broadcast 192.168.1.255
groupname ipmp_group0
ether 8:0:20:b9:72:23
hme1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
inet 192.168.1.21 netmask ffffff00 broadcast 192.168.1.255
groupname ipmp_group0
ether 8:0:20:ac:9b:21
#
The hme0 interface is reassigned its original IP address, and the hme1:1
logical interface is removed automatically.
With only a single interface in the group, the data address can never move
on to a different interface, and so is always associated with the interface
being monitored. In this configuration, it is not necessary to configure a
separate test address because the system can use the data address for
testing purposes.
To create a singleton IPMP group at system boot, ensure that the interface
configuration file contains the group option and the IPMP group name:
# cat /etc/hostname.hme0
sys11 group singleton up
#
Note – This message appears in the console window and is not seen if you
are using an xterm or dtterm window.
Note – This message appears in the console window and is not seen if you
are using an xterm or dtterm window.
The message indicates that the fail back was successful. To view the status
of the interfaces, use the ifconfig command:
# ifconfig -a
lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
hme0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 192.168.1.1 netmask ffffff00 broadcast 192.168.1.255
groupname mpgrp-one
ether 8:0:20:b9:72:23
hme0:1: flags=9040843<UP,BROADCAST,RUNNING,MULTICAST,DEPRECATED,IPv4,NOFAILOVER> mtu
1500 index 2
inet 192.168.1.51 netmask ffffff00 broadcast 192.168.1.255
qfe1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
inet 192.168.1.21 netmask ffffff00 broadcast 192.168.1.255
groupname mpgrp-one
ether 8:0:20:ac:9b:21
qfe1:1: flags=9040843<UP,BROADCAST,RUNNING,MULTICAST,DEPRECATED,IPv4,NOFAILOVER> mtu
1500 index 3
inet 192.168.1.71 netmask ffffff00 broadcast 192.168.1.255
#
The hme0 interface is reassigned its original IP address, and the qfe1:2
logical interface is removed automatically.
The output indicates that the configuration process is not complete. Recall
that IPMP requires a test address on a logical interface for each physical
interface. To configure a test interface, use the ifconfig command:
# ifconfig hme0 addif 192.168.1.51 deprecated netmask + \
> broadcast + -failover up
Created new logical interface hme0:1
Setting netmask of hme0:1 to 255.255.255.0
#
After defining a test interface with the ifconfig command, the following
message appears:
# Aug 4 13:55:37 sys11 in.mpathd[355]: Test address now configured on
interface hme0; enabling probe-based failure detection on it
The in.mpathd daemon reports that it can now perform failure detection.
Be aware that more than one interface is required to provide effective
failover. To view the interface configuration, use the ifconfig command:
# ifconfig -a
lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
hme0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 192.168.1.1 netmask ffffff00 broadcast 192.168.1.255
groupname mpgrp-one
ether 8:0:20:b9:72:23
hme0:1: flags=9040843<UP,BROADCAST,RUNNING,MULTICAST,DEPRECATED,IPv4,NOFAILOVER> mtu
1500 index 2
inet 192.168.1.51 netmask ffffff00 broadcast 192.168.1.255
#
Preparation
Refer to the lecture notes as necessary to perform the tasks listed.
At least two interfaces of the same type (for example, Ethernet) are
required for this exercise. Verify that your system meets the minimum
requirements and has enough network cabling before you continue. Work
with another student if your system does not have enough interfaces.
Caution – Remove any interfaces that you configured that are not part of
previous exercises before starting this exercise.
You need the following information when you configure IPMP in this
exercise:
● The IPMP group name – This name is required for each physical
interface that will be part of the IPMP group.
● A data IP address for each physical interface – Users and
applications use this address when accessing the system.
● A logical interface for each physical interface – The in.mpathd
daemon uses this interface to monitor the status of the physical
interface.
● A second physical interface – This interface must be connected with
a network cable.
● An IP address for each logical interface – This is the test address.
Tasks
Complete the following steps:
1. Open a console window to see any messages that might be sent to
the console but perform the other steps in a different (non-console)
window.
2. Verify that your system has a supported version of the Solaris OS.
Write the command that you use:
_________________________________________________
3. Can the system that displayed the preceding output be configured to
support IPMP? Why or why not?
_____________________________________________________________
_____________________________________________________________
_____________________________________________________________
4. View and document your system’s current interface information
with the ifconfig command, so that you can compare the output
after you configure IPMP.
Write the command that you use:
_____________________________________________________________
5. Document the existing interface information. Ignore the loopback
interface that has an index of 1.
Write the interface type for index 2:
_____________________________________________________________
6. Configure your system to use unique MAC addresses.
Write the command that you use:
_____________________________________________________________
7. Reboot your system to enable unique MAC address assignment.
8. Edit your /etc/inet/hosts file, and add entries for the interfaces.
Use comments to help limit confusion.
Write the command that you use:
_____________________________________________________________
_____________________________________________________________
_____________________________________________________________
12. Verify that the new physical interface is connected to the network
before proceeding with the following steps:
a. Configure and plumb the second physical interface. Specify the
appropriate IP address and addresses for broadcast and
netmask. Do not assign it membership in the IPMP group yet or
bring the interface up.
________________________________________________________
b. Assign the newly plumbed interface to the appropriate IPMP
group and bring the interface up.
________________________________________________________
13. Configure a test interface for the physical interface that you just
configured. Be sure to configure the netmask and broadcast
addresses. Deprecate the interface, and configure failover
appropriately. Then, configure the interface so that it is up.
Write the command that you use:
_____________________________________________________________
14. Work with another teammate for this step. Have your teammate:
a. Connect to one of your system’s physical IP addresses over the
network by using the telnet command.
b. Open an edit session by using an editor of your teammate’s
choice in the telnet session.
c. Start typing. While your teammate is typing, either unplug the
network cable to the interface or use the if_mpadm command to
detach one of your system’s IPMP interfaces.
Write the command you need if you used the if_mpadm
command:
________________________________________________________
Notice that your teammate’s work is frozen for a moment and
then continues, even though the interface to which your
teammate is connected is disabled.
d. Repair the interface by reconnecting the network cable or by
using the if_mpadm command.
Write the command that you need if you used the if_mpadm
command:
________________________________________________________
18. To prepare your system for future exercises, complete the following
steps and remove the IPMP configuration:
a. Restore the first hostname.interface file that you saved
earlier and delete the second interface file.
b. Reboot your system.
Exercise Summary
Exercise Solutions
Solutions to the exercise are as follows:
1. Open a console window to see any messages that might be sent to
the console but perform the other steps in a different (non-console)
window.
# dtterm -C &
2. Verify that your system has a supported version of the Solaris OS.
# cat /etc/release
Solaris 10 3/05 s10_74L2a SPARC
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
Use is subject to license terms.
Assembled 22 January 2005
#
3. Can the system that displayed the preceding output be configured to
support IPMP? Why or why not?
Yes. This system can be configured with IPMP because it has a version of
the operating environment that is at a minimum the Solaris 8 10/00 OS.
4. View and document your system’s current interface information
with the ifconfig command, so that you can compare the output
after you configure IPMP.
# ifconfig -a
lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232
index 1
inet 127.0.0.1 netmask ff000000
hme0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 192.168.1.1 netmask ffffff00 broadcast 192.168.1.255
ether 8:0:20:b9:72:23
#
5. Document the existing interface information. Ignore the loopback
interface that has an index of 1.
Write the interface type for index 2:
hme0
6. Configure your system to use unique MAC addresses.
Use the eeprom command.
# eeprom local-mac-address?=true
#
11. Configure a test interface for the physical interface that you just
assigned to an IPMP group. Be sure to set the appropriate netmask
and broadcast addresses. Deprecate the interface, and configure
failover appropriately. Then, configure the interface so that it is up.
# ifconfig hme0 addif 192.168.1.51 deprecated netmask + \
broadcast + -failover up
Created new logical interface hme0:1
#
12. Verify that the new physical interface is connected to the network
before proceeding with the following steps:
a. Configure and plumb the second physical interface. Specify the
appropriate IP address and addresses for broadcast and
netmask. Do not assign it membership in the IPMP group yet or
bring the interface up.
# ifconfig qfe1 plumb 192.168.1.21 netmask 0xffffff00 broadcast +
b. Assign the newly plumbed interface to the appropriate IPMP
group and bring the interface up.
# ifconfig qfe1 group mpgrp-one up
Console message:
in.mpathd[603]: No test address configured on interface qfe1; disabling
probe-based failure detection on it
13. Configure a test interface for the physical interface that you just
configured. Be sure to configure the netmask and broadcast
addresses. Deprecate the interface, and configure failover
appropriately. Then, configure the interface so that it is up.
Write the command that you use:
# ifconfig qfe1 addif 192.168.1.71 deprecated netmask 0xffffff00 \
broadcast + -failover up
Created new logical interface qfe1:1
#
Console message:
in.mpathd[603]: Test address now configured on interface qfe1; enabling
probe-based failure detection on it
14. Work with another teammate for this step. Have your teammate:
a. Connect to one of your system’s physical IP addresses over the
network by using the telnet command.
b. Open an edit session by using an editor of your teammate’s
choice in the telnet session.
c. Start typing. While your teammate is typing, either unplug the
network cable to the interface or use the if_mpadm command to
detach one of your system’s IPMP interfaces.
# if_mpadm -d qfe1
#
Console message:
in.mpathd[603]: Successfully failed over from NIC qfe1 to NIC hme0
Notice that your teammate’s work is frozen for a moment and
then continues, even though the interface to which your
teammate is connected is disabled.
d. Repair the interface by reconnecting the network cable or by
using the if_mpadm command.
# if_mpadm -r qfe1
#
Console message:
in.mpathd[603]: Successfully failed back to NIC qfe1
15. Configure your system so that the interfaces are automatically
configured for IPMP at boot time. Be sure to make copies of your
system’s original configuration files because you will need to restore
your system’s configuration later in this exercise.
a. Copy your system’s interface files for future use:
# cp /etc/hostname.hme0 /etc/_hostname.hme0
b. Edit the /etc/hostname.hme0 file so that it has contents similar to
the following:
sys11 netmask 0xffffff00 broadcast + group mpgrp-one up
addif 192.168.1.51 deprecated netmask 0xffffff00 broadcast + -failover up
c. Create a /etc/hostname.qfe1 file so that it has contents similar to
the following:
sys11-local-qfe1 netmask 0xffffff00 broadcast + group mpgrp-one up
addif 192.168.1.71 deprecated netmask 0xffffff00 broadcast + -failover up
18. To prepare your system for future exercises, complete the following
steps and remove the IPMP configuration:
a. Restore the first hostname.interface file that you saved
earlier and delete the second interface file.
# cp /etc/_hostname.qfe0 /etc/hostname.qfe0
# rm /etc/hostname.qfe1
b. Reboot your system.
# init 6
Configuring Routing
Objectives
This module describes how to configure routing, routing schemes, routing
types, and troubleshooting.
7-1
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
Objectives
The course map in Figure 7-1 shows how this module fits into the current
instructional goal.
Configuring the Network
Configuring IP
Configuring Network Configuring
IP Routing
Multipathing
Describing
Configuring the Transport
IPv6 Layer
Purpose of Routing
Routing is one of the important functions of the Internet layer in the
TCP/IP network model. This function is primarily supported by IP. An IP
router connects two or more networks and forwards IP datagrams
between them. An IP router can forward IP datagrams based on the
information in the IP header and information obtained from its routing
table. Figure 7-2 shows the layer in the TCP/IP network model in which
routing takes place.
TCP/IP Layers
Application Layer
Transport Layer
Internet Layer
Hardware Layer
Types of Routes
Routes can be dividing in to two types: direct routes and indirect routes.
Note – A router connects two networks running the same protocol stack.
A gateway connects two networks running different protocol stacks.
Figure 7-3 shows an example of direct and indirect routes. The sys11
system has a direct route to the sys13 system and an indirect route to the
sys24 system through the sys21 router.
192.168.1.0 192.168.30.0 192.168.4.0
sys11
instructor
sys12
sys21
sys13 sys24
Direct Route
Indirect Route
Static Routes
Static routes are permanent entries in the routing table. Static routes can
be removed through manual intervention only. The most common static
entries are the direct routes that a system creates to its local networks.
The ifconfig command updates the routing table with static entries for
networks that are directly connected to the local network interfaces when
an interface is configured as up. Therefore, even in single-user mode, a
system can route directly to its local network or networks because the
interfaces are initialized by the ifconfig command.
Static routes can also be added to your system’s routing table manually by
using the /etc/defaultrouter file or by using entries placed in the
/etc/gateways file. The /etc/defaultrouter file defines one or more
static default routes for a system. A default route defines the router to use
for all destinations that do not have an explicit routing table entry. The
/etc/gateways file is used to define static indirect routes to networks
and hosts.
Dynamic Routes
Dynamic routes are added to or removed from the routing table by
processes, such as the in.routed daemons. When the routing table is
updated with information about other reachable networks, the router can
forward or deliver datagrams to these networks.
Routers advertise the networks that they know about. Other hosts and
routers listen to these periodic announcements and update their routing
table with the most current and correct information. Only those entries
calculated to be the best paths to a network destination remain in the
routing table.
Autonomous Systems
An autonomous system (AS), as shown in Figure 7-4, is a collection of
networks and routers under a single administrative control. This broad
definition was incorporated into the Internet in an attempt to reduce
excessively large routing tables.
AS
AS
AS
IGP
AS
IGP
AS
AS IGP
OSPF provides a view of the entire network and provides the shortest
path choices on routes. The map on each OSPF router is updated
regularly.
AS
EGP
EGP
EGP
AS
AS
EGP and the Border Gateway Protocol (BGP) are the two principal
protocols that exchange routing information among autonomous systems.
BGP was developed in the mid 1990s to replace EGP. BGP replaces the
distance-vector algorithm of EGP with a path-vector algorithm. The path
vector that is implemented by BGP causes the routing information to
include a complete path (all autonomous system numbers) from the
source to the destination. This eliminates the possibility of looping
problems that might arise from complex network topologies, such as the
Internet. A loop is detected by BGP when the path it receives has an
autonomous system listed twice. If this occurs, BGP generates an error
condition.
Field Description
No
No
No
The kernel routing algorithm searches for routing table entries in the
following order when determining where to send a datagram:
1. The kernel routing algorithm checks to see if the IP address is on a
local network.
The kernel extracts the destination IP address from the IP datagram
and computes the destination network number. The destination
network number is then compared with the network numbers of all
of the local interfaces (interfaces that are physically attached to the
system) for a match. If the destination network number matches that
of a local interface network number, the kernel encapsulates the IP
datagram inside an Ethernet frame and sends it through the
matching local interface for delivery.
2. The kernel routing algorithm checks the routing table for a route to
a matching host IP address on a non-local network.
The kernel searches the routing table entries for a matching host IP
address. If an entry that matches the host IP address is found, the
kernel encapsulates the IP datagram inside an Ethernet frame and
sends the frame to the router that is associated with that destination.
3. The kernel routing algorithm checks the routing table for a route to
a matching network number.
The kernel searches the routing table for a matching network
number. If a matching number is found, the kernel sets the
destination Ethernet address to that of the corresponding router and
delivers the frame to that router. The router that receives the frame
repeats the execution of the route algorithm, but leaves the
destination IP address unchanged.
4. The kernel routing algorithm checks for a default route in the
routing table.
The kernel searches the routing table for a default entry, which
signifies that a default route is configured. If a default route is found,
the kernel encapsulates the datagram, sets the destination Ethernet
address to that of the default router, leaves the destination IP address
unchanged, and delivers the datagram through the interface that is
local to the default router.
5. If there is no route to the destination, the kernel routing algorithm
check generates an ICMP error message. The kernel cannot forward
the datagram. The error message states either No route to host
or Network is unreachable.
#
# The loopback network is used only for intra-machine communication
#
loopback 127
#
# Internet networks
#
arpanet 10 arpa # Historical
When the /etc/inet/networks file is modified, you can use the defined
network name in a command instead of a network address.
To view how defined networks are displayed in the output from the
netstat command, use the netstat command with the -r option:
# netstat -r
Routing Table: IPv4
Destination Gateway Flags Ref Use Interface
-------------------- -------------------- ----- ----- ------ ---------
one sys11 U 1 53 hme0
two sys11ext UG 1 0
three sys11ext UG 1 0
thirty sys11ext U 1 56 qfe0
224.0.0.0 sys11 U 1 0 hme0
localhost localhost UH 3 132 lo0
#
Observe that the destination networks are now displayed by name instead
of by network number, and the loopback address is replaced by its entry
from the /etc/inet/hosts file.
The ifconfig command builds the direct route entries initially when the
network interface is configured during system startup. To view the static
direct routes configured by the ifconfig command, use the
netstat -rn command:
# netstat -rn
Routing Table: IPv4
Destination Gateway Flags Ref Use Interface
-------------------- -------------------- ----- ----- ------ ---------
192.168.1.0 192.168.1.1 U 1 53 hme0
...
...
192.168.30.0 192.168.30.31 U 1 77 qfe0
224.0.0.0 192.168.1.1 U 1 0 hme0
127.0.0.1 127.0.0.1 UH 3 132 lo0
#
The 127.0.0.1 entry in the routing table is a loopback route to the local
host that is created when the lo0 pseudo interface is configured.
For example:
# cat /etc/gateways
net 192.168.3.0 gateway sys31ext metric 1
#
The /etc/gateways file also supports the use of directives to control the
behavior of the system. For example, you can disable the RIP protocols
(RIPv1 and RIPv2) by placing the following directive in the
/etc/gateways file:
no_rip
Use the no_rip_v1in directive when you want your system to ignore
RIPv1 information received on a specific interface. For example, to ignore
RIPv1 information received on the qfe3 interface, use the following
directive in the /etc/gateways file:
no_ripv1_in if=qfe3
You can disable the RDISC protocol by placing the following directive in
the /etc/gateways file:
no_rdisc
To add routes to the routing table, you use the route add command. Its
basic format is:
route add destination gateway
To add a static route to the sys24 host with the sys21ext system as the
gateway, type the command:
# route add host sys24 sys21ext
add host sys24: gateway sys21ext
#
To add a default route with the instructor system as its gateway, type
the command:
# route add default instructor
add default: gateway instructor
#
To delete a route, you use the route delete command. Its basic format
is:
route delete destination gateway
For example, to delete the route to the host sys24 using the gateway
sys21ext, type the command:
# route delete sys24 sys21ext
delete host sys24: gateway sys21ext
#
To change the routing table, use the route change command. For
example, to change the default route from instructor to sys41, type a
command similar to the following:
# route change default sys41
change net default: gateway sys41
#
To flush (remove) the routing table of all gateway entries, use the
route flush command. For example:
# route flush
192.168.9 sys13 done
two sys13 done
two sys11ext done
default 172.20.4.248 done
#
To cause the routing table to flush before the remaining options are
evaluated, use the flush option in combination with other options. For
example, to flush the routing table of gateways and to add a route to the
192.168.2.0 network, type a command similar to the following:
# route -f add net 192.168.2.0 sys21ext
add net 192.168.2.0: gateway sys21ext
#
To achieve the same results in a more concise way, specify the length of
the subnet mask after the destination. For example, enter:
192.168.3.0/27
Note – The in.routed process does not detect any routing table changes
that are performed by other programs on the machine, for example, routes
that are added, deleted, or flushed as a result of the route command.
Therefore, do not perform these types of changes while the in.routed
process is running. Instead, shut down the in.routed process, make the
required changes, and then restart the in.routed process. This ensures
that the in.routed process learns of any changes.
Network names can also be used to define routes. To add a route to the
two network, defined in the /etc/inet/networks file, type a command
similar to the following:
# route add net two 192.168.30.31
add net two: gateway 192.168.30.31
#
RIP Version 1
RIP version 1 is a distance-vector protocol that exchanges route
information between IP routers. RIP version 1 does not support VLSM or
CIDR.
Distance-Vector Protocols
Router
Router Router
Source Destination
Host Host
Metric = 2
(discarded)
RIP specifies a number of features that make its operation more stable in
the face of rapid network topology changes. These stability features
include a hop-count limit, hold-down states, split horizons, triggered
updates, and route poisoning.
Hop-Count Limits
This upper limit of 15 does not cause problems since RIP is an IGP and is
used within autonomous systems only.
Hold-Down States
Hold-down states tell routers to hold down any changes that can affect
recently removed routes for a specified period of time. The hold-down
period is usually calculated to be just greater than the period of time that
is necessary to update the entire network with a route change.
Split Horizons
Split horizons derive from the fact that it is never useful to send
information about a route back in the direction from which it came. The
split-horizon rule prohibits this from happening. This helps prevent
two-node routing loops.
Triggered Updates
Route Poisoning
RIP Version 2
RIP version 2 was developed to address some of the limitations of RIPv1,
while maintaining backward compatibility combined with the simplicity
of RIPv1. RIPv2 has the following characteristics:
● RIPv2 supports VLSM and non-byte-bounded subnet masks.
● RIPv2 uses muticast to advertise routes. The 224.0.0.9 multicast
address is reserved for RIPv2.
● RIPv2 includes support for simple authentication of messages.
If RIPv2 multicasts are being processed, only those hosts listening for the
RIPv2 multicast address process the information. If RIPv1 broadcasts are
being processed, all hosts receive the information, but only those hosts
that run the in.routed daemon use the information. Routers and
non-routers run the in.routed daemon.
Note – Using the routeadm command without the -u option causes the
configuration to be changed in the /etc/inet/routing.conf file, but
does not change the current configuration of the system.
To cause the system to revert to default behavior at system boot (start the
in.routed daemon unless the /etc/defaultrouter file is not
empty), type the command:
# routeadm -r ipv4-routing
#
Routers that run the in.routed daemon advertise their presence by using
the 224.0.0.1 multicast address every 600 seconds (10 minutes).
Non-routers running the in.routed daemon listen to the 224.0.0.1
multicast address for these router advertisement messages. The
in.routed process builds a default route entry for each router from
which an advertisement is received.
ICMP Redirects
ICMP provides control and error messages. ICMP on a router or gateway
attempts to send reports of problems to the original source if an IP
datagram cannot be delivered for some reason. ICMP datagrams are
always encapsulated in IP.
ICMP redirects occur when a system uses more than one default route. If
the router determines a more efficient route, or if there is only one way to
forward the datagram, it redirects the datagram using the better or only
route and reports that route to the sender. Figure 7-9 on page 7-32 shows
an ICMP redirect process where the sys21 system needs to communicate
with the server1 system and has a default route of sys11. The
information does reach the server1 system and the sys11 system sends
an ICMP redirect to the sys21 system, telling it that the best route to the
server1 system is through the instructor system.
The sending system’s routing table is updated with the new information.
The drawback to this method of routing is that for every ICMP redirect,
there is a separate entry in the sending system’s routing table. This action
can lead to a large routing table. However, this method of routing also
ensures that the datagrams that are going to all reachable hosts are taking
the shortest route.
server1
4 Datagram
5 Datagram
#telnet server1
sys21 instructor
3 ICMP Redirect
1 Datagram
2 Datagram
sys11
Introducing CIDR
The rapid growth of the Internet in the early 1990s created concerns about
the ability to scale and support future growth. The most severe problems
are:
● Impending depletion of Class B networks
● Increasing the size of routing tables
Purpose of CIDR
A task force was created by the Internet Engineering Task Force (IETF) to
develop a solution to the scale and growth problems. The solution became
known as CIDR, or supernetting, and is a way to make more-efficient use
of the IP address space. CIDR is documented in RFC 1517, RFC 1518,
RFC 1519, and RFC 1520. Three important features of CIDR that address
scalability and growth issues for the Internet are:
● Elimination of network classes (Class A, Class B, and Class C)
● Block address allocation
● Hierarchical routing
Operation of CIDR
CIDR uses classless addresses. Netmasks are referred to as network prefixes
and are used to create networks of varying sizes. The network prefix is
expressed in the following notation: X.X.X.X/Y. The value Y is an integer
value that specifies the number of 1s in the netmask. For example, using
/18 is equivalent to a netmask of 255.255.192.0. The first 18 bits
identify the network, and the remaining 14 bits identify the host.
n = Network
s = Subnet
h = Host
This use of variable length subnet masks means making efficient use of
network address space by supernetting or subnetting.
The systems on the supernetted networks must all use the following in
order to properly communicate without a router:
● Network address – 192.168.2.0/23
● Broadcast address – 192.168.3.255
# netstat -rnv
IRE Table: IPv4
Destination Mask Gateway Device Mxfrg Rtt Ref Flg Out In/Fwd
--------------- --------------- --------------- ------ ----- ---- --- --- ---- ------
172.20.221.6 255.255.255.255 192.168.2.254 1500* 0 1 UGH 0 0
192.168.2.0 255.255.254.0 192.168.3.239 eri0 1500* 0 1 U 0 0
127.0.0.1 255.255.255.255 127.0.0.1 lo0 8232* 0 1 UH 10 0
#
A CIDR and VLSM aware routing protocol, such as RIPv2, must be used
on the router that connects this supernetted network to other networks.
The routing table entry for each ISP or organization reflects the first
address in the block assigned to it, for example, 204.106.8.0/22, even
though there can be additional network addresses that are associated with
the block. A range of CIDR addresses is known as a CIDR block. This
support of network addresses eliminates the number of entries required in
the backbone routing tables.
Figure 7-11 shows the network addresses that can result from applying
different network prefixes.
It can be seen from Figure 7-11 that the four networks being considered
have identical values in their first 22 bits. Therefore, if you consider the
first 22 bits only of an address on any of these networks to represent the
network portion of the address, every address on the four networks has
the same network address. The networks can therefore be supernetted
and a single route can be used to reach all four networks.
204.106.0.0/21
Internet Service Provider (2048 Host Addresses)
Internet
204.106.8.0/22
(1024 Host Addresses)
204.106.0.0/20
(4096 Host Addresses) Address Range
204.106.8.0204.106.11.0
An ISP who is given a block of supernetted addresses can then divide the
range into different sized blocks to suit the needs of their customers, while
minimizing the number of routing table entries required.
Initializing a Router
When a system boots, the system first checks the contents of the
/etc/inet/routing.conf file. If the ipv4-routing or
ipv4-forwarding options are set explicitly to either enabled or
disabled, the setting is applied. If either option has not been set
explicitly, then the system determines whether or not to enable or disable
each option.
Start
Disable
IPv4 forwarding
No
No
Disable
IPv4 routing
IPv4
forwarding Yes Enable
enabled by IPv4 forwarding
routeadm?
No
Disable
IPv4 forwarding
End
The system is now a multihomed host that has connectivity to more than
one network and can be used without concern of advertising routes and
potentially causing routing issues on any of the networks to which it
belongs.
Initializing a Non-Router
Disabling IP forwarding stops a router from forwarding packets between
the networks to which it is connected. To initialize a non-router, use the
routeadm command to disable IP forwarding on all interfaces by typing
the following command:
# routeadm -u -d ipv4_forwarding
Troubleshooting Routing
One of the most challenging tasks that a network administrator has to
perform is troubleshooting routing. Router configuration and
troubleshooting relies on mastering other basic network skills.
Preparation
Refer to the lecture notes as necessary to perform the tasks listed.
Populate your system’s /etc/inet/hosts file with all of the hosts in the
class network if this is not already done. Your /etc/inet/hosts file
should have contents similar to the following:
# cat /etc/inet/hosts
#
# Internet host table
#
127.0.0.1 localhost loghost
# SA-300-S10 host information
192.168.30.31 sys11ext # router to get to instructor->Internet
192.168.1.1 sys11
192.168.1.2 sys12
192.168.1.3 sys13
192.168.1.4 sys14
#
192.168.30.32 sys21ext # router to get to instructor->Internet
192.168.2.1 sys21
192.168.2.2 sys22
192.168.2.3 sys23
192.168.2.4 sys24
#
192.168.30.33 sys31ext # router to get to instructor->Internet
192.168.3.1 sys31
192.168.3.2 sys32
192.168.3.3 sys33
192.168.3.4 sys34
#
192.168.30.30 instructor
#
Figure 7-14 shows the classroom’s network diagram. Take a few moments
to familiarize yourself with the diagram.
instructor
xxx.xxx.xxx.xxx
Internet
.30
192.168.30.0
.31 .32 .33
192.168.1.0 192.168.2.0 192.168.3.0
.1 .1 .1
sys11 sys21 sys31
.2 .2 .2
sys12 sys22 sys32
.2 .3 .3
sys13 sys23 sys33
.4 .4 .4
sys14 sys24 sys34
Tasks
Complete the following steps:
1. In your own words, define each of the following routing schemes:
a. Static route
________________________________________________________
________________________________________________________
________________________________________________________
b. Dynamic route
________________________________________________________
________________________________________________________
________________________________________________________
c. Default route
________________________________________________________
________________________________________________________
________________________________________________________
2. What is a multihomed host?
_____________________________________________________________
_____________________________________________________________
3. Define the term autonomous system.
_____________________________________________________________
_____________________________________________________________
_____________________________________________________________
4. In your own words, describe the differences between an interior
gateway protocol and an exterior gateway protocol.
_____________________________________________________________
_____________________________________________________________
_____________________________________________________________
5. Give two examples of an interior gateway protocol.
_____________________________________________________________
_____________________________________________________________
8. Before making any changes to the interfaces, write the netmask and
broadcast values of the Ethernet interface.
Command used: ______________________________________________
Netmask: ____________________________________________________
Broadcast: ___________________________________________________
Caution – Do not proceed if your system has more than one physical
interface configured. If additional interfaces are configured, remove the
relevant /etc/hostname.interface files, and use the ifconfig
command or reboot the system to remove the interface configuration. The
success of this exercise depends on your system having only one
configured physical interface.
Note – Do not proceed beyond this point until everyone in the class has
completed this step.
Caution – Do not proceed if your system has more than one physical
interface configured. If additional interfaces are configured, remove the
relevant /etc/hostname.interface files, and use the ifconfig
command or reboot the system to remove the interface configuration. The
success of this exercise depends on your system having only one
configured physical interface.
18. Start the snoop utility on the router to watch for network traffic
associated with multicast address 224.0.0.2 as the non-routers
reboot. (Hint: Use the icmp option on the snoop command line.) Be
sure to use the snoop utility on the appropriate interface for the
network that you want to monitor. Be prepared to see ICMP router
advertisements after the next step.
Write the command that you use:
_____________________________________________________________
21. Use the netstat -r command, and observe the change to the
routing tables.
Which new type of entry is now present? How was it entered into
the routing table?
_____________________________________________________________
22. Use the ps command on the non-router systems to determine if the
routing daemon is now running.
Write the command that you use:
_____________________________________________________________
Why is this daemon running?
_____________________________________________________________
23. Terminate the snoop trace that you had running, and then start a
verbose snoop trace in a separate window on your router system.
Write the command that you use:
_____________________________________________________________
24. Working in a new window, use the routeadm command to terminate
the in.routed process on the router.
Write the command that you use:
_____________________________________________________________
25. View the output from the snoop utility. Look for the router
notification when the in.routed daemon terminates gracefully.
Hint: Look for multicasts and ICMP messages.
a. Examine the snoop trace. Did you see the router notification
when the in.routed daemon terminated gracefully?
________________________________________________________
b. What was the ETHER destination, as reported by the snoop
trace?
________________________________________________________
c. What protocol did the router notification use?
________________________________________________________
d. What was the destination IP address of the router notification?
________________________________________________________
26. Verify that the process has been terminated.
Write the command that you use:
_____________________________________________________________
27. Use the netstat command to view the routing tables on one of the
non-router systems. What is missing?
_________________________________________________
Note – Do not proceed beyond this point until everyone in the class has
completed this step.
28. Verify that the snoop session started earlier on your router is still
running, and then start the in.routed process on your router
system, changing the advertisement interval to 90 seconds by placing
the appropriate entry in the /etc/gateways file.
What entry do you place in the /etc/gateways file?
_____________________________________________________________
Which command do you use to restart the in.routed daemon?
_____________________________________________________________
Observe ICMP and other traffic as the in.routed daemon is started.
29. Use the netstat command to view the routing tables on one of the
non-router systems to verify that the default route has been inserted
into the routing table.
Write the command that you use:
_____________________________________________________________
In this section, you test to see how long it takes for the default route to be
removed when no communications are received from a router. You use
the 9 (KILL) signal to kill the in.routed daemon, so that the daemon
does not have a chance to advertise that it is going down.
30. On a non-router, use the date and netstat commands to determine
how long before the default route entry is removed.
Note – The while statement syntax assumes that you are using the
Bourne shell:
while true
> do date; netstat -rn | grep default; sleep 20
> done
31. Simulate a router crash, and kill the in.routed daemon on the
router again, but use the 9 (KILL) signal this time.
Write the command that you use:
_____________________________________________________________
32. Watch the output from the script, and keep track of the time. When
the default entry stops being reported, subtract the start time from
the finish time to determine how long the system took to remove the
default route entry.
Approximately how long did it take for the default entry to be
removed from the table?
_____________________________________________________________
When done, stop the script by pressing the Control+C key sequence.
33. Stop the in.routed daemon on the non-router systems.
Write the command that you use:
_____________________________________________________________
Caution – Do not proceed beyond this point until everyone in the class
has completed this step.
34. Flush the routing tables on routers first and then the non-router
systems.
Write the command that you use:
_____________________________________________________________
36. Add routes manually to the other subnets by using the route
command.
Write the commands that you use:
_____________________________________________________________
_____________________________________________________________
_____________________________________________________________
37. Add routes manually by using the route command to the remote
subnets.
Write the commands that you use.
_____________________________________________________________
_____________________________________________________________
_____________________________________________________________
_____________________________________________________________
Caution – Do not proceed beyond this point until everyone in the class
has completed this step.
Note – Do not proceed beyond this point until everyone in the class has
completed this step.
42. Reboot the routers. Schedule a job so that the non-routers reboot two
minutes later. Check to see if the in.routed daemon was started on
each of the non-router systems. Explain why you see the results that
you do.
_____________________________________________________________
_____________________________________________________________
_____________________________________________________________
Caution – Do not proceed beyond this point until everyone in the class
has completed this step.
Exercise Summary
Exercise Solutions
Solutions to the exercise are as follows:
1. In your own words, define each of the following routing schemes:
a. Static route
Static routes are routes that are do not time-out and must be removed
manually. Rebooting the system removes the static entries. The most
common static entry is a system that routes datagrams to the locally
connected networks.
b. Dynamic route
Dynamic routing means that the routing environment changes.
Dynamic routing identifies other network destinations that are not
connected directly but are reachable through a router. After the
routing table identifies the other reachable networks, the identified
router can forward or deliver the datagrams.
c. Default route
A default route is a table entry that permits a system to define default
routes to use if a route entry for a specific destination does not exist. It
is used for all indirectly connected workstations. The default routers
must be reliable. There is no need to define every reachable network.
All indirectly connected datagram destinations go to the default
router.
2. What is a multihomed host?
A multihomed host is a host that has more than one physical network
interface and does not forward IP datagrams between networks.
3. Define the term autonomous system.
An autonomous system is a collection of networks and routers under a
single administrative control. This intentionally broad definition was
incorporated into the Internet to handle overly large routing tables.
4. In your own words, describe the differences between an interior
gateway protocol and an exterior gateway protocol.
A routing protocol used within an autonomous system is called an interior
gateway protocol. A routing protocol that communicates routes between
autonomous systems is called an exterior gateway protocol.
5. Give two examples of an interior gateway protocol.
OSPF protocol and RIP.
8. Before making any changes to the interfaces, write the netmask and
broadcast values of the Ethernet interface.
router# ifconfig -a
lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
hme0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 192.168.1.1 netmask ffffff00 broadcast 192.168.1.255
ether 8:0:20:b9:72:23
The netmask is ffffff00.
The broadcast address is 192.168.1.255.
Caution – Do not proceed if your system has more than one physical
interface configured. If additional interfaces are configured, remove the
relevant /etc/hostname.interface files, and use the ifconfig
command or reboot the system to remove the interface configuration. The
success of this exercise depends on your system having only one
configured physical interface.
Caution – Do not proceed beyond this point until everyone in the class
has completed this step.
Caution – Do not proceed if your system has more than one physical
interface configured. If additional interfaces are configured, remove the
relevant /etc/hostname.interface files, and use the ifconfig
command or reboot the system to remove the interface configuration. The
success of this exercise depends on your system having only one
configured physical interface.
18. Start the snoop utility on the router to watch for network traffic
associated with multicast address 224.0.0.2 as the non-routers
reboot. (Hint: Use the icmp option on the snoop command line.) Be
sure to use the snoop utility on the appropriate interface for the
network that you want to monitor. Be prepared to see ICMP router
advertisements after the next step.
router# snoop -d hme0 icmp
Using device /dev/hme (promiscuous mode)
21. Use the netstat -r command, and observe the change to the
routing tables.
non-router# netstat -r
Routing Table: IPv4
Destination Gateway Flags Ref Use Interface
-------------------- -------------------- ----- ----- ------ ---------
192.168.1.0 sys12 U 1 0 hme0
224.0.0.0 sys12 U 1 0 hme0
default sys11 UG 1 0 hme0
localhost localhost UH 2 6 lo0
Which new type of entry is now present? How was it entered into
the routing table?
The newest entry is a default route. The system learns the default route
from routers on the subnet through the router discovery ICMP messages.
22. Use the ps command on the non-router systems to determine if the
routing daemon is now running.
non-router# ps -ef | grep in[.]
root 91 1 0 12:36:05 ? 0:00 /usr/sbin/in.routed
Why is this daemon running?
The in.routed daemon is running because the daemon is invoked by
default, at boot time. This is controlled by the routeadm utility. You can
view the configuration by looking at the contents of the
/etc/inet/routing.conf file.
23. Terminate the snoop trace that you had running, and then start a
verbose snoop trace in a separate window on your router system.
router# snoop -v -d hme0
Using device /dev/hme (promiscuous mode)
24. Working in a new window, use the routeadm command to terminate
the in.routed process on the router.
router# routeadm -u -d ipv4-routing
25. View the output from the snoop utility. Look for the router
notification when the in.routed daemon terminated gracefully.
Hint: Look for multicasts and ICMP messages.
ETHER: ----- Ether Header -----
ETHER:
ETHER: Packet 8 arrived at 12:46:52.27
ETHER: Packet size = 50 bytes
ETHER: Destination = 1:0:5e:0:0:1, (multicast)
ETHER: Source = 8:0:20:ac:9b:20, Sun
ETHER: Ethertype = 0800 (IP)
ETHER:
...
...
IP: Protocol = 1 (ICMP)
IP: Header checksum = ea98
IP: Source address = 192.168.1.1, sys11
IP: Destination address = 224.0.0.1, 224.0.0.1
...
...
a. Examine the snoop trace. Did you see the router notification
when the in.routed daemon terminated gracefully?
Yes.
b. What was the ETHER destination, as reported by the snoop
trace?
1:0:5e:0:0:1.
c. What protocol did the router notification use?
ICMP.
d. What was the destination IP address of the router notification?
224.0.0.1.
26. Verify that the process has been terminated.
router# ps -ef | grep routed
root 94 1 0 10:52:12 ? 0:00 grep routed
27. Use the netstat command to view the routing tables on one of the
non-router systems. What is missing?
non-router# netstat -r
Routing Table: IPv4
Destination Gateway Flags Ref Use Interface
-------------------- -------------------- ----- ----- ------ ---------
192.168.1.0 sys12 U 1 0 qfme0
224.0.0.0 sys12 U 1 0 qfe0
localhost localhost UH 2 6 lo0
The default route through the sys11 system was removed.
Note – Do not proceed beyond this point until everyone in the class has
completed this step.
28. Verify that the snoop session started earlier on your router is still
running, and then start the in.routed process on your router
system, changing the advertisement interval to 90 seconds by placing
the appropriate entry in the /etc/gateways file.
What entry do you place in the /etc/gateways file?
rdisc_interval=90
Which command do you use to restart the in.routed daemon?
router# routeadm -u -e ipv4-routing
Observe ICMP and other traffic as the in.routed daemon is started.
Output from snoop trace:
ETHER: Packet 8 arrived at 16:39:16.72
ETHER: Packet size = 50 bytes
ETHER: Destination = 1:0:5e:0:0:1, (multicast)
ETHER: Source = 8:0:20:ac:9b:20, Sun
...
...
29. Use the netstat command to view the routing tables on one of the
non-router systems to verify that the default route has been inserted
into the routing table.
non-router# netstat -r
Routing Table: IPv4
Destination Gateway Flags Ref Use Interface
-------------------- -------------------- ----- ----- ------ ---------
192.168.1.0 sys12 U 1 0 qfe0
224.0.0.0 sys12 U 1 0 qfe0
default sys11 UG 1 0 qfe0
localhost localhost UH 2 6 lo0
In this section, you test to see how long it takes for the default route to be
removed when no communications are received from a router. You use
the 9 (KILL) signal to kill the in.routed daemon, so that the daemon
does not have a chance to advertise that it is going down.
30. On a non-router, use the date and netstat commands to determine
how long before the default route entry is removed.
Note – The while statement syntax assumes that you are using the
Bourne shell.
default sys11 UG 1 0
Tue Dec 4 17:18:04 MST 2004
default sys11 UG 1 0
...
...
31. Simulate a router crash, and kill the in.routed daemon on the
router again, but use the 9 (KILL) signal this time.
router# pkill -9 in.routed
32. Watch the output from the script, and keep track of the time. When
the default entry stops being reported, subtract the start time from
the finish time to determine how long the system took to remove the
default route entry.
...
...
Tue Dec 4 17:20:24 MST 2004
default sys11 UG 1 0
Tue Dec 4 17:20:44 MST 2004
default sys11 UG 1 0
Tue Dec 4 17:21:04 MST 2004
Tue Dec 4 17:21:25 MST 2004
...
...
Approximately how long did it take for the default entry to be
removed from the table?
Four and a half (4-1/2) minutes.
When done, stop the script by pressing the Control+C key sequence.
33. Stop the in.routed daemon on the non-router systems.
non-router# ps -ef | grep in[.]
root 91 1 0 12:36:05 ? 0:00 /usr/sbin/in.routed
non-router#
non-router# routeadm -u -d ipv4-routing
Caution – Do not proceed beyond this point until everyone in the class
has completed this step.
34. Flush the routing tables on routers first and then the non-router
systems.
Write the command that you use:
router# route flush
192.168.2 sys21ext done
36. Add routes manually to the other subnets by using the route
command.
router# route add net 192.168.2.0 192.168.30.32
add net 192.168.2.0: gateway 192.168.30.32
router#
router# route add net 192.168.3.0 192.168.30.33
add net 192.168.3.0: gateway 192.168.30.33
37. Add routes manually by using the route command to the remote
subnets.
non-router# route add net 192.168.30.0 192.168.1.1
add net 192.168.30.0: gateway 192.168.1.1
non-router#
non-router# route add net 192.168.2.0 192.168.1.1
add net 192.168.2.0: gateway 192.168.1.1
non-router#
non-router# route add net 192.168.3.0 192.168.1.1
add net 192.168.3.0: gateway 192.168.1.1
Caution – Do not proceed beyond this point until everyone in the class
has completed this step.
Caution – Do not proceed beyond this point until everyone in the class
has completed this step.
42. Reboot the routers. Schedule a job so that the non-routers reboot two
minutes later. Check to see if the in.routed daemon was started on
each of the non-router systems. Explain why you see the results that
you do.
router# init 6
non-router# at now+2minutes
at> init 6
at> ^D<EOT>
commands will be executed using /sbin/sh
job 1007515599.a at Tue Dec 4 18:26:39 2004
Caution – Do not proceed beyond this point until everyone in the class
has completed this step.
Configuring IPv6
Objectives
This module describes IPv6 management, features, configuration and
troubleshooting, and IPv6 addressing and interfaces.
8-1
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
Objectives
The course map in Figure 8-1 shows how this module fits into the current
instructional goal.
Configuring the Network
Configuring IP
Configuring Configuring
Network
IP Routing
Multipathing
Describing
Configuring the Transport
IPv6 Layer
Introducing IPv6
IPv6 is the most recent version of the IP specification. Refer to RFC 2460
for a description of IPv6. In 1991, the Internet Architecture Board (IAB)
sponsored a working group to address a pending IP address shortage.
The IAB predicted that all Class B networks would be allocated by 1994
and that all IP addresses would be allocated by 2002 (see Christian
Huitema, Routing in the Internet, Second Edition, 2000).
Features of IPv6
The IPv6 features are:
● Expanded addressing – The address size is increased from 32-bit
addresses to 128-bit addresses.
● Simplified header format – This format reduces the number of
header fields in an IPv6 datagram from 10 fields to 6 fields.
● Improved extension header and option support – This feature
supports extension headers in addition to the primary header.
Extension headers are located between the required IPv6 datagram
header and the payload; therefore, they provide special treatment of
some datagrams without a performance penalty.
● Quality of service – A flow label in the header provides for flows.
Flows identify a sequence of datagrams from the same source to the
same destination when the source requests special handling of the
specified datagram sequence by the intervening routers.
● Authentication and privacy headers – An authentication header
(AH) provides the authentication services, and the encapsulating
security payload (ESP) header provides privacy.
Address Types
Like IPv4, IPv6 has three types of addresses that you can use to
communicate across a network. For sending messages, IPv6 supports:
● Unicast addresses
● Multicast addresses
● Anycast addresses
IPv6 differs from IPv4 in that IPv6 does not provide broadcast addresses
as a mechanism for communicating with other hosts on a subnet.
Unicast Addressing
Multicast Addressing
Anycast Addressing
Format Prefixes
The format prefix (FP) in the address indicates the type of IPv6 address
that is used. For example:
● Link-local addresses are intended to identify hosts on a single
network link. They are similar to the way Ethernet addresses are
used to communicate on an Ethernet segment or subnet.
● Site-local addresses are valid across an intranet. They are similar to
an organization choosing a random IPv4 address class for the
organization, but not connecting to the Internet.
● Aggregatable global addresses are valid across the Internet. They are
similar to an officially registered IPv4 address class for organizations
connected to the Internet.
● A multicast address is an identifier for a group of systems. A node
can belong to any number of multicast groups.
Note – Refer to RFC 2373 for information about FPs that are not related to
the Solaris OS. The FP byte is binary. As defined in RFC 2373, unused
trailing bits in the byte are not shown. For example, the FP represented by
001 is 0x2 or 0x3, because the two binary values are 0010 and 0011. The FP
represented by 001 should not be confused with 0001, which is equal to
0x1.
Stateful Autoconfiguration
Stateful autoconfiguration requires the additional setup of a DHCP server.
For this reason, stateful autoconfiguration is not a preferred configuration
method. Stateful autoconfiguration and stateless autoconfiguration, as
defined in IPv6, can coexist and operate together. Stateful
autoconfiguration supplies address and service information similar to the
way that DHCP provides information in IPv4.
Stateless Autoconfiguration
The stateless mechanism permits a host to generate its own addresses by
using a combination of information this is available locally and
information that is advertised by routers. Routers advertise prefixes that
identify the subnets associated with a link, while hosts generate an
interface identifier that uniquely identifies an interface on a subnet.
0 8 0 0 2 0 B 5 4 1 3 7
0000 1000 0000 0000 0010 0000 1011 0101 0100 0001 0011 0111
CID VID
3. Toggle bit 7, the universal/local bit, which is the seventh bit from the
left.
Figure 8-4 shows the address after conversion.
0 A 0 0 2 0 B 5 4 1 3 7
0000 1010 0000 0000 0010 0000 1011 0101 0100 0001 0011 0111
CID VID
4. Insert two additional octets, 0xFF and 0xFE, between the CID and
the VID. This converts the MAC address to an interface identifier.
Figure 8-5 shows the resulting interface identifier.
0 A 0 0 2 0 F F F E B 5 4 1 3 7
0000 1010 0000 0000 0010 0000 1111 1111 1111 1110 1011 0101 0100 0001 0011 0111
CID VID
Link-Local Addresses
Link-local addresses are valid on a local network link only. Link-local
addresses are not forwarded by routers. The first 10 bits of the address
prefix identify an address as a link-local address. The link-local address
format prefix is 1111 1110 10 in binary, or FE8 in hexadecimal, as shown in
Figure 8-6.
10 Bits 54 Bits 64 Bits
fe80::a00:20ff:feb5:4137
Site-Local Addresses
Site-local addresses are similar to link-local addresses but can be routed
through an intranet. Intranet routers can forward site-local addresses
through the intranet but not outside of the intranet. The first 10 bits of the
address prefix identify an address as a site-local address.The site-local
address format prefix is 1111 1110 11 in binary, or FEC in hexadecimal
format, as shown in Figure 8-7.
fec0::0003:a00:20ff:feb5:4137
Prefix Notation
RFC 2373 describes how IPv6 addresses use prefix notation. IPv6
addresses have two parts. The first part is the format prefix. The second
part is the interface identifier and is analogous to the IPv4 host portion.
The /64 indicates that the subnet prefix is 64 bits in length. The first
64 bits of the address contain a subnet mask. The address can be broken
into a subnet prefix and a node address or into an interface identifier.
● fec0::0003 – The subnet prefix
● a00:20ff:feb5:4137 – The interface identifier
0000:0000:0000:0000:0000:FFFF:yyyy:yyyy
Multicast addresses include 4 bits of flags after the initial FF in the format
prefix. Three of the flag bits are reserved and are always set to 0. The
fourth flag bit is set to 0 if a well-known IANA-assigned multicast
address is used; the fourth bit is set to 1 if a temporary multicast address
is used. Figure 8-9 shows the multicast address types.
ff02:0:0:0:0:0:0:1
Scope Bits
Multicast addresses include four scope bits after the flag bits. The scope
bits determine how far the multicast datagram is routed:
● Node-local – FF01.
Route to all members of the group on the same node as the sender.
● Link-local – FF02.
Route to all members of the group on the same link as the sender.
● Site-local – FF05.
Route to all members of the group at the same site as the sender.
● Organization-local – FF08.
Route to all members of the same organization as the sender.
● Global – FF0E.
Route to all members of the group on the Internet.
Enabling IPv6
You can enable IPv6 from the command line or by creating specific files
that are read by the /lib/svc/method/net-init and
/lib/svc/method/net-physical SMF methods at boot time.
Note – You can also enable IPv6 during initial installation of the
Solaris 10 OS.
Like IPv4, you can apply names to IPv6 addresses so that you can more
easily refer to a system. For example, to name this system’s IPv6 hme0
interface sys12-v6, you can add an entry to the /etc/inet/ipnodes file
to make it look similar to the following:
# tail -2 /etc/inet/ipnodes
# added for ipnode example
fec0::a00:20ff:fe90:b5c7 sys12-v6
#
You can now address a system by its IPv6 interface by using the sys12-v6
host name. For example:
# uname -n
sys11
# ping sys12-v6
sys12-v6 is alive
#
● The ipnodes line is used in the nsswitch.conf file for IPv6 system
name resolution.
hosts: files nisplus dns
ipnodes: files nisplus dns
If Group RefCnt
----- --------------------------- ------
lo0 ff02::1:ff00:1 1
lo0 ff02::1 1
hme0 ff02::202 1
hme0 ff02::1:ff90:b5c7 1
hme0 ff02::1 2
In normal operation, the in.ripngd process listens on UDP port 521 for
routing information datagrams. If the host is a router, it supplies copies of
its routing table periodically to any directly connected host and network.
To designate which interfaces are configured with IPv6 at boot time, use
the touch command to create a /etc/hostname6.interface file for each
IPv6 interface. For example, to configure the system to configure the hme0
and hme0 interfaces with IPv6 at boot time, type the following:
# touch /etc/hostname6.hme0 /etc/hostname6.qfe0
#
The IPv6 name service lookup mechanism is controlled in the same way
as IPv4. Verify that the ipnodes database is defined correctly for your
site’s name-service lookup mechanism. For example, make sure that the
following entry exists if the ipnodes database uses the system’s local file:
# grep ipnodes /etc/nsswitch.conf
ipnodes: files
#
Start
Disable
IPv6-forwarding
IPv6 routing
enabled by Yes Enable
routeadm and IPv6-routing
/etc/inet/ndpd.conf
exists?
No
Disable
IPv6-routing
IPv6
forwarding Yes Enable
enabled by IPv6 forwarding
routeadm?
No
Disable
IPv6 forwarding
End
IPv6 IPv6
Network Network
Gateway Gateway
System IPv4 System
Network
The 6to4 addresses have a defined format for the network portion of the
address:
● A 16-bit prefix that denotes the address as a 6to4 address (2002)
● A 32-bit, public IPv4 address on the boundary router in hexadecimal
notation
● A 16-bit subnet ID unique to each subnet – One subnet ID is used by
the end point of the tunnel
This configures the tunnel endpoint with a subnet number of zero (0)
and a host number of one (1).
The tunnel configuration can be seen in the output from the
ifconfig -a command:
# ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
hme0: flags=1100843<UP,BROADCAST,RUNNING,MULTICAST,ROUTER,IPv4> mtu 1500 index 2
inet 192.168.1.3 netmask ffffff00 broadcast 192.168.1.255
ether 8:0:20:f8:b7:23
qfe0: flags=1100843<UP,BROADCAST,RUNNING,MULTICAST,ROUTER,IPv4> mtu 1500 index 3
inet 192.168.30.31 netmask ffffff00 broadcast 192.168.30.255
ether 8:0:20:f8:b7:23
lo0: flags=2002000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv6,VIRTUAL> mtu 8252 index 1
inet6 ::1/128
hme0: flags=2100841<UP,RUNNING,MULTICAST,ROUTER,IPv6> mtu 1500 index 2
inet6 fe80::a00:20ff:fef8:b723/10
ether 8:0:20:f8:b7:23
hme0:1: flags=2180841<UP,RUNNING,MULTICAST,ADDRCONF,ROUTER,IPv6> mtu 1500 index 2
inet6 2002:c0a8:1e1f:1:a00:20ff:fef8:b723/64
hme0:2: flags=2180841<UP,RUNNING,MULTICAST,ADDRCONF,ROUTER,IPv6> mtu 1500 index 2
inet6 fec0::1:a00:20ff:fef8:b723/64
ip.6to4tun0: flags=2300041<UP,RUNNING,ROUTER,NONUD,IPv6> mtu 8212 index 4
inet tunnel src 192.168.30.31
tunnel hop limit 60
inet6 2002:c0a8:1e1f::1/64
#
To configure a 6to4 tunnel with an explicit IPv6 host address as the
tunnel end point, use the syntax:
ifconfig ip.6to4tun0 inet6 tsrc IPv4_Address IPv6_Address up
Note – The 6to4 tunnel end point resides on its own IPv6 subnet. The
subnet ID used for the 6to4 tunnel must not be used on any of the local
IPv6 networks.
# uname -n
sys21
# pgrep -lf ndpd
1497 /usr/lib/inet/in.ndpd
● View the IPv6 routing table on each router in question.
# uname -n
sys11
# netstat -rn -f inet6
Routing Table: IPv6
Destination/Mask Gateway Flags Ref Use If
--------------------------- --------------------------- ----- --- ------ -----
2000:0:0:9255::/64 2000::9256:a00:20ff:feac:9b20 U 1 0 hme0:1
fec0:0:0:9255::/64 fec0::9256:a00:20ff:feac:9b20 U 1 0 hme0:2
2000:0:0:9256::/64 2000::9255:a00:20ff:feb9:7223 U 1 0 qfe0:1
fec0:0:0:9256::/64 fec0::9255:a00:20ff:feb9:7223 U 1 0 qfe0:2
2000:0:0:9257::/64 fe80::a00:20ff:fec0:449d UG 1 0 qfe0
fec0:0:0:9257::/64 fe80::a00:20ff:fec0:449d UG 1 0 qfe0
fe80::/10 fe80::a00:20ff:feac:9b20 U 1 0 hme0
fe80::/10 fe80::a00:20ff:feb9:7223 U 1 2 qfe0
ff00::/8 fe80::a00:20ff:feb9:7223 U 1 0 hme0
::1 ::1 UH 1 0 lo0
#
# uname -n
#
sys21
#
Managing IPv6
The tasks you use to manage IPv6 interfaces are similar to the tasks you
use to manage IPv4 interfaces.
To remove the logical interface, disable the interface, and then use the
unplumb parameter, for example:
# ifconfig qfe0:3 inet6 down unplumb
#
Preparation
Refer to the lecture notes as necessary to perform the tasks listed.
Work with another group for these tasks if your system functions as a
router in the classroom.
Continue as follows:
12. Obtain the IPv6 6to4 address of a system on a different subnet.
______________________________________________
13. Attempt to contact a system on a different subnet by using its IPv6
6to4 address.
______________________________________________
Caution – Do not proceed beyond this point until everyone in the class
completes this step.
Work with another teammate’s group for this task if your system
functions as a non-router in the classroom.
5. Edit the correct file on your router to cause it to use a site-local and
an aggregated global-unicast address for each interface on the router.
Use the following addresses:
● 192.168.1.0 uses fec0:0:0:1::0/64 and
2000:0:0:1::0/64
● 192.168.2.0 uses fec0:0:0:2::0/64 and 2000:0:0:2::0/64
● 192.168.3.0 uses fec0:0:0:3::0/64 and 2000:0:0:3::0/64
● 192.168.30.0 uses fec0:0:0:30::0/64 and
2000:0:0:30::0/64
Configure the file to cause the routing daemon to advertise IPv6 out
of all interfaces.
Be sure to remove an existing prefix 2002 lines.
Document your work.
6. Reboot the router systems.
______________________________________________
7. Verify that each router is configured correctly. Display the
configuration of each network interface.
______________________________________________
8. View your router’s IPv6 routing table. What routes are available?
______________________________________________
9. Determine which routing daemons are running on the router. Which
options are running with each routing daemon, and why?
______________________________________________
______________________________________________
______________________________________________
______________________________________________
______________________________________________
______________________________________________
Continue as follows:
10. Either reboot the non-router systems, or wait a few minutes for the
route information to propagate the network.
______________________________________________
11. Use the ping command to send ICMP echo requests from a non-
router system to the site-local address of another non-router system
on another subnet to verify that the routing is functioning as
expected. (You may have to wait enough time for the routing
information to be updated after the prior step’s system boot)
______________________________________________
12. Determine which routing daemons are running on each non-router
system. Which options are running with each routing daemon, and
why?
______________________________________________
______________________________________________
13. Display the system’s routing table. What type of routes are in the
routing table (link-local, site-local, or global)?
______________________________________________
14. Display the system’s interface configuration. Notice the logical
addresses that provide access to the different networks based on
the FP.
______________________________________________
Exercise Summary
Exercise 1 Solutions
The following solution is specific to an individual system. Your results
will be different if you are working on different systems.
7. View the current routing table so that you will be able to see the
difference after the router is reconfigured later.
netstat -rn
Routing Table: IPv4
Destination Gateway Flags Ref Use Interface
-------------------- -------------------- ----- ----- ------ ---------
192.168.1.0 192.168.1.3 U 1 2 hme0
224.0.0.0 192.168.1.3 U 1 0 hme0
default 192.168.1.1 UG 1 0 hme0
127.0.0.1 127.0.0.1 UH 2 6 lo0
● For sys31:
prefix fec0:0:0:3::0/64 hme0
prefix 2002:c0a8:1e21:3::0/64 hme0
# cat /etc/inet/ndpd.conf
# Send router advertisements out all interfaces
ifdefault AdvSendAdvertisements on
# Advertise an unregistered (bogus) global prefix and a site
# local prefix using the default lifetimes
# Site-local address
prefix fec0:0:0:1::0/64 hme0
# 6to4 address
prefix 2002:c0a8:1e1f:1::0/64 hme0
#
8. Reboot the router.
# init 6
9. Log in to the router and view the configuration of its network
interfaces.
# ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
hme0: flags=1100843<UP,BROADCAST,RUNNING,MULTICAST,ROUTER,IPv4> mtu 1500 index 2
inet 192.168.1.1 netmask ffffff00 broadcast 192.168.1.255
ether 8:0:20:f8:b7:23
qfe0: flags=1100843<UP,BROADCAST,RUNNING,MULTICAST,ROUTER,IPv4> mtu 1500 index 3
inet 192.168.30.31 netmask ffffff00 broadcast 192.168.30.255
ether 8:0:20:f8:b7:23
lo0: flags=2002000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv6,VIRTUAL> mtu 8252 index 1
inet6 ::1/128
hme0: flags=2100841<UP,RUNNING,MULTICAST,ROUTER,IPv6> mtu 1500 index 2
inet6 fe80::a00:20ff:fef8:b723/10
ether 8:0:20:f8:b7:23
hme0:1: flags=2180841<UP,RUNNING,MULTICAST,ADDRCONF,ROUTER,IPv6> mtu 1500 index 2
inet6 2002:c0a8:1e1f:1:a00:20ff:fef8:b723/64
hme0:2: flags=2180841<UP,RUNNING,MULTICAST,ADDRCONF,ROUTER,IPv6> mtu 1500 index 2
inet6 fec0::1:a00:20ff:fef8:b723/64
ip.6to4tun0: flags=2300041<UP,RUNNING,ROUTER,NONUD,IPv6> mtu 8212 index 4
inet tunnel src 192.168.30.31
tunnel hop limit 60
inet6 2002:c0a8:1e1f::1/64
#
Continue as follows:
12. Obtain the IPv6 6to4 address of a system on a different subnet.
2002:c0a8:1e20:2:a00:20ff:feb6:c5de
13. Attempt to contact a system on a different subnet by using its IPv6
6to4 address.
# ping 2002:c0a8:1e20:2:a00:20ff:feb6:c5de
2002:c0a8:1e20:2:a00:20ff:feb6:c5de is alive
#
Caution – Do not proceed beyond this point until everyone in the class
completes this step.
Work with another teammate’s group for this task if your system
functions as a non-router in the classroom.
Continue as follows:
10. Either reboot the non-router systems, or wait a few minutes for the
route information to propagate the network.
# init 6
svc.startd: The system is coming down. Please wait.
...
...
11. Use the ping command to send ICMP echo requests from a non-
router system to the site-local address of another non-router system
on another subnet to verify that the routing is functioning as
expected. (You may have to wait enough time for the routing
information to be updated after the prior step’s system boot).
# ping fec0::2:a00:20ff:feb8:30c8
ICMPv6 Address Unreachable from gateway ....
...
# ping fec0::2:a00:20ff:feb8:30c8
fec0::2:a00:20ff:feb8:30c8 is alive
#
The preceding output indicates that the system is still in its default mode
and uses the same MAC address for each interface. This is indicated by
the setting of the local-mac-address? variable to false. You now use
the eeprom command to change the EEPROM’s local-mac-address?
variable to true.
# eeprom local-mac-address?=true
#
Note – You must reboot the system for EEPROM changes to take place.
You can also set the EEPROM’s local-mac-address? variable from the
OpenBoot PROM.
Note – You only see this and subsequent failure messages if you are
viewing the console.
You can ignore the preceding message because the interface is still being
configured.
Next, you configure a test address for the hme0 interface. To configure an
IPv6 test address, you use the link-local address.
When you configure the address, mark it so that the in.mpathd daemon
recognizes it as a test address that must not fail over (-failover). Enter
the following:
# ifconfig hme0 inet6 -failover
#
Be aware that the logical interface cannot function if the physical interface
fails.
Configure the new interface to also support IPv6. You do not need to
assign the interface to group because the IPv6 interface assumes the same
group membership as the IPv4 interface. Type the following:
# ifconfig qfe1 inet6 plumb up
Now you configure an IPv6 test address for the qfe1 interface. When you
configure the address, mark it so that the in.mpathd daemon recognizes
it as a test address that must not be used as a failover interface
(-failover) if another interface in the group fails. Perform the command:
# ifconfig qfe1 inet6 -failover
# Dec 19 14:47:47 sys13 in.mpathd[309]: Failure detection restored on
qfe1 as an IFF_NOFAILOVER address is available
If you need to start the in.mpathd daemon from the command line, use
the following command as the root user:
# /sbin/in.mpathd
#
The system now remains available to users even if either of the multipath
network interfaces fail or become unusable for any reason.
The preceding output indicates that the system is still in its default mode
and uses the same MAC address for each interface. You now use the
eeprom command to change the EEPROM’s local-mac-address?
variable to true.
# eeprom local-mac-address?=true
#
Note – You must reboot the system for EEPROM changes to take place.
You can also set the EEPROM’s local-mac-address? variable from the
OpenBoot PROM level.
where:
To view the configuration of the interfaces when the system is booted, use
the ifconfig command:
# ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
hme0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 192.168.1.3 netmask ffffff00 broadcast 192.168.1.255
groupname mpgrp6-one
ether 8:0:20:c1:4b:44
qfe1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
inet 192.168.1.200 netmask ffffff00 broadcast 192.168.1.255
groupname mpgrp6-one
ether 8:0:20:b7:4e:5d
lo0: flags=2002000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv6,VIRTUAL> mtu 8252 index 1
inet6 ::1/128
hme0: flags=a000841<UP,RUNNING,MULTICAST,IPv6,NOFAILOVER> mtu 1500 index 2
ether 8:0:20:c1:4b:44
inet6 fe80::a00:20ff:fec1:4b44/10
groupname mpgrp6-one
hme0:1: flags=2080841<UP,RUNNING,MULTICAST,ADDRCONF,IPv6> mtu 1500 index 2
inet6 2000::1:a00:20ff:fec1:4b44/64
hme0:2: flags=2080841<UP,RUNNING,MULTICAST,ADDRCONF,IPv6> mtu 1500 index 2
inet6 fec0::1:a00:20ff:fec1:4b44/64
qfe1: flags=a000841<UP,RUNNING,MULTICAST,IPv6,NOFAILOVER> mtu 1500 index 3
ether 8:0:20:b7:4e:5d
inet6 fe80::a00:20ff:feb7:4e5d/10
groupname mpgrp6-one
qfe1:1: flags=2080841<UP,RUNNING,MULTICAST,ADDRCONF,IPv6> mtu 1500 index 3
inet6 2000::1:a00:20ff:feb7:4e5d/64
qfe1:2: flags=2080841<UP,RUNNING,MULTICAST,ADDRCONF,IPv6> mtu 1500 index 3
inet6 fec0::1:a00:20ff:feb7:4e5d/64
#
With a single interface in the group, data addresses can never move to a
different interface, and so are always associated with the monitored
interface.
To create a singleton IPMP group at system boot, ensure that the interface
configuration file contains the group option and the IPMP group name:
# cat /etc/hostname6.hme0
group singleton#
Preparation
Unplumb any secondary interfaces that might be configured before
beginning this exercise.
Tasks
Complete the following steps.
Note – You must reboot the system for EEPROM changes to take place.
Write the name that you are going to assign to your multipath group:
_____________________________________________________________
4. Check your system for interfaces, and decide which interfaces that
you will use for multipathing.
Complete the following fields:
Multipath group name: _________________________
First interface: _______________________________
Second interface: _____________________________
IPv4 address for second interface: __________________
5. Configure your first interface as part of the multipath group that you
will use.
Write the command that you use:
_____________________________________________________________
6. Use the ifconfig command to verify that the interfaces were
configured as expected.
7. Configure a test address for your system’s first multipath interface,
and set the failover option appropriately for a multipathing test
address.
Write the command that you use:
_____________________________________________________________
8. Use the ifconfig command to verify that the interfaces were
configured as expected.
Caution – Before performing the next step, bring down and unplumb any
secondary interfaces that might be configured, as described in the
preparation section at the beginning of this exercise.
Exercise Summary
Exercise 2 Solutions
The output in the following solution is specific to an individual system.
Your results will be different depending upon the system on which you
are working.
Task Solutions
This section provides solutions to the exercise tasks.
This system can support multipathing because it is more recent than the
Solaris 8 10/00 OS.
3. Verify that your system is configured to use unique MAC addresses.
# eeprom local-mac-address?
local-mac-address?=true
#
This system assigns unique MAC addresses to each interface.
What command do you use to cause your system to use unique
MAC addresses?
# eeprom local-mac-address?=true
#
Note – You must reboot the system for EEPROM changes to take place.
Write the name that you are going to assign to your multipath group:
This solution uses a multipath group name of mp-demo.
4. Check your system for interfaces, and decide which interfaces that
you will use for multipathing.
Complete the following fields:
Multipath group name: _________________________
First interface: _______________________________
Second interface: _____________________________
IPv4 address for second interface: __________________
# ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
hme0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 192.168.2.3 netmask ffffff00 broadcast 192.168.2.255
ether 8:0:20:b8:30:c8
lo0: flags=2002000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv6,VIRTUAL> mtu 8252 index 1
inet6 ::1/128
hme0: flags=2000841<UP,RUNNING,MULTICAST,IPv6> mtu 1500 index 2
ether 8:0:20:b8:30:c8
inet6 fe80::a00:20ff:feb8:30c8/10
hme0:1: flags=2080841<UP,RUNNING,MULTICAST,ADDRCONF,IPv6> mtu 1500 index 2
inet6 2000::2:a00:20ff:feb8:30c8/64
hme0:2: flags=2080841<UP,RUNNING,MULTICAST,ADDRCONF,IPv6> mtu 1500 index 2
inet6 fec0::2:a00:20ff:feb8:30c8/64
#
This solution demonstrates use of the hme0 and qfe1 interfaces. The qfe1
interface is not configured for any network traffic at this stage.
● Multipath group name – mp-demo
● First interface – hme0
● Second interface – qfe1
The IPv4 address used for the secondary will be the primary interface’s
address plus 200. For example, 192.168.2.3 uses 192.168.2.203 for
the secondary interface.
5. Configure your first interface as part of the multipath group that you
will use.
# ifconfig hme0 inet6 group mp-demo
#
6. Use the ifconfig command to verify that the interfaces were
configured as expected.
# ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
hme0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 192.168.2.3 netmask ffffff00 broadcast 192.168.2.255
groupname mp-demo
ether 8:0:20:b8:30:c8
lo0: flags=2002000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv6,VIRTUAL> mtu 8252 index 1
inet6 ::1/128
hme0: flags=2000841<UP,RUNNING,MULTICAST,IPv6> mtu 1500 index 2
ether 8:0:20:b8:30:c8
inet6 fe80::a00:20ff:feb8:30c8/10
groupname mp-demo
hme0:1: flags=2080841<UP,RUNNING,MULTICAST,ADDRCONF,IPv6> mtu 1500 index 2
inet6 2000::2:a00:20ff:feb8:30c8/64
hme0:2: flags=2080841<UP,RUNNING,MULTICAST,ADDRCONF,IPv6> mtu 1500 index 2
inet6 fec0::2:a00:20ff:feb8:30c8/64
#
Observe that the IPv4 interface has also joined the multipath group.
7. Configure a test address for your system’s first multipath interface,
and set the failover option appropriately for a multipathing test
address.
# ifconfig hme0 inet6 -failover
#
Caution – Before performing the next step, bring down and unplumb any
secondary interfaces that might be configured, as described in the
preparation section at the beginning of this exercise.
Objectives
This module describes Transport layer fundamentals, including the
different characteristics of UDP and TCP. In addition, this module
explains TCP flow control.
The course map in Figure 9-1 shows how this module fits into the current
instructional goal.
Configuring the Network
Configuring IP
Configuring Configuring
Network
IP Routing
Multipathing
Describing
Configuring the Transport
IPv6 Layer
9-1
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
Introducing Transport Layer Fundamentals
TCP/IP Layers
Application Layer
Transport Layer
Internet Layer
Hardware Layer
Protocol Characteristics
There are two main protocols that operate at the Transport layer, TCP and
UDP. To understand the differences between TCP and UDP, you must be
familiar with the different characteristics of network protocols. The two
protocols associated with the Transport layer, TCP and UDP, are provided
by a kernel-loadable module. Application designers decide which
transport protocol to use for their application.
Connection-Oriented Protocols
Connectionless Protocols
Stateful Protocols
Client Server
Stateless Protocols
A stateless protocol is a protocol in which neither the client nor the server
system has an obligation to keep track of the state of the communication
session. A stateless protocol does not support most reliability features;
therefore, data that is sent can be lost or delivered out-of-sequence.
Figure 9-6 illustrates how interaction in a stateless protocol could work.
Client Server
Figure 9-6 Stateless Protocol
The advantages of a stateless protocol are that it has lower overheads and
it has a degree of isolation between the client and the server.
Connectionless protocols are typically stateless.
Reliable Protocols
Time
Send Packet 1
1
Receive Packet 1
Send Acknowledgement (ACK)
Receive ACK
Send Packet 2
3
Receive Packet 2
Send ACK
4
Receive ACK
Send Packet 3
5 Packet Lost
Timeout
Resend Packet 3
6 7 Receive Packet 3
Unreliable Protocols
Time
Send Packet 1
1
Send Packet 2
2
Send Packet 3
3 Packet Lost
Send Packet 4
4
The TCP/IP protocol stack features two Transport layer protocols, TCP
and UDP. Figure 9-9 shows an analogy that compares TCP and UDP.
TCP
Certified
UDP
Uncertified
Introducing UDP
UDP is a connectionless, stateless, and unreliable protocol. UDP is
designed for applications that do not require a reliable Transport layer
mechanism. UDP packets can be lost, duplicated, or delivered
out-of-order. The application program that uses UDP is responsible for
reliability, sequencing, and flow control, if required.
Purpose of UDP
UDP gives an application direct access to the Internet layer and includes
the source and the destination port numbers. UDP does not require that
the receiving host acknowledge transmissions. UDP has low overhead,
and it is designed for high-speed applications that run on reliable
networks. UDP is also used by Application layer protocols that transmit
information by broadcast mechanisms.
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
Length Checksum
Introducing TCP
TCP is a connection-oriented, stateful, and reliable protocol.
TCP is suited for situations where large volumes of data must travel
between systems, particularly across multiple routers and gateways. TCP
has four main features:
● Virtual circuit connection
● Full-duplex connection
● Unstructured stream orientation
● Buffered transfer
Full-Duplex Connection
TCP connections provide concurrent transfer in both directions. A
full-duplex connection consists of two independent streams of data that
flow in opposite directions. The TCP protocol software sends control
information for one stream back to the source in the segments that carry
data in the opposite direction. This process is called piggybacking, and it
reduces network traffic.
Buffered Transfer
Data that comes from the application is a flowing stream. Data can flow
fast or slow. To ensure the efficient flow of data to and from the
application, TCP provides both input and output buffers to regulate the
flow of data. The input and output buffers also enable the application to
see TCP as a full-duplex connection.
Depending upon the severity of the congestion, TCP can use either a
slow-start or congestion-avoidance algorithm to begin to increase the size
of the congestion window. The slow-start algorithm quickly increases
window size by doubling it for each successful transmission. The
congestion-avoidance algorithm slowly increases the window’s size by
increasing it only one segment at a time for each successful transmission.
A standard TCP header uses a 16-bit field to report the receiver window
size to the sender. Therefore, the largest window that can be used is 216 or
64 kilobytes (Kbyte). RFC 1323 introduces a mechanism to increase the
window size to 230 or 1 gigabyte (Gbyte).
Preparation
Refer to the lecture notes as necessary to perform the tasks listed.
Tasks
Complete the following steps:
1. Match the terms to their definition.
Exercise Summary
Exercise Solutions
Solutions to the exercise are as follows:
1. Match the terms to their definition.
Configuring DNS
Objectives
This module describes the basic components of DNS, including the
Berkeley Internet name domain (BIND), top-level domains, zones of
authority, server types, the name resolution process, and resource records.
This module also describes DNS configuration, including gathering
needed information, editing the BIND configuration file and other
relevant files, and performing basic troubleshooting procedures.
The course map in Figure 10-1 shows how this module fits into the
current instructional goal.
Configuring the
Configuring Configuring Configuring Solaris™ IP
DNS DHCP NTP Filter Firewall
10-1
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
Introducing DNS Basics
BIND
BIND is the most frequently used implementation of DNS in the UNIX
environment. The Solaris 10 OS implements the BIND 9, version 9.2.4
software.
The latest versions of the BIND software are available from the Internet
Systems Consortium’s (ISC) Web site, http://www.isc.org/. You can
download and compile the latest version; however, Sun Microsystems,
Inc. does not support this action.
Top-Level Domains
A domain:
● Is a collection of names that identifies network hosts and is a logical,
not physical entity. A domain is maintained by a group of
administrators. A single network can consist of hosts that belong to
many different domains.
● Is an index for looking up information in the DNS distributed
database.
● Can be branches or leaves in the DNS tree. Branches represent
collections of names in a common domain. Leaves represent
individual nodes and are considered domains unto themselves.
● Represents nodes or systems by name in the DNS naming tree,
which might not be in physical proximity. In other words, a domain
can span a large physical area.
● Can be broken into subdomains and can delegate authority for those
subdomains to another group of administrators.
The top of the DNS hierarchy contains a nameless root domain. This
domain is a place holder containing names and servers for the top-level
domains. The IANA controls the root domain. The ICANN non-profit
group is the governing body of all IP address assignments and domain
names and controls the root domain.
Top-level domains are below the root domain. Top-level domains (TLDs)
include currently domains such as com, edu, gov, org and arpa. All
top-level domains are controlled currently by the ICANN. The proposals
for new TLDs are available at the http://www.icann.org/tlds URL.
Table 10-1 shows top-level domains and their descriptions.
Domain Description
com Commercial organizations (predominately in the
United States (U.S.))
edu Educational organizations
gov Governmental organizations (U.S.)
mil Military organizations (U.S.)
net Networking organizations and ISPs
org Non-profit and other organizations
arpa Reverse address lookups
ca Country-based domains, Canada in this example
Second-level domains are below the top-level domains. The second level is
usually the first place that the ICANN delegates authority for a domain to
some other local organization. The ICANN, available at the
http://www.icann.org Web site, authorizes domain registrars to sell
domain names. The second-level domain, sun.com, for example, is
controlled by administrators of Sun Microsystems, not ICANN.
Zones of Authority
In addition to dividing the name space into administrative domains, the
name space also divides into various zones of authority. These zones:
● Are the portion of the name space for which a server is authoritative
(that is, contains information for domains over which the server has
naming control in the form of resource records in the servers’
configuration files)
● Consist of at least one domain and its associated data
● Can span one or more domains
Server Types
DNS implements name resolution. The following are some of the more
common server types, which are described in more detail in this section.
Note that a single system can fulfill more than one role. For example, a
system might be a primary server for one zone and a secondary server for
a different zone. All servers also cache information.
Root Servers
Root servers maintain data about each of the top-level zones. There are (as
of September, 2004) 13 root servers. Of these servers, nine serve the root
and top-level domains, and four serve the root domain only. ICANN
maintains the root servers, and the servers are moved to a common
domain for consistent naming purposes. The root servers are currently
named A.root-servers.net., B.root-servers.net., and so on.
You can download a current copy of the named.root file, which contains
a list of the current root servers, from the
ftp://ftp.rs.internic.net/domain/named.root URL.
Primary Servers
Each DNS zone must have a primary server. Although DNS does not
prohibit having more than one primary server, maintaining multiple
primary servers is difficult and is prone to having errors occur; therefore,
it is not frequently done. In the /etc/named.conf file, the keyword
master indicates the primary server.
Secondary Servers
Each domain should have at least one secondary server. The ICANN does
not permit a domain to be registered officially as a subdomain of a
top-level domain until a site demonstrates two working DNS servers.
Caching-Only Servers
All DNS servers cache information for any domain for which they are not
authoritative. Caching-only servers are servers that are not authoritative
for any zone, but instead caches responses from other, authoritative, name
servers. Over time, the size of the cache grows.
Forwarding Servers
Forwarding servers are DNS servers intended to act as focal points for all
off-site DNS queries. Off-site queries are queries for remote information.
Designating a server as a forwarding server causes all off-site requests to
consult initially the forwarding server or servers, and to wait for a reply. If
no reply is received from the forwarders, the name server resumes normal
operations and contacts the remote name servers itself.
Answer Types
Answers that are returned from DNS servers can be described as
authoritative or non-authoritative.
Name-Resolution Process
DNS name resolution is the process of translating a domain name to an IP
address or translating an IP address to a domain name.
Client-resolver code:
● Does not cache any information
● Queries the DNS servers that are specified in the /etc/resolv.conf
file
● Is activated by a reference to DNS in the /etc/nsswitch.conf file
hosts entry
A DNS client uses the following steps to query a name server to resolve
name-to-address or address-to-name requests. Figure 10-2 shows a client
attempting to resolve the ftp.internic.net name to an IP address.
1 /etc/nsswitch.conf File
2 /etc/inet/hosts File
4 /etc/resolv.conf File
5 6 Cache
7. If the local DNS server does not have cached information about the
net or internic domains, it contacts one of the root servers and
sends an iterative query. An iterative query states: “Send me the best
answer you have, and I will do all of the work.” In this example, the
assumption is that the answer is not cached and that a root server
must be contacted.
8. The root server returns the best information it has. In this case, the
only information you are guaranteed is that the root server has the
names and addresses of all the net domain servers. The root server
returns these names and addresses along with a TTL value that
specifies how long the local DNS server can cache this information.
9. The local DNS server contacts one of the net domain servers
returned from the previous query and transmits the same iterative
query that was previously sent to a root server.
10. The net domain server that is contacted returns the best information
it has, which are the names and addresses of the internic.net
servers and a TTL value.
11. The local DNS server contacts one of the internic.net domain
servers and makes the same query for the IP address for the Internet
name, ftp.internic.net.
12. An internic.net server returns the IP addresses of the Internet
name, ftp.internic.net, along with a TTL value.
The local DNS server returns the requested address to the client system,
and the client can proceed.
Resource Records
Resource records are entries contained in the name server zone files and
are not case sensitive. A resource record can contain information that
pertains to a particular domain, including the server addresses, cache
time-out values, and the email address of the DNS administrator.
Resource records can also include information about a particular system
including its IP address, its domain name, and its contact information.
Although each type of resource record has specific syntax, the general
format of any resource record is:
[name] [ttl] class type data
Field Description
name Specifies the domain name for which the resource record is
defining information. Because DNS is a distributed database,
this record also defines the possible key values that are used
in DNS queries. The sys12.one.edu and one.edu names
are examples of domain names.
ttl Specifies the cache TTL value that is given to remote DNS
servers when they query the information specified by this
record. This value is expressed in seconds, days, hours, and
so on. An example is 86400, which represents one day in
seconds, which can also be expressed as 1d.
class Specifies the type of network. The examples in this module
only use the IN or Internet class.
type Specifies the type of information that is defined for the
domain in field 1. Table 10-3 on page 10-13 shows commonly
used resource record types.
data Defines the appropriate data for this resource record and
depends on the record type specified in field 4, the type
field. Some record types specify a single argument in this
field, and other record types specify multiple arguments in
this field. Examples of a record type with multiple
arguments include a host name, an IP address, and an email
address.
Depending on the record type and other shortcuts being taken, not all of
the fields are always required.
Record Types
DNS zone files can contain blank lines and comments. Comments begin
with a semicolon.
$TTL The $TTL record identifies the cache TTL value that
remote DNS servers receive when they query the
information specified by this record.
SOA The start of authority (SOA) record identifies the
primary name server, contact information, and default
cache TTL values for all resource records in the domain.
NS The name server (NS) record specifies the name server
for a domain.
A The address (A) record specifies an IP address for a host
name.
PTR The pointer (PTR) record specifies a host name for an IP
address (used for inverse lookups and IP
address-to-host names).
CNAME The canonical name (CNAME) record defines a host name
alias (www can substitute for a specific host name).
AAAA The quad-A (AAAA) record specifies an IPv6 address for
a host name.
The $TTL directive identifies the cache TTL value that remote DNS servers
receive when they query the information specified by this directive. This
directive, or control statement, was not available for use until BIND 8.2.x
versions.
The following svcadm commands enable the DNS naming service and the
default client service:
# svcadm enable svc:/network/dns/server:default
# svcadm enable svc:/network/dns/client:default
Note – The DNS client service will not start any new processes, but when
enabled, checks that the system is configured as a DNS client with an
/etc/resolv.conf file. Other services used for managing application
and daemons that require DNS, such as LDAP, will have a dependency on
the DNS client service to ensure that the system is a DNS client.
Gathering Information
When you configure a DNS server, supply the server with the following
types of information:
● The names and addresses of root servers.
● The information required to resolve all domains for which the server
is authoritative. This information consists of name-to-address
translations.
● The information needed to resolve all reverse domains for which the
server is authoritative. This information consists of address-to-name
translations.
● The names and addresses of servers for all domains that are one
level below the domains being served by this server. This
information is sometimes referred to as parenting or delegating.
The named daemon reads the /etc/named.conf file when the daemon is
started by the SMF. The configuration file directs the named daemon either
to other servers or to local data files for a specified domain.
Statement Definition
/etc/named.conf
options {
DIRECTORY "/var/named"; /var/named
};
acl "nets"{
{192.168.1.0/24;};
};
zone "." in {
type hint;
file "named.root"; named.root
};
zone "one.edu" in {
type master;
file "forward.zone"; forward.zone
allow-transfer {"nets";};
};
zone "1.168.192.in-addr.arpa" in {
type master;
file "reverse.rzone";
}; reverse.rzone
zone "0.0.127.in-addr.arpa" in {
type master;
file "loop.back"; loop.back
};
/* This is a comment */
// This is a comment
# This is a comment
The following is a modified (the IN entries for servers D–L have been
removed in order to conserve space on this page) excerpt taken from the
named.root file available at the ftp://ftp.rs.internic.net/
domain/named.root URL:
; formerly NS.INTERNIC.NET
;
. 3600000 IN NS A.ROOT-SERVERS.NET.
A.ROOT-SERVERS.NET. 3600000 A 198.41.0.4
;
; formerly NS1.ISI.EDU
;
. 3600000 IN NS B.ROOT-SERVERS.NET.
B.ROOT-SERVERS.NET. 3600000 A 128.9.0.107
;
; formerly C.PSI.NET
;
. 3600000 IN NS C.ROOT-SERVERS.NET.
C.ROOT-SERVERS.NET. 3600000 A 192.33.4.12
< Part of file truncated>
; housed in Japan, operated by WIDE
;
. 3600000 IN NS M.ROOT-SERVERS.NET.
M.ROOT-SERVERS.NET. 3600000 A 202.12.27.33
; End of File
The NS and A records combine to define the name and address of a single
root server. This file specifies additional pairs of records, as appropriate.
;
;{name} {ttl} Class NS Nameserver Name
;------------------------------------------------------
IN NS sys12.one.edu.
IN NS sys13.one.edu.
;
;{name} {ttl} Class A IP Address
;-------------------------------------------------
sys11 IN A 192.168.1.1
sys12 IN A 192.168.1.2
sys13 IN A 192.168.1.3
sys14 IN A 192.168.1.4
localhost IN A 127.0.0.1
;
;{name} {ttl} Class CNAME Canonical Name
;-------------------------------------------------------
router IN CNAME sys11
dns IN CNAME sys12
The $TTL directive sets the default time to live for the zone’s information
to eight hours.
You should define an NS record for all name servers in this domain that
you want to be recognized by DNS servers.
Most of the remaining resource records are address records for each
system in the domain. Most of the host names are not fully qualified. The
names that are not fully qualified have the domain name origin (the value
of the @ in the SOA record by default) appended to them. This shorthand
method can save typing and improve the readability and maintainability
of the file.
The CNAME record defines host aliases, or nicknames for hosts. The CNAME
record in this instance is similar to the following entry in a
/etc/inet/hosts file:
The localhost entry specifies the loopback address for all hosts.
;
;{name} {ttl} Class SOA Origin Postmaster
;----------------------------------------------------------------------------------
@ IN SOA sys12.one.edu. root.sys12.one.edu. (
2005010101 ; Serial
3600 ; Refresh (1 Hour)
1800 ; Retry (30 Minutes)
6048000 ; Expire (1 Week)
86400 ) ; Minimum (24 Hours)
;
;{name} {ttl} Class NS Nameserver Name
;------------------------------------------------------
IN NS sys12.one.edu.
IN NS sys13.one.edu.
;
;{name} {ttl} Class PTR Real Name
;------------------------------------------------
1 IN PTR sys11.one.edu.
2 IN PTR sys12.one.edu.
3 IN PTR sys13.one.edu.
4 IN PTR sys14.one.edu.
;
;{name} {ttl} Class SOA Origin Postmaster
;----------------------------------------------------------------------------------
@ IN SOA sys12.one.edu. root.sys12.one.edu. (
2005010101 ; Serial
3600 ; Refresh (1 Hour)
1800 ; Retry (30 Minutes)
6048000 ; Expire (1 Week)
86400 ) ; Minimum (24 Hours)
;
;{name} {ttl} Class NS Nameserver Name
;------------------------------------------------------
IN NS sys12.one.edu.
IN NS sys13.one.edu.
;
;{name} {ttl} Class PTR Real Name
;------------------------------------------------
1 IN PTR localhost.
zone "1.168.192.in-addr.arpa" in {
type master;
file "db.192.168.1";
allow-update { 127.0.0.1; 192.168.1.2; };
};
2. Restart the named process by using the svcadm commands. For
example:
# svcadm restart svc:/network/dns/server:default
#
or
# svcadm disable svc:/network/dns/server:default
# svcadm enable svc:/network/dns/server:default
Configuring Security
Because of the nature of the Internet, DNS can be vulnerable to
unauthorized access.
You can restrict queries to all zones by using the allow-query keyword
as an argument to the options statement for the zone.
For example:
options {
allow-query { 192.168.1/24; 192.168.3/24; };
};
You can restrict queries for a specific zone by using the allow-query
keyword as an argument to the zone statement. For example:
zone "one.edu" in {
type master;
file "forward.zone";
allow-query { 192.168.3/24; };
};
In this case, only subnet 192.168.3.0 has access to the resource records
for this zone.
You can configure ACLs by using the acl keyword to build an ACL list
that can be used as an argument to the allow-query and
allow-transfer keywords.
For example:
acl "local" { 192.168.1.0/24; 192.168.2.0/24; 192.168.3.0/24; };
zone "one.edu" in {
type master;
allow-query { "local"; };
allow-transfer { "local"; };
};
Secondary servers start the named daemon during the boot process if the
/etc/named.conf file exists. The daemon is started by SMF.
The /etc/resolv.conf file specifies the name servers that the client must
use, the client’s domain name, and the search path to use for queries.
; resolv.conf file for DNS clients of the one.edu domain
search one.edu two.edu three.edu
nameserver 192.168.1.2
nameserver 192.168.1.3
The following svcadm command enables the DNS default client service:
# svcadm enable svc:/network/dns/client:default
A typical debug query testing forward resolution might look like the
following:
# dig @192.168.1.2 one.edu sys11.one.edu
;; QUESTION SECTION:
;one.edu. IN A
;; AUTHORITY SECTION:
one.edu. 86400 IN SOA sys12.one.edu.
root.sys12.one.edu. 2005010101 3600 1800 6048000 86400
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 1440
;; QUESTION SECTION:
;sys11.one.edu. IN A
;; ANSWER SECTION:
sys11.one.edu. 86400 IN A 192.168.1.1
;; AUTHORITY SECTION:
one.edu. 86400 IN NS sys12.one.edu.
one.edu. 86400 IN NS sys13.one.edu.
;; ADDITIONAL SECTION:
sys12.one.edu. 86400 IN A 192.168.1.2
sys13.one.edu. 86400 IN A 192.168.1.3
The ANSWER SECTION lists the answer retrieved from the DNS server. An
answer number (on the flags line) greater than zero usually indicates
success.
A typical debug query testing reverse resolution might look like the
following:
# dig @192.168.1.2 one.edu -x 192.168.1.1
;; QUESTION SECTION:
;one.edu. IN A
;; AUTHORITY SECTION:
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 1932
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2
;; QUESTION SECTION:
;1.1.168.192.in-addr.arpa. IN PTR
;; ANSWER SECTION:
1.1.168.192.in-addr.arpa. 86400 IN PTR sys11.one.edu.
;; AUTHORITY SECTION:
1.168.192.in-addr.arpa. 86400 IN NS sys13.one.edu.
1.168.192.in-addr.arpa. 86400 IN NS sys12.one.edu.
;; ADDITIONAL SECTION:
sys12.one.edu. 86400 IN A 192.168.1.2
sys13.one.edu. 86400 IN A 192.168.1.3
All of the options for the rndc utility are listed when it is invoked without
any as follows:
# rndc
Usage: rndc [-c config] [-s server] [-p port]
[-k key-file ] [-y key] [-V] command
Clear the server’s cached data by restarting the named daemon. For
example:
sys12# svcs -a | grep dns
online 5:09:02 svc:/network/dns/client:default
Verify that the cache has been cleared using the rndc command:
sys12# rndc dumpdb
sys12# cat /var/named/named_dump.db
;
; Cache dump of view '_default'
;
$DATE 20050112135516
Dump Examples
;; QUESTION SECTION:
;one.edu. IN A
;; AUTHORITY SECTION:
one.edu. 86400 IN SOA sys12.one.edu.
root.sys12.one.edu. 2005010101 3600 1800 6048000 86400
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 1204
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
;; QUESTION SECTION:
;192.168.1.1. IN A
;; AUTHORITY SECTION:
. 10800 IN SOA instructor.thirty.edu.
root.instructor.thirty.edu. 2005010101 3600 1800 6048000 86400
The NXDOMAIN in the dumped data indicates that a non existent (NX)
domain was requested. Because the incorrect syntax was used (missing -x
option, needed for reverse queries), the IP address was mistaken for a
domain.
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 1174
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
;; QUESTION SECTION:
;two.edu. IN A
;; AUTHORITY SECTION:
two.edu. 10800 IN SOA sys22.two.edu.
root.sys22.two.edu. 2005010101 3600 1800 6048000 86400
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 1982
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 0
;; QUESTION SECTION:
;1.2.168.192.in-addr.arpa. IN PTR
;; ANSWER SECTION:
1.2.168.192.in-addr.arpa. 86400 IN PTR sys21.two.edu.
;; AUTHORITY SECTION:
2.168.192.in-addr.arpa. 86400 IN NS sys23.two.edu.
2.168.192.in-addr.arpa. 86400 IN NS sys22.two.edu.
The first three entries in the cached data show the resolution process. The
first highlight entry shows the forwarding of the request to the
instructor.thirty.edu. The second highlighted entry shows that
server supplying the and of the authoritative server for the
2.168.192.in-addr.arpa zone (sys22.two.edu). The last highlighted
entry shows the pointer information cached for the requested IP address.
This next example cache dump shows a similar resolution for a forward
query:
sys13# dig @192.168.1.2 two.edu sys21.two.edu
<dig output omitted>
As of the Solaris 10 OS, the rndc utility replaces the ndc utility as the
name daemon control application. A significant difference between ndc
in BIND 8 and rndc in BIND 9 is that rndc uses its own configuration file,
rndc.conf.
Use the rndc-confgen utility to generate the proper contents for the
rndc.conf and /etc/named.conf files. The rndc.conf file specifies
which server controls and algorithm the server should use. You need only
a rndc.conf file in place if the named.conf file has an entry for a
rndc-key.
sys12# /usr/sbin/rndc-confgen
# Start of rndc.conf
key "rndc-key" {
algorithm hmac-md5;
secret "jZOP5nh//i9t7BwHivvNzA==";
};
options {
default-key "rndc-key";
default-server 127.0.0.1;
default-port 953;
};
# End of rndc.conf
options {
default-key "rndc-key";
default-server 127.0.0.1;
default-port 953;
};
key "rndc-key" {
algorithm hmac-md5;
secret "jZOP5nh//i9t7BwHivvNzA==";
};
controls {
inet 127.0.0.1 port 953
allow { 127.0.0.1; } keys { "rndc-key"; };
};
// end of rndc.key addition
...
Test the rndc.key by stopping and starting the named process, using the
rndc utility, and examining the resulting /var/adm/messages file entries:
sys12# svcadm disable svc:/network/dns/server:default
sys12# svcadm enable svc:/network/dns/server:default
sys12# tail -4 /var/adm/messages
Jan 12 08:58:48 sys12 named[1402]: [ID 873579 daemon.notice] starting
BIND 9.2.4
Jan 12 08:58:48 sys12 named[1402]: [ID 873579 daemon.notice] command
channel listening on 127.0.0.1#953
Jan 12 08:58:48 sys12 named[1402]: [ID 873579 daemon.notice] running
You will see an error message similar to the following if either there is a
problem with the contents of the rndc.conf file:
sys12# rndc dumpdb
Jan 12 10:13:40 sys12 named[1431]: invalid command from 127.0.0.1#32839:
bad auth
rndc: connection to remote host closed
This may indicate that the remote server is using an older version of
the command protocol, this host is not authorized to connect,
or the key is invalid.
sys12#
Server Status
The rndc utility can be used to query server status and report statistics.
You can use the rndc utility to flush the memory cache.
sys12# rndc flush
sys12# rndc dumpdb
sys12# cat /var/named/named_dump.db
;
; Cache dump of view '_default'
;
$DATE 20050113141237
sys12#
Use the rndc utility to change the debug level of the server. Before
making any changes, determine the current debug level of the daemon.
sys12# rndc status
number of zones: 5
debug level: 0
xfers running: 0
xfers deferred: 0
soa queries in progress: 0
query logging is ON
server is up and running
If logging is enabled, the debug level is shown along with the logged
messages:
sys12# tail -f /var/named/bind-log
Jan 13 07:12:37.548 general: debug 1: received control channel command
'dumpdb'
Jan 13 07:17:02.598 general: debug 1: received control channel command
'status'
Jan 13 07:17:15.249 general: debug 1: received control channel command
'trace'
Jan 13 07:17:17.929 general: debug 1: received control channel command
'status'
Jan 13 07:17:34.838 general: debug 1: received control channel command
'trace 8'
Jan 13 07:17:37.149 general: debug 1: received control channel command
'status'
Preparation
Refer to the lecture notes as necessary to perform the tasks listed.
Host Function
Task Summary
In this exercise, team up with the other students on your subnet, and
configure a DNS primary server, a DNS secondary server, and clients on
your subnet. You practice using troubleshooting tools, such as the
nslookup utility. Work as a team, and move as a team to each system that
is to be configured. In this way, you experience most of the aspects of
configuring DNS.
Tasks
To configure DNS, complete the following steps.
5. Set up the reverse lookup file for your domain on the system that
will be your domain’s primary DNS server. You can create the file
yourself, or you can use the template file that your instructor makes
available to you.
● What is the purpose of the reverse lookup zone file?
___________________________________________________
● What is the purpose of the PTR resource record?
___________________________________________________
6. Set up the loopback file for your domain on the system that will be
your domain’s primary DNS server. You can create the file yourself,
or you can use the template file that your instructor makes available
to you.
Continue as follows:
9. Start the name server daemon on your DNS server:
a. Use the svcadm command to enable both the name server
daemon and the DNS client.
___________________________________________________
___________________________________________________
b. Use the svcs command to verify that the services are online.
___________________________________________________
c. Check that the server daemon is running.
___________________________________________________
10. Check the /var/adm/messages file for DNS error messages.
Before continuing, troubleshoot to eliminate any DNS-related error
messages that appear in the /var/adm/messages file.
Note – Since the client service was just enabled on the primary name
server, this step does not have to be done on those systems.
11. Use the svcadm command to enable the default client service and
verify that it is enabled.
___________________________________________________
___________________________________________________
Continue as follows:
14. Test your DNS server. Use the techniques that are described in the
lecture part of the module.
a. Take a snapshot of the DNS information in memory.
Use the following command:
sys12# rndc dumpdb
b. View the dumped DNS data to look for errors.
Continue as follows:
16. Update both the forward and reverse zone files on the primary
server to support the secondary name server. Write the updates that
you use in each file.
_________________________________________________________
_________________________________________________________
_________________________________________________________
Continue as follows:
17. Add the secondary name server to the /etc/resolv.conf file on the
DNS clients and servers in your domain.
Write the updates that you put in the file:
_________________________________________________________
_________________________________________________________
Continue as follows:
18. Set up the /etc/named.conf file for your domain on the system that
will be your domain’s secondary DNS server. You can create the file
yourself, or you can use the template file that your instructor makes
available to you.
19. Set up the /var/named/db.root file for your domain on the system
that will be your domain’s secondary DNS server. You can create the
file yourself, or you can use the template file that your instructor
makes available to you.
20. Start the name server daemon on your DNS server:
a. Use the svcadm command to enable both the name server
daemon and the DNS client.
_____________________________________________________
_____________________________________________________
b. Use the svcs command to verify that the services are online.
_____________________________________________________
c. Check that the server daemon is running.
_____________________________________________________
21. Verify that the new zone files have been created in the /var/named
directory.
__________________________________________________________
22. Verify that the secondary name server performs forward lookup
requests as expected.
__________________________________________________________
Exercise Summary
Exercise Solutions
Solutions to this exercise are provided in the following section.
Task Solutions
To configure DNS, complete the following steps.
zone "."
{
type hint;
file "db.root";
};
zone "one.edu"
{
type master;
file "db.one.edu";
};
zone "1.168.192.in-addr.arpa"
{
type master;
file "db.192.168.1";
};
zone "0.0.127.in-addr.arpa" in
{
type master;
file "db.127.0.0";
};
● What is the purpose of the /etc/named.conf file?
The /etc/named.conf file is the configuration file read by the
named daemon at system start up. The named.conf file specifies the
directory that contains the other configuration files, the root servers,
the domains served by this server, and the type of server that this
system will be for each of those domains.
● What is the purpose of the following /etc/named.conf file
keywords?
● zone
It defines a zone of authority and applies options selectively on a
per-zone basis, rather than to all zones.
● options
It controls global server configuration options and sets default
values for other statements.
2. Create the /var/named directory.
sys12# mkdir /var/named
3. Set up the /var/named/db.root file for your domain on the system
that will be your domain’s primary DNS server. You can create the
file yourself, or you can use the template file that your instructor
makes available to you.
Your /var/named/db.root file should be similar to the following:
sys12# cat /var/named/db.root
;
; db.root
;
;{name} {ttl} Class NS Nameserver Name
;--------------------------------------------------------------
. 604800 IN NS instructor.thirty.edu.
;
;{name} {ttl} Class A IP Address
;---------------------------------------------------------
instructor.thirty.edu. 604800 IN A 192.168.30.30
#
;
;{name} {ttl} Class NS Nameserver Name
;------------------------------------------------------
IN NS sys12.one.edu.
localhost IN A 127.0.0.1
;
;{name} {ttl} Class CNAME Canonical Name
;-------------------------------------------------------
router IN CNAME sys11
dns IN CNAME sys12
● What is the purpose of a domain’s zone file?
This file contains the mappings of names to IP addresses for all
systems in the domain being served by this name server. In addition,
this file must specify an SOA record and NS records for all name
servers for this domain.
● What is the purpose of the SOA resource record?
The SOA record identifies the primary server, contact information, and
cache time-out values for the entries in the domain.
● What is the purpose of the CNAME resource record?
The CNAME record defines an alias for a host name.
5. Set up the reverse lookup file for your domain on the system that
will be your domain’s primary DNS server. You can create the file
yourself, or you can use the template file that your instructor makes
available to you.
Your /var/named/db.192.168.1 file should be similar to the following:
sys12# cat /var/named/db.192.168.1
; db.192.168.1
;
$TTL 86400
;
;{name} {ttl} Class SOA Origin Postmaster
;----------------------------------------------------------------------------------
@ IN SOA sys12.one.edu. root.sys12.one.edu. (
2005010101 ; Serial
3600 ; Refresh (1 Hour)
1800 ; Retry (30 Minutes)
6048000 ; Expire (1 Week)
86400 ) ; Minimum (24 Hours)
;
;{name} {ttl} Class PTR Real Name
;------------------------------------------------
1 IN PTR sys11.one.edu.
2 IN PTR sys12.one.edu.
3 IN PTR sys13.one.edu.
4 IN PTR sys14.one.edu.
● What is the purpose of the reverse lookup zone file?
This file contains mappings for address-to-name translation.
● What is the purpose of the PTR resource record?
The PTR record specifies a host name for an IP address.
6. Set up the loopback file for your domain on the system that will be
your domains primary DNS server. You can create the file yourself,
or you can use the template file that your instructor makes available
to you.
Your /var/named/db.127.0.0 file should be similar to the following:
sys12# cat /var/named/db.127.0.0
; db.127.0.0
;
$TTL 86400
;
;{name} {ttl} Class SOA Origin Postmaster
;----------------------------------------------------------------------------------
@ IN SOA sys12.one.edu. root.sys12.one.edu. (
2005010101 ; Serial
3600 ; Refresh (1 Hour)
1800 ; Retry (30 Minutes)
6048000 ; Expire (1 Week)
86400 ) ; Minimum (24 Hours)
;
;{name} {ttl} Class NS Nameserver Name
;------------------------------------------------------
IN NS sys12.one.edu.
;
;{name} {ttl} Class PTR Real Name
;------------------------------------------------
1 IN PTR localhost.
Continue as follows:
9. Start the name server daemon on your DNS server:
a. Use the svcadm command to enable both the name server
daemon and the DNS client.
sys12# svcadm enable svc:/network/dns/server:default
sys12# svcadm enable svc:/network/dns/client:default
b. Use the svcs command to verify that the services are online.
sys12# svcs -a | grep dns
online 14:53:08 svc:/network/dns/server:default
online 14:56:04 svc:/network/dns/client:default
c. Check that the server daemon is running.
sys12# pgrep named
97
10. Check the /var/adm/messages file for DNS error messages.
sys12# tail -4 /var/adm/messages
Jan 12 13:23:18 sys12 named[1516]: [ID 873579 daemon.notice] starting BIND 9.2.4
Jan 12 13:23:18 sys12 named[1516]: [ID 873579 daemon.notice] command channel listening
on 127.0.0.1#953
Jan 12 13:23:18 sys12 named[1516]: [ID 873579 daemon.notice] command channel listening
on ::1#953
Jan 12 13:23:18 sys12 named[1516]: [ID 873579 daemon.notice] running
Before continuing, troubleshoot to eliminate any DNS-related error
messages that appear in the /var/adm/messages file.
Note – Since the client service was just enabled on the primary name
servers, this step does not have to be done on those systems.
11. Use the svcadm command to enable the default client service and
verify that it is enabled.
# svcadm enable svc:/network/dns/client:default
# svcs -a | grep dns
online 15:02:34 svc:/network/dns/client:default
...
;; QUESTION SECTION:
;one.edu. IN A
;; AUTHORITY SECTION:
one.edu. 86400 IN SOA sys12.one.edu.
root.sys12.one.edu. 2005010101 3600 1800 6048000 86400
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 53
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2
;; QUESTION SECTION:
;sys11.one.edu. IN A
;; ANSWER SECTION:
sys11.one.edu. 86400 IN A 192.168.1.1
;; AUTHORITY SECTION:
one.edu. 86400 IN NS sys12.one.edu.
;; ADDITIONAL SECTION:
Continue as follows:
14. Test your DNS server. Use the techniques that are described in the
lecture part of the module.
a. Take a snapshot of the DNS information in memory.
Use the following command:
sys12# rndc dumpdb
b. View the dumped DNS data to look for errors.
sys12# view /var/named/named_dump.db
;
; Cache dump of view '_default'
;
$DATE 20050112203358
The dumped cache file is currently empty because the server has been
started recently and no queries have been cached at this time.
Continue as follows:
16. Update both the forward and reverse zone files on the primary
server to support the secondary name server. Write the updates that
you use in each file.
The addition to the forward zone file should be similar to the following,
added under the existing name server configuration:
The addition to the reverse zone file should be similar to the following,
added under the existing name server configuration:
Continue as follows:
17. Add the secondary name server to the /etc/resolv.conf file on the
DNS clients and servers in your domain.
Write the updates that you put in the file:
Your /etc/resolv.conf file should be similar to the following:
# cat /etc/resolv.conf
domain one.edu
nameserver 192.168.1.2
nameserver 192.168.1.3
Continue as follows:
18. Set up the /etc/named.conf file for your domain on the system that
will be your domain’s secondary DNS server. You can create the file
yourself, or you can use the template file that your instructor makes
available to you.
Your /etc/named.conf file should be similar to the following:
sys13# cat /etc/named.conf
options
{
directory "/var/named";
};
zone "."
{
type hint;
file "db.root";
};
zone "one.edu"
{
type slave;
file "db.one.edu.slave";
masters
{
192.168.1.2;
};
};
zone "1.168.192.in-addr.arpa"
{
type slave;
file "db.192.168.1.slave";
masters
{
192.168.1.2;
};
};
zone "0.0.127.in-addr.arpa" in
{
type slave;
file "db.127.0.0.slave";
masters
{
192.168.1.2;
};
};
19. Set up the /var/named/db.root file for your domain on the system
that will be your domain’s secondary DNS server. You can create the
file yourself, or you can use the template file that your instructor
makes available to you.
Your /var/named/db.root file should be similar to the following:
sys13# cat /var/named/db.root
; db.root
;
;{name} {ttl} Class NS Nameserver Name
;--------------------------------------------------------------
. 604800 IN NS instructor.thirty.edu.
;
;{name} {ttl} Class A IP Address
;---------------------------------------------------------
instructor.thirty.edu. 604800 IN A 192.168.30.30
sys13#
;; QUESTION SECTION:
;one.edu. IN A
;; AUTHORITY SECTION:
one.edu. 86400 IN SOA sys12.one.edu.
root.sys12.one.edu. 2005010101 3600 1800 6048000 86400
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 322
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2
;; QUESTION SECTION:
;4.1.168.192.in-addr.arpa. IN PTR
;; ANSWER SECTION:
4.1.168.192.in-addr.arpa. 86400 IN PTR sys14.one.edu.
;; AUTHORITY SECTION:
1.168.192.in-addr.arpa. 86400 IN NS sys13.one.edu.
1.168.192.in-addr.arpa. 86400 IN NS sys12.one.edu.
;; ADDITIONAL SECTION:
sys12.one.edu. 86400 IN A 192.168.1.2
sys13.one.edu. 86400 IN A 192.168.1.3
Configuring DHCP
Objectives
This module explains the fundamentals of DHCP, including the purpose
of DHCP and client and server functions. This module explains how to
configure DHCP and how to troubleshoot a DCHP server.
The course map in Figure 11-1 shows how this module fits into the current
instructional goal.
Configuring the
Configuring Configuring Configuring Solaris™ IP
DNS DHCP NTP Filter Firewall
11-1
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
Introducing the Fundamentals of DHCP
DHCP evolved from the bootstrap protocol (BOOTP). DHCP provides the
following enhanced functionality:
● Messages include network configuration for clients, such as:
● IP address
● Boot server IP address
● DNS domain, DNS server, and default router
● Lease periods are provided for IP address assignments.
● Routers can be configured to act as a BOOTP relay agent.
● Support is available for clients that need to boot over a network,
which, in effect, replaces the need for using RARP and the
/etc/bootparams file.
● Support is available for DHCP clients in the Solaris 10 OS.
Purpose of DHCP
DHCP reduces the cost of managing networks by eliminating the need to
manually assign or change IP addresses repeatedly. DHCP also reclaims
IP addresses that are no longer needed or if the time period for their use
has expired. These IP addresses can then be used by other clients. DHCP
also makes it easier to renumber the network if the ISP is changed. The
DHCP server would be reconfigured to provide the new IP addresses
offered from this new ISP.
DHCP
Configure Parameters
Network (System and
Interfaces Application)
Time
DHCPDISCOVER
1
DHCPOFFER
2
DHCPACK
4
Figure 11-4 shows the difference that a BOOTP relay makes for a client
that is attempting to contact a server.
BOOTP DHCP
Client Relay Server
Time
DHCPDISCOVER
DHCPDISCOVER
2
DHCPOFFER
DHCPACK
5
The BOOTP relay picks up incoming requests from clients and forwards
them to the DHCP server. The DHCP server replies to the BOOTP relay,
which then forwards the response on to the client.
The dhcpconfig command and the dhcpmgr utility are available for use
to configure DHCP servers and BOOTP relay servers. These utilities
enable you to set startup options, configure the DHCP service database
type and location, and initialize the dhcptab file and DHCP network
tables for any networks.
2. Click OK.
The DHCP Configuration Wizard – Step 1 window appears.
Figure 11-6 shows you where to select the data storage format.
12. If appropriate, type the NIS domain configuration in the NIS Domain
field.
13. If appropriate, type the NIS server IP address in the NIS Servers
field, and click Add for each NIS server that you are specifying.
14. Click >.
8. Select Configuration Macro from the drop-down list box and verify
that Addresses are unusable is unchecked.
9. If you want to view the contents of the selected macro, click View. To
exit the contents window, click OK.
10. Click >.
Note – Normally, routers, mail servers, and systems that provide services
use permanent lease types.
13. Choose Exit from the File menu to close the DHCP Manager
window.
14. To view the information that the dhcpmgr utility added to the
/etc/inet/hosts file, use the grep command:
# grep dhcp /etc/inet/hosts
192.168.1.10 sys13-dhcp-10 #net1
192.168.1.11 sys13-dhcp-11 #net1
192.168.1.12 sys13-dhcp-12 #net1
192.168.1.13 sys13-dhcp-13 #net1
192.168.1.14 sys13-dhcp-14 #net1
192.168.1.15 sys13-dhcp-15 #net1
192.168.1.16 sys13-dhcp-16 #net1
192.168.1.17 sys13-dhcp-17 #net1
192.168.1.18 sys13-dhcp-18 #net1
192.168.1.19 sys13-dhcp-19 #net1
#
To configure a DHCP server for the first time, type the command by using
the following format:
/usr/sbin/dhcpconfig -D -r datastore -p location
where:
To configure (-D) a system for DHCP services using ASCII files for
datastore (-r) and locate (-p) the datastore files in the /var/dhcp
directory, enter the following:
# /usr/sbin/dhcpconfig -D -r SUNWfiles -p /var/dhcp
Created DHCP configuration file.
Created dhcptab.
Added "Locale" macro to dhcptab.
Added server macro to dhcptab - sys12.
DHCP server started.
#
After the datastore location and type are established, you must configure
the appropriate files to function as a DHCP server.
DHCP
Network
192.168.1.0
Configuration Parameters
00 Client Address:
192.168.30.1
Server Address:
192.168.30.30
One DHCP network file exists for each network that is served by the
DHCP server. The name of each file is determined from the datastore
format and the network address of the network that it supports, such as
SUNWfiles1_192_168_1_0. There is no table or file with the name
SUNWfiles. The name always includes an IP address and an identifier
about the file type (SUNWbinfiles, SUNWfiles, or SUNWnisplus).
To view the initial contents of the DHCP network file, type the command:
# cat SUNWfiles1_192_168_1_0
# SUNWfiles1_192_168_1_0
#
# Do NOT edit this file by hand -- use pntadm(1M) or dhcpmgr(1M) instead
#
The DHCP network tables can exist as ASCII text files, binary files, or
NIS+ tables, depending on the datastore used. Binary files are faster and
more efficient and are recommended for networks with a DHCP client
base of many thousands of systems.
You can use any one of the following option flags with the pntadm
command:
Note – You can use an alias name for this network in place of the network
number if the alias is defined in the /etc/inet/networks file.
To verify that the network table was created, type the command:
# ls /var/dhcp | grep 30
SUNWfiles1_192_168_30_0
#
To view the initial contents of the new table, use the cat command:
# cat /var/dhcp/SUNWfiles1_192_168_30_0
# SUNWfiles1_192_168_30_0
#
# Do NOT edit this file by hand -- use pntadm(1M) or dhcpmgr(1M) instead
#
To view the table and observe the changes made by the pntadm command,
type the command:
# cat /var/dhcp/SUNWfiles1_192_168_30_0
# SUNWfiles1_192_168_30_0
#
# Do NOT edit this file by hand -- use pntadm(1M) or dhcpmgr(1M) instead
192.168.30.1|00|00|192.168.1.2|0|8214847195300495361|UNKNOWN|
#
Note – Observe that the Flags value is 03, which represents the sum of 2
and 1, where MANUAL is represented by 2 and PERMANENT is represented
by 1. Refer to the DHCP network man page for more information.
To delete the 192.168.30.2 entry from the 192.168.30.0 table, type the
command:
# pntadm -D 192.168.30.2 192.168.30.0
The preferred methods of managing the dhcptab table are through the
use of the dhcpmgr utility or dhtadm command.
View the contents of the dhcptab table by using the Macros and Options
tabs in the DHCP Manager, or by using the dhtadm -P command on the
command line.
To add a symbol called NewSym to the dhcptab table, type the command:
# dhtadm -A -s NewSym -d ’Vendor=SUNW.PCW.LAN,20,IP,1,0’ -r SUNWfiles -p
/var/dhcp
To add a macro called NewMacro to the dhcptab table, type the command:
# dhtadm -A -m NewMacro
’:Timeserv=192.168.1.1:DNSserv=192.168.1.1:’
#
To delete the NewSym symbol from the dhcptab table, type the command:
# dhtadm -D -s NewSym
#
To delete the NewMacro macro from the dhcptab table, type the command:
# dhtadm -D -m NewMacro
Table 11-1 shows the items that are created during DHCP configuration.
The service configuration Records keywords and Data store type and
file, values for server location. Options used with
/etc/inet/dhcpsvc.conf configuration options. the in.dhcpd daemon to
start the DHCP daemon
when the system boots.
The dhcptab table Creates a dhcptab table if it Macros and options with
does not already exist. assigned values.
The Locale macro Contains the local time The UTCoffst option.
(optional) zone’s offset in seconds
from Coordinated Universal
Time.
The server macro, named to Contains options with The Locale macro. The
match the server’s node values determined by input options: Palatinoerv,
name from the administrator who which is set to point to the
configured the DHCP server’s primary IP address;
server. The options apply to LeaseTim and LeaseNeg, if
all clients that use addresses you select negotiable leases;
owned by the server. and DNSdmain and DNSserv,
if DNS is configured.
5. Reboot the client, and watch the system console as the system boots.
6. Observe the hostname, for example:
Copyright 1983-2004 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
Hostname: sys13-dhcp-14
Note – The state file is written only when the dhcpagent process is
terminated and the dhcpagent program is not configured to release its IP
address on termination.
The DHCP server makes sure that the host name is not in use by another
system on the network before the server assigns it to the client.
Depending on how the DHCP server is configured, it can also update
naming services with the client’s host name.
After you enable the client software and reboot the system, the client tries
to reach the DHCP server to obtain its network configuration. If the client
fails to reach the server or if the client does not receive correct
information, you can see error messages, such as:
DHCP or BOOTP server not responding
Need router-ip to communicate with TFTP server
TFTP server’s IP address not known!
The information you gather can help you determine if the problem is with
the client, server, or a relay agent.
Preparation
Before performing this exercise, do the following:
● Refer to your network diagram to determine the function of each
system on your subnet.
● Refer to the lecture notes as necessary to perform the tasks listed.
The exercise examples show the DHCP server as 192.168.X.3 and the
DHCP client as 192.168.X.4. The complete system and server-client
functions for these exercises are shown in Table 11-2.
Host Function
Task Summary
In this exercise, you accomplish the following tasks:
● Configure a DHCP server.
● Configure a DHCP client.
● Use the snoop utility to view DHCP client server interaction.
In this part of the exercise, use the DHCP Manager graphical user
interface (GUI) utility (dhcpmgr utility) to configure a DHCP server on
your subnet. Permit the network wizard to start and configure at least five
hosts with the address range starting at 192.168.xxx.xxx, where
xxx.xxx is provided by the instructor depending on the classroom setup.
This example uses the sys14 system as the DHCP client. To configure the
DHCP client, complete the following steps:
1. Log in as the root user on the DHCP client.
2. Enable DHCP on the client.
3. Configure the /etc/default/dhcpagent file on the DHCP client so
that it releases its IP address if it is rebooted or is shut down.
4. Reboot the client, and watch the system console as the system boots.
5. Use the snoop utility to convert the trace data to ASCII text, and
output that text to the /tmp/dhcp-snoop.txt file for viewing with
any text editor that provides easy navigation and searching of the
data.
6. Use the view utility to view the trace data in the
/tmp/dhcp-snoop.txt file. Look for messages, such as
DHCPDISCOVER, DHCPOFFER, DHCPREQUEST, and DHCPACK, in the trace.
Observe the ETHER destination addresses, the source and destination
IP addresses, and the DHCP messages.
7. Prevent the client system from continuing to act as a DHCP by
removing the /etc/dhcp.* files and rebooting the system.
Exercise Summary
Exercise Solutions
Solutions to the exercise are provided in this section.
In this part of the exercise, use the DHCP Manager GUI utility
(dhcpmgr utility) to configure a DHCP server on your subnet. Permit the
network wizard to start and configure at least five hosts with the address
range starting at 192.168.xxx.xxx, where xxx.xxx is provided by the
instructor depending on the classroom setup.
e. Accept the defaults of 1, days, and Clients can renew their leases,
then click >.
f. Accept the default DNS domain and DNS servers, and click >.
i. Use the default Configuration Macro and verify that Addresses are
unusable is checked.
j. Click >.
Note – You can continue without problems if one or two addresses are
already in use from earlier exercises.
m. Select Exit from the File menu to close the DHCP Manager window.
4. To view the information that the dhcpmgr utility added to
the/etc/inet/hosts file, use the grep command:
# grep dhcp /etc/inet/hosts
192.168.1.10 sys13-dhcp-10 #net1
192.168.1.11 sys13-dhcp-11 #net1
192.168.1.12 sys13-dhcp-12 #net1
192.168.1.13 sys13-dhcp-13 #net1
192.168.1.14 sys13-dhcp-14 #net1
#
This example uses the sys14 system as the DHCP client. To configure the
DHCP client, complete the following steps:
1. Log in as the root user on the DHCP client.
2. Enable DHCP on the client.
Create the appropriate file for the external interface, which is hme0 in this
example.
The command syntax used to enable the DHCP client is:
# touch /etc/dhcp.hme0
DHCPDISCOVER:
DHCPOFFER:
DHCPREQUEST:
DHCPACK:
Configuring NTP
Objectives
This module introduces how to configure the Network Time Protocol
(NTP). This module also introduces NTP basics, including how computers
keep time, the uses of NTP, and NTP terms. This module also describes
how to configure an NTP server and an NTP client. In addition, this
module describes how to troubleshoot NTP, including how to view logs
and how to use the snoop utility.
The course map in Figure 12-1 shows how this module fits into the
current instructional goal.
Configuring the
Configuring Configuring Configuring Solaris™ IP
DNS DHCP NTP Filter Firewall
12-1
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
Identifying NTP Basics
When the system is not running the Solaris OS, the time-of-day chip
maintains basic 24-hour time. This time is copied into a 64-bit counter
used by the kernel to maintain 24-hour time for a running system.
The Sun system central processing units (CPUs) generate the regular
interrupts. By default, 100 interrupts are generated per second. For the
system’s counter to increment, the CPUs interrupt must be processed by
the kernel. Each interrupt that gets processed is known as a clock tick.
However, not all interrupts get processed. This is often due to high system
loads and higher priority tasks that take precedence within the kernel.
Therefore, gradually, a clock will fall slightly behind because not all time
interrupts are processed. However, the controller boards in Sun FIre™ 12k
to 25k high-end servers use a real-time clock, not the normal 100
interrupts per second method. This makes them excellent NTP servers,
since the clock does not drift as it does on a regular server or workstation.
However, making them an NTP client can cause issues with the SMS
software.
Note – The 32-bit time counter would reach its limit in the year 2038. The
64-bit time counter was started at 0 at midnight, January 1, 1970
Greenwich Mean Time (GMT). The counter will reach its limit in about
290 million years.
Uses of NTP
Many network applications need synchronized clocks to properly
function. For example:
● Encryption – This application often uses time as a component of
encryption keys.
● Network management – This application uses time to determine
exactly when something took place.
● Logging – The syslog facility uses time to display system events.
● File systems – Applications time stamp files when they are created or
modified. Many backup applications are configured to use time as a
criteria for determining backups, so that clock synchronization
between the backup server and other systems is important.
● Cluster Nodes – Individual nodes in a Sun Cluster configuration use
NTP to ensure that they all agree on the time.
NTP Terms
Several terms are used when describing time-related topics. These terms
are described in Table 12-1.
Term Description
Term Description
Jitter The difference of the differences experienced when
repeatedly measuring time.
Accuracy How close a clock follows an official time reference,
such as UTC.
Reliability The length of time that a clock can remain accurate
within a specified range.
Wander All clocks suffer from frequency variations. This
variation is called wander.
Drift file A file that contains the frequency offset of the local
system’s clock oscillator. Drift file contents can be used
by protocols, like NTP, to cause a system’s clock to be
more accurate. The default location for Sun’s NTP drift
file is /var/ntp/ntp.drift.
xntpd The NTP daemon.
The ntp.conf A file that causes the xntpd daemon to start in either
file the client or the server mode and provides
configuration statements that control the behavior of
the xntpd daemon.
The fudge You can use the fudge command in the ntp.conf file
command as a keyword to configure reference clocks in special
ways, such as defining calibration constants to force a
time offset to a particular external-time standard.
Discipline A general term used for various actions carried out by
some protocol, which helps keep a local clock better
synchronized to an official time source, such as UTC.
Table 12-2 shows the parts of an NTP server’s configuration file and their
descriptions.
Part Description
server 127.127.1.0 prefer The IP address of the preferred NTP server. In this
case, the loopback network is used, indicating the
use of a local clock. The server keyword indicates
an IP address of an NTP server from which time
will be received.
If the system is a stratum-1 server, then you use X
in the 127.127.X.0 syntax to identify a reference
clock source. If X is set to 1, the system uses its
local clock as the reference clock source.
If the server is a stratum-2 (or higher), this entry is
an IP address of another NTP server to contact for
time information. The prefer keyword means
that if multiple systems of the same strata are used
to getting clock information, a preferred server is
the one that is always used when performing
calculations.
fudge 127.127.1.0 stratum 0 The fudge entry is available to change (fudge) the
stratum that the server advertises.
broadcast 224.0.1.1 ttl 4 The address the server uses to advertise to the
network along with the TTL value to use in IP
datagrams.
enable auth monitor The configuration entry that enables
authentication and the monitoring facility.
driftfile /var/ntp/ntp.drift The location of the drift file.
statsdir /var/ntp/ntpstats/ The location of NTP statistics.
keys /etc/inet/ntp.keys The conventional name of the key file used for
authentication.
trustedkey 0 The encryption identifier. (Refer to RFC 1305 for
more information.)
controlkey 0 The key identifier. (Refer to RFC 1305 for more
information.)
Note – The xntpd daemon creates the contents of the drift file
dynamically.
You can configure the stratum of an NTP server manually by editing the
fudge entry in the /etc/inet/ntp.conf file. This is useful when you do
not have access to an external NTP server and you have to synchronize
with another system manually.
Note – The snoop utility output includes the stratum level of the server.
NTP servers and clients that are in the process of synchronization have a
stratum level of 0 (zero) initially, until they establish their correct stratum
level.
Note – NTP servers and client that are synchronizing with specific servers
defined in the /etc/inet/ntp.conf file use a 64-second polling
interval initially. When time synchronization is established, the polling
interval increases to 17 minutes and 4 seconds (that is, 1024 seconds, or 210
seconds).
Managing Daemons
By default, all NTP messages are sent to the syslog facility.
You can query or configure a running xntpd daemon by using the xntpdc
utility, which was introduced in the Solaris 8 OS. The xntpdc command
provides an extensive view of the state of the xntpd daemon. You can
view statistical information interactively or on the command-line. Use the
? command to view a list of commands available inside xntpdc.
# xntpdc
xntpdc> ?
Commands available:
addpeer addrefclock addserver addtrap authinfo
broadcast clkbug clockstat clrtrap controlkey
ctlstats debug delay delrestrict disable
dmpeers enable exit fudge help
host hostnames iostats kerninfo keyid
keytype leapinfo listpeers loopinfo memstats
monlist passwd peers preset pstats
The commands can be used to display and configure the NTP setup. For
example, the sysinfo command displays information about the current
configuration:
xntpdc> sysinfo
system peer: instructor
system peer mode: client
leap indicator: 00
stratum: 2
precision: -14
root distance: 0.00081 s
root dispersion: 0.31441 s
reference ID: [192.168.30.30]
reference time: c4cc99b1.2ce5f000 Tue, Aug 17 2004 15:50:25.175
system flags: auth monitor pll stats kernel_sync
frequency: -16.000 ppm
stability: 38.345 ppm
broadcastdelay: 0.003906 s
authdelay: 0.000122 s
xntpdc> quit
#
Troubleshooting NTP
Use a combination of tools, such as viewing system error logs and using
the snoop utility, to troubleshoot NTP.
Viewing Messages
Log messages result from setting the time forward on the system. The
system sends out its periodic (every 64 seconds) NTP requests with the
incorrect time. The NTP servers respond with the correct time. After
receiving multiple updates from the NTP servers, the client changes its
time and writes a message to the /var/adm/messages file.
# tail -50 /var/adm/messages | grep -i ntp
Aug 17 15:21:46 sys11 ntpdate[1680]: [ID 318594 daemon.notice] no server
suitable for synchronisation found yet
Aug 17 15:21:46 sys11 ntpdate[1680]: [ID 147394 daemon.notice] trying ttl
1 for multicast server synchronisation
Aug 17 15:21:46 sys11 ntpdate[1680]: [ID 558725 daemon.notice] adjust tim
e server 192.168.30.30 offset 0.004158 sec
Aug 17 15:22:48 sys11 xntpd[1676]: [ID 702911 daemon.notice] xntpd 3-5.93
e+sun 03/08/29 16:23:05 (1.4)
Aug 17 15:22:48 sys11 xntpd[1676]: [ID 301315 daemon.notice] tickadj = 5,
tick = 10000, tvu_maxslew = 495, est. hz = 100
Aug 17 15:22:48 sys11 xntpd[1676]: [ID 266339 daemon.notice] using kernel
phase-lock loop 0041, drift correction 0.00000
#
Preparation
Refer to the lecture notes as necessary to perform the tasks listed. The
instructor’s system must be configured as a stratum-0 server even though
the system might be using its local clock. This configuration must be
completed at least five minutes before this exercise starts so that the NTP
server has an opportunity to initialize itself properly.
Task Summary
In this exercise, you configure an NTP server and an NTP client on your
subnet. Your NTP server uses the instructor system as an external NTP
server. After the NTP server is configured, it broadcasts NTP updates to
your local subnet.
Team up with other students in your subnet group so that you can
experience most aspects of NTP configuration.
Tasks
Your first task is to configure your subnet’s router as an NTP server.
7. Start the NTP daemon, and view the NTP transactions that can be
seen on the snoop trace that is running. Watch the transactions for a
few minutes to see your system’s time becoming synchronized with
the instructor’s stratum-0 NTP server. When you are finished,
terminate the snoop session.
Write the command that you use:
_____________________________________________________________
Exercise Summary
Exercise Solutions
Solutions to this exercise are provided in the following section.
Task Solutions
Your first task is to configure your subnet’s router as an NTP server.
Use a combination of the snoop and grep utilities to look for NTP updates
on the interface (qfe0) closest to the instructor system as follows:
# snoop -d qfe0 -c 1 port ntp
Using device /dev/qfe (promiscuous mode)
instructor.thirty.edu -> 192.168.30.255 NTP broadcast [st=1]
(2004-11-05 09:41:20.83034)
1 packets captured
#
You can continue to configure your system as an NTP server because it is
receiving NTP updates from the instructor system that is acting as a
stratum-0 server.
2. Copy and rename the NTP configuration template in preparation for
specifying configurations in that file for the next time the NTP
service is enable.
Write the command that you use:
Copy the /etc/inet/ntp.server file to the /etc/inet/ntp.conf file.
# cp /etc/inet/ntp.server /etc/inet/ntp.conf
3. Edit the NTP configuration file, and modify the server entry so that
your system looks to the instructor system for NTP updates. Ensure
that the instructor system is your preferred server. While you edit
the file, comment out the fudge and keys entries and modify the
broadcast entry.
Edit the /etc/inet/ntp.conf file.
# vi /etc/inet/ntp.conf
Change the server and fudge entries to be similar to the following:
server 192.168.30.30 prefer
# fudge 127.127.XType.0 stratum 0
Change the keys entries to be similar to the following:
#keys /etc/inet/ntp.keys
#trustedkey 0
#requestkey 0
#controlkey 0
Change the broadcast entry to be similar to the following:
broadcast 192.168.1.255 ttl 4
4. Create a drift file as specified by the drift file entry in the
configuration file.
Write the command that you use:
# touch /var/ntp/ntp.drift
5. Start the snoop utility on your router system’s to observe NTP traffic
between the router and the instructor system.
Write the command that you use:
Start the snoop utility on the 192.168.30.0 network.
# snoop -d qfe0 port ntp
Using device /dev/qfe (promiscuous mode)
instructor -> 192.168.30.255 NTP broadcast [st=1] (2004-11-05 10:04:48.83026)
...
6. In another window, determine if the NTP daemon is running on
your system.
Write the command that you use, and write the output of the
command:
# pgrep -lf ntp
1142 snoop -d qfe0 port ntp
No, the NTP daemon is not running, as expected.
7. Start the NTP daemon, and view the NTP transactions that can be
seen on the snoop trace that is running. Watch the transactions for a
few minutes to see your system’s time becoming synchronized with
the instructor’s stratum-0 NTP server.
Write the command that you use:
# svcadm enable svc:/network/ntp:default
svc:/network/ntp:default enabled
#
# snoop -d qfe2 port ntp
Using device /dev/qfe (promiscuous mode)
sys11ext -> instructor NTP client [st=0] (2004-11-05 10:05:14.45062)
instructor -> sys11ext NTP server [st=1] (2004-11-05 10:09:39.79242)
...
You can continue with configuring your system as an NTP client because it
is receiving NTP updates from your router system, which acts as a
stratum-2 server.
9. Copy and rename the NTP client configuration template to specify
the configuation of the NTP service when it is enabled.
Write the command that you use:
# cp /etc/inet/ntp.client /etc/inet/ntp.conf
10. Determine if the NTP daemon is running.
Write the command that you use, and write your answer:
# pgrep -lf ntp
No, the NTP daemon is not running, as expected.
11. Start a snoop session on the appropriate interface on the client. In the
window running the snoop trace on the NTP client. After you start
the NTP service in the next step, be prepared to examine the trace
carefully.
# snoop -d hme0 port ntp
...
12. Start the NTP daemon and verify that it is running.
Write the commands that you use:
# svcadm -v enable svc:/network/ntp
svc:/network/ntp:default enabled.
#
# pgrep -lf ntp
1528 /usr/lib/inet/xntpd
13. Examine the snoop trace and locate the part of the snoop trace where
the client time changed to match the server’s time. (Hint: Use X-Off
(Control+S key sequence) to stop the snoop trace from scrolling and
use X-On (Control+Q key sequence) to enable scrolling again.
...
sys12.one.edu -> 224.0.1.1 NTP client [st=0] (2005-02-02 15:58:11.61034)
sys12.one.edu -> 224.0.1.1 NTP client [st=0] (2005-02-02 15:58:12.61016)
sys12.one.edu -> 224.0.1.1 NTP client [st=0] (2005-02-02 15:58:13.61026)
sys12.one.edu -> 224.0.1.1 NTP client [st=0] (2005-02-02 15:58:14.61010)
sys11.one.edu -> 192.168.1.255 NTP broadcast [st=2] (2005-02-02 15:57:47.06304)
sys12.one.edu -> sys11.one.edu NTP client [st=0] (2005-02-02 15:58:38.02497)
{observe that the client has updated its time to that of the server}
Objectives
This module introduces how to configure the Solaris IP Filter host-based
firewall. This module also introduces the basics of the Solaris IP Filter
firewall, including how the firewall decides whether or not to pass a
packet and how rules for the firewall can be defined based on various
criteria.
The course map in Figure 13-1 shows how this module fits into the
current instructional goal.
Configuring the
Configuring Configuring Configuring Solaris™ IP
DNS DHCP NTP Filter Firewall
13-1
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
Identifying Firewall Basics
The default behavior of the Solaris IP Filter firewall is to read every rule in
the /etc/ipf/ipf.conf file. Each rule in the file tells the Solaris IP
Filter firewall to either permit or deny the packet to be sent or received.
When processing a packet, the Solaris IP Filter firewall performs the
following tasks:
1. Compare the packet against the direction and criteria in the rule.
2. If the packet matches, remember the action specified in the rule.
3. Discard any action remembered previously.
4. If the end of the rules is reached or the matched rule contains the
quick keyword, stop matching and perform the action.
5. If no rules match, pass the packet.
#le -1 0 pfil
#qe -1 0 pfil
#hme -1 0 pfil
#qfe -1 0 pfil
#eri -1 0 pfil
#ce -1 0 pfil
#bge -1 0 pfil
#be -1 0 pfil
#vge -1 0 pfil
#ge -1 0 pfil
#nf -1 0 pfil
#fa -1 0 pfil
#ci -1 0 pfil
#el -1 0 pfil
#ipdptp -1 0 pfil
#lane -1 0 pfil
#dmfe -1 0 pfil
#
Figure 13-2 shows how filtering works when based upon traffic direction.
Traffic
Flow
hme0 hme1
Internet
Corporate
Traffic Network
Flow
hme0 hme1
The block keyword is an action keyword which tells the Solaris IP Filter
firewall that the packet should be blocked (dropped) if the packet matches
the rule.
The pass keyword is the action keyword that tells the Solaris IP Filter
firewall that the packet should be accepted or sent if the packet matches
the rule.
The in keyword is used for rules that relate to packets arriving at the
system from the network. Any rule that contains the in keyword is
applied only to packets arriving at the system from the network.
All rules that are intended to block packets arriving at a system start with
the following:
block in ...
All rules that are intended to pass packets arriving at a system start with
the following:
pass in ...
The out keyword is used for rules that relate to packets leaving the
system to go out on to the network. Any rule containing the out keyword
is applied only to packets leaving the system.
All rules that are intended to block packets leaving a system start with the
following:
block out ...
All rules that are intended to pass packets leaving a system start with the
following:
pass out ...
Recall that the default behavior of the Solaris IP Filter firewall is to find
every rule that matches and remember the action from the last rule
matched. The quick keyword is used to change this behavior.
If a packet matches a rule containing the quick keyword, then the Solaris
IP Filter firewall stops matching at that rule and applies the action
contained in the rule. The remaining rules are not processed against the
packet for matches.
To define a rule that will block any incoming packet matching the rule
and will stop the Solaris IP Filter firewall from processing any further
rules, start the rule with:
block in quick ...
To define a rule that will permit any outgoing packet matching the rule
and will stop the Solaris IP Filter firewall from processing any further
rules, start the rule with:
pass out quick ...
The all keyword is used to match every packet either arriving or leaving
at a system.
For example, to block every packet arriving at a system, use the rule:
block in all
The Solaris IP Filter firewall applies each rule to every network interface
on the system by default. Use of the on keyword enables you to apply a
rule to a particular network interface only.
Note – The Solaris IP Filter firewall does not filter the loopback interface.
You should not use the interface identifier lo0 in the
/etc/ipf/ipf.conf file. Note that the lo identifier does not appear in
the /etc/ipf/pfil.ap file.
The Solaris IP Filter firewall can filter packets based on their source and
destination IP addresses. To filter packets based on the source IP address,
the from keyword is used. To filter packets based on the destination IP
address, the to keyword is used.
The rule:
block out from any to 192.168.30.30/32
will block any packets leaving the current system which have the host
192.168.30.30 as their destination.
will block any packets arriving at the qfe0 network interface from any
source IP address which are intended for the 192.168.1.0 network.
will block any packet leaving the qfe0 interface which originated from
the host 192.168.1.2 and is intended for the 192.168.3.0 network.
The Solaris IP Filter firewall is also capable of filtering traffic based on the
network protocol contained in a packet. The protocols which can be
filtered are TCP, UDP and ICMP.
The proto keyword is used to filter on protocol type. The proto keyword
is followed by a second keyword that identifies the protocol or protocols
to be filtered. Table 13-1 shows the keywords and the protocols to which
they relate.
icmp ICMP
tcp TCP
udp UDP
tcp/udp Both TCP and UDP
For example, to block all ICMP packets arriving on the hme0 interface, use
the rule:
block in on hme0 proto icmp from any to any
In this form, this rule blocks all ICMP packets. The icmp-type keyword
can be used to specify a single ICMP type value for the rule. All ICMP
packets contain a type value in the ICMP header. Some common ICMP
types are shown in Table 13-2.
When writing rules for protocols like Telnet and FTP, the keep state
keywords are a convenient way to avoid having to know the per-session,
anonymous-client port assignments. See the ipf.conf(4) man page for
details.
To block all incoming packets intended for the telnet server port (port
23), use the rule:
block in quick proto tcp from any to any port = 23
To block all incoming telnet packets except those originating from the
192.168.1.0 network, use the rules:
pass in quick proto tcp from 192.168.1.0/24 to any port = 23
block in quick proto tcp from any to any port = 23
To permit packets to leave the telnet server port if they are intended for
the local subnet, use the rule:
pass out quick proto tcp from 192.168.1.1/32 port = 23 to 192.168.1.0/24
The -f option is used to add filtering rules. The -f option takes the name
of a file containing the new rules as an argument. The rules found in the
file are appended to any existing rules:
# ipf -f /etc/ipf/ipf.conf
#
The ipf command can also be used to remove rules from the current
configuration. The -F (flush) option is used to clear rules. The -F option is
combined with one of three choices of the rules to clear:
For example, to clear all of the input rules, type the command:
# ipf -Fi
#
Note – Options to the ipf command are executed in the order in which
they are specified on the command line. If a flush option is specified after
an add rules option, the new rules will be added, then flushed along with
the old rules. To clear the existing rules and load a new or updated set, the
flush option must be specified first.
The ipfstat command can also be used to display the rules being used
currently by using the -io option:
# ipfstat -io
empty list for ipfilter(out)
block in proto tcp from any to 192.168.2.0/24 port = telnet
#
Note – The ipfstat -io command does not display the rules in the
same sequence as they are listed in the /etc/ipf/ipf.conf file. The
out rules are listed in order first, and then the in rules are listed.
For example, to log any packets which are received on the hme0 interface
and intended for the rpcbind daemon, but which do not originate from
the 192.168.1.0 network, add the log keyword to the block rule in
the following example:
pass in quick on hme0 proto tcp/udp from 192.168.1.0 to any port = 111
block in log quick on hme0 proto tcp/udp from any to any port = 111
To capture logged information to a file, supply the name of the file to log
to as an argument to the ipmon command:
# ipmon /var/tmp/filterlog.txt
<Control>-C
#
The Solaris IP Filter firewall sends packets by using the local0 facility,
and so the /etc/syslog.conf file must be configured appropriately to
record logging information sent to it by the ipmon command.
Preparation
Caution – Before beginning this exercise, check that DNS services are
running as they were in the prior DNS exercise. If the services are not
running, issue the appropropriate svcadm commands on the appropriate
systems to once again enable them.
Team up with other students in your subnet group so that you can
experience most aspects of the Solaris IP Filter firewall configuration.
Task Summary
In this exercise, you configure packet filtering on your subnet’s router and
on client systems in your subnet.
To enable the packet filter to block all incoming telnet requests to your
system, perform the following:
1. Use another system to verify that your network is functioning
properly and that your system can be accessed with the telnet
utility. After you verify that telnet access is permitted, terminate
the telnet session.
_____________________________________________________________
2. Determine the current status of the svc:/network/ipfilter and
svc:/network/pfil services by using the svcs command.
_____________________________________________________________
3. Use the ifconfig command to determine to which interface to
apply filter rules.
_____________________________________________________________
4. Edit the Solaris IP Filter firewall’s autopush configuration file to
specify the network interface for packet filtering on your system. Do
this by removing the comment from the appropriate interface
learned in the previous step.
Which file do you edit?
_____________________________________________________________
5. Edit the /etc/ipf/ipf.conf file and add the relevant rules to block
all incoming telnet requests to your system. Your file should have
contents similar to the following:
sys12# cat /etc/ipf/ipf.conf
#
# ipf.conf
#
# IP Filter rules to be loaded during startup
#
# See ipf(4) manpage for more information on
# IP Filter rules syntax.
block in proto tcp from any to 192.168.1.2/32 port = 23
#
6. Enable the packet filter.
a. Start the service, and write the command that you use.
________________________________________________________
b. Verify that the service started, and write the command that you
use.
________________________________________________________
7. Verify that, although a rule to block telnet access was established
and the ipfilter service enabled, it is possible to use the telnet
utility to access from another system to your system. After you
verify that telnet access is permitted, terminate the telnet session.
_____________________________________________________________
8. From the command line force the pfild daemon to read the rule file
by performing the following steps. (You can also reboot the system
to accomplish the same effect.)
a. Use the ifconfig command to determine the configuration of
your system’s interfaces. Document the relevant interface
information, such as IP address, mask, and broadcast address.
________________________________________________________
b. Force the autopush configuration file to be read by using the
following command:
sys12# autopush -f /etc/ipf/pfil.ap
c. Unplumb your system’s interface.
________________________________________________________
d. Plumb your system’s interface to load the packet filter into the
interface’s IP stack.
________________________________________________________
9. As done previously, use another system and attempt to use the
telnet utility to determine if your system permits a telnet
connection.
_____________________________________________________________
The next steps are to configure your system to permit incoming telnet
requests from the local subnet, but block telnet requests from all other
networks and not process any other rules.
10. Edit the Solaris IP Filter firewall configuration file by adding a new
rule that:
● Permits incoming telnet access only from other hosts on your
local subnet
● Stops processing of subsequent rules by using the quick
keyword.
Write the rule that you entered in the /etc/ipf/ipf.conf file:
_____________________________________________________________
Did you put the new rule before or after the existing rule? Why?
_____________________________________________________________
_____________________________________________________________
11. Update the Solaris IP Filter firewall configuration to include the new
rule by using the following ipf command:
sys12# ipf -Fa -f /etc/ipf/ipf.conf
12. Display the new rule set by using the ipfstat command.
_____________________________________________________________
13. Validate that the new configuration is working. Attempt to establish
a telnet session to your system from a host on the local subnet and
from a host on another subnet.
_____________________________________________________________
The next steps configure your router to block all telnet requests from
outside your subnet to any system on your subnet.
14. Verify that the systems can properly communicate across subnets by
establishing an appropriate telnet session that passes through your
router system. Terminate the telnet session after you verify
successful communication.
_____________________________________________________________
15. Edit the Solaris IP Filter firewall’s autopush configuration file to
specify the network interfaces for packet filtering on your router
system. Do this by removing the comments from the appropriate
interfaces. (The ifconfig command shows the interfaces.)
Which file do you edit?
_____________________________________________________________
16. Edit the relevant file on your router system and add rules to block all
incoming telnet requests to your local subnet that do not originate
from the local subnet. Document the file that you edit and your
rules.
_____________________________________________________________
The next steps block your non-router system from sending any outgoing
ICMP echo replies.
Continue as follows on the same router system on which you have been
working:
6. Update the Solaris IP Filter firewall configuration to permit routing
information traffic to be sent and received.
Before the existing block out all and block in all rules, write
the rules that you entered in the /etc/ipf/ipf.conf file:
_____________________________________________________________
_____________________________________________________________
_____________________________________________________________
_____________________________________________________________
_____________________________________________________________
_____________________________________________________________
7. Update the Solaris IP Filter firewall configuration to use the new
rules by using the ipf command.
_____________________________________________________________
8. Verify the rules by using the ipfstat command.
_____________________________________________________________
Continue as follows on the same router system on which you have been
working:
10. Update the Solaris IP Filter firewall configuration to permit DNS
traffic to be sent and received.
At the beginning of the configuration file, write the rules that you
entered in the /etc/ipf/ipf.conf file.
_____________________________________________________________
_____________________________________________________________
11. Update the Solaris IP Filter firewall configuration to include the new
rule by using the ipf command.
_____________________________________________________________
12. Verify the rules by using the ipfstat command.
_____________________________________________________________
Continue as follows on the same router system on which you have been
working:
14. Even though this group of steps is to be performed on your router
system, before configuring rules for FTP, verify that your firewalls
are functioning properly by insuring that you cannot initiate an FTP
session from your non-router system to the instructor machine.
Once you verify this, you can proceed with writing rules to allow
FTP through the router firewall system.
_____________________________________________________________
15. Update the Solaris IP Filter firewall configuration to permit FTP
traffic to pass from the local subnet to the instructor system only. Log
any traffic that matches one of the rules that you define.
Assume that your system will get more DNS traffic than FTP traffic.
Placing the new FTP rules after the DNS rules would recognize this
and, appropriately, be more responsive to the DNS traffic.
Hint: Use the keep state keywords in your rules.
Write the rules that you entered in the /etc/ipf/ipf.conf file.
_____________________________________________________________
_____________________________________________________________
_____________________________________________________________
_____________________________________________________________
_____________________________________________________________
_____________________________________________________________
_____________________________________________________________
_____________________________________________________________
16. Update the Solaris IP Filter firewall configuration to include the new
rule by using the ipf command.
_____________________________________________________________
17. Verify the rules by using the ipfstat command.
_____________________________________________________________
Complete as follows on the same router system on which you have been
working:
21. View the log file created by the ipmon command.
_____________________________________________________________
Exercise Summary
Exercise Solutions
Solutions to this exercise are provided in the following sections.
These solutions use sys12 as the example non-router system and sys11
as the example router system. Solution results vary accordingly.
Task 1 Solutions
In the first part of the lab you will configure the Solaris IP Filter firewall’s
rules to show how to enable and disable access to services on a host and a
network.
To enable the packet filter to block all incoming telnet requests to your
system, perform the following:
1. Use another system to verify that your network is functioning
properly and that your system can be accessed with the telnet
utility. After you verify that telnet access is permitted, terminate
the telnet session.
sys13# telnet sys12
Trying 192.168.1.2...
Connected to sys12.one.edu
Escape character is '^]'.
login: root
Password:
Last login: Mon Dec 20 03:46:26 from sys13.one.edu
Sun Microsystems Inc. SunOS 5.10 Generic January 2005
Welcome to SA300-S10_A on sys12
sys12# exit
Connection to sys12.one.edu closed by foreign host.
sys13#
This proves that your system responds to the telnet request as expected.
Now you can proceed with configuring the firewall and have confidence that
your working blocking rule will be responsible for blocking telnet
requests and not some other networking issue.
8. From the command line force the pfild daemon to read the rule file
by performing the following steps. (You can also reboot the system
to accomplish the same effect.)
a. Use the ifconfig command to determine the configuration of
your system’s interfaces. Document the relevant interface
information, such as IP address, mask, and broadcast address.
sys12# ifconfig -a inet
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu
8232 index 1
inet 127.0.0.1 netmask ff000000
hme0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
inet 192.168.1.2 netmask ffffff00 broadcast 192.168.1.255
b. Force the autopush configuration file to be read by using the
following command:
sys12# autopush -f /etc/ipf/pfil.ap
c. Unplumb your system’s interface.
sys12# ifconfig hme0 down unplumb
d. Plumb your system’s interface to load the packet filter into the
interface’s IP stack.
sys12# ifconfig hme0 plumb 192.168.1.2 netmask 0xffffff00 broadcast 192.168.1.255 up
9. As done previously, use another system and attempt to use the
telnet utility to determine if your system permits a telnet
connection.
sys13# telnet sys12
Trying 192.168.1.2...
telnet: Unable to connect to remote host: Connection timed out
sys13#
You should observe that telnet access is now blocked.
The next steps are to configure your system to permit incoming telnet
requests from the local subnet, but block telnet requests from all other
networks and not process any other rules.
10. Edit the Solaris IP Filter firewall configuration file by adding a new
rule that:
● Permits incoming telnet access only from other hosts on your
local subnet
● Stops processing of subsequent rules by using the quick
keyword.
Write the rule that you entered in the /etc/ipf/ipf.conf file:
pass in quick proto tcp from 192.168.1.0/24 to 192.168.1.2/32 port = 23
Did you put the new rule before or after the existing rule? Why?
Because you used the quick keyword in the new rule, it should be placed
before the old rule to permit local telnet access only.
If you place it after the old the rule, the old rule attempts to block the
telnet requests and then the new rule permits telnet access from the
local subnet.
11. Update the Solaris IP Filter firewall configuration to include the new
rule by using the following ipf command:
sys12# ipf -Fa -f /etc/ipf/ipf.conf
12. Display the new rule set by using the ipfstat command.
sys12# ipfstat -io
empty list for ipfilter(out)
pass in quick proto tcp from 192.168.1.0/24 to 192.168.1.2/32 port = telnet
block in proto tcp from any to 192.168.1.2/32 port = telnet
13. Validate that the new configuration is working. Attempt to establish
a telnet session to your system from a host on the local subnet and
from a host on another subnet.
sys13# telnet 192.168.1.2
Trying 192.168.1.2...
Connected to sys12.
Escape character is ’^]’.
login:
The next steps configure your router to block all telnet requests from
outside your subnet to any system on your subnet.
14. Verify that the systems can properly communicate across subnets by
establishing an appropriate telnet session that passes through your
router system. Terminate the telnet session after you verify
successful communication.
sys21# telnet 192.168.1.1
Trying 192.168.1.1...
Connected to 192.168.1.1.
Escape character is '^]'.
login: root
Password:
Last login: Mon Dec 20 05:54:27 from sys21ext.thirty
Sun Microsystems Inc. SunOS 5.10 Generic January 2005
Welcome to SA300-S10_A on sys11
sys11# exit
Connection to 192.168.1.1 closed by foreign host.
Now that you have established successful communication you can have
confidence that subsequent failed sessions will be the result of a firewall
configured properly, and not some other networking issue.
15. Edit the Solaris IP Filter firewall’s autopush configuration file to
specify the network interfaces for packet filtering on your router
system. Do this by removing the comments from the appropriate
interfaces. (The ifconfig command shows the interfaces.)
Which file do you edit?
The /etc/ipf/pfil.ap file.
Your configuration file should look similar to the following:
sys11# cat /etc/ipf/pfil.ap
...
#qe
hme
qfe
#eri
...
16. Edit the relevant file on your router system and add rules to block all
incoming telnet requests to your local subnet that do not originate
from the local subnet. Document the file that you edit and your
rules.
sys11# cat /etc/ipf/ipf.conf
block in on qfe2 proto tcp from any to 192.168.1.0/24 port = 23
17. Enable the packet filter by performing the following steps:
a. Verify the status of the svc:/network/ipfilter service, and
write the command that you use.
sys11# svcs -a | grep ipfilter
disabled 8:31:38 svc:/network/ipfilter:default
b. Start the service, and write the command that you use.
sys11# svcadm enable svc:/network/ipfilter:default
c. Verify that the service started, and write the command that you
use.
sys11# svcs -a | grep ipfilter
online 5:56:23 svc:/network/ipfilter:default
18. From the command line force the pfild daemon to read the rule file
by performing the following steps. (You can also reboot the system
to accomplish the same effect.)
a. Force the autopush configuration file to be read by using the
following command:
sys11# autopush -f /etc/ipf/pfil.ap
b. Determine the configuration of your system’s interfaces.
Document the relevant interface information, such as IP
address, mask, broadcast address, and routing information.
sys11# ifconfig -a inet
The next steps block your non-router system from sending any outgoing
ICMP echo replies.
21. Update the Solaris IP Filter firewall configuration to include the new
rule by using the ipf command.
sys12# ipf -Fa -f /etc/ipf/ipf.conf
22. Verify the rules by using the ipfstat command.
sys12# ipfstat -io
block out quick proto icmp from any to any icmp-type echorep
pass in quick proto tcp from 192.168.1.0/24 to 192.168.1.2/32 port = telnet
block in proto tcp from any to 192.168.1.2/32 port = telnet
#
23. Test that the new rule is functioning correctly by using the ping
command from the test system again.
sys13# ping sys12
no answer from sys12
24. Verify that a local system can successfully perform DNS lookups
across routers. Use the dig command to find the IP address of a
system on another network. (Successful completion of this step will
aid you in later steps when you write rules to specifically allow DNS
through firewalls.)
sys13# dig @192.168.2.2 two.edu -x 192.168.2.4
; <<>> DiG 9.2.4 <<>> @192.168.2.2 two.edu -x 192.168.2.4
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 1914
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
;; QUESTION SECTION:
;two.edu. IN A
;; AUTHORITY SECTION:
two.edu. 86400 IN SOA sys22.two.edu.
root.sys22.two.edu. 2005010101 3600 1800 6048000 86400
;; Query time: 4 msec
;; SERVER: 192.168.2.2#53(192.168.2.2)
;; WHEN: Wed Jan 12 08:19:05 2005
;; MSG SIZE rcvd: 72
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 1194
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2
;; QUESTION SECTION:
;4.2.168.192.in-addr.arpa. IN PTR
;; ANSWER SECTION:
4.2.168.192.in-addr.arpa. 86400 IN PTR sys24.two.edu.
;; AUTHORITY SECTION:
2.168.192.in-addr.arpa. 86400 IN NS sys22.two.edu.
2.168.192.in-addr.arpa. 86400 IN NS sys23.two.edu.
;; ADDITIONAL SECTION:
Task 2 Solutions
In the second part of the lab you restrict access to your subnet by
disabling all services except a defined set.
Continue as follows on the same router system on which you have been
working:
6. Update the Solaris IP Filter firewall configuration to permit routing
information traffic to be sent and received.
Before the existing block out all and block in all rules, write
the rules that you entered in the /etc/ipf/ipf.conf file:
pass in quick proto udp from any to any port = 520
pass out quick proto udp from any to any port = 520
pass in quick proto udp from any to any port = 521
pass out quick proto udp from any to any port = 521
pass in quick proto icmp from any to any icmp-type 10
pass out quick proto icmp from any to any icmp-type 9
7. Update the Solaris IP Filter firewall configuration to use the new
rules by using the ipf command.
sys11# ipf -Fa -f /etc/ipf/ipf.conf
8. Verify the rules by using the ipfstat command.
sys11# ipfstat -io
pass out quick proto udp from any to any port = route
pass out quick proto udp from any to any port = ripngd
pass out quick proto icmp from any to any icmp-type routerad
block out all
pass in quick proto udp from any to any port = route
pass in quick proto udp from any to any port = ripngd
pass in quick proto icmp from any to any icmp-type routersol
block in all
Continue as follows on the same router system on which you have been
working:
10. Update the Solaris IP Filter firewall configuration to permit DNS
traffic to be sent and received.
At the beginning of the configuration file, write the rules that you
entered in the /etc/ipf/ipf.conf file.
pass in quick proto udp from any to any port = 53 keep state
pass out quick proto udp from any to any port = 53 keep state
11. Update the Solaris IP Filter firewall configuration to include the new
rule by using the ipf command.
sys11# ipf -Fa -f /etc/ipf/ipf.conf
12. Verify the rules by using the ipfstat command.
sys11# ipfstat -io
pass out quick proto udp from any to any port = domain keep state
pass out quick proto udp from any to any port = route
pass out quick proto udp from any to any port = ripng
pass out quick proto icmp from any to any icmp-type routerad
block out all
pass in quick proto udp from any to any port = domain keep state
pass in quick proto udp from any to any port = route
pass in quick proto udp from any to any port = ripng
pass in quick proto icmp from any to any icmp-type routersol
block in all
Continue as follows on the same router system on which you have been
working:
14. Even though this group of steps is to be performed on your router
system, before configuring rules for FTP, verify that your firewalls
are functioning properly by ensuring that you cannot initiate an FTP
session from your non-router system to the instructor machine.
Once you verify this, you can proceed with writing rules to allow
FTP through the router firewall system.
sys12# ftp 192.168.30.30
ftp: connect: Connection timed out
ftp> bye
sys12#
Complete as follows on the same router system on which you have been
working:
21. View the log file created by the ipmon command.
sys11# cat /var/tmp/ipfilter.log
03/02/2005 14:13:12.223769 hme0 @0:2 p 192.168.1.3,32788 -> 192.168.30.30,21 PR tcp
len 20 52 -S K-S IN
03/02/2005 14:13:12.223821 qfe0 @0:2 p 192.168.1.3,32788 -> 192.168.30.30,21 PR tcp
len 20 52 -S K-S OUT
03/02/2005 14:13:12.224270 qfe0 @0:2 p 192.168.30.30,21 -> 192.168.1.3,32788 PR tcp
len 20 52 -AS K-S IN
03/02/2005 14:13:12.224486 hme0 @0:2 p 192.168.30.30,21 -> 192.168.1.3,32788 PR tcp
len 20 52 -AS K-S OUT
03/02/2005 14:13:12.224930 hme0 @0:2 p 192.168.1.3,32788 -> 192.168.30.30,21 PR tcp
len 20 40 -A K-S IN
03/02/2005 14:13:12.224950 qfe0 @0:2 p 192.168.1.3,32788 -> 192.168.30.30,21 PR tcp
len 20 40 -A K-S OUT
03/02/2005 14:13:12.274058 qfe0 @0:2 p 192.168.30.30,21 -> 192.168.1.3,32788 PR tcp
len 20 85 -AP K-S IN
03/02/2005 14:13:12.274078 hme0 @0:2 p 192.168.30.30,21 -> 192.168.1.3,32788 PR tcp
len 20 85 -AP K-S OUT
03/02/2005 14:13:12.274309 hme0 @0:2 p 192.168.1.3,32788 -> 192.168.30.30,21 PR tcp
len 20 40 -A K-S IN
03/02/2005 14:13:12.274326 qfe0 @0:2 p 192.168.1.3,32788 -> 192.168.30.30,21 PR tcp
len 20 40 -A K-S OUT
Bibliography1-1
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
Books
Books
The following books were used to create this course:
● Albitz, Paul, and Cricket Liu. DNS & BIND, Fourth Edition.
Sebastopol, CA: O’Reilly & Associates, Inc., 2001.
● Comer, Douglas. Internetworking with TCP/IP, Second Edition.
Englewood Cliffs, NJ: Prentice Hall, 1991.
● Comer, Douglas E. Internetworking With TCP/IP, Vol. 1, Third Edition.
Upper Saddle River, NJ: Prentice Hall, Inc. 1995.
● Huitema, Christian. IPv6 The New Internet Protocol, Second Edition.
Upper Saddle River, NJ: Prentice Hall, Inc. 1998.
● Huitema, Christian. Routing in the Internet. Upper Saddle River, NJ:
Prentice-Hall. 1995.
● Huitema, Christian. Routing in the Internet, Second Edition. Upper
Saddle River, NJ: Prentice Hall, Inc., 1999.
● Loshin, Pete. IPv6 Clearly Explained. San Francisco: Morgan
Kaufmann, 1999.
● Perlman, Radia. Interconnections, Second Edition. Menlo Park, CA:
Addison-Wesley, 1999.
● Spurgeon, Charles E. Ethernet: The Definitive Guide. Sebastopol, CA:
O’Reilly & Associates, Inc., 2000.
The following book can be used when studying for the Solaris 8 Network
Certification Exam:
Online References
Many online references were used to create this course, including:
● Mills, David. Information on Time and Frequency Services. [Online].
Available: http://www.eecis.udel.edu/~mills/ntp/, last
accessed: 2000.
● Windl, U. and D. Dalton. What about NTP?: Understanding and Using
the Network Time Protocol (A First Try on a Non-Technical Mini-HOWTO
and FAQ on NTP). [Online]. Available:
www.ntp.org/ntpfaq/NTP-a-faq.htm. Last accessed: 03/04/2000.
● The Solaris OS online manual pages.
● The http://docs.sun.com Web site.
● The http://www.sun.com/solutions/blueprints/ Sun
BluePrints Web site.
Bibliography Bibliography-3
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
RFCs
RFCs
Many RFCs were used to create this course, including:
● RFC 1323: TCP Extensions for High Performance.
● Conta, A., and S. Deering. RFC 2463: Internet Control Message Protocol
(ICMPv6) for the Internet Protocol Version 6 (IPv6) Specification.
Network Working Group Request for Comments: 2463, 1998.
● Fenner, W. RFC 2236: Internet Group Management Protocol, Version 2.
Network Working Group Request for Comments: 2236, 1997.
● Hinden, R., and S. Deering. RFC 2373: IP Version 6 Addressing
Architecture. Network Working Group Request for Comments: 2373,
1998.
● Hinden, R., and S. Deering. RFC 2460: Internet Protocol, Version 6
(IPv6) Specification. Network Working Group Request for Comments:
2460, 1998.
● Mills, David. RFC 1305: Network Time Protocol (Version 3) Specification,
Implementation and Analysis. Network Working Group Request for
Comments: 1305, 1992.
● Narten, T., E. Nordmark, and W. Simpson. RFC 2461: Neighbor
Discovery for IP Version 6 (IPv6). Network Working Group Request for
Comments: 2461, 1998.
● Rekhter, Y., B. Moskowitz, D. Karrenberg, G. J. de Groot, and E. Lear.
RFC 1918: Address Allocation for Private Internets. Network Working
Group Request for Comments: 1918, 1996.
● Thomson, S., and T. Narten. RFC: 2462: IPv6 Stateless Address
Autoconfiguration. Network Working Group Request for Comments:
2462, 1998.
Numerals
10BASE-T
An evolution of Ethernet technology that succeeded 10BASE-5 and
10BASE-2 as the most popular method of physical network
implementation. A 10BASE-T network has a data transfer rate of
10 megabits per second and uses unshielded twisted-pair wiring.
A
ACL
(access control list) ACLs provide a higher level of file security than the
standard UNIX file permissions. ACLs give a file owner the ability to
permit access to that file or directory to one or more specific users or
groups and to set the default permissions for specific users or groups.
AH
Authentication header.
ANSI
American National Standards Institute.
application
A program that combines all the functions necessary for the user to
accomplish a particular set of tasks (for example, word processing or
inventory tracking).
Application layer
In the International Standards Organization/Open Systems
Interconnection (ISO/OSI) model of network standards, the seventh
layer, which handles services, such as login procedures, file and print
server operation, and other basic functions.
Glossary-1
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
ARP
(Address Resolution Protocol) The Internet protocol that dynamically
maps Internet addresses to physical (hardware) addresses on local area
networks. ARP is limited to networks that support hardware broadcast.
AS
Autonomous system.
ASCII
(American Standard Code for Information Interchange) A standard
assignment of 7-bit numeric codes to characters.
B
BCC
Block-check character.
BIND
Berkeley Internet Name Domain.
boot
(bootstrap) To load the system software into memory and start it.
Bourne shell
The Bourne shell is the default shell for the Solaris Operating
Environment. It does not have aliasing or history capabilities.
broadcast address
One of three types of Ethernet addresses, the broadcast address
represents broadcasts to the network. A host sends a message to all
hosts on the local Ethernet using a broadcast address. The Ethernet
broadcast address is all 1s (ff:ff:ff:ff:ff:ff in hexadecimal).
C
cache
A buffer of high-speed memory filled at medium speed from main
memory, often with instructions or the most frequently accessed
information. A cache increases effective memory transfer rates and
processor speed.
caching-only server
A domain name server that is not authoritative for any domain. This
server queries servers that have authority for the information needed
and caches that data.
Glossary/Acronyms Glossary-3
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
connectionless
A type of data transfer in which self-contained messages are delivered
without acknowledgement of receipt. User Datagram Protocol (UDP) is
an example of a protocol in which a connection is not necessary.
connection-oriented
A type of data transfer in which a connection with another system must
be established before exchanging data. Transmission Control Protocol
(TCP) is an example of a connection-oriented protocol.
CRC
(cyclical redundancy check) A system of error checking performed at
both the sending and receiving station after a block-check character
(BCC) has been accumulated.
CSMA/CD
(carrier sense multiple access/collision detection) The Ethernet access
method protocol used to control packet transmission and flow over the
Ethernet hardware.
D
daemon
A process that performs a particular system task.
datagram
The Internet Protocol (IP) datagram is the basic unit of information that
is passed on a Transmission Control Protocol/Internet Protocol
(TCP/IP) network. Datagrams contain at least data and destination
addresses.
Data Link layer
In the International Standards Organization/Open Systems
Interconnection (ISO/OSI) model, the second layer, which enables
establishing, maintaining, and releasing services between network
entities.
decryption
The process of converting coded data to plain text.
de-encapsulation
The process of removing a header from a segment of data when systems
are communicating with each other.
E
EBCDIC
Extended Binary Coded Decimal Interchange Code.
EEPROM
(electrically erasable programmable read-only memory) A nonvolatile
PROM that can be written to as well as read from. In Sun workstations,
an EEPROM holds information about the current system configuration,
alternate boot paths, and so on.
EGPs
Exterior gateway protocols.
encapsulation
The process of adding a header to a segment of data when systems are
communicating with each other.
encryption
The process of protecting information from unauthorized use by making
the information unintelligible. Encryption is based on a code, called a
key, which is used to decrypt the information.
ESP
Encapsulation security payload.
Ethernet
A type of local area network that enables real-time communication
between machines connected directly through cables.
Glossary/Acronyms Glossary-5
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
Ethernet address
The physical address of an individual Ethernet controller board. It is
called the hardware address or media access control (MAC) address.
The Ethernet address of every Sun workstation is unique and coded into
a chip on the motherboard. Additional Ethernet interfaces are assigned
different Ethernet addresses.
Ethernet MAC address
The physical address also known as the media access controller (MAC)
or Ethernet address. An Ethernet address is a unique hardware address.
It is 48 bits long. An example of a complete Ethernet address is
8:0:20:le:56:7:d.
EUI
End-unit identifier.
F
FCS
Frame check sequence.
FP
Format prefix.
FQDN
(fully qualified domain name) A domain name that ends with a dot
followed by a domain label of length zero (the root). For example,
andy.sun.com, where andy is the name of a host.
frame
A series of bits with a well-defined beginning and a well-defined end.
H
hierarchal domains
A tree of domains or namespaces, each one of them having their own
authority.
hierarchy
A classification of relationships in which each item except the top one
(called the root) is a specialized form of the item above it. Each item can
have one or more items below it in the hierarchy.
I
IAB
Internet Architecture Board.
IANA
Internet Assigned Numbers Authority.
ICANN
Internet Corporation for Assigned Names and Numbers.
ICMP
(Internet Control Message Protocol) A network layer protocol that
provides for routing, reliability, flow control, and sequencing of data.
IEEE
(Institute of Electrical and Electronics Engineers) The standards
organization that is responsible for developing networking standards
relating to Ethernet, token bus, token ring, and metropolitan area
networks.
IGMP
Internet Group Management Protocol.
IGP
(Interior Gateway Protocol) The protocol that enables the exchange or
routing information between collaborating routers on the Internet.
Examples of IGPs include Routing Information Protocol (RIP) and Open
Shortest Path First (OSPF).
IP
(Internet Protocol) The basic protocol of the Internet. It enables the
unreliable delivery of individual packets from one host to another. The
IP does not determine whether the packet will be delivered, how long it
will take, or if multiple packets will arrive in the order they were sent.
Protocols built on top of this protocol add the functions of connection
and reliability.
Glossary/Acronyms Glossary-7
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
IP address
In Transmission Control Protocol/Internet Protocol (TCP/IP), a unique
32-bit number that identifies each host in a network.
IPG
Internet Gateway Protocol.
IPMP
Internet Protocol Messaging Protocol.
IP network number
The first octet or octets of an Internet Protocol (IP) address that uniquely
identify an IP network within an organization, and on the Internet, if
that network has been registered with the Internet governing
organization.
IPsec
Internet Protocol Security Architecture.
IPv4
(Internet Protocol version 4) One of two versions of IP addressing. It is a
32-bit addressing scheme currently used as the dominant scheme. An
IPv4 address is a unique number assigned to a host on a network. IPv4
addresses are 32 bits divided into four 8-bit fields. Each 8-bit field, or
octet, is represented by a decimal number between 0 and 255, separated
by periods; for example, 129.150.182.31.
IPv6
(Internet Protocol version 6) A new version designed to be an
evolutionary step from the current version, Internet Protocol version 4
(IPv4). IPv6 is an increment to IPv4. Deploying IPv6, using defined
transition mechanisms, does not disrupt current operations. In addition,
IPv6 provides a platform for new Internet functionality.
ISO
(International Organization for Standardization) An international
standards body that reviews and approves independently designed
products for use within specific industries. ISO also develops standards
for information exchange, such as the ISO/OSI model for computer
networks.
ISP
(Internet service provider) A company providing an Internet package.
This often includes a phone number access code, user name, and
software, all for a provider fee.
K
kernel
The master program (core) of the Solaris Operating Environment. It
manages devices, memory, swap, processes, and daemons. The kernel
also controls the functions between the system programs and the system
hardware.
L
LAN
(local area network) A group of computer systems in close proximity
that can communicate by way of some connecting hardware and
software.
layer
One of a set of services, functions, and protocols that span all open
systems.
M
MAC
Media access control.
master server
The server that maintains the master copy of the network information
service database. It has a disk and a complete copy of the operating
system.
mirror
Disk mirroring is a feature that guards against component failure by
writing the same data to two or more disk drives at the same time.
MMF
Multimode fiber.
Glossary/Acronyms Glossary-9
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
MTU
(maximum transmission unit) An MTU is the largest amount of data
that can be transferred across a given physical network. The MTU is
hardware specific. For example, the MTU for a physical Ethernet
interface is 1500 bytes.
multicast address
One of three types of Ethernet address, the multicast address is used to
send a message to a subset of hosts on a network. In Ethernet multicast
addressing, the first three octets must contain a value of 01.00.5E. The
last three octets are used to assign host group identity.
N
name service
A name service provides a means of identifying and locating resources
(traditionally host names and Internet Protocol [IP] addresses) available
to a network. The default name service product available in the
Solaris 2.x Operating Environment is Network Information Service Plus
(NIS+).
NDP
Neighbor Discovery Protocol.
network
Technically, the hardware connecting various systems, enabling them to
communicate. Informally, the systems so connected.
network address
The address, consisting of up to 20 octets, used to locate an Open
Systems Interconnection (OSI) transport entity. The address is formatted
into an initial domain part that is standardized for each of several
addressing domains, and a domain-specific part that is the responsibility
of the addressing authority for that domain.
Network layer
In the International Standards Organization/Open Systems
Interconnection (ISO/OSI) model of network standards, the third layer,
which enables routing and switching blocks of data between two
devices that support Transport layer protocols over a connection.
network segment
In Integrated Services Digital Network (ISDN), when the TCP adds an
information header to a packet of data for decoding by the TCP on the
remote machine, the expanded packet is referred to as a segment. It is
then passed to the Network layer, which converts it to a datagram. It
then goes to the Data Link layer, which converts it to a frame.
O
OpenBoot PROM
OpenBoot programmable read-only memory.
OS
(operating system) A collection of programs that monitor the use of the
system and supervise the other programs executed by it.
Glossary/Acronyms Glossary-11
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
OSI
(Open Systems Interconnection) OSI is an international standardization
program that was developed to facilitate communications among
computers from different manufacturers.
OSPF
Open Shortest Path First.
P
PDU
Packet data unit.
peer-to-peer communication
The communications between peer devices.
Physical layer
In the International Standards Organization/Open Systems
Interconnection (ISO/OSI) model of network standards, the first layer,
which supplies the mechanical, electrical, and procedural means of
establishing, maintaining, and releasing physical connections.
PID
(process identification number) A unique, system-wide, identification
number assigned to a process. Also called process ID, process number.
PLM
Physical layer medium.
PPP
(Point-to-Point Protocol) A way to connect to the Internet; PPP also
provides error-checking features.
PROM
(programmable read-only memory) A permanent memory chip
programmed by the user rather than at the chip manufacturer, as is true
with a read-only memory (ROM). You need a PROM programmer or
burner to write data onto a PROM. PROM has been mostly replaced by
erasable programmable read-only memory (EPROM), a type of PROM
that can be erased by ultraviolet light and reprogrammed.
protocol
A way to transmit data between devices. A computer or device must
have a correct protocol to be able to communicate successfully with
other computers or devices.
PTR
DNS pointer record.
S
SLA
Site-level aggregator.
Glossary/Acronyms Glossary-13
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
slave server
A server system that maintains a copy of the Network Information
Service (NIS) database. It has a disk and a complete copy of the
operating system.
SLIP
(Serial-Line Internet Protocol) An Internet protocol used to run Internet
Protocol (IP) over serial lines such as telephone circuits or RS-232 cables
interconnecting two systems. The Point-to-Point Protocol (PPP) is the
preferred protocol.
SMF
Service Management Framework.
SNMP
(Simple Network Management Protocol) The network management of
choice for Transmission Control Protocol/Internet Protocol-based
(TCP/IP-based) Internets.
snoop
This command captures network packets and displays their contents.
The command can be run only by the superuser.
SOA
(start of authority) An SOA record marks the beginning of a zone’s
authority and defines parameters that affect an entire zone.
stateful
A type of data transfer where part of the data sent from the client to the
server includes the status of the client. Transmission Control Protocol
(TCP) is an example of a stateful protocol.
stateless
A type of data transfer where the server has no obligation to keep track
of the state of the client. User Datagram Protocol (UDP) is an example of
a stateless protocol.
subnetwork
A collection of International Standards Organization/Open Systems
Interconnection (ISO/OSI) end systems and intermediate systems under
the control of a single administrative domain and using a single
network access protocol; for example, private X.25 networks and a
collection of bridged LANs.
U
UDP
(User Datagram Protocol) This protocol is a transport protocol in the
Internet suite of protocols. It uses Internet Protocol (IP) for delivery, and
provides for exchange of datagrams without acknowledgements or
guaranteed delivery.
UTC
Coordinated Universal Time. This is the official standard for current
time. Several institutions contribute their calculations of the current
time, and UTC is a combination of these estimates.
UTP
Unshielded twisted-pair.
Glossary/Acronyms Glossary-15
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
V
VLAN
Virtual local area network.
VLSM
Variable length subnet mask.
W
WAN
(wide area network) WANs are slower-speed networks typically used by
organizations to connect their local area networks. WANs are often built
from leased telephone lines capable of moving data at speeds of
56 kilobits per second to 1.55 megabits per second. A WAN might be
used to bridge a company’s office on two opposite ends of town or on
opposite ends of a continent.
Numerics IPv6
anycast 8-6
1000BASE-CX media multicast 8-5
system 2-11 representation 8-6
1000BASE-LX media types 8-5
system 2-11 unicast 8-5
1000BASE-SX media link-local 8-6
system 2-11 loopback type 8-14
1000BASE-T media system 2-11 multicast 3-7, 5-11, 8-7
100BASE-FX media system 2-10 network number 5-9
100BASE-T4 media system 2-10 scope bits 8-16
100BASE-TX media system 2-9 site-local 8-6
10BASE-T media system 2-9 test 6-5
unicast 3-7, 5-9
unspecified type 8-14
A address-to-name
access list 10-27 translation 10-24, 10-25
access method, Ethernet 3-2 aggregatable global address 8-7,
addif option 5-27 8-12
address anycast address 8-6
aggregatable global 8-7 Application layer
broadcast 3-7, 5-11 common protocols 1-9
Class A 5-9 description 1-4, 1-8
Class B 5-10 formatting data 1-9
Class C 5-10 functions 1-9
classful 5-9 presenting data 1-9
define test 8-61 transporting data 1-9
detecting duplicates 8-10 ARP
embedded IPv4 8-13 adding entries from a file 4-6
Ethernet 3-6 adding permanent table
host number 5-9 entries 4-6
IP 5-9 adding table entries 4-6
IPv4 5-9 cache 4-4
Index-1
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
cache management 4-5 classful address 5-9
cache times 4-4 classless inter-domain routing. See CIDR
control table entries 4-5 CNAME record 10-23
deleting table entries 4-7 coaxial cable 2-8
description 1-13, 4-2 collision
display table entries 4-5 detection 3-2
Ethernet frame 4-2 rates 3-4
operation 4-2 collision rates 3-4
process 4-3 commands
removing static entries 4-7 banner 3-8
removing table entries 4-6 eeprom 3-8
searching for new cache entries 4-6 ndd 4-4
table entries 4-5 route 7-24
TCP/IP model 4-2 communication architecture 1-2
time to live 4-6 computers
arp utility 4-5 keeping time 12-2
ASCII 1-9 networking fundamentals 1-2
autonomous system 7-8 configuration errors file 10-35
configuring
default route 7-19
B DHCP
banner command 3-8 address 11-21 to 11-38
BASE 2-8 initial 11-9, 11-20
baseband 2-8 server 11-28
BIND 10-24 DHCP client 11-39
bridges 2-12 DNS
bridging devices 2-12 client 10-32
broadcast addresses 3-7, 5-11 dynamic routing 7-25
buffered transfer 9-11 interface for IPv6 8-20
bus configurations 2-2 IPMP
at boot time 8-68
manually 8-58
C IPv6
autoconfiguration 8-3, 8-8
capture network packets 3-14 interfaces 8-24
carrier sense 3-2 multipathing 8-58
carrier sense multiple access/collision name service lookup 8-21, 8-25
detection. See CSMA/CD on non-router 8-19
changing host name 5-23 router 8-24
CIDR logical interfaces 5-26, 8-36
block 7-35 multipathing 6-6, 6-21
operation 7-33 ndpd.conf file 8-25
purpose 7-33 NTP client 12-13
Class A address 5-9 NTP server 12-5
Class B address 5-10 router troubleshooting 7-42
Class C address 5-10 routing
Index Index-3
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
restricting queries 10-28 Ethernet-II frames 3-10
reverse-domain file 10-24 Exterior Gateway Protocol (EGP) 7-10
security 10-27
server 10-25
troubleshooting the server 10-33 F
Domain Name System. See DNS failover 6-2
drift file 12-7 FAILURE_DETECTION_TIME variable 6-5
duplicate address detection 8-10 features of a protocol stack 1-3
Dynamic Host Configuration Protocol. File Transfer Protocol (FTP) 1-9, 1-14
See DHCP files
dynamic route 7-7 /etc/default/dhcp 11-7
dynamic routing, configuring 7-25 /etc/default/mpathd 6-3, 6-5, 6-18,
8-66
/etc/defaultrouter 7-6, 7-19
E /etc/ethers 4-11
EBCDIC 1-9 /etc/gateways 7-20
EEPROM 3-8 /etc/hostname.hme0 5-27
eeprom command 3-8 /etc/hostname.interface 5-22,
EGP 7-10 5-23
electrically erasable programmable /etc/inet/dhcpsvc.conf 11-7
read-only memory (EEPROM) 3-8 /etc/inet/hosts 3-17, 4-11, 5-23
embedded IPv4 address 8-13 /etc/inet/netmasks 5-18
enabling IPv6 8-18 /etc/inet/networks 7-16
Ethernet /etc/inet/ntp.conf 12-7, 12-11
access method 3-2 /etc/inet/ntp.server 12-5
address mapping 4-5 /etc/named.conf 10-27
addresses 3-6 /etc/net/hosts 5-22
ARP 4-2 /etc/netmask 5-18
changing the address 3-9 /etc/nodename 5-23
displaying the address 3-8 /etc/nsswitch.conf 4-11
displaying the state 3-4 /usr/include/netinet/ip_icmp.h
elements 3-2 5-4
frame header information 3-14 /var/adm/messages 10-35
frames 3-2, 3-6, 3-10 /var/ntp/ntp.drift 12-7
permanent change to address 3-9 dhcp_network 11-30
statistics 3-4 interface configuration 5-22
switches 2-13 ndpd.conf 8-25
topology 3-3 ntp.conf 12-8
viewing the address 3-8 one-backup 10-30
Ethernet frames one-rbackup 10-30
bad CRC 3-13 flow control 9-12
error conditions 3-13 flushing route table 7-23
giant 3-13 format prefix 8-6
jabbers 3-13 formatting data, Application layer
long 3-13 functions 1-9
runts 3-13 fragmentation 5-3
Index Index-5
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
interfaces authentication 8-4
hme 3-19 autoconfiguration 8-3, 8-8
hme0 3-19 configure on non-router 8-19
logical 5-24 configuring interfaces 8-20, 8-24
virtual 5-24 configuring multipathing 8-58
Internet Assigned Numbers Authority configuring name service lookup 8-21
(IANA) 5-9 displaying interfaces 8-35
Internet Control Message Protocol. See displaying route table 8-36
ICMP embedded IPv4 address 8-13
Internet Gateway Protocol (IGP) 7-9 enabling 8-18
Internet layer expanded addressing 8-4
description 1-4, 1-6 format prefix 8-6
functions 1-6 interface troubleshooting 8-36
ICMP 1-7 IPMP configuration 8-58
IP 1-7 link-local address 8-6
Internet Message Access Protocol managing 8-35
version 4 (IMAP4) 1-14 multicast address 8-5, 8-7
Internet Protocol. See IP name service lookup 8-25
IP privacy header 8-4
address mapping 4-5 RFC 8-3
address types 5-9 RIP 8-23
datagram 5-3, 5-6, 7-15 router configuration 8-24
datagram header fields 5-6 site-local address 8-6
datagram payload 5-8 stateful autoconfiguration 8-8
description 1-13 stateless autoconfiguration 8-8
fragmenting data 1-7 unicast address 8-5
header fields 5-7
ICMP 5-3
MTUs 5-3 J
purpose 5-3 JumpStart software
routing 7-3 clients 4-9
routing data 1-7
IPMP
configuring at boot time 8-68 L
features 6-3
manual configuration 8-58 LAN
requirements 6-4, 6-20 media 2-8
IPv4 network devices 2-12
address shortage 8-3 link speed 3-19
addresses 5-9 link-local address 8-6, 8-11
IPv6 link-state protocol 7-10
address representation 8-6 localhost entry 7-18
address shortage 8-3 local-mac-address? variable 3-8
address types 8-5 logical interfaces
aggregatable global address 8-7, 8-12 administering 5-24
anycast address 8-6 configuring 5-26, 8-36
M N
MAC address name daemon control program (ndc) 10-45
banner command 3-8 name server 10-20
files 4-11 name service lookup 8-21, 8-25
ifconfig utility 3-8 name-service database 4-11
setting 3-8 names-to-IP addresses 10-21
viewing 3-8 ND 8-18
managing ndc utility 10-45
DHCP tables 11-31 ndd parameters 3-19
IPv6 8-35 ndd utility 3-18, 3-19, 3-20, 4-4
NTP daemons 12-10 ndpd.conf file 8-25
mappings to host names 10-21 Neighbor Discovery Protocol (ND) 8-18
maximum transfer unit. See MTU netmask
media access control address. See MAC contiguous 5-15
address definition 5-18
media systems file 5-18
1000BASE-CX 2-11 noncontiguous 5-15
1000BASE-LX 2-11 netstat utility
1000BASE-SX 2-11 displaying collisions 3-4
1000BASE-T 2-11 displaying Ethernet interfaces 3-17
100BASE - TX 2-9 field descriptions 3-17
100BASE-FX 2-10 -i option 3-17
100BASE-T4 2-10 input and output errors 3-5
10BASE-T 2-9 network devices
messages, ICMP 5-4 bridges 2-12
monitoring route table changes 7-22 LANs 2-12
MTU switches 2-12
data size 3-12 Network File System (NFS) 1-9
description 3-12 network interface card (NIC) 3-6, 6-2
fragmentation 5-3 Network Interface layer
Internet layer 5-3 description 1-4
maximum frame size 3-12 protocols
multicast address IEEE 802.4 1-6
description 3-7, 5-11 IEEE 802.5 1-6
format prefixes 8-7 PPP 1-12
IPv6 8-5 SLIP 1-12
purpose 8-15 TCP/IP 3-2
scope bits 8-16 network is unreachable 7-15
Index Index-7
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
network model query program 12-12
concepts 1-3 snoop utility 12-16
functions 1-3 terms 12-3
layered model 1-3 troubleshooting 12-15
layers 1-3 undisciplined local clock 12-7
rules 1-3 xntpdc utility 12-10
structure 1-3 ntp.conf file 12-8
network name 7-16, 7-44 ntpq utility 12-12
network number 5-18 NVRAM 3-6
network overload 3-5
network packets, capturing 3-14
network performance problems 3-4 O
network protocols 1-2 one-backup file 10-30
Network Time Protocol. See NTP one-rbackup file 10-30
network topologies output errors 3-5
and OSPF 7-10
bus configurations 2-2
describing 2-2 P
ring configurations 2-4
star configurations 2-3 packet data unit 1-5
NFS 1-9 parameters
NIC 3-6, 6-2 instance 3-19
no route to host 7-15 TRACK_INTERFACES_ONLY_WITH_
noncontiguous netmasks 5-15 GROUPS 8-66
noncontiguous subnet masks 5-15 path-vector algorithm 7-11
non-intelligent hubs 2-3 PDU 1-5
nonvolatile random access memory peer-to-peer
(NVRAM), Ethernet addresses 3-6 description 1-10
noripin directive 7-20 encapsulation 1-11
NS record 10-20, 10-21 physical network interface 5-25
nslookup utility 10-36 piggybacking 9-11
NTP pntadm utility 11-31
basic concepts 12-2 Point-to-Point Protocol (PPP) 1-12
configuration file parts 12-6 POP3 1-14
configuring a server 12-5 port-based address 3-8
configuring clients 12-13 port-based approach, Ethernet
configuring stratum of a NTP addresses 3-6
server 12-8 Post Office Protocol, version 3
configuring the stratum 12-8 (POP3) 1-14
external reference servers 12-9 PPP 1-12
fudge entry 12-8 prefix notation 8-13
functions 12-3 presenting data, Application layer
managing daemons 12-10 functions 1-9
multicast advertisement 12-8 process, in.rdisc 7-30
ntpg utility 12-12 programmable read-only memory
peers 12-12 (PROM) 4-10
Index Index-9
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
route poisoning 7-27 using 3-14
route table 7-6 verbose mode 3-14
split horizons 7-26 SOA record 10-22
static 7-6 speed matching 1-2
triggered updates 7-26 split horizons 7-26
troubleshooting 7-42 SSH 1-9
Routing Information Protocol (RIP) 7-7, standby interface 6-3
8-23 star configurations 2-3
RPC 3-14 stateful
RUNNING flag 6-5 autoconfiguration 8-8
protocol 9-5
stateless
S autoconfiguration 8-8
scope bits 8-16 protocol 9-5
scripts static routes
/etc/rc2.d/S69inet 4-11, 5-17, 6-18, configuring 7-18
7-7, 7-39, 8-29 configuring manual 7-21
/etc/rc2.d/S72inetsvc 5-17 definition 7-6
/etc/rcSd/S30network.sh 5-17, strata 12-3
6-18 stratum-1 server 12-3
secure shell 1-9 subnet address 5-21
security subnet masks
DNS 10-27 contiguous 5-15
restricting queries 10-28 noncontiguous 5-15
segment type 2-8 subnetting 5-12
self-contained messages 9-4 switches 2-12
semantics in network protocols 1-2 switching devices 2-12
sender side congestion window 9-12
sequencing 1-2
Serial Line Internet Protocol (SLIP) 1-12
T
servers TCP
DHCP configuration 11-7 congestion window 9-12
stratum 12-3 datagram header 9-10
Simple Mail Transfer Protocol description 1-13, 9-10
(SMTP) 1-9, 1-14 flow control 9-12
Simple Network Management Protocol header information 9-11
(SNMP) 1-9, 1-14 high-bandwidth network 9-13
site-local address 8-6, 8-12 large window 9-13
SLIP 1-12 network congestion 9-12
SMTP 1-9, 1-14 protocol 1-8, 9-2, 9-8
SNMP 1-9, 1-14 receiver-side window
snoop utility advertisements 9-12
capture network packets 3-14 reliability 1-8
NTP 12-16 satellite networks 9-13
reading the file 3-16 segment acknowledgement 9-12
summary mode 3-14 segments 1-8
Index Index-11
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
V
variable length subnet mask (VLSM) 5-20
variables
FAILURE_DETECTION_TIME 6-5
local-mac-address? 3-8
virtual circuit connection 9-11
virtual interfaces 5-24
Virtual Local Area Network (VLAN) 2-5
VLAN 2-5
VLSM 5-20
W
web servers 10-24
window advertisement 9-12
X
xntpd daemon 12-7
xntpdc utility 12-10