Top Banner
Internetworking Nov 25, 2009
31

Internetworking Nov 25, 2009

Feb 13, 2022

Download

Documents

dariahiddleston
Welcome message from author
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.
Transcript
Page 1: Internetworking Nov 25, 2009

InternetworkingNov 25, 2009"

Page 2: Internetworking Nov 25, 2009

– 2 –!

A Client-Server Transaction"

Client"process"

Server"process"

1. Client sends request!

2. Server !handles!request!

3. Server sends response!4. Client !handles!

response!

Resource"

Note: clients and servers are processes running on hosts !(can be the same or different hosts).!

Page 3: Internetworking Nov 25, 2009

– 3 –!

Hardware Org of a Network Host"

main"memory"

I/O "bridge"MI"

ALU"

register file"CPU chip"

system bus" memory bus"

disk "controller"

graphics"adapter"

USB"controller"

mouse"keyboard" monitor"disk"

I/O bus"

Expansion slots"

network"adapter"

network"

Page 4: Internetworking Nov 25, 2009

– 4 –!

Computer Networks"

Page 5: Internetworking Nov 25, 2009

– 5 –!

Lowest Level: Ethernet Segment"

host" host" host"

hub"100 Mb/s"100 Mb/s"

ports!

Page 6: Internetworking Nov 25, 2009

– 6 –!

Next Level: Bridged Ethernet Segment"

host" host" host" host" host"

hub" hub"bridge"100 Mb/s" 100 Mb/s"

host" host"

hub" 100 Mb/s" 100 Mb/s"

1 Gb/s"

host" host" host"

bridge"

host"host"

hub"

A" B"

C"

X"

Y"

Page 7: Internetworking Nov 25, 2009

– 7 –!

Conceptual View of LANs"

host" host" host"..."

Page 8: Internetworking Nov 25, 2009

– 8 –!

Next Level: internets"

host" host" host"

LAN 1"

..." host" host" host"

LAN 2"

..."

router" router" router"WAN" WAN"

LAN 1 and LAN 2 might be completely different, totally incompatible LANs (e.g., Ethernet and ATM)"

Page 9: Internetworking Nov 25, 2009

– 9 –!

The Notion of an internet Protocol"

Page 10: Internetworking Nov 25, 2009

– 10 –!

What Does an internet Protocol Do?"

Page 11: Internetworking Nov 25, 2009

– 11 –!

Transferring Data Over an internet"

protocol"software"

client"

LAN1"adapter"

Host A"

data"

data" PH" FH1"

data" PH"

data" PH" FH2"

LAN1" LAN2"

data"

data" PH"

FH1"

data" PH" FH2"

(1)"

(2)"

(3)"

(4)" (5)"

(6)"

(7)"

(8)"

internet packet!

LAN2 frame!

protocol"software"

LAN1"adapter"

LAN2"adapter"

Router"FH1"

LAN1 frame!

data" PH" FH2"

protocol"software"

server"

LAN2"adapter"

Host B"

Page 12: Internetworking Nov 25, 2009

– 12 –!

Other Issues"

Page 13: Internetworking Nov 25, 2009

– 13 –!

Global IP Internet"

Page 14: Internetworking Nov 25, 2009

– 14 –!

Hardware and Software Org of an Internet Application"

TCP/IP"

Client"

Network"adapter"

Global IP Internet"

TCP/IP"

Server"

Network"adapter"

Internet client host" Internet server host"

Sockets interface!(system calls)!

Hardware interface!(interrupts)!

User code!

Kernel code!

Hardware!and firmware!

Page 15: Internetworking Nov 25, 2009

– 15 –!

Basic Internet Components"

Page 16: Internetworking Nov 25, 2009

– 16 –!

The Internet Circa 1993"

Page 17: Internetworking Nov 25, 2009

– 17 –!

NSFNET Internet Backbone "

source: www.eef.org

Page 18: Internetworking Nov 25, 2009

– 18 –!

Current NAP-Based Internet Architecture"

Page 19: Internetworking Nov 25, 2009

– 19 –!

Internet Connection Hierarchy"NAP" NAP"

