Top Banner
1 UNIX Networking
25

UNIX Networking

Jan 15, 2016

Download

Documents

nedra

UNIX Networking. Section Overview. TCP/IP Basics TCP/IP Configuration TCP/IP Network Testing Dynamic Host Config Protocol (DHCP) Wireless Networking. TCP/IP Protocol Stack. Application (FTP, HTTP, DNS). Transport Layer (TCP,UDP). Network Layer (IP). Link Layer (Device Drivers). - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: UNIX Networking

1

UNIX Networking

Page 2: UNIX Networking

2

Section Overview

TCP/IP Basics

TCP/IP Configuration

TCP/IP Network Testing

Dynamic Host Config Protocol (DHCP)

Wireless Networking

Page 3: UNIX Networking

3

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 4: UNIX Networking

4

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 5: UNIX Networking

5

Connecting to a Network

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

Page 6: UNIX Networking

6

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 7: UNIX Networking

7

IP Addresses

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

Special Addresses Network Address Broadcast Address

Page 8: UNIX Networking

8

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 9: UNIX Networking

9

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 10: UNIX Networking

10

Interface Configuration

Hardware to connect to networkCommon interfaces Ethernet Modem

Loopback (lo) Interfaceifconfig – View/Configure interface

Page 11: UNIX Networking

11

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 12: UNIX Networking

12

Translates IP addresses to Ethernet (MAC) addressesTranslates 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 13: UNIX Networking

13

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

Default Gateways

route: Display/configure routing

Page 14: UNIX Networking

14

RedHat Network Files

/etc/sysconfig/networkHOSTNAME

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

BOOTPROTO ONBOOTIPADDR GATEWAYUSERCTL NETMASKNETWORK BROADCAST

ifup/ifdown [interface]

Page 15: UNIX Networking

15

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 16: UNIX Networking

16

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 17: UNIX Networking

17

Network Testing

Localhost reachabilityHostname reachabilityLocal network reachabilityInternet network reachabilityDNS resolution

Page 18: UNIX Networking

18

Network tools

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

Page 19: UNIX Networking

19

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 20: UNIX Networking

20

Wireless Networks

Extend the networkIncluded in many devices now

Laptops PDAs DSL/Cable Modems

Bandwidth (YMMV!) 802.11b – 11 Mbps 802.11g – 54 Mbps

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

Page 21: UNIX Networking

21

Wireless Security Issues

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

Page 22: UNIX Networking

22

RedHat ifcfg- Additions

TYPE=Wireless

ESSID=[ssid name]

CHANNEL=[1-11]

MODE=[Auto|Managed|Ad-hoc]

Can set manually with /sbin/iwconfig

Page 23: UNIX Networking

23

Virtual Private Networks

Virtual Private NetworkVirtual Private Network

VPNVPNServerServer

ApplicationApplicationServerServer

InternetInternet

Page 24: UNIX Networking

24

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 25: UNIX Networking

25

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