Вы находитесь на странице: 1из 65

TCP/IP Internetworking

Single Networks (Subnets) Internets


Connect multiple single networks using routers 70%-80% of internet traffic follows TCP/IP standards These standards are created by the IETF Chapter 10 looks in more detail at TCP/IP management

General Purpose Application-application communication Transmission across an internet

Layer Application (5) Transport (4) Internet (3)

Specific Purpose Application-application interworking Host-host communication Packet delivery across an internet Frame delivery across a network

Transmission across a single network (LAN or WAN)

Data Link (2)

Device-device connection TCP/IP standards dominate at the internet and transport layers transmission across an internet

Physical (1)

Client PC

Transport Layer end-to-end (host-to-host) TCP is connection-oriented, reliable UDP is connectionless and unreliable Internet Layer (usually IP) hop-by-hop (host-router or router-router) connectionless, unreliable

Server

Router 1

Router 2

Router 3

Frames and Packets


Messages at the data link layer are called frames

Messages at the internet layer are called packets


Within a single network, packets are encapsulated in the data fields of frames
Frame Trailer Packet (Data Field) Frame Header

Frames and Packets In an internet with hosts separated by N networks, there will be:
2 hosts One packet (going all the way between hosts)

One route (between the two hosts), though this route may differ between connections.
N frames (one in each network) N-1 routers (change frames between each pair of networks)

Frames and Packets


Horizontal Communication App Trans Int DL Phy Source Host Switch 1 Switch 2 Router 1 Switch 3 Router Destination Host 2 Internet Protocol (IP) Int Transmission Control Protocol (TCP) Or User Datagram Protocol (UDP) Trans

IP

Int

Int

TCP/IP Standards
User Applications 5 Application HTTP 4 Transport 3 Internet 2 Data Link 1 Physical IP SMTP TCP Supervisory Applications DNS

Many Others

Routing Many Protocols Others


UDP

ICMP

MPLS

ARP

None: Use OSI Standards None: Use OSI Standards Internetworking is done at the internet and transport layers. There are only a few standards at these layers. We will look at the shaded protocols in this chapter.

IP, TCP, and UDP

Protocol Layer

Connection- Reliable / Oriented/ Unreliable CNLS Connection- Reliable oriented CNLS CNLS Unreliable Unreliable

Lightweight / Heavyweight Heavyweight Lightweight Lightweight

TCP UDP IP

4. Trans 4. Trans 3. Int

Note: CNLS = connectionless

IP Addresses

Figure Figure 8-3:Hierarchical IP Address 8-3: Hierarchical IP Address


Netw ork Part (not alw ays 16 bits) Subnet Part (not alw ays 8 bits) Host Part (not alw ays 8 bits) Total alw ays is 32 bits

128.171.17.13
The Internet UH Netw ork (128.171) Host 13 CBA Subnet (17)

Hierarchical Addressing
Hierarchical Addressing Brings Simplicity
Phone System Country code-area code-exchange-subscriber number 01-808-555-9889 Long-distance switches near the top of the hierarchy only have to deal with country codes and area codes to set up circuits

Similarly, core Internet routers only have to consider network or network and subnet parts of packets

Dynamic Routing Protocols

Dynamic Routing Protocol Routing Table Information

Dynamic Routing Protocols Routing


Routers constantly exchange routing table information with one another using dynamic routing protocols
Note that the term routing is used in two ways In TCP/IP For IP packet forwarding and For the exchange of routing table information through routing protocols
Dynamic Routing Protocol Routing Table Information

Dynamic Routing Protocols Autonomous System


An organizations internal network (internet)

Interior Dynamic Routing Protocols


Within an Autonomous System, firms use interior dynamic routing protocols

Exterior Dynamic Routing Protocols


Between Autonomous Systems, companies use an exterior dynamic routing protocol

Dynamic Routing Protocols Interior Dynamic Routing Protocols


As just discussed, within an Autonomous System, firms use interior dynamic routing protocols
The organization can freely select an interior routing protocol RIP (Routing Information Protocol) OSPF (Open Shortest Path First) EIGRP (Enhanced Interior Gateway Routing Protocol) Etc.

Dynamic Routing Protocols Routing Information Protocol (RIP)


Simple interior dynamic routing protocol from the IETF (Internet Engineering Task Force)
Low-cost management

