Download - Mod21_Connecting to a Network
-
8/12/2019 Mod21_Connecting to a Network
1/26
Module 21 Connecting to a Network
Objectives
Upon completion of this module, you will be able to do the following:
Physically connect an HP-UX machine to an existing LAN
!on"gu#e a host name using set_parmso# $A%
!on"gu#e an &P add#ess using set_parmso# $A%
!on"gu#e a default #oute using set_parmso# $A%
!on"gu#e a host as a 'N$ client using set_parmso# $A%
!on"gu#e a host as an N&$ client using set_parmso# $A%
(est connecti)ity with ping and nslookupo# $A%
http://education.hp.com H3064S B.00
2000 Hewlett-Packard Company
21-1
-
8/12/2019 Mod21_Connecting to a Network
2/26
Module 21Connectin to a !etwork
211. SLID! Setting an I" #ddress and Subnet Mask
Student Notes
$%at Is an I" address&
*ach machine on a local a#ea netwo#+ LAN, whethe# it is a lase# p#inte#,wo#+station, o# se#)e#, is assigned a uni.ue &nte#net p#otocol &P add#ess *)e#ypac+et of data sent ac#oss the netwo#+ contains a destination &P add#ess whichdete#mines the #ecipient of that pac+et of data, and the #oute ta+en to #eachthat destination
An &P add#ess consists of fou# dot sepa#ated intege#s in the #ange /-011
I" #ddress 'a()les
20134205621653470202265
H3064S B.00 "ttp#$$education."p.com
2000 Hewlett-Packard Company
21-2
$etting an &P Add#ess and $ubnet %as+
208220 208226 208225
&P add#esses
9 Assigned to each netwo#+ node
%ust be uni.ue
'e"ne )ia $A% o# set;pa#ms
-
8/12/2019 Mod21_Connecting to a Network
3/26
Module 21Connectin to a !etwork
-
8/12/2019 Mod21_Connecting to a Network
4/26
Module 21Connectin to a !etwork
$%at Is a Subnet Mask&
%any companies these days ha)e la#ge netwo#+s that a#e di)ided into=subnetwo#+s= 'i)iding a la#ge# netwo#+ into smalle# =subnets= can g#eatlyimp#o)e pe#fo#mance and #eliability on la#ge LANs &f you# company has a
subnetted netwo#+, you# netwo#+ manage# will assign you a =subnet mas+= (hesubnet mas+, in con>unction with you# &P add#ess, dete#mines which subnet youa#e attached to, and you# uni.ue host add#ess on that subnet &n o#de# tosuccessfully communicate with othe# nodes on the LAN, you must de"ne thesubnet mas+ fo# you# machine
Subnet Mask 'a()les
011011//011011011/011011015/
Setting an I" #ddress and Subnet Mask wit% set*)ar(s
?hen you connect you# node to the LAN, you# &$P o# netwo#+ manage# willassign you# host a uni.ue &P add#ess acco#ding to the add#ess schemeimplemented in you# shop Networking & Communications--> Network Interface Cards
(Select an interface card) Actions --> Configure
$A% displays a list of you# system@s LAN ca#ds including the LAN ca#d type,name, ha#dwa#e path, status, and &P add#ess (o change you# subnet mas+ o# &Padd#ess, select the inte#face ca#d to change, select Actions -- !on"gu#e, andanswe# the .uestions in the dialog box that follows
H3064S B.00 "ttp#$$education."p.com
2000 Hewlett-Packard Company
21-4
-
8/12/2019 Mod21_Connecting to a Network
5/26
Module 21Connectin to a !etwork
212. SLID! Setting a De+ault ,oute
Student Notes
$%at Is a De+ault ,oute&
?ithout any fu#the# con"gu#ation, HP-UX should be able to deli)e# data to anynode on you# local netwo#+ once you# &P add#ess and subnet mas+ ha)e beenset Howe)e#, if you wish to access nodes beyond you# local netwo#+, you#machine must ha)e access to a router A #oute# is a de)ice that is able to #outedata to othe# netwo#+s
-
8/12/2019 Mod21_Connecting to a Network
6/26
Module 21Connectin to a !etwork
# set_parms initial# sam --> Networking & Communications
--> osts--> !ocal osts "ile
Actions --> Configure efault $atewa%
H3064S B.00 "ttp#$$education."p.com
2000 Hewlett-Packard Company
21-6
-
8/12/2019 Mod21_Connecting to a Network
7/26
Module 21Connectin to a !etwork
21. SLID! Setting a S/ste( 0ostna(e
Student Notes
$%at Is a 0ostna(e&
$ince many use#s "nd it diDcult to #emembe# &P add#esses, most machines a#ealso assigned a =hostname= A hostname is simply a uni.ue alphanume#ic=nic+name= assigned to each host on the netwo#+ Hostnames a#e assignedbased on any of the following:
the pu#pose of the node
the p#ima#y use# of the node
any othe# naming con)ention chosen by the netwo#+ manage#
Setting our S/ste( 0ostna(e
-
8/12/2019 Mod21_Connecting to a Network
8/26
Module 21Connectin to a !etwork
# set_parms initial
# sam --> Networking & Communications--> !an Interface Cards
Actions --> odif% S%stem Name
H3064S B.00 "ttp#$$education."p.com
2000 Hewlett-Packard Company
21-'
-
8/12/2019 Mod21_Connecting to a Network
9/26
Module 21Connectin to a !etwork
21. SLID! ,esolving 0ostna(es to I" #ddresses
Student NotesAlthough hostnames a#e mo#e memo#able than &P add#esses, a #oute# must +nowa pac+et@s &P add#ess to successfully deli)e# data to a destination Eo# this#eason, if a use# o# application speci"es a pac+et@s destination as a hostname,the system must t#anslate the destination hostname to a destination &P add#ess
(he#e a#e th#ee ways to #esol)e hostnames to &P add#esses on an HP-UX system:
)ia the /etc/hosts"le
)ia the 'omain Name $e#)ice 'N$
)ia the Netwo#+ &nfo#mation $e#)ice N&$
?e will conside# each method in the pages that follow
http://education.hp.com H3064S B.00
2000 Hewlett-Packard Company
21-(
Besol)ing Hostnames to &P Add#esses
9 *)e#y outgoing pac+et #e.ui#es an &P add#ess
9 (h#ee ways to #esol)e hostnames to &P add#esses
' /etc/hosts"le
'omain Name $e#)ice 'N$
Netwo#+ &nfo#mation $e#)ice N&$
telnet mickie
208220
ftp minnie
208226
-
8/12/2019 Mod21_Connecting to a Network
10/26
Module 21Connectin to a !etwork
213. SLID! Con-guring /etc/hosts
Student Notes
$%at Is t%e 4etc4%osts 5ile&
&f you need to communicate only with hosts on you# local netwo#+, you# netwo#+manage# may #ecommend using the /etc/hosts"le to #esol)e hostnames to &Padd#esses (he /etc/hosts"le is a con"gu#ation "le maintained locally on eachhost to #esol)e hostnames to &Ps
*ach line in the /etc/hosts"le contains an &P add#ess in the fa# left "eld,followed by the hostname associated with that &P add#ess in the second "eld &nthe example on the slide, hostname donald#esol)es to &P add#ess 208225Hostnameminnie#esol)es to &P add#ess 208226
-
8/12/2019 Mod21_Connecting to a Network
11/26
Module 21Connectin to a !etwork
*ach line in /etc/hostscan contain a comment p#eceded by a #sign as well
Con-guring /etc/hosts
(he /etc/hosts"le must be modi"ed anytime an &P add#ess o# hostnamechanges Note that /etc/hostsis maintained locally on each host, so changes
must be p#opagated to all hosts if you wish to maintain consistency ac#oss allmachines on you# netwo#+
Networking and Communications --> osts --> !ocal osts "ile Actions --> Addodif%emo*e
http://education.hp.com H3064S B.00
2000 Hewlett-Packard Company
21-11
-
8/12/2019 Mod21_Connecting to a Network
12/26
Module 21Connectin to a !etwork
216. SLID! Con-guring a DNS Client
Student Notes
$%at Is DNS&
Although the /etc/hosts"le is ade.uate fo# hostname #esolution on smallnetwo#+s, you# netwo#+ manage# will li+ely #ecommend using the 'omain Name$e#)ice 'N$ fo# name #esolution if you wish to access the outside &nte#net o#othe# netwo#+s within you# company
&nstead of #efe#encing a locally sto#ed /etc/hosts"le that .uic+ly becomesoutdated, hosts using 'N$ send name #esolution #e.uests to a speciallycon"gu#ed DNS name server
-
8/12/2019 Mod21_Connecting to a Network
13/26
Module 21Connectin to a !etwork
*ach host on the &nte#net can be uni.uely identi"ed by the concatenation of thehost@s hostname and domain &f two hosts ha)e the same hostname, the domainname appended to the end of the hostname dete#mines which host you wish to#efe#ence
(he example on the slide shows two hosts with hostnamewww (he two a#ediFe#entiated f#om one anothe# by the hp.comand acme.comdomain namesappended afte#www
S)eci+/ing a DNS Na(eserver
!on"gu#ing you# host to use 'N$ is most easily accomplished )ia $A% Jo to:
# SA --> NS (+IN) --> NS esol*er Actions --> Specif% Name Ser*ers
Up to th#ee 'N$ namese#)e#s may be de"ned &f one namese#)e# is una)ailable,you# system will automatically t#y anothe# Use the name se#)e# &P add#essesp#o)ided by you# netwo#+ manage#
S)eci+/ing a DNS Do(ain Searc% List
?hile in $A%, you should also de"ne you# 'N$ domain
-
8/12/2019 Mod21_Connecting to a Network
14/26
-
8/12/2019 Mod21_Connecting to a Network
15/26
Module 21Connectin to a !etwork
Must one piece of info#mation is #e.ui#ed to con"gu#e an N&$ client: the NISDomain Name An N&$ domain is a logical g#ouping hosts that sha#e a commonset of con"gu#ation "les Eo# example, all hosts in the ma#+eting depa#tmentmay be placed in the ma#+eting domain, while hosts in the accountingdepa#tment may be placed in the accounting domain &f you# o#ganiKation usesN&$, you will need to obtain you# N&$ domain name f#om you# o#ganiKation@s N&$
administ#ato#
Con-guring an NIS Client
?hen you "#st boot a newly-installed system, set_parmsp#o)ides anoppo#tunity to de"ne the N&$ domain name
-
8/12/2019 Mod21_Connecting to a Network
16/26
Module 21Connectin to a !etwork
218. SLID! C%oosing a Look9:) Service
Student Notes
?e@)e seen that hostnames may be #esol)ed )ia the local /etc/hosts"le, 'N$o# N&$ How does the system decide, then, which sou#ce to useI (he/etc/nsswitch.conf"le dete#mines which sou#ce should be used fo# loo+-ups
(his "le can be edited manually, o# can be con"gu#ed )ia $A%:
# sam --> Networking and Communications --> Name Ser*ice Switc/ (Select a lookup t%pe) Actions --> Configure Name Ser*ice Switc/
(he sample system that p#o)ided the sc#een shot below is con"gu#ed to use 'N$as the p#ima#y sou#ce fo# hostname #esolution &f the 'N$ se#)e# doesn@t #espondo# isn@t con"gu#ed, the system #eso#ts to using the local /etc/hosts"le instead
H3064S B.00 "ttp#$$education."p.com
2000 Hewlett-Packard Company
21-16
!hoosing a Loo+-Up $e#)ice
:?he#e do & loo+ up hostnamesI
A: !onsult/etc/nsswitch.conf
&
DNS
/etc/hosts
NIS
-
8/12/2019 Mod21_Connecting to a Network
17/26
Module 21Connectin to a !etwork
$A% Name $e#)ice $witch
$A% also lets you change the loo+up sou#ce o#de# Eo# instance, to fo#ce you#system to #esol)e hostnames "#st f#om /etc/hosts, then f#om 'N$, select thehosts line f#om the ob>ect list and clic+Actions --> Configure Name ServiceSwitch (he sc#een that follows lets you dete#mine which se#)ice is used when
http://education.hp.com H3064S B.00
2000 Hewlett-Packard Company
21-1&
-
8/12/2019 Mod21_Connecting to a Network
18/26
Module 21Connectin to a !etwork
$A% !on"gu#e Name $e#)ice $witch
(he /etc/nsswitch.conf"le is used to con"gu#e the sou#ce o#de# fo# passwo#d,g#oup, and othe# types of loo+-ups as well, if you ha)e access to a netwo#+info#mation se#)ice N&$ se#)e#
H3064S B.00 "ttp#$$education."p.com
2000 Hewlett-Packard Company
21-1'
-
8/12/2019 Mod21_Connecting to a Network
19/26
Module 21Connectin to a !etwork
21;. SLID!
-
8/12/2019 Mod21_Connecting to a Network
20/26
Module 21Connectin to a !etwork
6pingyou# default #oute#5pinga host on anothe# netwo#+
&fpingfails, chec+ the following:
&s the LAN ca#d installed p#ope#lyI
&s the LAN cable connected p#ope#lyI
'id you set you# &P p#ope#lyI
'id you con"gu#e a default gatewayR#oute#I
'id you con"gu#e you# subnet mas+ p#ope#lyI
C%eck 0ostna(e ,esolution wit% nslookup
(he nslookuputility can be used to ensu#e that you# host is #esol)ing hostnamesp#ope#ly Ji)en a hostname as an a#gument, nslookup#esponds with theco##esponding &P add#ess nslookupalso notes the sou#ce p#o)iding the &Padd#ess
'a()le =on a %ost using t%e local /etc/hosts-le>
# nslookup minnie5sing etc/osts on mickie
looking up "I!SName6 minnie
Address6 012,0,0,3
&f nslookup#esponds with an inco##ect &P add#ess, chec+ the following:
2 'id you con"gu#e the name se#)ice switch p#ope#lyI0 &f you a#e using 'N$, is the name se#)e# &P add#ess co##ectI6 &f you a#e using N&$, is the N&$ domain name co##ectI5 &f you a#e using /etc/hosts, is the /etc/hosts"le ent#y co##ectI
H3064S B.00 "ttp#$$education."p.com
2000 Hewlett-Packard Company
21-20
-
8/12/2019 Mod21_Connecting to a Network
21/26
Module 21Connectin to a !etwork
211?. L#@! Connecting to t%e Network
Directions
&n the exe#cise that follows, you will ha)e an oppo#tunity to explo#e the
set_parmsand $A% sc#eens used to set netwo#+ pa#amete#s on you# system
Sac+ in you# shop, you# &( depa#tment o# &$P should p#o)ide you with you# basicnetwo#+ing pa#amete#s Eo# this lab exe#cise, you# inst#ucto# will p#o)ide theadd#esses you need:
ostname6 I7 address6
Su.net mask6ef, outer$atewa% I7 address6
NS domain6 (optional) NS ser*er address6 (optional) Secondar% NS ser*er address6 (optional)
(he#e should be a shell sc#ipt on you# system called /la's/clo''ernet.sh Bunthe sc#ipt (he sc#ipt clobbe#s you# netwo#+ con"gu#ation "les and #eboots you#machine ?hen you# machine comes bac+ up again, it will automatically #un theset_parmsutility, >ust as it would if you had >ust installed the ope#ating system
"art I! Con-guring an I" #ddress and 0ostna(e
2 set;pa#ms "#st as+s if you want to connect to the netwo#+ Eo# this labexe#cise, we do want to connect to the netwo#+, so clic+ =CT=
0 Next, set_parmsas+s if you wish to obtain you# netwo#+ pa#amete#s )ia'H!P 'H!P is a se#)ice that can automatically p#o)ide you# machine with an&P add#ess and hostname, if a 'H!P se#)e# exists on you# netwo#+ Eo# thisexe#cise, clic+ =NC=
6 Answe# the p#ompts in the sc#eens that follow to set you# hostname, time
Kone info#mation, and &P add#ess ?hen as+ed if you wish to set additionalnetwo#+ info#mation fo# example, a default gateway, netmas+, and 'N$ andN&$ info#mation, answe# NC ?e will con"gu#e these pa#amete#s late# )ia$A%
http://education.hp.com H3064S B.00
2000 Hewlett-Packard Company
21-21
-
8/12/2019 Mod21_Connecting to a Network
22/26
Module 21Connectin to a !etwork
Note &f you ma+e a mista+e while ente#ing any of the netwo#+pa#amete#s, you can #un set_parms again any time by typingset_parms initial
"art II! C%ecking our I" #ddress and Setting our Net(ask
2 Afte# #unning set_parmsand logging in, go to:
$A% -- Netwo#+ing and !ommunications -- Netwo#+ &nte#face !a#ds
to ensu#e that you# &P is set co##ectly ?hat ha#dwa#e slot numbe# is you# lan/ca#d installed inI &s lan/ enabled fo# useI ?hat is lan/@s &P add#essI A#e the#eany othe# LAN ca#ds on you# machineI
0 ?hile still at the Netwo#+ &nte#face !a#d sc#een, set you# subnet mas+?ithout the subnet mas+, you may not be able to communicate with othe#nodes on you# LAN $et you# subnet mas+ fo# lan/ )ia $A%
*ach machine on a netwo#+, #ega#dless of the numbe# of LAN inte#face ca#ds,has a single hostname &f you ha)e multiple LAN ca#ds on a host, $A%#e.ui#es you to con"gu#e a uni.ue =Host Name Alias= fo# each LAN ca#d (his
is useful in t#oubleshooting situations whe#e you may wish to access aspeci"c LAN ca#d on a ta#get machine #athe# than the gene#al hostname &f$A% as+s you to set an alias, simply use you# hostname with an =a=appended to the end
"art III!
-
8/12/2019 Mod21_Connecting to a Network
23/26
Module 21Connectin to a !etwork
0 Next, t#y pinging a couple of neighbo#ing machines@ &P add#esses 'id thiswo#+I
6 Next, t#y pinging a neighbo#ing machine using its hostname !an you guesswhy this failsI Hint: Loo+ in the /etc/hosts"le
"art IA! Con-guring /etc/hosts
-
8/12/2019 Mod21_Connecting to a Network
24/26
Module 21Connectin to a !etwork
0 Use $A% to con"gu#e you# default 'N$ domain name 'on@t con"gu#e any
=Cthe# 'omains to $ea#ch=
6 Now use $A% to con"gu#e the &P add#esses of you# 'N$ namese#)e#s
"art AI =O)tional>! Con-gure t%e Na(e Service Switc%
2'id you# 'N$ con"gu#ation wo#+I &f 'N$ is con"gu#ed p#ope#ly on you#machine, and the 'N$ se#)e# is functioning, you should be able to loo+uphostnames of machines outside you# local netwo#+ (#y an nsloo+up onwwwhpcom ?hat happensI
0Loo+ ca#efully at the output f#om the nsloo+up you did in the p#e)ious exe#cise!an you explain why you we#e unable to "nd an &P add#ess fo# wwwhpcomIHint: ?hat loo+up sou#ce is nsloo+up using at this pointI
6!on"gu#e the name se#)ice switch )ia $A% to ensu#e that you# system
consults the 'N$ se#)e# if a hostname isn@t found in the local RetcRhosts "le
H3064S B.00 "ttp#$$education."p.com
2000 Hewlett-Packard Company
21-24
-
8/12/2019 Mod21_Connecting to a Network
25/26
Module 21Connectin to a !etwork
5Afte# changing the namese#)ice switch, $A% #eboots you# machine Afte# the#eboot, do an nsloo+up on wwwhpcom again A#e you able to #esol)ewwwhpcomnowI
http://education.hp.com H3064S B.00
2000 Hewlett-Packard Company
21-2%
http://www.hp.com/http://www.hp.com/ -
8/12/2019 Mod21_Connecting to a Network
26/26
Module 21Connectin to a !etwork
H3064S B.00 "ttp#$$education."p.com21-26