Other Chapter Notes:
[Chapter
One] [Chapter
Two]
[Chapter
Three]
[Chapter Four]
[Chapter Five]
[Chapter Six]
[NID Outline]
[Back
to Notes]
[Home]
|
IP
Concepts
- Transmission
Control Protocol/Internet Protocol (TCP/IP)
- Required
to communicate between hosts on the internet
- TCP/IP
is the standard for global communications between hosts and networks
- The
TCP/IP Internet Model
- Layers
(figure 1.1 on page 5)
- OSI
vs. TCP/IP and Data Types
- Application
Layer
- Date
type: Data Stream
- Handles
implementation of user applications
- Software
supports the implementation of the application (web browser and
web server)
- Transport
Layer
- Data
type: TCP segment
- Manages
end-to-end communications between hosts
- Concerned
with providing reliability over inherently unreliable layers
- Two
transport layers
- TCP
- UDP
(User Datagram Protocol)
- No
promise of reliable delivery
- Network
Layer
- Data
type: IP datagram
- Gets
data from source to destination
- Link
Layer
- Data
type: Ethernet frame
- Manages
data transfer to and from physical medium
- Data
Flow
- Data
flows down TCP/IP stack of source computer and then it goes up the
TCP/IP stack of the destination computer.
- Each
layer talks to its “peer” layer, although the two computers do
not directly interact with each other.
- Each
layer adds it own leader and the receiving host reverses this by
removing the header information.
- Process
id repeated for each layer of the stack
- Packaging
- Bits,
Bytes, and Packets
- Bit
- Byte
- Eight
bits
- Large
enough for an ASCII (American Standard Code for Information
Interchange) character
- Multiple
bytes are grouped together and sent over the network as a packet.
- A
field know as the cyclical redundancy check (CRC), or checksum, is
used to violate that the frame has not been damaged or corrupted
in transit.
- IP
packets need to include the sender and receiver addresses
- MAC
Addresses
- Media
Access Control
- 48
bits long
- Unique
to each NIC
- Frame
- Frame
header (14 bytes)
- Source
and destination MAC addresses
- Frame
data
- Trailer
of 4 bytes that represent CRC
- Encapsulation
revisited
- Layered
packing configuration
- TCP
header
- IP
datagram
- Frame
Header
- Ready
to be sent
- First
the data is gathered into the TCP segment and includes the TCP
header and TCP data.
- If
this was UDP, this would be a datagram.
- At
the IP layer adds header information, then known as an IP
datagram.
- The
link layer adds another header and it is known as a frame.
- Process
is repeated in reverse on the other computer.
- Interpretation
of Layers
- Each
protocol has its own layouts and formats.
- Refer
to figure 1.5 on page 10 for IP header format.
- There
are a set number of bits for each field.
- The
protocol field lets you know which protocol is being used.
- Addresses
- Physical
addresses, media access controller addresses
- MAC
addresses will NOT be in the IP headers, MAC addresses mean
nothing to IP.
- Physical
MAC addresses are how the NIC interfaces with the network, and
doesn’t know anything about IP addresses.
- Not
uncommon to not know your IP address.
- Many
times you are “loaned” an IP address for your session, either
by an ISP or by DHCP (Dynamic Host Configuration Protocol).
- DHCP
is good because it helps with the limit of available IP addresses.
By allowing an IP address to be used to a certain amount of
time it can then use that address for another system instead of
using two separate IP address.
- The
Internet Address Number Authority (IANA) has set aside a block of
IP addresses for internal addresses only.
- 192.168
and 176.12 subnets are to be used for hosts talking within a
particular network.
- These
should not leave the gateway.
- The
ARP (Address Resolution Protocol) enables you to resolve the
translation of physical MAC addresses to logical IP addresses.
- The
source host broadcasts an ARP request, then the destination host
picks it up and replies with its MAC address.
- During
this, the source, destination, and all other listening hosts
save this information.
- This
saving cuts down on the number of ARP requests.
- Length
is 48 bits, future plans are to expand that 128 bits.
- Logical
Addresses, IP Addresses
- IP
address is a 32 bit number.
- Classes
- Class
A
- First
8 bits for network
- Last
24 bits for hosts
- More
than 16 million possible hosts (224-1)
- 32
Bits for IP Address Space
Class
|
Network
Bits
|
Host
Bits
|
Number
of Hosts
|
A
|
8
|
24
|
16
million+
|
B
|
16
|
16
|
65,000+
|
C
|
24
|
8
|
255
|
-
- Classes
A, B, and C are unicast, when you send a packet; presumably you
are addressing a single machine.
- Class
D is multicast
- Class
E is reserved for experimental use.
- Address
Classes and IP Ranges
Class
|
Beginning
IP
|
Ending
IP
|
A
|
0.0.0.0
|
127.255.255.255
|
B
|
128.0.0.0
|
191.255.255.255
|
C
|
192.0.0.0
|
223.255.255.255
|
D
|
224.0.0.0
|
239.255.255.255
|
E
|
240.0.0.0
|
247.255.255.255
|
- Subnet
Masks
- The
masks informs a computer how many bits in its IP address have been
relegated to the network and how many to the host.
- Service
Ports
- TCP
and UDP have 16-bit port number fields in their respective header
fields.
- This
means you can have up to 65,536 different ports.
- Most
processes have an assigned port number, but there is nothing
stopping you from changing that number to one of your choosing.
- Any
service can run at any port.
- IP
Protocols
- Two
different transport models
- Connection-oriented
model (TCP)
- Software
ensures that the communication is reliable and complete and
begins the process establishing a handshake connection.
- Ensures
that all data sent is received.
- Reliable
because each packet is acknowledged when it is received.
If a packet is not received, it is resent.
- Connectionless
model (UDP)
- Send
and pray delivery.
- No
handshake and no promise of delivery.
- Just
assemble packets and fire them into the network.
- Application
must ignore the missing pieces or ask for them.
-
- TCP
is slower than UDP because of all the checking, but because of
that it is a lot more reliable than UDP.
- ICMP
(Internet Control Message Protocol)
- Ping
- Determine
if a given network host is reachable.
- More
information in Chapter 4.
- IP
Header Table
- Domain
Name System
- A.k.a
DNS
- DNS
is a distributed database because the entire address table is not
stored on a single host.
- Distributed
across many servers.
- Translates
a domain name to an IP address so you can go to that server.
- Routing:
How you get there from here
- TCP/IP
network layer is concerned with routing and how to get from one host
to another.
- Layer
where IP addresses are used.
- ARP
is used to get an IP address from a MAC address so a packet can be
sent.
- When
the destination host is not on the local network, the traffic is
sent to a default router.
- That
router is responsible for sending the packet one hop closer to its
destination.
- Routers
maintain tables of routes that they know about. They use dynamic
routing protocols to update their tables.
- Routing
Protocols:
- Interior
Gateway Protocols (IGPs)
- Routing
traffic within a network that is under the same administration,
also known as Autonomous System (AS).
- Routing
Information Protocol (RIP)
- Open
Shortest Path First (OSPF)
- Exterior
Gateway Protocols (EGPs)
- Required
when packets must travel between different Autonomous Systems.
- Border
Gateway Protocol (BGP)is a widely used EGP.
- Currently
provides routing protocol that supports the internet backbone.
- BGP
servers must maintain routing table that include all of the
external addresses on the internet.
- TCP
Header Table
- Ethernet
Frame Header
|