Poor efficiency: metric is merely the number of router hops to the destination host No way to select cheapest route, etc.
Weak security Useful only in small firms

Dynamic Routing Protocols Open Shortest Path First


Sophisticated IETF interior dynamic routing protocol
Very efficient, having a complex metric based on a mixture of cost, throughput, and traffic delays Strong security High management costs

The only IETF dynamic routing protocol that makes sense for all but the smallest networks

Dynamic Routing Protocols Enhanced Interior Gateway Routing Protocol (EIGRP)


Proprietary interior dynamic routing protocol from Cisco Systems

Gateway is an obsolete term for router


Very efficient because metric is a mixture of interface bandwidth, load on the interface (0% to 100% of capacity), delay, and reliability (percentage of packets lost).

Dynamic Routing Protocols Enhanced Interior Gateway Routing Protocol (EIGRP)


Only interior dynamic routing protocol that supports multiprotocol routing (not just TCP/IP): IPX/SPX, SNA, etc. But to use it, a company must buy Cisco routers

Dynamic Routing Protocols Exterior Dynamic Routing Protocols


Between autonomous systems, companies use an exterior dynamic routing protocol
An organization is not free to select an exterior routing protocol It must select a protocol selected by its ISP Border Gateway Protocol (BGP) is the main exterior routing protocol Recall that gateway is the old term for router

Dynamic 8-11: Dy namic Routing Protocols Routing Protocols Figure


RIP, OSPF, or EIGRP

Internal Router

Internal Router RIP, OSPF, or EIGRP

RIP, OSPF, and EIGRP Interior Dynamic Routing Protocols Border Router Autonomous System Autonomous System Border Router

BGP Is an Exterior Dynamic Routing Protocol

The Address Resolution Protocol (ARP)

Address Resolution Protocol (ARP)


Figure 8-12: Address Resolution Protocol (ARP)

Packet
ARP Cache: Know n IP addressEthernet Address Pairs

Frame
Originating Router 1. Broadcast ARP Request Message: "IP Host 110.19.8.17, w hat is your 48-bit MAC address?" Router B 110.19.8. does not reply

Host 110.19.8.47 does not respond to ARP Request.

2. ARP Response Message: "My MAC address is A7-23-DA-95-7C-99".

Host 110.19.8.17 replies.

Address Resolution Protocol (ARP)


Figure 8-12: Address Resolution Protocol (ARP)

Packet
ARP Cache: Know n IP addressEthernet Address Pairs

Frame
Originating Router

1. Broadcast ARP Request Message: Host "IPThe Situation: Host 110.19.8.17, 110.19.8.47 w hat is your to pass the packet The router wishes 48-bit MAC address?" to the respond to does not destination host or to a next-hop router. Request. Router B ARP The router knows the destination IP address of the target. 110.19.8. Thedoes notmust learn the targets MAC layer address router reply

in order to be able to send the packet to the target in a frame. Host The router uses the Address Resolution Protocol (ARP) 110.19.8.17
2. ARP Response Message: "My MAC address is A7-23-DA-95-7C-99". replies.

Multiprotocol Label Switching (MPLS)

Multiprotocol Label Switching (MPLS)


Routers are Connected in a Mesh
Multiple alternative routes make the choice of an outgoing interface very expensive

PSDNs also are Arranged in a Mesh


However, a best path (virtual circuit) is set up before transmission begins Once a VC is in place, subsequent frames are handled quickly and inexpensively

MPLS Does Something Like this for Routers

Multiprotocol Label Switching (MPLS)


MPLS Adds a Label Before Each Packet
Label sits between the frame header and the IP header
Contains an MPLS label number Like a virtual circuit number in a PSDN frame Label-switching router merely looks up the MPLS label number in its MPLS table and sends the packet back out
IP Packet MPLS Label Data Link Header

Multiprotocol Label Switching (MPLS)


Advantages of MPLS
Router does a simple table lookup. This is fast and therefore inexpensive per packet handled
As fast as Ethernet switching!

Can use multiple label numbers to give to traffic between sites for multiple levels of priority or quality of service guarantees MPLS supports traffic engineering: balancing traffic on an internet

Multiprotocol Label Switching (MPLS) Figure 8-13: Multiprotocol Label Switching (MPLS)
Label-Sw itching Router 1 Label-Sw itching Router 2

