Home Networking

Document Sample
Home Networking Powered By Docstoc
					Home Networking


      CS 110
Objectives

 Understand the basics Network Addressing
 Learn the basic hardware needed to form a
  home network
 Learn basic Firewall functionality
 Learn how to share files among hosts on a
  network
Internet Addresses
 Every host connected to the Internet is identified by an IP
   address
     Acts as your computer’s Phone Number
     Multiple programs can run on any one host
           FTP
           Internet Explorer
           IM
 Every program (i.e. client or server) on a host is identified by a
  number, called a “port”
 IP Address Format
    <address>:<port>
    Examples:
           136.142.185.31:22 (SSH on unixs.cis.pitt.edu)
           216.109.118.66 (www.yahoo.com)
DNS
 Humans prefer to work with text
    unixs.cis.pitt.edu
    www.yahoo.com
    user@pitt.edu
 DNS (Domain Name System) translates a text
  address to an IP address
     unixs.cis.pitt.edu      136.142.185.31
     pitt.edu                136.142.11.143
     www.yahoo.com           216.109.117.106
 Notice: similarity between pitt.edu IP addresses
    Indicates that these hosts exist on same network
Address assignment
 Two ways a host’s IP address can be assigned
    Manually assigned by the user of the host
       May not be consistent with network

       May already be used by another host

    DHCP (Dynamic Host Configuration Protocol)
       Another host assigns IP addresses to every host on a

        network
       Ensures every host gets a unique IP address

            (among other tasks)
 Which to use is up to the network administrator (you)
Finding IP address in Windows
 Click Start Menu ->
  Control Panels
 Double Click “Network
  Connections” Icon
    Displays all network
      connections
    Most common for us
      is “Local Area
      Connection”
 Double Click “Local
  Area Connection”
 Click “Support” Tab
Setting IP address in Windows
 Right click “Local Area Connection” in Network Connections
  Control Panel
 Go to Properties

 Click Internet
  Protocol
 Click Properties
  Button
Setting IP address in Windows
 Obtain an IP address
  automatically
    Uses DHCP
    This is the default setting
 Use the following IP address
    Allows user to enter a
      specific IP address
    Subnet mask specifies
      how many of the fields in
      the IP address uniquely
      identify the PC
    Default gateway is the
      address of the computer to
      where data can be sent to
      get to “the outside world”
Basic Network Hardware
 Network Interface Card (NIC)
    Inside PC
    Transfers data between PC and network
    Provides the Plug on the back of your PC
 Hub
    Simple interconnection between computers
    Collisions occur if more than one PC sends data at the same
     time
 Switch
    Also simple interconnection
    Prevents collisions by time multiplexing
 Router
    Actively transfers data on correct path to reach its destination
Simple Network
 Assume we have a PC, a laptop, a PDA, a Media
  Center, and an Xbox
 Simplest network involves connecting each to a
  single hub or switch
    Provides the interconnection shown below



                PC              Xbox




                                Media
                PDA    Laptop
                                Center
Simple Network
 Can specify IP address manually for each device
 PC (or laptop) can act as a DHCP server to assign IP
  addresses




                PC              Xbox




                                Media
                PDA    Laptop
                                Center
Connecting to the Outside
 Must add routing functionality
       a device that has two NICs
            One connected to our simple network
            One connected to the outside
 Two means of doing this:
       The PC (or Laptop) can be set up to do this
       Can add a separate device


Internet                PC      Router     Xbox




                                          Media
                       PDA      Laptop
                                          Center
Configuring your PC
 Assume the PC has:
   Dialup connection to the Internet (a modem)
          Already setup to properly dial
     LAN connection to our simple network
 Configure “Local Area Connection” in
  Network Connections Control Panel to use
  DHCP as described earlier
     It will be it’s own DHCP server
 Similarly, each device on the network can be
  configured to use DHCP
Configuring your PC
 Right click dialup connection icon, go to “Properties”
 Click “Advanced” tab

 Check “Allow other
  network users to
  connect through
  this computer’s
  Internet
  connection”
 Select “Local Area
  Connection” from
  the drop down
  menu
Configuring your PC
 Other network devices can now send and receive information to and
   from the Internet
       First, through the switch to the PC
       PC transfers the data to the modem
       PC decides to which device to send incoming data
            “routes” incoming data
 Note: Instead of a dialup connection, the PC could have a second
   Local Area Connection


             Internet                 PC               Xbox




                                                      Media
                                      PDA   Laptop
                                                      Center
Alternative
 Use a separate router for the network
    Usually for broadband connections (Cable, DSL)
    Faster and more configurable than PC
 Most act as a DHCP server too
 For simple networks, comes preconfigured
    Plug it in and Go



         Internet            PC      Router   Xbox




                                              Media
                            PDA      Laptop
                                              Center
