unix networking
DESCRIPTION
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 PresentationTRANSCRIPT
![Page 1: UNIX Networking](https://reader033.vdocument.in/reader033/viewer/2022051417/56814901550346895db630e2/html5/thumbnails/1.jpg)
1
UNIX Networking
![Page 2: UNIX Networking](https://reader033.vdocument.in/reader033/viewer/2022051417/56814901550346895db630e2/html5/thumbnails/2.jpg)
2
Section Overview
TCP/IP Basics
TCP/IP Configuration
TCP/IP Network Testing
Dynamic Host Config Protocol (DHCP)
Wireless Networking
![Page 3: UNIX Networking](https://reader033.vdocument.in/reader033/viewer/2022051417/56814901550346895db630e2/html5/thumbnails/3.jpg)
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](https://reader033.vdocument.in/reader033/viewer/2022051417/56814901550346895db630e2/html5/thumbnails/4.jpg)
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](https://reader033.vdocument.in/reader033/viewer/2022051417/56814901550346895db630e2/html5/thumbnails/5.jpg)
5
Connecting to a Network
Hostname and IP Address assignmentConfiguration of hardwareDefault route (gateway) assignmentName Service ConfigurationTesting and troubleshooting
![Page 6: UNIX Networking](https://reader033.vdocument.in/reader033/viewer/2022051417/56814901550346895db630e2/html5/thumbnails/6.jpg)
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](https://reader033.vdocument.in/reader033/viewer/2022051417/56814901550346895db630e2/html5/thumbnails/7.jpg)
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](https://reader033.vdocument.in/reader033/viewer/2022051417/56814901550346895db630e2/html5/thumbnails/8.jpg)
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](https://reader033.vdocument.in/reader033/viewer/2022051417/56814901550346895db630e2/html5/thumbnails/9.jpg)
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](https://reader033.vdocument.in/reader033/viewer/2022051417/56814901550346895db630e2/html5/thumbnails/10.jpg)
10
Interface Configuration
Hardware to connect to networkCommon interfaces Ethernet Modem
Loopback (lo) Interfaceifconfig – View/Configure interface
![Page 11: UNIX Networking](https://reader033.vdocument.in/reader033/viewer/2022051417/56814901550346895db630e2/html5/thumbnails/11.jpg)
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](https://reader033.vdocument.in/reader033/viewer/2022051417/56814901550346895db630e2/html5/thumbnails/12.jpg)
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](https://reader033.vdocument.in/reader033/viewer/2022051417/56814901550346895db630e2/html5/thumbnails/13.jpg)
13
Connects Networks togetherIf destination not on local network, packets sent through gateway
Default Gateways
route: Display/configure routing
![Page 14: UNIX Networking](https://reader033.vdocument.in/reader033/viewer/2022051417/56814901550346895db630e2/html5/thumbnails/14.jpg)
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](https://reader033.vdocument.in/reader033/viewer/2022051417/56814901550346895db630e2/html5/thumbnails/15.jpg)
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](https://reader033.vdocument.in/reader033/viewer/2022051417/56814901550346895db630e2/html5/thumbnails/16.jpg)
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](https://reader033.vdocument.in/reader033/viewer/2022051417/56814901550346895db630e2/html5/thumbnails/17.jpg)
17
Network Testing
Localhost reachabilityHostname reachabilityLocal network reachabilityInternet network reachabilityDNS resolution
![Page 18: UNIX Networking](https://reader033.vdocument.in/reader033/viewer/2022051417/56814901550346895db630e2/html5/thumbnails/18.jpg)
18
Network tools
ping – Reachability testtraceroute – Routing performancenetstat – Network performance statstcpdump – Packet sniffingnslookup/dig – DNS QueriesConfiguration tools (already discussed)
![Page 19: UNIX Networking](https://reader033.vdocument.in/reader033/viewer/2022051417/56814901550346895db630e2/html5/thumbnails/19.jpg)
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](https://reader033.vdocument.in/reader033/viewer/2022051417/56814901550346895db630e2/html5/thumbnails/20.jpg)
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](https://reader033.vdocument.in/reader033/viewer/2022051417/56814901550346895db630e2/html5/thumbnails/21.jpg)
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](https://reader033.vdocument.in/reader033/viewer/2022051417/56814901550346895db630e2/html5/thumbnails/22.jpg)
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](https://reader033.vdocument.in/reader033/viewer/2022051417/56814901550346895db630e2/html5/thumbnails/23.jpg)
23
Virtual Private Networks
Virtual Private NetworkVirtual Private Network
VPNVPNServerServer
ApplicationApplicationServerServer
InternetInternet
![Page 24: UNIX Networking](https://reader033.vdocument.in/reader033/viewer/2022051417/56814901550346895db630e2/html5/thumbnails/24.jpg)
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](https://reader033.vdocument.in/reader033/viewer/2022051417/56814901550346895db630e2/html5/thumbnails/25.jpg)
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