First router adds the label

Legend Packet Label LabelSw itching Router 3 Label-Sw itching Router 4 Label-Sw itching Router 5

Label-Sw itching Table Label Interface A 1 C 1 F 3

Last router drops the label

Label-Sw itched Path

MPLS reduces forw arding costs and permits traffic engineering, including quality of service and traffic load balancing

The Internet Control Message Protocol (ICMP)

Internet Control Message Protocol (ICMP) for Supervisory Messages


Figure 8-15: Internet Control Message Protocol (ICMP) f or Superv isory Messages

Host Unreachable Error Message

Router

Echo Request (Ping) Echo Response

ICMP IP Message Header

ICMP is the supervisory protocol at the internet layer. ICMP messages are encapsulated in the data fields of IP packets

Internet Control Message Protocol (ICMP) for Supervisory Messages


Figure 8-15: Internet Control Message Protocol (ICMP) f or Superv isory Messages

Host Unreachable Error Message

Router

Echo Request (Ping) Echo Response

ICMP IP Message Header

When an error occurs, the device noting the error may try to respond with an ICMP error message describing the problem. ICMP error messages often are not sent for security reasons because attackers can use them to learn about a network

Internet Control Message Protocol (ICMP) for Supervisory Messages


Figure 8-15: Internet Control Message Protocol (ICMP) f or Superv isory Messages

To see if another host is active, a host can send the target host an ICMP echo request message (called a ping).

Host If the Unreachable it will send back an host is active, Router Error Message echo response message confirming that it is active. Echo Request (Ping) Echo Response ICMP IP Message Header

Dynamic Host Configuration Protocol (DHCP)


DHCP Gives Each Client PC at Boot-Up:
A temporary IP Address
A subnet mask The IP addresses of local DNS servers

Better Than Manual Configuration


If subnet mask or DNS IP addresses change, only the DHCP server has to be updated manually Client PCs are automatically updated when they next boot up

The Internet Protocol (IP)


Versions 4 and 6

IPv4 and IPv6 Packets

Bit 0

IP Version 4 Packet Total Length (16 bits) Length in octets

Bit 31

Version Header Diff-Serv (4 bits) Length (8 bits) Value (4 bits) is 4 (0100) Identification (16 bits) Unique value in each original IP packet Time to Live (8 bits)

Flags Fragment Offset (13 bits) (3 bits) Octets from start of original IP fragments data field Protocol (8 bits) Header Checksum 1=ICMP, 6=TCP, (16 bits) 17=UDP

IPv4 and IPv6 Packets

Bit 0

IP Version 4 Packet

Bit 31

Version Header Diff-Serv Total Length (4 bits) Length (8 bits) (16 bits) Value (4 bits) Length in octets is 4 (0100) Identification (16 bits) Flags Fragment Offset (13 bits) IPv4each original is the dominant (3 bits) of IP today. version Unique value in Octets from start of The version number in its header is 4 (0100).fragments IP packet original IP data field The header length and total length field tell the size of the packet. Time to Live Protocol (8 bits) Header Checksum (8 bits) The Diff-Serv1=ICMP, 6=TCP, for quality of(16 bits) labeling. field can be used service 17=UDP (But MPLS is being used instead by most carriers)

IPv4 and IPv6 Packets

Bit 0

IP Version 4 Packet Total Length (16 bits) Length in octets

Bit 31

Version Header Diff-Serv (4 bits) Length (8 bits) Value (4 bits) is 4 (0100) Identification (16 bits) Unique value in each original IP packet

Flags Fragment Offset (13 bits) (3 bits) Octets from start of original IP fragments data field Time to Live Protocol (8 bits) Header Checksum The (8 bits) second row is used for reassembling fragmented 1=ICMP, 6=TCP, (16 bits) IP packets, but fragmentation is quite rare, 17=UDP so we will not look at these fields.

IPv4 and IPv6 Packets