Backbone" Backbone"Backbone"Backbone"

NAP"

POP "POP" POP"

Regional net "

POP"POP" POP"

POP"POP"

Small Business"

Big Business"ISP"

POP "POP" POP" POP"

Pgh employee"

dialup"

DC employee"

POP"

T3"

T1 "

ISP (for individuals)"

POP"

dialup"T1"

Colocation!sites!

Private!“peering”!

agreements!between!

two backbone!companies!

often bypass!NAP!

Page 20: Internetworking Nov 25, 2009

– 20 –!

Network Access Points (NAPs)"

Source: Boardwatch.com!

Note: Peers in this context are "commercial backbones."

Page 21: Internetworking Nov 25, 2009

– 21 –!Source: Boardwatch.com!

MCI/WorldCom/UUNET Global Backbone"

Page 22: Internetworking Nov 25, 2009

– 22 –!

A Programmerʼs View of the Internet"

Page 23: Internetworking Nov 25, 2009

– 23 –!

1. IP Addresses"

/* Internet address structure */ struct in_addr { unsigned int s_addr; /* network byte order (big-endian) */ };

Handy network byte-order conversion functions:"htonl: convert long int from host to network byte order."htons: convert short int from host to network byte order. ntohl: convert long int from network to host byte order."ntohs: convert short int from network to host byte order."

Page 24: Internetworking Nov 25, 2009

– 24 –!

Dotted Decimal Notation"

Page 25: Internetworking Nov 25, 2009

– 25 –!

2. Internet Domain Names"

mil" edu" gov" com"

cmu" berkeley"mit"

cs" ece"

kittyhawk"128.2.194.242"

cmcl"

unnamed root!

pdl"

imperial"128.2.189.40 "

amazon"

www"208.216.181.15"

First-level domain names!

Second-level domain names!

Third-level domain names!

Page 26: Internetworking Nov 25, 2009

– 26 –!

Domain Naming System (DNS)"

/* DNS host entry structure */ struct hostent { char *h_name; /* official domain name of host */ char **h_aliases; /* null-terminated array of domain names */ int h_addrtype; /* host address type (AF_INET) */ int h_length; /* length of an address, in bytes */ char **h_addr_list; /* null-terminated array of in_addr structs */ };

Page 27: Internetworking Nov 25, 2009

– 27 –!

Properties of DNS Host Entries"

Page 28: Internetworking Nov 25, 2009

– 28 –!

A Program That Queries DNS"int main(int argc, char **argv) { /* argv[1] is a domain name char **pp; * or dotted decimal IP addr */ struct in_addr addr; struct hostent *hostp;

if (inet_aton(argv[1], &addr) != 0) hostp = Gethostbyaddr((const char *)&addr, sizeof(addr), AF_INET); else hostp = Gethostbyname(argv[1]); printf("official hostname: %s\n", hostp->h_name);

for (pp = hostp->h_aliases; *pp != NULL; pp++) printf("alias: %s\n", *pp);

for (pp = hostp->h_addr_list; *pp != NULL; pp++) { addr.s_addr = *((unsigned int *)*pp); printf("address: %s\n", inet_ntoa(addr)); } }

Page 29: Internetworking Nov 25, 2009

– 29 –!

Querying DNS from the Command Line

linux> dig +short kittyhawk.cmcl.cs.cmu.edu 128.2.194.242 linux> dig +short -x 128.2.194.242 KITTYHAWK.CMCL.CS.CMU.EDU. linux> dig +short aol.com 205.188.145.215 205.188.160.121 64.12.149.24 64.12.187.25 linux> dig +short -x 64.12.187.25 aol-v5.websys.aol.com.

Page 30: Internetworking Nov 25, 2009

– 30 –!

3. Internet Connections"

Page 31: Internetworking Nov 25, 2009

– 31 –!

Putting it all Together: Anatomy of an Internet Connection"

Connection socket pair"(128.2.194.242:51213, 208.216.181.15:80)"

Server"(port 80)"Client"

Client socket address!128.2.194.242:51213"

Server socket address!208.216.181.15:80"

Client host address"128.2.194.242

Server host address"208.216.181.15"