Professional Documents
Culture Documents
CT 320: Network and System Administration Fall 2014
CT 320: Network and System Administration Fall 2014
CT 320: Network and System Administration Fall 2014
Fall 2014*
* Thanks to Dr. James Walden, NKU and Russ Wakefield, CSU for contents of these slides
Dr. Indrajit Ray, Computer Science Department CT 320 Network and Systems Administration, Fall 2014
Introduction to TCP/IP Networking
Dr. Indrajit Ray, Computer Science Department CT 320 Network and Systems Administration, Fall 2014
Internetworking
Internetwork = Collection of networks
connected via routers
Dr. Indrajit Ray, Computer Science Department CT 320 Network and Systems Administration, Fall 2014
Internet = Virtual Network
Dr. Indrajit Ray, Computer Science Department CT 320 Network and Systems Administration, Fall 2014
Some Very Basic Terms
Simple Example: Use web browser to lookup www.cnn.com
My Laptop -
Running web Web Server
browser www.cnn.com
Internet
My laptop and the web server are both End Systems = Hosts
End systems can also include PDAs, sensors, cell phones, and
generally any device using the network to communicate
End systems are located at the network edge and connected to the
network using communication links
Dr. Indrajit Ray, Computer Science Department CT 320 Network and Systems Administration, Fall 2014
More Basic Terms: Client/Server
Simple Example: Use web browser to lookup www.cnn.com
My Laptop -
Running web Web Server
browser www.cnn.com
Internet
argon.tcpip-lab.edu neon.tcpip-lab.edu
"Argon" "Neon"
128.143.137.144 128.143.71.21
router137.tcpip-lab.edu router71.tcpip-lab.edu
"Router137" "Router71"
128.143.137.1 128.143.71.1
Router
Dr. Indrajit Ray, Computer Science Department CT 320 Network and Systems Administration, Fall 2014
Sending a packet from Argon to Neon
128.143.71.21 is not on my local network.
Therefore, I need to send the packet to my
128.143.71.21
default gateway withisaddress
on my local network.
128.143.137.1
DNS:
DNS:
ARP:What
The is
WhatIPisthe
address
theIPMAC
address
of Therefore, I can send the packet directly.
neon.tcpip-lab.edu?
ofneon.tcpip-lab.edu
address
ARP: TheofMAC is of
128.143.137.1?
address
128.143.71.21
128.143.137.1 is 00:e0:f9:23:a8:20
ARP: What is the MAC
ARP: TheofMAC
address address of
128.143.71.21?
argon.tcpip-lab.edu
"Argon"
128.143.137.1 is neon.tcpip-lab.edu
00:20:af:03:98:28
"Neon"
128.143.137.144 128.143.71.21
router137.tcpip-lab.edu router71.tcpip-lab.edu
"Router137" "Router71"
128.143.137.1 128.143.71.1
Router
frame frame
Dr. Indrajit Ray, Computer Science Department CT 320 Network and Systems Administration, Fall 2014
Communications Architecture
The complexity of the communication task is
reduced by using multiple protocol layers:
Each protocol is implemented independently
Each protocol is responsible for a specific subtask
Protocols are grouped in a hierarchy
A structured set of protocols is called a
communications architecture or protocol suite
Dr. Indrajit Ray, Computer Science Department CT 320 Network and Systems Administration, Fall 2014
TCP/IP Protocol Suite
Operating system
The TCP/IP suite has four Network
layers: Application, Transport,
Network, and Data Link Layer Data Link
Dr. Indrajit Ray, Computer Science Department CT 320 Network and Systems Administration, Fall 2014
OSI and TCP/IP Protocol Stack
7th
Application Layer
6th
Presentation Layer Application Layer
5th
Session Layer
4th
Transport Layer
Transport Layer
3rd
Network Layer
Network Layer
2nd
Link Layer
Link Layer
1st
Physical Layer
Dr. Indrajit Ray, Computer Science Department CT 320 Network and Systems Administration, Fall 2014
Functions of the Layers
Data Link Layer:
Service: Reliable transfer of frames over a link
Media Access Control on a LAN
Functions: Framing, media access control, error checking
Network Layer:
Service: Move packets from source host to destination
host
Functions: Routing, addressing
Transport Layer:
Service: Delivery of data between hosts
Functions: Connection establishment/termination, error
control, flow control
Application Layer:
Service: Application specific (delivery of email, retrieval
of HTML documents, reliable transfer of file)
Functions: Application specific
Dr. Indrajit Ray, Computer Science Department CT 320 Network and Systems Administration, Fall 2014
Assignment of Protocols to Layers
ping Application
application
HTTP Telnet FTP DNS SNMP
Layer
Routing Protocols
ICMP RIP
Network
IGMP IP PIM
Layer
OSPF
DHCP
Network
Interface
Dr. Indrajit Ray, Computer Science Department CT 320 Network and Systems Administration, Fall 2014
Layered Communications
An entity of a particular layer can only
communicate with:
1. a peer layer entity using a common protocol
(Peer Protocol)
2. adjacent layers to provide services and to receive
services
N+1 Layer N+1 Layer Protocol N+1 Layer
N+1 Layer
Entity Entity
layer N+1/N
interface
N Layer N Layer Protocol N Layer
N Layer
Entity Entity
layer N/N-1
interface
N-1 Layer N-1 Layer Protocol N-1 Layer
N-1 Layer
Entity Entity
Dr. Indrajit Ray, Computer Science Department CT 320 Network and Systems Administration, Fall 2014
Layered Communications
A layer N+1 entity sees the lower layers only as
a service provider
Request Indicate
Delivery Delivery
Service Provider
Dr. Indrajit Ray, Computer Science Department CT 320 Network and Systems Administration, Fall 2014
Application View of Networking
Application job: write the web browser (client) or web server (server)
My Laptop -
Running web Web Server
browser www.cnn.com
Internet
Dr. Indrajit Ray, Computer Science Department CT 320 Network and Systems Administration, Fall 2014
Transport View of Networking
Transport job: design/implement the connection-oriented(-less) service
Some
Some
Destination
Source
End System
End System
Internet
ISP A
ISP B
ISP A
Dr. Indrajit Ray, Computer Science Department CT 320 Network and Systems Administration, Fall 2014
Link Layer View of Networking
Only care about how to get message from A to B across this link
Link can be twisted pair, coaxial, fiber optic, wireless
Dr. Indrajit Ray, Computer Science Department CT 320 Network and Systems Administration, Fall 2014
Service Access Points
A service user accesses services of the service
provider at Service Access Points (SAPs)
A SAP has an address that uniquely identifies
where the service can be accessed
Layer-N
N Layer
Entity
Dr. Indrajit Ray, Computer Science Department CT 320 Network and Systems Administration, Fall 2014
Exchange of Data
The unit of data sent between peer entities is called a Protocol
Data Unit (PDU)
For now, let us think of a PDU as a single packet
Dr. Indrajit Ray, Computer Science Department CT 320 Network and Systems Administration, Fall 2014
Exchange of Data
A B
Layer-N Layer-N
Entity Layer-N PDU and control data is Entity
sent to SAP of Layer-N-1
control N PDU
SAPs
Header
(of layer N-1)
N PDU
control N PDU
PDU of Layer-N-1
Dr. Indrajit Ray, Computer Science Department CT 320 Network and Systems Administration, Fall 2014
Layers in the Example
IP IP protocol IP IP protocol IP
Dr. Indrajit Ray, Computer Science Department CT 320 Network and Systems Administration, Fall 2014
Layers in the Example
Other services:
DNS: translation between domain names and IP addresses
ARP: Translation between IP addresses and MAC addresses
Dr. Indrajit Ray, Computer Science Department CT 320 Network and Systems Administration, Fall 2014
Encapsulation
As data is moving down the protocol stack,
each protocol is adding layer-specific control
information
User data
HTTP
HTTP Header User data
TCP
TCP Header HTTP Header User data
IP TCP segment
Ethernet IP datagram
Ethernet Ethernet
IP Header TCP Header HTTP Header User data
Header Trailer
Ethernet frame
Dr. Indrajit Ray, Computer Science Department CT 320 Network and Systems Administration, Fall 2014
Ethernet
Computer <-> Computer communication on
same network
Each device has unique MAC address (48-bit)
example: 00-C0-4F-48-47-93
Ethernet Packet:
Preamble Dest. Source Type Data CRC
address address
Dr. Indrajit Ray, Computer Science Department CT 320 Network and Systems Administration, Fall 2014
IP: Internet Protocol
Unreliable connectionless datagram delivery service
Responsible for routing of data through intermediate
networks and computers
1 :ICMP
6 :TCP
17 :UDP
Dr. Indrajit Ray, Computer Science Department CT 320 Network and Systems Administration, Fall 2014
IP Routing
Source Destination
Application Application
Transport Router Transport
Network Network Network
Link Link Link
Routing Table
Destination IP address
IP address of a next-hop router
Flags
Network interface specification
Dr. Indrajit Ray, Computer Science Department CT 320 Network and Systems Administration, Fall 2014
ICMP : Internet Control Message Protocol
IP ICMP ICMP
Header Header Data
Dr. Indrajit Ray, Computer Science Department CT 320 Network and Systems Administration, Fall 2014
TCP : Transmission Control Protocol
Connection-Oriented, Reliable, Byte Stream Service
Protocol
1. Set up connection
2. Transfer data
3. Close connection
TCP Header Format
0 1 2 3 4 5 6 7 8 9 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
Source Port Destination Port
Sequence Number
Acknowledgement Number
Data - - - - Window
Offset
Checksum Urgent Pointer
Options (0 to 10 Words of 32 Bits)
TCP Payload
Dr. Indrajit Ray, Computer Science Department CT 320 Network and Systems Administration, Fall 2014
IP Addressing: Introduction
IP address: 32-bit 223.1.1.1
identifier for host, router
223.1.2.1
interface 223.1.1.2
interface: connection 223.1.1.4 223.1.2.9
223 1 1 1
Dr. Indrajit Ray, Computer Science Department CT 320 Network and Systems Administration, Fall 2014
An Addressing Example
Dr. Indrajit Ray, Computer Science Department CT 320 Network and Systems Administration, Fall 2014
IP Addresses
4 8-bit numbers (Hierarchical)
18.26.0.1
Dr. Indrajit Ray, Computer Science Department CT 320 Network and Systems Administration, Fall 2014
IP Addresses
Dr. Indrajit Ray, Computer Science Department CT 320 Network and Systems Administration, Fall 2014
IP Address Space
Originally, 3 Classes
A, B, C
Problem
Classes too rigid (C too small, B too big)
Solution
Subnetting (e.g. within CSU)
Classless Interdomain Routing (CIDR)
Dr. Indrajit Ray, Computer Science Department CT 320 Network and Systems Administration, Fall 2014
Subnetting
IP Address plus subnet mask
(netmask)
IP Addr: 171.64.15.82
Netmask: 0xFFFFFF00
(111...1100000000)
First 24 bits are the Subnet ID (the
neighborhood)
Last 8 bits are Host ID (the street
address)
Can be written as Prefix + Length
171.64.15.0/24 or 171.64.15/24
Dr. Indrajit Ray, Computer Science Department CT 320 Network and Systems Administration, Fall 2014
Subnets
IP address:
subnet part 223.1.1.1
(high order bits) 223.1.2.1
223.1.1.2
host part
223.1.1.4 223.1.2.9
(low order bits)
Whats a subnet ? 223.1.1.3 223.1.3.27
223.1.2.2
Dr. Indrajit Ray, Computer Science Department CT 320 Network and Systems Administration, Fall 2014
Subnets 223.1.1.0/24
223.1.2.0/24
Recipe
To determine the
subnets, detach each
interface from its host
or router, creating
islands of isolated
networks. Each
isolated network is
called a subnet. 223.1.3.0/24
Dr. Indrajit Ray, Computer Science Department CT 320 Network and Systems Administration, Fall 2014
Subnets
223.1.1.2
223.1.1.1 223.1.1.4
223.1.1.3
223.1.9.2 223.1.7.0
223.1.9.1 223.1.7.1
223.1.8.1 223.1.8.0
223.1.2.6 223.1.3.27
Dr. Indrajit Ray, Computer Science Department CT 320 Network and Systems Administration, Fall 2014
Routers and IP Addressing Principle
subnet host
part part
11001000 00010111 00010000 00000000
200.23.16.0/23
Dr. Indrajit Ray, Computer Science Department CT 320 Network and Systems Administration, Fall 2014
Getting a datagram from source to dest.
routing table in A
Dest. Net. next router Nhops
223.1.1 1
223.1.2 223.1.1.4 2
IP datagram:
223.1.3 223.1.1.4 2
misc source dest
IP addr data
fields IP addr A 223.1.1.1
223.1.3.1 223.1.3.2
Dr. Indrajit Ray, Computer Science Department CT 320 Network and Systems Administration, Fall 2014
Getting a datagram from source to dest.
223.1.3.1 223.1.3.2
Dr. Indrajit Ray, Computer Science Department CT 320 Network and Systems Administration, Fall 2014
Getting a datagram from source to dest.
Dest. next
misc network router Nhops interface
data
fields 223.1.1.1 223.1.2.3
223.1.1 - 1 223.1.1.4
Arriving at 223.1.4, destined for 223.1.2 - 1 223.1.2.9
Protocol
1. ARP request broadcast on Ethernet
2. Destination host ARP layer responds
Dr. Indrajit Ray, Computer Science Department CT 320 Network and Systems Administration, Fall 2014
IP addresses: Allocation
Q: How does a host get an IP address?
Dr. Indrajit Ray, Computer Science Department CT 320 Network and Systems Administration, Fall 2014