Вы находитесь на странице: 1из 10

Connecting to a Network

Setting an IP Address and Subnet Mask

128.1.1.1 128.1.1.2 128.1.1.3

 IP addresses
 Assigned to each network node
 Must be unique
 Define via SAM, SMH, or
set_parms
Setting a Default Route

Internet

Router
128.1.0.1
LAN

128.1.1.1 128.1.1.2 128.1.1.3

 Hosts can locally deliver data to nodes on own LAN


 Route is required to route data to other LANs
 Define via SAM, SMH, or set_parms
Setting a System Hostname

LAN

128.1.1.1 128.1.1.2 128.1.1.3


(sanfran) (oakland) (la)

 Hostnames
 Mnemonic name assigned to each node
 Can be based on
 Purpose of node
 Primary users of node
 Any other naming convention
 Defined via set_parms
Resolving Hostnames to IP Addresses

telnet sanfran
128.1.1.1
ftp oakland
128.1.1.2

 Every outgoing packet requires an IP address


 Three ways to resolve hostnames to IP addresses
 /etc/hosts file
 Domain Name Service (DNS)
 Network Information Service (NIS)
Configuring /etc/hosts

Sample /etc/hosts:

128.1.1.1 sanfran mailsvr


128.1.1.2 oakland
128.1.1.3 la

 Maps IP addresses to hostnames


 Maintained on each individual host
 Usually used to resolve hostnames on small LANs
 Defined via SAM, SMH, or copy from another host
Configuring a DNS Client

DNS name
server

 Used to resolve hostnames on larger networks


 Clients request lookups from DNS servers
 To prevent duplicate names, each host assigned to a “domain”
 Must define the following via SAM or set_parms
 Your DNS server address
 Your DNS “domain” nae
Configuring an NIS Client

NIS
server
/etc/hosts
/etc/passwd
/etc/group
.
.
.

 Centralized maintenance of configuration files


 Clients send host, user, group lookups to NIS server
 Must define the following via SAM or set_parms
 NIS domain
 NIS server address
Choosing a Look-Up Service

DNS NIS
/etc/hosts

 Q: Where do I look up hostnames?


 A: Consult /etc/nsswitch.conf!
Troubleshooting Tools

 Check connectivity
# ping 128.1.1.3
# ping 128.1.1.4

 Check hostname resolution


# nslookup minnie
# nslookup donald

Вам также может понравиться