Chapter 10 Networking and the Internet
Download
Report
Transcript Chapter 10 Networking and the Internet
Chapter 10 Networking and the
Internet
ITSC 1458
Hostnames
• Linux provides several ways to associate hostnames
with IP addresses.
• One of these is to store a list of names and addresses
in the /etc/hosts file.
cat /etc/hosts
127.0.0.1
130.128.52.1
localhost
bravo.example.com
bravo
Localhost - allows networking software to operate on th
local machine without going onto a physical network
FQDN - fully qualified domain name
Nickname – locally unique
NIS
• The second way to associate hostnames with
Ips is to use NIS (Network Information
Service). NIS stores info in a database and is
useful only for host information within a single
administrative domain. Hosts outside of the
domain can’t access the database.
DNS
• The third way to associate hostnames with IP
addresses is to use DNS. DNS arranges the
entire network namespace as a hierarchy.
Each domain in the DNS manages its own
namespace (addressing and name resolution),
and each domain can query for any host or IP
address by following the tree up or down the
namespace until it finds the appropriate
domain.
Communication Commands
• Hostname – shows or sets the system’s host name (default is
localhost.localdomain)
– hostname
• Displays the hostname
– hostname Anaconda
• Changes the hostname to Anaconda
• msmith@remotehost – allows you to refer to a user (msmith)
on a remote server (remotehost).
• uname – lists host information
– uname –n
– uname –a
lists hostname
lists kernel name (-s), hostname (-n), kernelrelease (-f), kernel version (-v), machine
hardware name (-m), processor type (-p),
hardware platform (-i), and operating system (-o)
Comm. Commands
• domainname – show or set the system’s
domain name
– domainname
– domainname newname
lists the domain name
sets the domain name
• dnsdomainname – show or set the system’s
DNS domain name
finger
• Finger – displays information about local and
remote users.
– finger @bravo
displays information about all
users on the remote system bravo
– finger alex@bravo
displays information about the single user
alex on remote system bravo.
–F
– inger jane
displays info on all local users with “jane” in
/etc/passwd. Displays username, shell,
home directory, and last login.
• Finger queries in.fingerd that runs on the system
being queried.
• To disable finger,
– set disable = yes in /etc/xinetd.d/finger
– service finger restart
Network Utilities
• Trusted Hosts – some commands such as rcp
and rsh work only if the remote system trusts
your local computer. Trusted systems are
listed in the /etc/hosts.equiv file. OBSOLETE.
You should not allow rcp, rsh, or any
rcommands on your network.
• OpenSSH has tools that replace the r (remote)
commands with more secure alternatives.
telnet vs. ssh
• telnet – remotely access another system. Sends
info in clear text. Don’t allow. Can be used as a
debugging tool to connect to other ports rather
than the standard 23.
– telnet smtpsrv 25
-connects to port 25
using SMTP commands
• ssh – more secure alternative. Assumes that your
username and password are the same on the
remote system as they are on the querying
system.
ftp
• ftp – transfers files over a network in clear
text. Login is also in clear text. Used for
publicly available downloads. Must connect
to a server and must log in to the server.
– ftp [email protected]
ping
• ICMP Echo request/echo response
• Checks for connectivity (and DNS if use
domain name)
– ping www.yahoo.com
• Ctrl c ends
traceroute
• Traces the route that an IP packet follows,
including all hops, to its destination.
– traceroute www.linux.org
Host and dig
• Host looks up an IP address given a name, or
vice versa.
– host 209.131.36.158
– host www.yahoo.com
• Dig (domain information groper) queries DNS
servers and individual machines for
information about a domain.
jwhois
• jwhois – replaces whois and queries a whois
server for information about an Internet side.
Returns site contact and registry information.
Faster than whois
– jwhois victoriacollege.edu
DNS
• DNS is a distributed service to provide IP address to
domain name resolution. Nameservers on thousands
of machines worldwide cooperate to keep the
database up-to-date. No one system has a complete
copy of the database.
• 6 original top-level domains: com, edu, gov, mil, net,
org
• FQDN – fully-qualified domain name – a system’s
complete name. Top-level domain appears last
– anaconda.marty.com
• DNS service – bind (most common) – client/server
system.
nis
• Network Information Service – simplifies the
maintenance of frequently used
administrative files by keeping them in a
central database and having clients contact
the database server to retrieve information
from the database.
nfs
• Network Filesystem – allows a server to share
selected local directory hierarchies with client
systems. Files on the remote fileserver appear
as if they are present on the local system.