Polytechnic University1 The internetworking solution of the Internet Prof. Malathi Veeraraghavan...
-
Upload
bernice-crawford -
Category
Documents
-
view
216 -
download
0
Transcript of Polytechnic University1 The internetworking solution of the Internet Prof. Malathi Veeraraghavan...
1 Polytechnic University
The internetworking solutionof the Internet
Prof. Malathi VeeraraghavanElec. & Comp. Engg. Dept/CATT
Polytechnic [email protected]
What is the internetworking problem:
• how to connect different types of networks
2 Polytechnic University
Simplest network – one link
Endpoint Endpoint
Endpoint Endpoint
EndpointEndpoint
Switch Switch
One network – same type of switches – link rates can be different
Single networks
Endpoint
Endpoint
Endpoint
A shared link:often used tocreate a LAN
3 Polytechnic University
Endpoint
Endpoint
Switch Switch
Network 1
Endpoint
Endpoint
Switch Switch
Network 2IP router
An internetwork
The Internet approach to internetworking
• Have all endpoints speak the IP (Internet Protocol) in addition to their own network protocols
• For loss-sensitive applications: run TCP, an end-to-end transport protocol, irrespective of whether
– both ends are within the same network– the two ends are on different networks
• IP routers are connectionless packet switches – they forward IP packets from one network to another based on the destination IP
address carried in the IP header and information stored in their routing tables
Network 3
4 Polytechnic University
Network 1 Network 2
T1
Inter-T:TCP
Inter-N: IP
A
N1
L1
P1
N1
L3
P3
T1
N2
L4
P4
T2
Inter-N: IP
IP router routerrouter
N1
L2
P2 P3
N1
L1 L2
P1 P2
N2
L5 L6
P5 P6
N2
L4 L5
P4 P5
T2
Inter-T:TCP
Inter-N: IP
A
N2
L6
P6
Switch Switch Switch Switch
Endpoint Endpoint
L3
Protocol stacks in the Internet
5 Polytechnic University
Today’s most common networksin the Internet
• Ethernet within enterprises using a combination of– shared-medium Ethernet LANs with hubs, or– with Ethernet switches – which are connectionless
packet switches
• PDH/SONET networks in the MAN and WAN domains– Routers are interconnected by T1, T3, OC3 connections
that are set up through a PDH/SONET circuit-switched network
– PPP, Point-to-Point Protocol, is executed on these circuits
6 Polytechnic University
Ethernet frame structure (RFC 894 and 893)
CRCDest.Addr
.
Src.Addr. Data
IPdatagram
ARP req./reply
RARP req./reply
Type
66
2 18
PAD
46-1500
28
0800
0806
8035
Type
Type
Type
28 18
PAD
2
2
2
46-1500
4FOCUS:Ethernetaddresses(also calledMAC addresses)are 6 bytes long
7 Polytechnic University
PPP frame structure
7E
flag
1
FF
addr
1
03
ctrl
1 2
protocol
<= 1500
data
2
CRC
7E
flag
1
0021 IP datagram
C021 link control data
8021 network control data
296 if low delay
8 Polytechnic University
IP Datagram Format
version(4 bits)
headerlength
Type of Service/TOS(8 bits)
Total Length (in bytes)(16 bits)
Identification (16 bits)flags
(3 bits)Fragment Offset (13 bits)
Source IP address (32 bits)
Destination IP address (32 bits)
Options (if any, <=40 bytes)
DATA
>= five 32-bit words
32-bit word0 31
TTL Time-to-Live(8 bits)
Protocol(8 bits)
Header Checksum (16 bits)
FOCUS
9 Polytechnic University
Application
TCP
IP
EthernetDriver
User data
User dataApplicationHeader
Application dataTCP Header
Application dataTCP HeaderIP Header
Application dataTCP HeaderIP HeaderEthernetHeader
EthernetTrailer
IP datagram
TCP segment
Ethernet frame
User-plane interworking -Encapsulation
As data moves down the protocol stack, each protocol adds layer-specific control information.
10 Polytechnic University
Layers used in ftp
FTPprogram
TCP
IP
mng.poly.edu
EthernetDriver
EthernetDriver
EthernetDriver
IP
FTPprogram
TCP
IP
photon.poly.edu
EthernetDriver
FTP protocol
TCP protocol
IP protocol IP protocol
Ethernetprotocol
Ethernetprotocol
IP router: dibner-gw
11 Polytechnic University
Need Internet address and Network address
Host A
Host B
Switch1
Switch2
Ethernet 1
Host C
Host D
Switch3
Switch4
Ethernet 2
IP router
Internetwork
Host E
Host F
Switch Switch
Ethernet 3
Host A sends a packet to Host C:- Places Host C’s IP address in IP header- To get through Ethernet 1, it needs Ethernet address of IP router’s
interface 1- Switch 1 and Switch 2 forward packets based on destination
Ethernet address of IP router’s interface 1- IP router forwards packet to port 2 to reach Host C (based on IP
level routing data using destination IP address of host C)- IP router needs Ethernet address of Host C to send the packet
through Ethernet 2- Switch 3 and 4 forward packets based on destination Ethernet
address of Host C
1 2
3
12 Polytechnic University
Addresses for interfaces
• Both IP addresses and Ethernet addresses are assigned per interface, not per node (router or host).
• An IP router has many interfaces; each interface has an IP address; interfaces that connect the IP router to an Ethernet network also have Ethernet addresses, one per interface
• An Ethernet switch has many interfaces; each has an Ethernet address
• A host typically has only one interface; hence it is assigned one IP address and one Ethernet address if its interface is an Ethernet link
13 Polytechnic University
FTP session from host mng to photon
128.238.42.105
dibner-gw.poly.edu
photon.poly.edumng.poly.edu
128.238.32.1128.238.42.1 128.238.32.22
Note that IP router dibner-gw has more than one IP address
14 Polytechnic University
Packet sent from mng to IP router dibner-gw
mng.poly.edu
router
dibner-gw.poly.edu
src IP address: 128.238.42.105dst IP address: 128.238.32.22src MAC address: 5:6:7:1:a1:fdst MAC address: 0:0:c:1:a2:e
5:6:7:1:a1:f
0:0:c:1:a2:e
• Host mng consults its IP routing table. This says that to reach destination IP address 128.238.32.22, it needs to send the packet to the IP router because this destination is on a different network
• Hence it sends the packet within its Ethernet network to destination Ethernet (MAC) address 0:0:c:1:a2:e because this is the Ethernet address of the router interface that is connected to mng’s Ethernet network. This destination MAC address allows the Ethernet packet (called frame) to be routed through the first Ethernet network – Ethernet switches determine how to route based on destination MAC address
15 Polytechnic University
At the IP router, dibner-gw
• When the packet arrives at the IP router, dibner-gw, it looks up its routing table– For destination IP address 128.238.32.22, the routing table shows which
output port to use.
photon.poly.edu(128.238.32.22)
dibner-gw
128.238.42.1
0:0:c:1:a2:e
dibner-gw
128.238.32.1
0:0:c:1:a2:d
16 Polytechnic University
Packet sent from mng to IP router dibner-gw
photon.poly.edu
router
dibner-gw.poly.edu
src IP address: 128.238.42.105dst IP address: 128.238.32.22src MAC address: 0:0:c:1:a2:ddst MAC address: 0:0:5e:3f:4d:2c
0:0:c:1:a2:d
0:0:5e:3f:4d:2c
• IP router, dibner-gw, finds MAC address of photon and adds the IP header and Ethernet header to the packet with the four addresses as shown and sends it.
• The destination MAC address allows for routing through the second Ethernet network; each Ethernet switch that the frame encounters will forward packets based on destination MAC address and its routing table.
17 Polytechnic University
Intra-network addresses and inter-network addresses
• Consider example:– mng knows that to reach photon it has to route the
packet to the IP router dibner-gw from its IP-level routing data
– it needs to find the MAC address of the router to get through the first Ethernet
– it does this using ARP (Address Resolution Protocol)
• Same thing when dibner-gw needs to send packet to photon.
18 Polytechnic University
ARP (Address Resolution Protocol)
ARP
dibner-gw .poly.edu all stations on thesame Ethernet
128.238.32.22
0:0:5e:3f:4d:2c ARP
ARP
mng.poly.eduall stations on the
same Ethernet
128.238.42.1
0:0:c:1:a2:e ARP
19 Polytechnic University
ARP and RARP
• The IP protocol uses 32-bit addresses.• Ethernet networks use 48-bit Ethernet (MAC) addresses• The ARP and RARP protocols perform the translation
between IP addresses and MAC layer addresses.• We will discuss ARP for broadcast LANs, particularly
Ethernet LANs.
RARP
Ethernet MACaddress(48 bit)
ARPIP address(32 bit)
20 Polytechnic University
Finding MAC address of an interface whose IP address is available
HOST-BHOST-A
ARP
IP
EthernetDriver
1
EthernetDriver
ARP
2
3
IP
4
(1) HOST-A wants to send an IP datagram to HOST-B.
(2) HOST-A broadcasts an ARP request to all stations on the network: “What is the hardware address of HOST-B?”
(3) HOST-B responds with an ARP Reply which contains its hardware address.
(4) HOST-A transmits the IP datagram to HOST-B.
21 Polytechnic University
ARP reply
• The ARP reply is sent by the node whose IP address matches the address sent in the ARP request
• All other nodes receiving the broadcast ARP ignore the request (since their IP addresses do not match the address that is being resolved)
22 Polytechnic University
ARP cache
• Clearly, sending an ARP request/reply for each IP datagram is inefficient.
• Each station maintains a cache (ARP Cache) of current entries. The entries expire after 20 minutes.
• Everytime the ARP cache is consulted for a MAC address, the expiry timer is reset in common implementations.) at (incomplete)
23 Polytechnic University
Whose addresses does a host store on initialization?
• Go to Control Panel – Network on a Windows PC– Point out that a host needs to have initialized
• host IP address
• gateway IP address (default router interface)
• DNS server IP address
24 Polytechnic University
For Internet applications, what type of “address” do you need?
• To begin with, a user obtains “domain name” of a host to which the user wants to connect for a web file download, to send email etc.
• Host needs to find IP address corresponding to domain name – it does this by sending a DNS (Domain Name
Service) query to the DNS Server whose IP address is stored on host (as we just saw)
25 Polytechnic University
For the file transfer example from mng to photon
ftpprogram
DomainNameServer
mng.poly.edu gatekeeper.poly.edu
photon.poly.edu
128.238.32.22
• Step 1:– mng knows it wants to execute an ftp to photon.poly.edu– sends DNS query to DNS server gatekeeper.poly.edu– gets IP address corresponding to name photon.poly.edu
26 Polytechnic University
What other addresses doesmng need?
• With photon’s IP address, mng consults its routing table to see how it can reach this node.
• Show route print command on PC– point out entry for hosts on the same subnet as
having the gateway address as the IP address of the host interface itself
– point out default entry 255.255.255.255 as having the address of the IP router (gateway)
27 Polytechnic University
What if photon was on same Ethernet as mng?
• In this case, the IP address of photon would have matched the entry in the routing table that says photon can be reached through the PC’s Ethernet interface
• Therefore it will try to find the Ethernet address of photon to send the packet via its own network– it does this by issuing an ARP
28 Polytechnic University
What happened when photon was on a different Ethernet from mng
• Route lookup showed that IP address (of photon) was on some other network and hence packet had to be sent to the default router (gateway)
• mng then needed Ethernet address of default router. The first time this has to be learned by sending an ARP. Then as long as it is used often (before ARP cache expires), mng knows the Ethernet address of its default router and does not have to issue ARP requests each time
29 Polytechnic University
Internet transport protocols
• Loss-sensitive applications: TCP– End-to-end – across networks– To ensure error-free delivery, it executes ARQ retranmission
scheme for error correction– Uses window based flow control– Because IP routers are CL packet switches that do not
implement congestion control, TCP implements an end-to-end congestion control
• Delay-sensitive applications: RTP (Real-time Transfer Protocol)– All packets carry a timestamp allowing receiver to determine
when to play out packets
30 Polytechnic University
Summary
• The Internet is an internetwork of networks• Any type of network, CS, CL PS, CO PS can be
part of the Internet• “IP router” is the node that interconnects different
networks– CL packet switch
• Need Internet addresses (i.e., IP addresses) and addresses for each network that packets traverse
• Internetwork transport protocols: TCP and RTP