Download presentation
Presentation is loading. Please wait.
1
Introduction to Communication Networks
Lecture 7 Internetworking Introduction to Communication Networks 2/2005
2
Motivation LANs WANs Low cost Limited distance High cost
Unlimited distance. Introduction to Communication Networks 2/2005
3
Goal: Universal Service
Arbitrary pair of computers can communicate Pioneered by telephone system Fundamental concept in networking Incompatibilities among networks Electrical properties Signaling and data encoding Packet formats Addresses Introduction to Communication Networks 2/2005
4
An Internetwork or internet
Introduction to Communication Networks 2/2005
5
Internet Architecture
Multiple Networks Routers interconnecting networks Host computer connects to a network Single router has insufficient CPU power and memory I/O capability Introduction to Communication Networks 2/2005
6
Virtual Network Seamless Uniform General-purpose Universal
Hides heterogeneity from user Introduction to Communication Networks 2/2005
7
Hide Heterogeneity Create ‘‘virtual’’ network
Addressing scheme Naming scheme Implement with: Protocol software Note: protocol software needed on both hosts and routers Introduction to Communication Networks 2/2005
8
The Internet Network layer
Host, router network layer functions: routing table Routing protocols path selection RIP, OSPF, BGP IP protocol addressing conventions datagram format packet handling conventions ICMP protocol error reporting router “signaling” Transport layer: TCP, UDP Link layer physical layer Network layer Introduction to Communication Networks 2/2005
9
Internet Reference Model
Layer 1: Physical. Basic network hardware Layer 2: Network Interface MAC frame format MAC addressing Interface between computer and network (NIC) Layer 3: Internet. Facilities to send packets across internet composed of multiple routers Layer 4: Transport: Transport from an application on one computer to application on another Layer 5: Application. Everything else Introduction to Communication Networks 2/2005
10
Internet Protocol (IP)
Only protocol at Layer 3 Defines Internet addressing Internet packet format Internet routing We have talked until now about general routing and route establishment and maintenance protocols Introduction to Communication Networks 2/2005
11
IP Addressing: introduction
IP address: 32-bit identifier for host, router interface interface: connection between host, router and physical link router’s typically have multiple interfaces host may have multiple interfaces IP addresses associated with interface, not host, or router = 223 1 1 1 Introduction to Communication Networks 2/2005
12
IP Addressing IP address:
network part high order bits host part low order bits What’s a network ? (from IP address perspective) device interfaces with same network part of IP address can physically reach each other without intervening router LAN network consisting of 3 IP networks (for IP addresses starting with 223, first 24 bits are network address) Introduction to Communication Networks 2/2005
13
IP Addressing How to find the networks?
Detach each interface from router, host create “islands of isolated networks Interconnected system consisting of six networks Introduction to Communication Networks 2/2005
14
IP Addresses given notion of “network”, let’s re-examine IP addresses:
“class-full” addressing: class A to network host B to 10 network host to C 110 network host to D 1110 multicast address 32 bits Introduction to Communication Networks 2/2005
15
IP addressing: CIDR Classfull addressing:
inefficient use of address space, address space exhaustion e.g., class B net allocated enough addresses for 65K hosts, even if only 2K hosts in that network CIDR: Classless Inter Domain Routing network portion of address of arbitrary length address format: a.b.c.d/x, where x is # bits in network portion of address network part host /23 Introduction to Communication Networks 2/2005
16
IP Addressing - Problem
Address classes were too “rigid”. For most organizations, Class C were too small and Class B too big. Led to inefficient use of address space, and a shortage of addresses. Organizations with internal routers needed to have a separate (Class C) network ID for each link. And then every other router in the Internet had to know about every network ID in every organization, which led to large address tables. Small organizations wanted Class B in case they grew to more than 255 hosts. But there were only about 16,000 Class B network IDs. Introduction to Communication Networks 2/2005
17
IP Addressing cont. Two solutions were introduced:
Subnetting within an organization to subdivide the organization’s network ID. Classless Interdomain Routing (CIDR) in the Internet backbone was introduced in 1993 to provide more efficient and flexible use of IP address space. CIDR is also known as “supernetting” because subnetting and CIDR are basically the same idea. Introduction to Communication Networks 2/2005
18
Subnetting CLASS “B” e.g. Company 10 Net ID Host-ID Subnet ID (20)
14 16 0000 Subnet ID (20) Subnet Host ID (12) 1111 000000 Subnet ID (22) Host ID (10) Subnet ID (26) Host ID (6) e.g. Site e.g. Dept Introduction to Communication Networks 2/2005
19
Subnetting Subnetting is a form of hierarchical routing.
Subnets are usually represented via an address plus a subnet mask or “netmask”. Netmask ffffff00: the first 24 bits are the subnet ID, and the last 8 bits are the host ID. Can also be represented by a “prefix + length”, e.g /24, or just /24. Introduction to Communication Networks 2/2005
20
Classless Inter-domain Routing (CIDR) Addressing
The IP address space is broken into line segments. Each line segment is described by a prefix. A prefix is of the form x/y where x indicates the prefix of all addresses in the line segment, and y indicates the length of the segment. e.g. The prefix 128.9/16 represents the line segment containing addresses in the range: … 232-1 128.9/16 216 142.12/19 65/8 Introduction to Communication Networks 2/2005
21
Classless Interdomain Routing (CIDR) Addressing
/24 /24 /20 /20 Most specific route = “longest matching prefix” 128.9/16 232-1 Introduction to Communication Networks 2/2005
22
Classless Interdomain Routing (CIDR) Addressing
Prefix aggregation: If a service provider serves two organizations with prefixes, it can (sometimes) aggregate them to form a shorter prefix. Other routers can refer to this shorter prefix, and so reduce the size of their address table. E.g. ISP serves /24 and /24, it can tell other routers to send it all packets belonging to the prefix /23. ISP Choice: In principle, an organization can keep its prefix if it changes service providers. Introduction to Communication Networks 2/2005
23
Hierarchical addressing: route aggregation
Hierarchical addressing allows efficient advertisement of routing information: Organization 0 /23 Organization 1 /23 “Send me anything with addresses beginning /20” Organization 2 /23 . Fly-By-Night-ISP . Internet Organization 7 /23 “Send me anything with addresses beginning /16” ISPs-R-Us Introduction to Communication Networks 2/2005
24
Hierarchical addressing: more specific routes
ISPs-R-Us has a more specific route to Organization 1 Organization 0 /23 “Send me anything with addresses beginning /20” Organization 2 /23 . Fly-By-Night-ISP . Internet Organization 7 /23 “Send me anything with addresses beginning /16 or /23” ISPs-R-Us Organization 1 /23 Introduction to Communication Networks 2/2005
25
IP addresses: how to get one?
Network (network portion): get allocated portion of ISP’s address space: ISP's block /20 Organization /23 Organization /23 Organization /23 … … …. Organization /23 Introduction to Communication Networks 2/2005
26
IP addresses: how to get one?
Hosts (host portion): hard-coded by system admin in a file DHCP: Dynamic Host Configuration Protocol: dynamically get address: “plug-and-play” host broadcasts “DHCP discover” msg DHCP server responds with “DHCP offer” msg host requests IP address: “DHCP request” msg DHCP server sends address: “DHCP ack” msg The common practice in LAN and home access (why?) Introduction to Communication Networks 2/2005
27
IP addressing: the last word...
Q: How does an ISP get block of addresses? A: ICANN: Internet Corporation for Assigned Names and Numbers allocates addresses manages DNS assigns domain names, resolves disputes Introduction to Communication Networks 2/2005
28
Getting a datagram from source to dest.
routing table in A Dest. Net. next router Nhops IP datagram: misc fields source IP addr dest data A B E datagram remains unchanged, as it travels source to destination addr fields of interest here mainly dest. IP addr Introduction to Communication Networks 2/2005
29
Getting a datagram from source to dest.
misc fields data Dest. Net. next router Nhops Starting at A, given IP datagram addressed to B: look up net. address of B find B is on same net. as A link layer will send datagram directly to B inside link-layer frame B and A are directly connected A B E Introduction to Communication Networks 2/2005
30
Getting a datagram from source to dest.
misc fields data Dest. Net. next router Nhops Starting at A, dest. E: look up network address of E E on different network A, E not directly attached routing table: next hop router to E is link layer sends datagram to router inside link-layer frame datagram arrives at continued….. A B E Introduction to Communication Networks 2/2005
31
Getting a datagram from source to dest.
network router Nhops interface Dest next misc fields data Arriving at , destined for look up network address of E E on same network as router’s interface router, E directly attached link layer sends datagram to inside link-layer frame via interface datagram arrives at !!! (hooray!) A B E Introduction to Communication Networks 2/2005
32
Special Addresses Network address not used in packets
Loopback never leaves local computer Introduction to Communication Networks 2/2005
33
Mapping Computer Names to IP addresses The Domain Naming System (DNS)
Names are hierarchical and belong to a domain: e.g. cse.bgu.ac.il Common domain names: .com, .gov, .org, .net, .il (or other country-specific domain). Top-level names are assigned by the Internet Corporation for Assigned Names and Numbers (ICANN). A unique name is assigned to each organization. DNS Client-Server Model DNS maintains a hierarchical, distributed database of names. Servers are arranged in a hierarchy. Each domain has a “root” server. An application needing an IP address is a DNS client. Introduction to Communication Networks 2/2005
34
Mapping Computer Names to IP addresses The Domain Naming System (DNS)
A DNS Query Client asks local server. If local server does not have address, it asks the root server of the requested domain. Addresses are cached in case they are requested again. huji.ac.il bgu.ac.il cse.bgu.ac.il .ac “What is the IP address of e.g. gethostbyname() Client application Introduction to Communication Networks 2/2005
35
Summary Internetworking Internet concept
Solves problem of heterogeneity Includes LANs and WANs Internet concept Virtual network Seamless Universal Introduction to Communication Networks 2/2005
36
Summary: Architecture
Internet architecture Multiple networks Interconnected by routers Router Special-purpose computer system Interconnects two or more networks Uses table to forward datagrams Introduction to Communication Networks 2/2005
37
Summary: Internet Protocol (IP)
Fundamental piece of TCP/ IP Defines Internet addressing Delivery semantics Internet packet format (IP datagram) Introduction to Communication Networks 2/2005
38
Internet Transmission Paradigm
Source host Forms datagram Includes destination address Sends to nearest router Intermediate routers Forward datagram to next router Final router Delivers to destination host Introduction to Communication Networks 2/2005
39
Datagram Transmission
Datagram sent across conventional network From source host and router Between intermediate routers From final router to destination host Network hardware does not recognize Datagram format IP addresses Encapsulation needed Introduction to Communication Networks 2/2005
40
Created and understood only by software
Internet Packets Created and understood only by software Contains sender and destination addresses Size depends on data being carried Called IP datagram Introduction to Communication Networks 2/2005
41
IP Datagram Introduction to Communication Networks 2/2005
42
Datagram Header Source IP address Destination IP address Type ver TTL
Flags ver TTL TOS checksum H-Len Total Length ID FRAG Offset Protocol SRC IP Address DST IP Address (OPTIONS) (PAD) <=64 KBytes Offset within original packet Hop count Beginning of data Source IP address Destination IP address Type Introduction to Communication Networks 2/2005
43
IP Semantics IP is connectionless Routes can change at any time
Datagram contains identity of destination Each datagram sent / handled independently Routes can change at any time Introduction to Communication Networks 2/2005
44
Frame and Datagram Destination Addresses
Frame address Hardware (MAC) address Next hop Datagram address IP address Ultimate destination Introduction to Communication Networks 2/2005
45
Resolving Addresses Hardware only recognizes MAC addresses
IP only uses IP addresses Consequence: software needed to perform translation Part of network interface Known as address resolution Introduction to Communication Networks 2/2005
46
Address Resolution Layer 2 protocol Given Find Technique
A locally-connected network, N IP address C of computer on N Find Hardware address for C Technique Address Resolution Protocol Introduction to Communication Networks 2/2005
47
Address Resolution Protocol (ARP)
Keep bindings in table Table entry contains pair of addresses for one computer IP address Hardware address Build table automatically as needed Introduction to Communication Networks 2/2005
48
ARP Table Only contains entries for computers on local network
IP network prefix in all entries identical Introduction to Communication Networks 2/2005
49
ARP Lookup Algorithm Look for target IP address, T, in ARP table
If not found Send ARP request message to T Receive reply with T’s hardware address Add entry to table Return hardware address from table Introduction to Communication Networks 2/2005
50
ARP Exchange Introduction to Communication Networks 2/2005
51
ARP Message Format (Ethernet)
Length of hardware address fields depend on network type Ethernet uses 48-bit addresses Introduction to Communication Networks 2/2005
52
ARP Message Transmission
ARP message sent in payload area of frame Called encapsulation Introduction to Communication Networks 2/2005
53
Addressing Example H1 H2 H3 R1 R2 H7 H8 H4 H6 H5 Network 1 (Ethernet)
Network 3 (FDDI) Network 2 (Ethernet) Network 4 (PTP) Introduction to Communication Networks 2/2005
54
Frames and Datagrams Introduction to Communication Networks 2/2005
55
Maximum Frame Size Each network technology imposes maximum frame size
Called Maximum Transmission Unit (MTU) MTUs differ in different technologies Internet Can contain heterogeneous technologies Must accommodate multiple MTUs Introduction to Communication Networks 2/2005
56
Datagram Fragmentation
Performed by routers Needed when datagram larger than MTU of network Divides datagram into pieces called fragments Each fragment has datagram header Fragments sent separately Ultimate destination reassembles fragments Introduction to Communication Networks 2/2005
57
Illustration of Datagram Fragmentation
Problem: A router may receive a packet larger than the maximum transmission unit (MTU) of the outgoing link. Solution: R1 fragments the IP datagram into multiple, self-contained datagrams. A Ethernet MTU=1500 bytes B Source Destination MTU<1500 bytes R1 R2 Data HDR (ID=x) Offset>0 More Frag=0 Offset=0 More Frag=1 Introduction to Communication Networks 2/2005
58
Datagram Fragmentation
Each fragment has IP datagram header Header fields Identify original datagram Indicate where fragment fits Fragments are re-assembled by the destination host; not by intermediate routers. To avoid fragmentation, hosts commonly use path MTU discovery to find the smallest MTU along the path. Most links use MTU>=1500bytes today. Introduction to Communication Networks 2/2005
59
Path MTU Discovery IP datagram header contains a bit to specify no fragmentation allowed ICMP sends an error message when fragmentation required but not permitted Path MTU discovery involves sending various size datagrams until they do not require fragmentation along the path. Note: MTU not guaranteed if routes change Introduction to Communication Networks 2/2005
60
Fragment Loss Receiver
Collects incoming fragments Reassembles when all fragments arrive Does not know identity of router that did fragmentation Cannot request missing pieces Consequence: Loss of one fragment means entire datagram lost Introduction to Communication Networks 2/2005
61
IP Semantics IP is best-effort Datagrams can be Lost Delayed
Duplicated Delivered out of order Corrupted Introduction to Communication Networks 2/2005
62
Error Detection IP does not Errors detected Introduce errors
Ignore all errors Errors detected Corrupted bits Illegal addresses Routing loops Fragment loss Introduction to Communication Networks 2/2005
63
Problems and Solutions
Corrupted header bits Header checksum Illegal destination address Routing tables Routing loop Time-To-Live (TTL) field Fragment loss Timeout Introduction to Communication Networks 2/2005
64
Internet Control Message Protocol (ICMP)
Separate protocol for Errors Information Required part of IP Sends error messages to original source Introduction to Communication Networks 2/2005
65
ICMP Messages: Source Quench & Time Exceeded
Source Quench (overfull) Sent by router Triggered by datagram overrun Requests sending host(s) to slow down Time Exceeded TTL on datagram reached zero Not a request for retransmission Sent by host Reassembly timeout (some fragments lost) Introduction to Communication Networks 2/2005
66
ICMP Messages: Destination unreachable & Redirect
Specifies whether Destination network unreachable Destination host unreachable Protocol port on destination unreachable Redirect Sent by router Goes to host on local network Host used incorrect initial router Requests host to change routes Introduction to Communication Networks 2/2005
67
ICMP Message Transport
Error messages go back to original source (may cross internet) Messages carried in IP Two levels of encapsulation IP type field specifies ICMP Introduction to Communication Networks 2/2005
68
Summary: Address Resolution
Needed to map IP address to equivalent hardware address Part of network interface Uses table Automatically updates table entries Broadcasts requests Introduction to Communication Networks 2/2005
69
Summary: Maximum Payload UNIT
Network hardware has maximum payload size Called MTU Datagram must be smaller than hardware MTU Datagram fragmentation Accommodates multiple MTUs Performed by router Divides datagram into pieces Ultimate destination reassembles Introduction to Communication Networks 2/2005
70
Summary: Internet Control Message Protocol
Mechanism to detect errors Header checksum Time-to-live field Internet Control Message Protocol Has both error and informational messages Closely integrated with IP ICMP messages Encapsulated in IP Sent back to original source Introduction to Communication Networks 2/2005
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.