The sender sets the time-to-live value (usually 64 to 128). Each router along the way decreases the value by one. A router decreasing the value to zero discards the packet. Bit 0 IP Version 4 Packet Bit 31 It may send an ICMP error message. Version Header Diff-Serv Total Length (4 bits)The protocol field bits) Length (8 describes the message(16the data field in bits) Value (4 bits) Length in octets (ICMP, TCP, UDP, etc.) is 4 (0100)The header checksum is used to find errors in the header. Identification (16 bits) an error, the router dropsOffset (13 bits) If a packet has Flags Fragment it. Unique value in is no retransmission at the internet layer, start of There each original (3 bits) Octets from IP packet internet layer is still unreliable.IP fragments so the original data field Time to Live Protocol (8 bits) Header Checksum (8 bits) 1=ICMP, 6=TCP, (16 bits) 17=UDP

IPv4 and IPv6 Packets

Bit 0

IP Version 4 Packet

Bit 31

Source IP Address (32 bits)


Destination IP Address (32 bits) Options (if any) Padding

Data Field The source and destination IP addresses Are 32 bits long, as you would suspect. Options can be added, but these are rare.

IPv4 and IPv6 Packets


IP Version 6 is the IP Version 6 Packet emerging Bit 31 version of the Internet protocol. Flow Label (20 bits) Marks128 bit addresses for specific flow Has a packet as part of a

Bit 0 Version (4 bits) Value is 6 (0110) Diff-Serv (8 bits)

an almost unlimited number of IP addresses. Growing fastest in Asia, which was Payload Length Next Header Hop Limit short-changed in IPv4 address allocations (16 bits) (8 bits) Name (8 bits) of next header Source IP Address (128 bits)

Destination IP Address (128 bits)


Next Header or Payload (Data Field)

The Transmission Control Protocol (TCP)

TCP Segment and UDP Datagram


Bit 0 TCP Segment Bit 31

Source Port Number (16 bits)

Destination Port Number (16 bits)

Sequence Number (32 bits) Acknowledgment Number (32 bits) Header Length (4 bits) Reserved Flag Fields The source and destination portWindow Size numbers (6 bits) specify a(6 bits) particular application on the (16 bits) source and destination multitasking computers (Discussed later) TCP Checksum (16 bits) Urgent Pointer (16 bits) Sequence numbers are 32 bits long. Flag fields are one-bit fields. They include SYN, ACK, FIN, So are acknowledgment numbers. and RST.

TCP Segment and UDP Datagram

Flags are one-bit fields. Bit 0 TCP Segment Bit 31 If a flags value is 1, it is set. If a (16 bits) Source Port Numberflags value is 0, it is not Port Number (16 bits) Destination set. TCP has six flags Sequence Number (32 bits) If the TCP Checksum fields value is correct, The receiving process sends back an acknowledgment. Acknowledgment Number (32 bits) Header Length (4 bits) Reserved Flag Fields (6 bits) (6 bits) Window Size (16 bits)

TCP Checksum (16 bits)

Urgent Pointer (16 bits)

TCP Segment and UDP Datagram

Bit 0

For flow control (to tell Segment party to slow down), TCP the other Bit 31 The sender places a small value in the Window Size field. Source Port Number (16 bits) Destination Port Number (16 bits) If the Window Size is small, the receiver will have to stop transmitting Sequence Number (32 bits) after a few more segments (unless it gets a new acknowledgment extending the number of segments it may send.) Acknowledgment Number (32 bits) Header Length (4 bits) Reserved Flag Fields (6 bits) (6 bits) Window Size (16 bits)

TCP Checksum (16 bits)

Urgent Pointer (16 bits)

TCP Segment and UDP Datagram


Bit 0 TCP Segment Bit 31

Options (if any)

Padding

Data Field

TCP segment headers can end with options. This is very common.

If an option does not end at a 32-bit boundary, padding must be added.

The User Datagram Protocol (UDP)

TCP Segment and UDP Datagram


Bit 0 UDP Datagram Bit 31

Source Port Number (16 bits)


UDP Length (16 bits)

Destination Port Number (16 bits)


UDP Checksum (16 bits)

Data Field
UDP messages (datagrams) are very simple. Like TCP, UDP has 16-bit port numbers. The UDP length field allows variable-length application messages. If the UDP checksum is correct, there is no acknowledgment. If the UDP checksum is incorrect, the UDP datagram is dropped.

TCP Connection Openings and Closings TCP is a connection-oriented protocol


Each connection has a formal opening process
Each connection has a formal closing process During a connection, each TCP segment is acknowledged (Of course, pure acknowledgments are not acknowledged)

TCP Connection Openings and Closings


Normal Three-Way Opening

SYN SYN/ACK
ACK

A SYN segment is a segment in which the SYN bit is set. One side sends a SYN segment requesting an opening. The other side sends a SYN/acknowledgment segment. Originating side acknowledges the SYN/ACK.

TCP Connection Openings and Closings


Normal Four-Way Close FIN ACK

FIN ACK

A FIN segment is a segment in which the FIN bit is set. Like both sides saying good bye to end a conversation.

TCP Connection Openings and Closings

Abrupt Reset RST

An RST segment is a segment in which the RST bit is set. A single RST segment breaks a connection. Like hanging up during a phone call. There is no acknowledgment.

Layer 3 Switches

Layer 3 Switches and Routers in Site Networks


Figure 8-21: Lay er 3 Switches and Routers in Site Internets

To Other Sites Router Layer 3 Sw itch Ethernet Workgroup Sw itch

L3 L3

Layer 3 Sw itch

Layer 3 sw itches are routers. Layer 3 sw itches are faster and cheaper to buy than traditional routers. How ever, they are usually limited in functionality.

Ethernet Workgroup Sw itch

They also are expensive to manage. They are typically used betw een

Usually too expensive to replace workgroup switches. Usually too limited in functionality to replace border routers. Replaces core switches in the middle.

Web Services

Web Services Similar to the old client server architecture of early LAN systems, but services are now provided by internet or web based resources. SOA (Service Oriented Architecture) is used to enable platform and development language independence.

Web Services

Web Services Web services may be simple or complex

Example: RSS

The Domain Name System (DNS)

Figure 8-14: Domain Name System (DNS) Hierarchy 8-14: Domain Name Sy stem (DNS) Hierarchy Figure
(root)

Top-Level Domain Names .edu .net .org

A domain is a group of resources .au .nl .com .uk under the control of.ie organization. an

Second-Level The domain name system is a Domain general cnn.com haw aii.edu Names microsoft.com system for managing names.

It is a hierarchical naming system.


cba.haw aii.edu Subnet Name

Queries to a DNS server can get Information about a domain.


ntl.cba.haw aii.edu

voyager.cba.haw aii.edu Host Names

Figure 8-14: Domain Name System (DNS) Hierarchy 8-14: Domain Name Sy stem (DNS) Hierarchy Figure
(root)

Top-Level Domain Names .edu .net .org

.com

.au

.ie

.nl

.uk

Second-Level The highest level is called the root. Domain haw aii.edu Names microsoft.com 13 DNS Root Servers. There are cnn.com

They point to lower-level servers.


cba.haw aii.edu Subnet Name

voyager.cba.haw aii.edu Host Names

ntl.cba.haw aii.edu

Figure 8-14: Domain Name System (DNS) Hierarchy 8-14: Domain Name Sy stem (DNS) Hierarchy Figure
(root)

Top-Level Domain Names .edu .net .org

.com

.au

.ie

.nl

.uk

Second-Level Domain haw aii.edu Names microsoft.com

cba.haw aii.edu

Subnet Name

Top-level domains are generic TLDs (.com, .net., .org, etc.) or country TLDs (.ca, .uk, .ie, etc.)

cnn.com

voyager.cba.haw aii.edu Host Names

ntl.cba.haw aii.edu

Figure 8-14: Domain Name System (DNS) Hierarchy 8-14: Domain Name Sy stem (DNS) Hierarchy Figure
(root)

Top-Level Domain Names .edu .net .org

.com

.au

Organizations seek good secondlevel domain names .nl .ie .uk cnn.com microsoft.com hawaii.edu etc. Get them from address registrars

Second-Level Domain haw aii.edu Names microsoft.com

cnn.com

cba.haw aii.edu

Subnet Name

voyager.cba.haw aii.edu Host Names

ntl.cba.haw aii.edu

Figure 8-14: Domain Name System (DNS) Hierarchy 8-14: Domain Name Sy stem (DNS) Hierarchy Figure
(root)

Top-Level Domain Names .edu .net .org

.com

.au

.ie

.nl

.uk

Second-Level Host names are the bottom Domain the DNS haw aii.edu Names microsoft.com ofcnn.com hierarchy.

cba.haw aii.edu

Subnet Name

A DNS request for a host name will return its IP address.

voyager.cba.haw aii.edu Host Names

ntl.cba.haw aii.edu

Вам также может понравиться