Adding Wireless
 Wireless Network Access is becoming more popular
 Access provided by another device
    Wireless Access Point (WAP)
    Transfers data received over wireless through wired network to
     Internet and back
 Default configuration works on most networks
    Best to enable security features
           Varies from manufacturer to manufacturer


            Internet              PC        Router     Xbox


                                                                WAP


                                                       Media
                                 PDA        Laptop
                                                       Center
Simple Network Summary
 Started with PC, laptop, PDA, Xbox, and Media
  Center
 For networking, added switch, router, WAP, and an
  implied DHCP server
      Vendors collect these devices into a single box

          Internet
                            PC      Router   Xbox


                                                      WAP


                                             Media
                            PDA     Laptop
                                             Center
Using the All-in-one
 Now have a single
  networking device                          Internet
 If the network grows
      Another switch can be
       added
      Another WAP can be                      WiFi
       added                                  Router
         Geographical
          distance will          PDA
          increase coverage
      Only a single router is                       Media
                                       PC   Laptop            Xbox
                                                     Center
       needed for the entire
       network
How data travels
 Data sent over Internet is organized into “packets”
    Contain chunks of a sequence of data
    A single unit of transmission

 Similar to an envelope sent through US Mail
 Packaged with:
    Address (destination IP address)
    Return address (Source IP address)
    Name of recipient (Port Number of Application)
    Name of sender (Port Number of Sender Program)
Basic Routing
 Router receives packet on either NIC
 Forwards it on the other
    Uses IP address and Port to decide where packet should go
    If specified destination is unknown, router forwards it to
     another router that does know the destination
 Similar to Post Office
    Picks up mail at your home
    Transfers it to large Distribution Centers
    Forwarded to office of correct zip code
    Delivered to destination


                                    NIC
                     NIC




                           Router
Problem
 Internet Service Providers
  (ISP) provide a single IP                      Internet
  address per account
    Other hosts only see one
      destination
 Our network has several                   24.133.65.78

                                                     WiFi
  different hosts
                                                    Router
 A packet received from
  Internet has the ISP
  assigned IP address as the
  destination                                                Media
                                    PC         Laptop                        Xbox
 Which host on our network                                  Center
                                192.168.1.100 192.168.1.101 192.168.1.102   192.168.1.103
  should get the packet?
Network Address Translation
 For packets crossing the router (in either direction)
    Router replaces local network IP address with ISP
     address
    Remembers the Internet destination (or source)
       Pairs that with the local network host for future

        packets




                                   NIC
                    NIC




Internet                  Router
Introduction to Firewalls
 NAT requires local hosts to initiate connections to outside world
  first
     Router needs to know where to send return packets
 All traffic coming from outside world is blocked from accessing
  local network
     By default
     Administrator can let specific traffic into network
 This is the basic idea of a Firewall
     Note: NAT and Firewalls are mutually exclusive functions


                                     NIC
                      NIC




                            Router
Firewall
 Examines each packet it receives
 Decides to allow or deny the packet to pass through
  the device
      Decision based on a list of rules
 Matches Source IP, Source Port, Destination IP,
  Destination Port, and Protocol against those specified
  in the rule
 If a match occurs, rule is applied to the packet
 e.g. Block all TCP packets from 23.45.67.* on any
  port destined for 78.12.89.3:80
      (number after the colon specifies port)
Port Forwarding
 Most home networks don’t need the
  complexity of most Firewall rules
 Port Forwarding refers to rules with a specific
  kind of format
 Allows traffic received from any Internet host
  destined for a specific port to be directed to a
  specific local host on the home network
Example
 Let’s say our PC is running a
    web server                                              Internet
      Runs on port 80
   We want people to be able to
    visit http://24.133.65.78/
   By default, the router would
    block any Web browser from                         24.133.65.78

    accessing our PC                                            WiFi
   Add a rule to the router to allow                          Router
    any Internet traffic trying to reach
    port 80
      Forward the traffic to
        192.168.1.100                                                   Media
   Web server will then receive and           PC         Laptop                        Xbox
                                                                        Center
    respond to the traffic                 192.168.1.100 192.168.1.101 192.168.1.102   192.168.1.103

   Different manufacturers offer this
    functionality in different ways
Example
 Typical Ports
                                              Internet
Port Application
 21   FTP Server (Control)
                                         24.133.65.78

 22   SSH server                                  WiFi
                                                 Router
 23   Telnet server
 25   SMTP server
 80   Web server                                          Media
                                 PC         Laptop                        Xbox
                                                          Center
3389 Windows Remote          192.168.1.100 192.168.1.101 192.168.1.102   192.168.1.103


     Desktop
