Upload
eric-vanderburg
View
1.203
Download
4
Embed Size (px)
Citation preview
Networking Concepts – Eric Vanderburg ©2005
Chapter 6
Protocols
Networking Concepts – Eric Vanderburg ©2005
Communication
Send small piecesLessen impact from errorsMinimize bandwidth usageSupport maximum sending requirements
Networking Concepts – Eric Vanderburg ©2005
Packets
HeaderSource/DestinationSequence numberPriority
Data (Payload) – 50b-16kbTrailer
Integrity checking infoPadding
Networking Concepts – Eric Vanderburg ©2005
Packet Types
Unicast (one)Point-to-point
Anycast / Broadcast (all)Destination address is broadcast address
Multicast (group)Point-to-multipoint communicationDestination address is multicast addressAll computers with multicast address get
this message
Networking Concepts – Eric Vanderburg ©2005
Protocols
Rules of communication Protocol Suite – collection of protocols to operate at multiple
layers Routable protocols – can operate at layer 3.
TCP/IP IPX/SPX DECNet DDP (Datagram Delivery Protocol) – AppleTalk XNS - Xerox
Non-routable protocols NetBEUI DLC (Digital Loop Carrier) – for HP printers & IBM
mainframes LAT (Local Area Transport) DEC
Networking Concepts – Eric Vanderburg ©2005
Connection
Connection Oriented (Statefull)More reliableSlower (control & check data)TCP, FTP
Connectionless (Stateless)Less reliableFasterUDP, TFTP, PPPDatagrams
Networking Concepts – Eric Vanderburg ©2005
OSI and Protocols
ApplicationApplication Layer (7)Presentation Layer (6)Session Layer (5)
TransportTransport Layer (4)
NetworkNetwork Layer (3)Datalink Layer (2)Physical Layer (1)
Networking Concepts – Eric Vanderburg ©2005
Application Protocols
Application to Application services
SMTP (Simple Mail Transport Protocol) FTP (File Transfer Protocol) SNMP (Simple Network Management
Protocol) NCP (NetWare Core Protocol) – client and
redirector AFP (AppleTalk File Protocol) – remote file
management
Networking Concepts – Eric Vanderburg ©2005
Transport Protocols
Handle delivery between nodes
TCP (Transmission Control Protocol)SPX (Sequenced Packet Exchange)NetBIOS (Network Basic Input Output
System)
Networking Concepts – Eric Vanderburg ©2005
Network Protocols
Provides “Link Services” that address, route, and check for errors
IPv6 (Internet Protocol version 6) IPv4 (Internet Protocol version 4) IPX (Internetwork Packet Exchange) NWLink NetBEUI (NetBIOS Extended User Interface)
Networking Concepts – Eric Vanderburg ©2005
Protocol Suites
TCP/IP IPX/SPX NetBIOS / NetBEUI AppleTalk DLC (Digital Loop Carrier) XNS (Xerox Network Systems) DECNet (Digital Equipment Corporation
Network) X.25 – WANS and connects terminals to
mainframes
Networking Concepts – Eric Vanderburg ©2005
XNS
IDP (Internet Datagram Protocol) – Layer 2 RIP (Routing Information Protocol) – Layer 3 PEP (Packet Exchange Protocol) – Layer 4 SPP (Sequenced Packet Protocol)
Networking Concepts – Eric Vanderburg ©2005
DECNet
RP (Routing Protocol) MOP (Maintenance Operation Protocol) - uploading
and downloading system software, remote testing and problem diagnosis
NSP (Network Service Protocol) - flow control SCP (Session Control Protocol) DAP (Data Access Protocol) – remote file access CTERM (Command Terminal) LAT (Local Area Transport) STP (Spanning Tree Protocol) NIC bridging LAVC (Local Area VAX Cluster)
Networking Concepts – Eric Vanderburg ©2005
DECNet
Networking Concepts – Eric Vanderburg ©2005
TCP/IP
IP – Connectionless, provides routing and logical addressing
ICMP (Internet Control Message Protocol) – sends error messages, flow control instructions, confirmations Ping command
ARP (Address Resolution Protocol) – associates an IP with a MAC
TCP – fragmentation, reassembly, connection setup & maintenance, sequencing
Networking Concepts – Eric Vanderburg ©2005
TCP/IP
UDP – connectionless version of TCP, used by NFS (Network File System) & DNS
FTP (File Transfer Protocol) – upload, download, delete, move files
Telnet – connect and control systems, routers, & switches
SMTP – operates at 3 upper layers, mail
Networking Concepts – Eric Vanderburg ©2005
TCP/IP
RIP (Routing Information Protocol) Distance vector – each router sends its routing
table to its neighbors, sends link costs also RIPv2 has better performance than RIP Use on smaller networks
OSPF (Open Shortest Path First) Link-state routing – each router has partial map of
network. LSA (Link State Advertisement) is sent through the network when a link goes up or down.
Better on larger networks Requires more computations on each router
Networking Concepts – Eric Vanderburg ©2005
IP Addresses
Class A - 0nnnnnnn hhhhhhhh hhhhhhhh hhhhhhhh First bit 0; 7 network bits; 24 host bits Initial byte: 0 - 127 126 Class As exist (0 and 127 are reserved) 16,777,214 hosts
Class B - 10nnnnnn nnnnnnnn hhhhhhhh hhhhhhhh First two bits 10; 14 network bits; 16 host bits Initial byte: 128 - 191 16,384 Class Bs exist 65,532 hosts
Class C - 110nnnnn nnnnnnnn nnnnnnnn hhhhhhhh First three bits 110; 21 network bits; 8 host bits Initial byte: 192 - 223 2,097,152 Class Cs exist 254 hosts
Networking Concepts – Eric Vanderburg ©2005
IP Addresses
Class D - 1110mmmm mmmmmmmm mmmmmmmm mmmmmmmm First four bits 1110; 28 multicast address bits Initial byte: 224 - 239 Class Ds are multicast addresses
Class E - 1111rrrr rrrrrrrr rrrrrrrr rrrrrrrr First four bits 1111; 28 reserved address bits Initial byte: 240 - 255 Reserved for experimental use
Networking Concepts – Eric Vanderburg ©2005
IP Addresses
Register an IP IANA (Internet Assigned Numbers Authority)
Private IP Address Ranges Class "A" or 24Bit
10.0.0.0 - 10.255.255.255/8 Subnet Mask: 255.0.0.0
Class "B" or 20 Bit 172.16.0.0 - 172.31.255.255/12 or /16 255.240.0.0 or 255.255.0.0
Class "C" or 16 Bit 192.168.0.0 - 192.168.255.255/16 or /24 255.255.0.0 or 255.255.255.0
Requires NAT (Network Address Translation) to access the Internet Auto-configured Addresses 169.254..
APIPA (Automatic Private IP Addressing) Loopback Address 127… (localhost)
Networking Concepts – Eric Vanderburg ©2005
CIDR
Classless Inter-Domain RoutingWeakens boundaries between address
spaces. Specified by number of bits /24 denoting
the bits in the network address
Networking Concepts – Eric Vanderburg ©2005
Subnetting
Subnetting – dividing an IP address range into smaller networks (subnets)
Subnet Mask – address that shows which subnet a host belongs toNetwork bits are 1’sHost bits are 0’s
Each network needs an address for the network address and broadcast address (all 1’s and all 0’s)
Networking Concepts – Eric Vanderburg ©2005
Finding Host & Network Address
Convert from Decimal to BinaryCompare Subnet Mask to IP in BinaryConvert new Binary number to Decimal
Networking Concepts – Eric Vanderburg ©2005
Subnetting
Determine needed hosts and networksAdd 2 to needed networksFind power of 2 that is larger than the #Hosts is number of bits left over used in
power of 2 and subtract 2.
Networking Concepts – Eric Vanderburg ©2005
Supernetting
Combining multiple IP addresses into a larger network to support more hosts than could be achieved separately (synergy)
Find how many binary digits it takes to account for the number of IP’s you have If the number of addresses is not equal to
the binary digit calc, use lower number and some IPs will not be supernetted.
Networking Concepts – Eric Vanderburg ©2005
NAT/PAT
NAT Lets an organization use Private IP’s Increases security Translates internal to external IP
PAT (Port Address Translation) Maps internal IP’s to external IP and port number Used by most NATs
Linux VPN Masquerade – essentially NAT services for Linux
Networking Concepts – Eric Vanderburg ©2005
DHCP
Dynamic Host Configuration ProtocolGives IP addresses to clients as neededScope, Reservations, & ExclusionsLease Length
After 50% expired, try to renewAuto-configured address used if no
assigned IP, good if DHCP goes down or if no server is available
Networking Concepts – Eric Vanderburg ©2005
MADCAP
MADCAP (Multicast Address Dynamic Client Allocation Protocol)
Gives multicast addresses to clientsMulticast scope (class D)Scope, Reservations, & ExclusionsLease Length
Networking Concepts – Eric Vanderburg ©2005
IPv6
Aka: IPNG (Internet Protocol Next Generation) July 25, 1994 in RFC 1752, Core Protocols in 1998 128 bit address space instead of IPv4’s 32 bit address space 340,282,366,920,938,463,463,374,607,431,768,211,456
maximum possible addresses Specified in Hex (4 Hex digits and :) in 8 sets Leading 0 is omitted First Set – Public topology (ISP, backbone), 48bits Second Set – Site topology (business), 16bits Third Set – Interface ID, 64bits Security information, sender/receiver verification, & encryption in
each packet Backward compatible
Networking Concepts – Eric Vanderburg ©2005
DNS (Domain Name Service)
Networking Concepts – Eric Vanderburg ©2005
DNS
Vendor Products Windows DNS Server
Active Directory Integrated DDNS (Dynamic Domain Name Service)
BIND (Berkley Internet Name Domain) Server Types
Primary Server Secondary Server Caching Only Server Forwarding Only Server (Slave)
FQDN (Fully Qualified Domain Name) Zone – Specific DNS namespace, a server or servers can be
responsible for a zone Reverse Lookup Zone – search for FQDN from IP
Networking Concepts – Eric Vanderburg ©2005
DNS RRs (Resource Record)
SOA (Start of Authority) – First record, which server manages this zone@ IN SOA source_host email serial#
NS (Name Server) – Lists name servers in a domain. Allows other NS’s to look up records in your zone. Domain @ IN NS nameserver_host
A (Host) – Host to IPhostname IN A IP_Address
PTR (Pointer) – FQDN to IPowner ttl class PTR FQDN
CNAME – provides alternate hostnames (www)alias IN CNAME hostname
MX (Mail Exchange)domain IN MX priority mailserver_host
Networking Concepts – Eric Vanderburg ©2005
Example DNS file
Networking Concepts – Eric Vanderburg ©2005
Recursive, Iterative, & Caching
Networking Concepts – Eric Vanderburg ©2005
NetBIOS, NetBEUI
First used in IBM’s PC-Net & later MS-Net Each computer has 15 character name and
one character for a service code NetBEUI created for OS/2 and LAN Manager
NetBIOS is for upper layers NetBEUI for layers 2-4
Used in early Windows systems as the default protocol
Networking Concepts – Eric Vanderburg ©2005
NetBIOS Service Codes
Common NetBIOS Names Service That Registers the Name
<computer name>[00h] Workstation (your NetBIOS Redirector)
<computer name>[03h] Messenger(listens for messages sent to your computer)
<computer name>[20h] Server (Shares your resources to the network)
<user name>[03h] Messenger (listens for messages sent to your logon ID)
<domain name>[1Dh] Master Browser
<domain name>[1Bh] Domain Master Browser
Name Cache (nbtstat –c)
Networking Concepts – Eric Vanderburg ©2005
NBT
NBT (NetBIOS over TCP/IP)
Allows NetBIOS names to be translated to IP addresses so that they can be routed across the network
Check the box to enable NBT
Networking Concepts – Eric Vanderburg ©2005
NetBIOS Node Types
B-Node (Broadcast Node) Broadcast mode uses broadcasts only. NetBIOS Name Cache Broadcast a NetBIOS Name Query Checking the LMHOSTS file Checking a HOSTS file Checking with a DNS server
P-Node(Peer-to-Peer Node) NetBIOS Name Cache Asking a NetBIOS Name Server HOSTS file DNS
Networking Concepts – Eric Vanderburg ©2005
NetBIOS Node Types
M-Node(Mixed Node) NetBIOS Name Cache Broadcast a NetBIOS Name Query Checking the LMHOSTS file Asking a NetBIOS Name Server Checking a HOSTS file Checking with a DNS server
H-Node(Hybrid Node) NetBIOS Name Cache Asking a NetBIOS Name Server Broadcast a NetBIOS Name Query Checking the LMHOSTS file Checking a HOSTS file Checking with a DNS server
Networking Concepts – Eric Vanderburg ©2005
Nbtstat switches
-n Lists the NetBIOS name registered by the client
-c Displays NetBIOS name cache.-R Manually reloads the NetBIOS name
cache using entries in the LMHOSTS file with a #PRE parameter.
Networking Concepts – Eric Vanderburg ©2005
Hosts file
Maps NetBIOS names to IP AddressesWorks on Windows and UNIXNT Location: %winroot%\system32\drivers\
etc Unix Location:- /etc/hosts File Name- HOSTS # is used for comments
Networking Concepts – Eric Vanderburg ©2005
Example Hosts file
127.0.0.1 localhost 13.41.85.1 router 13.91.45.121 server1 13.91.45.122 server214.33.121.121 mcsunix # Solaris 10 machine 14.33.121.122 mail # Server 2003 Mail Server 189.11.121.11 sunshinemtn.com web # Web server
Networking Concepts – Eric Vanderburg ©2005
LMHosts file
Maps NetBIOS names to IP Addresses Location:- %winroot%\system32\drivers\etc File Name- LMHOSTS
#PRE - A #PRE tag tells the computer to pre-load the entry to the name cache during initialization or after the NBTSTAT -R command has been issued at the command prompt. Entries of #PRE are static in the cache.
#DOM:[domain_name] - Indicates the computer is a domain controller. #NOFNR - Avoids using NetBIOS name queries on older LAN manager
for UNIX environments. #INCLUDE - Directs the system to the location of the central LMHOSTS
file #BEGIN_ALTERNATE - Used in conjunction with the #INCLUDE file .
This entry marks the begining of entries that are alternative locations for the central LMHOST file. If the first entry is unavailable.
#END ALTERNATE - End of alternative locations statement. #MH - Multihomed computers that have more than one entry
Networking Concepts – Eric Vanderburg ©2005
Example File
141.8.2.1 WKS-1 141.8.2.2 WKS-2 #PRE 141.8.2.3 PDC-1 #PRE 156.34.2.9 BDC-1 #PRE 141.8.2.10 Gateway-1 #MH 156.34.2.4 Gateway-1 #MH 156.34.2.7 Server-1 #PRE #INCLUDE \\PDC-1\Scripts\lmhosts #BEGIN_ALTERNATE #INCLUDE\\SERVER-1\Scripts\lmhosts #END_ALTERNATE
Networking Concepts – Eric Vanderburg ©2005
SMB
SMB (Server Message Block)Sends file listsStarts connection for LAN ManagerLinks Redirector and Server softwarePresentation layer
Networking Concepts – Eric Vanderburg ©2005
IPX/SPX
Used on older Netware networksRequires all computers to use the same
frame typeHas network address for communication
between computers
Networking Concepts – Eric Vanderburg ©2005
NetWare
Older versions require IPX/SPXNCP (NetWare Core Protocol) - file &
print services for NetWare (similar to Microsoft’s SMB)
LIP (Large Internet Protocol) - negotiates the largest packet size that can be used
Networking Concepts – Eric Vanderburg ©2005
AppleTalk
RTMP (Routing Table Maintenance Protocol)
AURP (AppleTalk Update-Based Routing)
ADSP (Appletalk Data Stream Protocol)ZIP (Zone Information Protocol)AFP (AppleTalk Filing Protocol)
Networking Concepts – Eric Vanderburg ©2005
AppleTalk
Networking Concepts – Eric Vanderburg ©2005
Channel Access Methods
*Done at Layer 2 MAC sublayer Contention
CSMA/CD – check to see if anyone is using the line. If so, wait random interval and try again. (Ethernet)
CSMA/CA – Send packet to tell other computers you are going to send data. (reduces speed)
AppleTalk Wireless
Switching – Data sent to same MAC at same time. Some computers can be given higher priority (server)
Token Passing Demand Priority – each asks intelligent hub for permission to
send data (raise hand) Polling – allows priority, asks if there is data to send, same
limitations and advantages of token passing (IBM SNA networks)