of 66

Lecture 9 Unix Networking (see chapter 7) Unix Networking & Internetworking  History  Overview  DNS  Typical Communication Utilities.

Dec 28, 2015

ReportDownload

Documents

  • Lecture 9 Unix Networking(see chapter 7)Unix Networking & InternetworkingHistoryOverviewDNSTypical Communication Utilities

  • Network HistoryInternet research started in the 1960sARPA Advanced Research Planning AgencyBegan work on packet switching.ARPANET late 1970s

  • TCP/IPPrototype Internet was developed.Transmission Control Protocol/ Internet Protocol 1st used by academic institutions, research organizations, & the U.S. military.

  • Internet Growth1983 Internet sites = 5621986 Internet sites = 2,308Doubled every year for the next 10 years.1996 9.5 million

  • Web BrowserKey to easy network utilization.1st browser Mosaic Developed by NCSANational Center for Supercomputer Applications.Launched in 1991Web browsing surpassed FTPFile Transfer Protocol

  • Size NowBetween 50 100 million computers1 million computer networksUnix has a special role in that most of the network protocols were initially implemented on Unix platforms.Most servers run on Unix based machines.

  • Networks & InternetworksTwo or > hardware resources connected.Can be computers, printers, plotters, scanners, etc.A hardware resource is a host.

  • A typical network configuration

  • Network TypesLAN Local Area NetworkMAN Metropolitan Area NetworkWAN Wide Area Network

    These distinctions are based on the maximum distance between hosts.

  • LANLocal Area NetworkHosts are in a room, building, or close buildingsDistance from a few meters to about 1km

  • MANMetropolitan Area NetworksHosts between a city or between small citiesDistance between hosts is about 1 to 20 km

  • WANWide Area NetworkHosts distance range from tens of kilometers to a few thousand kilometers.

  • InternetworkInternetwork is a network of networks.Can connect networks within a campus or networks thousands of kilometers apart.Connected with routers or gateways.Internet is an internetwork of tens of thousands of networks

  • Routers & GatewaysRouters Connect similar networksGateways Connect dissimilar networts.Convert messages to suitable form for each network.

  • Reasons for NetworksSharing resources Printers, plotters, scanners, software, etc.Communication between peopleCosts savingsReliability > 1 computer

  • TCP/IPKernel handles the communications.The communications hardware (NIC)Network Interface CardThe Unix kernel handles the details.

  • DNS Name ServerDomain name service (DNS) is central to the InternetWhen URLs are entered in a Web browser, a DNS server converts the name to an IP address, allowing the client to send a packet to the Web server as requestedThe information in DNS can be thought of as an inverted hierarchical tree, where the top of the tree is called root and is represented by a periodUsers typically dont refer to roots, but to the last part of domain names called top-level domains

  • DNS Name Server

  • DNS Name Server

  • Setting Up a DNS Name ServerResolving a domain to an IP address using DNS, also called querying the DNS server, stores, or caches, the conversion information resulting in speedier DNS queriesEach domain has a master DNS server which contains database files that provide IP addresses to every host in that domainEach domain should have a slave DNS server which acts as a backup to the master

  • Setting Up a Basic Name ServerThe program that implements a DNS server is called named, the name daemon, which is controlled by a system script in /etc/rc.d/init.dnamed is found in the BIND package on most Linux systems; selecting the Red Hat Linux name server component provides bind-conf, bind-utils, and caching-nameserverCaching name servers have no preconfigured domain information, but simply query other DNS servers and cache the results

  • Name ServerResolver functions like: gethostbyname To invoke DNS serviceMaps a host name to its IP address gethostbyaddrMaps an IP address to its hostname

  • View Information ifconfig commandView the IP address & other info about your hosts interface to the network.Usually in the /sbin directory (Type /sbin/ifconfig)

  • View Informationnslookup Display the IP address of a host nslookup ibm.comReturns the address.Modern forms: host or dig

  • Popular Internet ServicesElectronic Mail SMTP (Simple Mail Transfer Protocol)File Transfer FTP (File Transfer Protocol)Remote Login Telnet (and ssh)Time TimeWeb Browsing HTTP (Hyper Text Transfer Protocol)

  • Client-Server ModelInternet services are implemented by service partitioned in two parts.Part on the computer (host) where the user is logged onto is the client software.The part that starts running when a server boots is the server software.

  • Client-ServerThe server runs forever Waiting for a client requestA request is handled & then waits for another request.Client starts running when a user runs the program for a service the client offers.

  • Web Site URL Universal Resource LocatorURL is given to the client process to view a page. http://machine Displays the home page of machine

  • List of users List of users using hosts on a network. rwho Remote whoDisplays users using machines on your network. rwho a Users currently idle

  • Testing a network Connection ping If host is alive it echoes a datagram. whereis Finds the location finger Display information about a user

  • Problem AreasSize of networks continues to grow.Big problem Too many servers.Usually one server per application 1 for data base, 1 for accounting, etc.

  • VirtualizationVirtualize the many servers employed.One server with the capability of replacing many specialized servers.Goldman Sachs (brokerage firm) Had 250 network people & 30 million lines of specialized code.Large number of servers, regional, intl., etc.

  • VirtualizationThe number of specialist can be greatly reduced.The network complexity can also be reduced.The one major problem is having one machine for critical functions.

  • Typical Communication Utilities in UNIX

  • The talk Command

  • A Complete talk Session

  • A Complete talk Session

  • A Complete talk Session

  • The write Command

  • E-Mail ProgramsSome Programs available in Unix/LinuxMail most basic, low level mail commandELMPINE (PINE Is Not Elm), more user friendly text mailOutlook, GUI drivenEudoraNetscape Mailer

  • Email Address

  • The mail command

  • The mail commandYou can use the mail command in several ways:mail -- by itself, it opens your messages and lets you read themmail person@address -- lets you compose a message to someone at a certain address.mail -s (subject) person@address -- lets you send a message to someone at an address, with a certain subject.mail -s (subject) person@address < text_file -- lets you send a message to someone with text_file as the body of the email.

  • Using mailWhen you are writing the mail message body, use ^D or . to end editing and send the message.If cc: shows up, this is a list of other addresses you can enter if you wish to send a message to other people.^C will kill a mail message you are typing.

  • The mail Command (Sending Mail)

  • Header EditingWhile editing a message you may use~h -- lets you edit the header (to, subject, cc, bcc)These may also work:~s -- edit the subject.~t -- edit the to list.~c -- edit the cc (carbon copy) list.~b -- edit the bcc (blind carbon copy) list.

  • Message Editing CommandsUse these while writing the actual message~r -- Add a file into the message.~f -- add another email into the message (forwarding).~w -- write the message to a file.~q -- quit without saving~p -- print the contents of the message.

  • Mail Command Example

  • The mail Command (Read Mail)

  • Mail reading commandsThese commands are used in mail at the & promptq -- quit and savex -- quit without making any changes.R or r -- reply to a message (r = senders and recipients, R = senders only.)f -- view the message headers.p or t -- show those messages

  • More mail commandsd -- delete messages.u -- undelete messages.s -- append the messages to with headers.w -- append messages to -- message only.

  • PINEA menu-driven clientUses pico as an editorAllows MIME attachmentsMain MenuC - Compose to write a messageI or L - View messagesQ - Quit

  • Figure 7-10Local login

  • Figure 7-11Remote Login

  • Remote Login rlogin host rlogin paris rlogin l username host exit to leave telnet from UNIXtelnet open host close quit Shortcut: telnet host

  • Secure ShellSSH or Open SSHEncrypted connectionsssh l loginID remote.machine.name

  • EncryptionClientCorporate earnings are up 45% this quarter1DecryptServerssh installedssh installed

  • File Transfer Protocol: ftp ftp open hostShortcut: ftp host login password ftp help: ? ftp command help: ? Command ? binary quit

  • Getting a file with ftpUse binary or bin if needed to go to binary mode (default is ASCII)Use cd to go to the remote directory with your fileUse lcd to go a directory on your local machine (where you want the file to go after you ftp)Use get filename to copy a file from the remote directory to the local directory

  • Getting many files with ftpUse binary or bin if needed to go to binary mode (default is ASCII)Use cd to go to the remote directory with your fileUse lcd to go a directory on your local machine (where you want the file to