Networking CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and...

29
Networking CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University

Transcript of Networking CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and...

Page 1: Networking CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University.

Networking

CSCI N321 – System and Network Administration

Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University

Page 2: Networking CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University.

Section Overview

TCP/IP Basics

TCP/IP Configuration

TCP/IP Network Testing

Dynamic Host Config Protocol (DHCP)

Wireless Networking

Page 3: Networking CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University.

References

CQU 85321 System Administration Course Chapter 15

Page 4: Networking CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University.

TCP/IP Protocol Stack

Physical Layer (media)Physical Layer (media)

Link Layer (Device Drivers)Link Layer (Device Drivers)

Network Layer (IP)Network Layer (IP)

Transport Layer (TCP,UDP)Transport Layer (TCP,UDP)

Application (FTP, HTTP, DNS)Application (FTP, HTTP, DNS)

Page 5: Networking CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University.

EE IPIP T/UT/U

TCP/IP Packet Encapsulation

UTP/PSTNUTP/PSTN

Ethernet/PPPEthernet/PPP

IPIP

TCP/UDPTCP/UDP

ServiceService DataData

DataData

T/UT/U DataData

IPIP T/UT/U DataData

EE

Page 6: Networking CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University.

Connecting to a Network

Hostname and IP Address assignmentConfiguration of hardwareDefault route (gateway) assignmentName Service ConfigurationTesting and troubleshooting

Page 7: Networking CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University.

Hostnames

Uniquely identifies each systemFully Qualified Domain Name hostname.site.domain[.country] Country: 2 letter identifier for country Domain: Type of site (edu, com, org) Site: Unique name of organization Hostname: Unique name of system

hostname: Display or set system name

Page 8: Networking CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University.

IP Addresses