Windows File Sharing
Idea
 Now we have our
  network set up
 We’d like to able to
  easily access file on                     24.133.65.78

                                                     WiFi
  other hosts                                       Router
      Media Center could
       access media stored
       on the PC
      Laptop may need a file       PC         Laptop
                                                             Media
                                                                             Xbox
       from PC                                               Center
                                192.168.1.100 192.168.1.101 192.168.1.102   192.168.1.103
 Windows provides an
  easy way to facilitate
  this
Windows File Sharing
 Built into Windows
 Specify Directories to
  be shared
      Entire contents of
       directory and all
       subdirectories can be
       accessed by other
       hosts
 Right-click on Folder
  icon
 Go to “Sharing and
  Security”
Simple Windows File Sharing
 Click “Share this folder on the
  network”
 In most cases, this is all that
  needs to be done
 Can change the name other
  hosts will see when accessing
  the folder
 Can change the access
  permissions
    By default, other hosts only
      have Read-Only access
    Click “Allow network users
      to change my files” to give
      write permission
    Also gives permission for
      others to store new files into
      the folder
Switching to Advanced File Sharing
 Open Folder Options
  control panel
 Click “View” Tab
 Uncheck “Use simple
  file sharing
  (Recommended)”
 Click OK
Advanced Windows File Sharing
 This is “Sharing and
  Security” window after
  Unchecking the Folder
  Options setting
 Advanced File Sharing
  allows:
    Different permissions for
      different users
          Users must have a
           user account on this
           PC
     More fine-tuned access
      control per user
 In most cases, Simple File
  Sharing is adequate
Windows Network Organization
 Windows File Sharing organizes hosts into
  “Workgroups”
     Originally designed for the workplace
     People grouped into same project or team
     Their PC could be grouped in the same
      workgroup
 Files can be accessed from any PC
  regardless of workgroup
 Users can specify any name for their PC’s
  workgroup (and hostname)
Setting Workgroup Name
 Open “System” Control
  Panel
      Or right-click on “My
       Computer and go to
       “Properties”
 Click “Computer Name”
  Tab
 Current Name and
  Workgroup are
  displayed here
 To change, click
  “Change…” button
Setting Workgroup Name
 Change the text in the
  given boxes to any
  desired name
 Click OK
 Workgroup name
  changes don’t take
  effect until computer is
  restarted
Viewing Files Shared On Other Hosts
 Open “My Network Places” on Desktop
 Usually also in Start Menu or linked on right side of
  Explorer window
Viewing Files Shared On Other Hosts
 My Network Places
  automatically searches
  for shared folders from
  any host it can find
      Can only search in a
       local part of the
       network
 To view hosts
    Click “View workgroup
     computers” on right
     side of window
Viewing Files Shared On Other Hosts
 Shows an icon for each host that (independently)
  specified the same workgroup name as your PC
 By clicking the parent directory button, can view all
  the workgroups the PC can locate
      Displays an icon for each workgroup (See the next
       slide)
Viewing Files Shared On Other Hosts
Viewing Files Shared On Other Hosts
 Double click on a host to view its shared resources
    Includes shared folders and shared printers

 From this point, you can view (and possibly changed)
  shared files as if they were part of your local file
  system
Network Setup Wizard
 Setups up Windows to
  properly use its network
  connections
 Configures many of the
  settings we’ve
  discussed
 To get started, Open
  “My Network Places”
 Click “Set up a home or
  small office network”
Network Setup Wizard
 The screens viewed will vary
    Depends on what kind of network connections
     are available
Network Setup Wizard
 To enable the Router-
  like capabilities of
  Windows
     Check the top radio
       button
     Allows other hosts on
       the local network to
       send packets to the
       Internet through the
       PC
 Most common selection
  is the middle radio
  button
 If setting up the simple
  network (just a switch),
  choose “Other”
Network Setup Wizard
 Enter description if
  desired
      Can be left blank
 Enter desired
  hostname
 This sets the same
  setting as the
  “Computer Name”
  tab in the “System”
  Control Panel
 Click “Next”
Network Setup Wizard
 Enter Workgroup
  name
      Can be any
       desired name
 Click “Next”
Network Setup Wizard
 Enable the ability
  to share folders
  and printers from
  this computer
      Click the top
       radio button
 Disable it by
  selecting the
  bottom radio
  button
 Click “Next”
Network Setup Wizard
 Review Settings
  you’ve chosen
 Click “Next”
Network Setup Wizard
 Unless you need to
  apply exactly the
  same settings to
  many PCs, check
  the last radio
  button
 Click “Next”
 You’re done

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:4
posted:1/7/2012
language:English
pages:50
jianghongl jianghongl http://
About