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.
• Transmission Control Protocol / Internet Protocol• Developed by DARPA to connect universities and research labs
Applications
Transport
Network
Link
Telnet, FTP, email etc
TCP, UDP
IP, ICMP, IGMP
Device drivers, interface cards
TCP: Transmission Control ProtocolUDP: User Datagram ProtocolIP: Internet Protocol
The Internet Layered model
Weiqiang Sun
Internetworking with TCP/IP
5
application
transport
IP
Data link and lower layer
application
transport
IP
Data link and lower layer
IP
Ethernet Token ring
Token ringEthernet
Ethernet
IP protocol
IP protocol
TCP/UDP protocol
FTP, HTTP, SMTP…
Weiqiang Sun
The TCP/IP suite
6
PING telnet & rlogin FTP SMTP X Trace
route DNS TFTP BOOTP SNMP RPC
TCP UDP
ICMP IP IGMP
DATA LINKARP RARP
Weiqiang Sun
Internet sub-layer
• A sub-layer between the transport and network layers is required when various incompatible networks are joined together– This sub-layer is used at gateways between the different networks– In the internet this function is accomplished using the Internet Protocol (IP)
7
IP
DLC LayerLink 1
DLC LayerLink 1
DLC LayerLink 1
DLC LayerLink 1
DLC LayerLink 1
DLC LayerLink 1
On a gateway connecting different types of networks, IP is the protocol to realize inter-operability
Weiqiang Sun
IP addresses
• 32 bit address written as four decimal numbers– One per byte of address (202.120.39.134)
• IP Address classes
8
10 Net ID Host ID
0 Net ID Host ID
8 32
16 32
110 Net ID Host ID
16 32
Class A Address
Class B Address
Class C Address
11100000
16 32Class D Address, (For multicast only)
Weiqiang Sun
IPv4 address classes
9
Weiqiang Sun
Routing a packet in the network
10
1
2
5
3
6
4
11
22
1122
33
11 33
22
11 22
33
44
11
22 33
11
22 33
Routing table in 5
Dest Next Hop Out Intf
1 3 2
2 2 1
3 3 2
4 3 2
6 6 3
Routing table in 3
Dest Next Hop Out Intf
1 1 1
2 5 4
6 6 3
4 4 2
5 5 4
4
Weiqiang Sun
IP router architecture
Weiqiang Sun
3 generations of IP routers
Bus based router
Bus based router with dist. routing
Switch-based router with multi. Forwarding eng.
Weiqiang Sun
Host name
• Each host has a unique name• Domain name system (DNS): a distributed
database that provides a mapping between IP addresses and host names
• E.g., 202.120.39.134 FRONT.SJTU.EDU.CN
13
Weiqiang Sun
Internet standards
• Internet Engineering Task Force (IETF)– Development on near term internet standards– Open body– Meets 3 times a year
• Request For Comments (RFCs)– Official internet standards– Available from IETF web page: http://www.ietf.org/
14
Weiqiang Sun
The Internet protocol (IP)
• Routing packets across the network• Unreliable service
– Best effort delivery– Recovery from lost packet must be done at higher layers
• Connectionless– Packets are delivered independently– Can arrive out of order– Re-ordering must be done at higher layers
• Current version V4, IPv4• Future IPv6
15
Weiqiang Sun
IP header
16
0 bit Version Header length Type of Service Total Length
32 bit Identification Flags Fragment Offset
64 bit Time To Live Protocol Header Checksum
96 bit Source IP Address
128 bit Destination IP Address
160 bit Options
160or192+ Data
Note that the minimum header size is 20 bytes, or 160 bits
Weiqiang Sun
IP header
17
Weiqiang Sun
Dynamic Host Configuration (DHCP)
• Automated method for assigning network numbers– IP addresses, default routers
• Computer contact DHCP server at Boot-up time• Server assigns IP address• Allows sharing of address space
– More efficient use of address space– Adds scalability
• Addresses are “leased” for some time– Not permanently assigned
18
Weiqiang Sun
Address Resolution Protocol (ARP)
• The role of the IP routing is to deliver the packet to its destination subnet– To the last hop router
• Addressing inside a subnet, or a LAN, is based on local addresses, such as Ethernet addresses
• ARP provides a mapping between IP addresses and LAN addresses• RARP provides mapping from LAN addresses to IP addresses• Both accomplished by sending out a broadcast message• An ARP cache is maintained at each node with recent mappings to avoid
(1) Computer S is configured to have a default router R1(2) S wants to send a message to D, and D is outside of the same LAN(3) S sends an ARP request for Ethernet Address of R1(4) R1 sends ARP responds to S(5) S sends the message to R1 with Ethernet addressing(6) R1 routes the packet to the next hop in the internet and the message
will be subsequently routed further toward D
Weiqiang Sun
ARP at destination subnet
21
R2
D
(3) Hi all~ I got a message for 202.120.39.134. Where is
he?
(4) Hi R2~ I am here at 00-01-01-11-AB-
ED
(1) An IP packet is delivered by the network from its source subnet to router R2.
(2) Router R2 realizes that the packet has reached its destination subnet by comparing the destination address in the IP packet and its local interface configurations (subnet address and mask)
(3) Router R2 sends an ARP request on the interface to the subnet(4) Destination node D responses to the request(5) Packet is delivered to D with Ethernet addressing
Weiqiang Sun
Routing in the multi-AS Internet
• The Internet is divided into sub-networks, each under the control of a single authority known as an Autonomous Systems (AS)
• Routing algorithms are divided into two categories– Interior protocols (within an AS)– Exterior protocols (between ASs)
• Interior protocols use shortest path algorithms– Distance vector proto. Based on Bellman-Ford– Link state proto. Based on Dijkstra’s algorithm
• Exterior protocols route packets across ASs– Issue: no single cost metric, policy routing, etc– Hierarchical routing based on “peering” agreements– Example: Exterior Gateway Protocol (EGP) and Border Gateway Protocols
(BGP)
22
Weiqiang Sun
Border Gateway Protocol (BGP)
• Routing between Autonomous systems– Find a path (no optimality) to destination (AS)– Path must satisfy policy criteria
23
AS corporation
AS Large service
provider
AS Large service
provider
AS Small ISP
AS corporation
AS corporation
AS Small ISP
AS Small ISP
Transit AS
Multi-homed AS(No transit traffic)
Stub AS
Weiqiang Sun
BGP overview• BGP speaker – one per AS
– Establishes (TCP) sessions with other “speakers” to exchange reachability information
• Border “gateways” – routers that interface between AS’s• BGP advertises complete paths to destination AS
– Avoid loop problems– Enable policy decisions (e.g. avoid certain ASs)– AS numbers – centrally assigned 16 bit numbers for transit ASs
24
128.64.3128.61.2
192.12.2Path to 128.64.2: (AS-144, AS-367)
AS - 12 AS - 144
AS - 367
AS - 298
Weiqiang Sun
Relationship between ASs
• ISP “tiers”– Tier-1 ISPs – provide global reachability– Tier-2 ISPs – regional/country– Tier-3 ISPs – local
• Provider-customer relationship (transit)– Smaller ASs purchase internet access from
larger ones
• Peering– ISPs of similar size are “peers” and
forward each other’s traffic at no charge– Paid peering: a small ISP may purchase
the right to peer with a larger provider
• Policy issue– Which route would an ISP advertise?
25
Tier-1 ISP
Tier-2 ISP Tier-1 ISP
Tier-2 ISP
Tier-3 ISP
Weiqiang Sun
IPv6
• Effort started in 1991 as IPng• Motivation
– Need to increase IP address space– Support for real-time applications – QoS– Security, mobility and auto-configuration
• Major changes– Increased address space (128bit)– Support for QoS via Flow Label field– Simplified header– Security
• Transition to IPv6– Cannot be done at once; must support co-existance– Dual-stack: routers run both IPv4 and IPv6– Tunneling: IPv6 packets carried in payload of IPv4 packets, or vice versa
26
Weiqiang Sun
QoS in the Internet
• Quality of Service parameters– Dropped packets– Delay– Jitter– Out-of-order delivery– Error
• Applications that require QoS– Multimedia streaming – IPTV– IP telephony, or VoIP– Video conferencing– Online game– Remote control– …
27
Weiqiang Sun
QoS mechanisms
• IntServ: integrated services– best-effort service, real-time service, and
controlled link sharing– Resource reserved prior to data transfer– Resource released after transfer completes
28
request
grant
Weiqiang Sun
QoS mechanisms (cont.)
• DiffServ: differentiated services– Tagging on ingress edge node– Un-tagging on egress edge node– Routed/processed in network according to the tag/label– Realizes service differentiation through per-hop behavior (PHB)
29
Weiqiang Sun
DiffServ and MPLS
30
• MPLS: Multi-Protocol Label Switching
Weiqiang Sun
ATM - Asynchronous Transfer Mode
• 1980’s effort by the phone companies to develop an integrated network standard (B-ISDN) that can support voice, data, video, etc.
• ATM uses small (53 Bytes) fixed size packets called “cells” – Why cells?
• Cell switching has properties of both packet and circuit switching Easier to implement high speed switches
– Why 53 bytes? • Small cells are good for voice traffic (limit sampling delays) For 64Kbps voice it takes 6 ms to fill
a cell with data
• ATM networks are connection oriented – Virtual circuits
31
Weiqiang Sun
ATM Reference Architecture
• Upper layers – Applications – TCP/IP
• ATM adaptation layer – Similar to transport layer – Provides interface between upper layers
and ATM – Break messages into cells and
reassemble • ATM layer
– Cell switching – Congestion control
• Physical layer – ATM designed for SONET – Synchronous optical network – TDMA transmission scheme with 125 μs
frames
32
Weiqiang Sun
ATM Cell format
33
Weiqiang Sun
VPI/VCI
34
Weiqiang Sun
ATM cell switches
35
Weiqiang Sun
ATM summary
• ATM is mostly used as a “core” network technology • ATM Advantages
– Ability to provide QoS – Ability to do traffic management – Fast cell switching using relatively short VC numbers
• ATM disadvantages – It not IP -most everything was design for TCP/IP – It’s not naturally an end-to-end protocol
• Does not work well in heterogeneous environment • Was not design to inter-operate with other protocols • Not a good match for certain physical media (e.g., wireless)
• Many of the benefits of ATM can be “borrowed” by IP– Cell switching core routers – Label switching mechanisms
36
Weiqiang Sun
Project #1
• Try to identify at least 3 applications that use plaint text password/identification method– Use Wireshark to capture the plaint text password– Write a report to describe the problem