Unique for each connection (interface)Consists of 4 octets (#.#.#.#) Network portion Host portion

Special Addresses Network Address Broadcast Address

Page 9: Networking CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University.

IP Address Classes

ClassClass 11stst Byte Byte FormatFormat Total HostsTotal Hosts

A 0 – 126 N.H.H.H 16 Million

B 128 – 191

N.N.H.H 64 Thousand

C 192 – 239

N.N.N.H 254

D 224 – 239

- (Multicast)

E 240 – 254

- (Experimental)

Page 10: Networking CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University.

Subnet Masks

Splits networks into subnetworksSeparates address into 2 parts 1’s – Network Portion 0’s – Host Portion

Example: Class C Network Address: N.N.N.H Mask: 255.255.255.0 (255 =

11111111) CIDR Notation: N.N.N.H/24

Page 11: Networking CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University.

Interface Configuration

Hardware to connect to networkCommon interfaces Ethernet Modem

Loopback (lo) Interfaceifconfig – View/Configure interfaceipconfig – View interface (Windows)

Page 12: Networking CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University.

Ethernet Addressing

Assigned by manufacturer (hardware)Must be absolutely uniqueAddress format 6 octets in hex (#:#:#:#:#:#) First 3 octets: Manufacturer Identifier Last 3 octets: Card serial number

Used for local network communication

Page 13: Networking CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University.

Translates IP addresses to Ethernet (MAC) addresses

Address Resolution Protocol

Who is 10.0.0.3?Who is 10.0.0.3?

10.0.0.110.0.0.1 10.0.0.210.0.0.2 10.0.0.310.0.0.3 10.0.0.410.0.0.4

I am (1:2:3:7:8:9)I am (1:2:3:7:8:9)

arp –a: View the cache

Page 14: Networking CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University.

Connects Networks togetherIf destination not on local network, packets sent through gateway

Default Gateways

route: Display/configure routing

Page 15: Networking CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University.

RedHat Network Files

/etc/sysconfig/networkHOSTNAMEGATEWAY

/etc/sysconfig/network-scripts/ ifcfg-[interface]

BOOTPROTO ONBOOTIPADDR NETMASKUSERCTL BROADCASTNETWORK

ifup/ifdown [interface]

Page 16: Networking CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University.

Name Services

/etc/hosts Local configuration Localhost – 127.0.0.1

/etc/resolv.conf Domain Name Service (DNS) lookup search: domains to search if not FQDN nameserver (3): Nameservers to consult

/etc/nsswitch.conf

Page 17: Networking CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University.

DNS Name Resolution

11

22

33

44 55

667788

host.domain.comhost.domain.com dns.domain.comdns.domain.com dns.iupui.edudns.iupui.edu dns.cs.iupui.edudns.cs.iupui.edu

Root ServerRoot Server Non-RecursiveNon-Recursive

RecursiveRecursive

Page 18: Networking CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University.

Network Testing

Localhost reachabilityHostname reachabilityLocal network reachabilityInternet network reachabilityDNS resolution

Page 19: Networking CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University.

Network tools

ping – Reachability testtraceroute – Routing performancenetstat – Network performance statstcpdump – Packet sniffingnslookup/dig – DNS QueriesConfiguration tools (already discussed)

Page 20: Networking CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University.

Dynamic Host Config Protocol

Client broadcasts a request for an IP address and network informationServer leases address to clientLease must be renewed periodicallyEasy to make global network changesLinux: BOOTPROTO=dhcp

Page 21: Networking CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University.

Windows Networking

Page 22: Networking CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University.

Windows CLI

ipconfig – Display Interface Settingsping – Destination reachabilitytracert – Router hops to destinationnetstat – Performance statisticsnslookup – DNS lookupsroute – Set/Display gatewaynetsh – Change Interface Settings

Page 23: Networking CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University.

netsh Examples

Display Interfacesnetsh interface show interface

Configure Interfacenetsh interface ip set address \

local static [ip-addr] [netmask] \

[default-gw] 1

DNS Server Settingnetsh interface ip set dns local \

static [ip-addr]

Page 24: Networking CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University.

Wireless Networks

Extend the networkIncluded in many devices now

Laptops Smart Phones DSL/Cable Modems

Bandwidth (YMMV!) 802.11b – 11 Mbps 802.11g – 54 Mbps 802.11n - 150/300/450/600 Mbps

Set Service Identifier (SSID) Shared “key” between clients and Access Point (AP) Automatically detected vs. assigned

Page 25: Networking CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University.

Wireless Security Issues

Sniffing / War DrivingBandwidth stealingAccess to private resourcesSecurity Measures Non-broadcasting SSIDs MAC Access Control Lists (ACLs) WEP???? WPA/WPA2

Page 26: Networking CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University.

RedHat ifcfg- Additions

TYPE=Wireless

ESSID=[ssid name]

CHANNEL=[1-11]

MODE=[Auto|Managed|Ad-hoc]

Can set manually with /sbin/iwconfig

Page 27: Networking CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University.

Virtual Private Networks

Virtual Private NetworkVirtual Private Network

VPNVPNServerServer

ApplicationApplicationServerServer

InternetInternet

Page 28: Networking CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University.

Point to Point Tunneling Protocol

Based on Point to Point Protocol (PPP) Generic Routing Encapsulation (GRE)

IP HdrIP Hdr GRE HdrGRE Hdr Encrypted GRE BodyEncrypted GRE BodyPPPPPP DataDataTCPTCPIPIP

WeaknessesWeaknesses Poor EncryptionPoor Encryption Session handshaking done in clearSession handshaking done in clear

Page 29: Networking CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University.

IPSec

Part of IPv6 SpecAuthentication Header (AH)

IPv4 HdrIPv4 Hdr Auth HdrAuth Hdr TCP/UDP Hdr & DataTCP/UDP Hdr & Data

Encapsulating Security Payload (ESP)Encapsulating Security Payload (ESP)

IPv4 HdrIPv4 Hdr ESP HdrESP Hdr Encrypted PayloadEncrypted PayloadDataDataTCP HdrTCP Hdr ESP AuthESP AuthESP TlrESP Tlr

Modes: Transport and TunnelModes: Transport and Tunnel