Marquette University logo      

Notes on TCP/IP (cont.)

 

Previous notes on TCP/IP.

References:

Delivering the Data

Addressing
Routing
Multiplexing

IP Addressing

IP addresses, which uniquely identify every host on the Internet, deliver data to the correct host.

Apply to Network Information Center (NIC) for IP addresses. Addresses used to be class-based (based on Hunt, Fig. 2.2):

Class A:
   +--------+--------+--------+--------+
   |0       |        |        |        |
   +--------+--------+--------+--------+
   |<------>|<------------------------>|
 8 network bits      24 host bits
    
Class B:
   +--------+--------+--------+--------+
   |10      |        |        |        |
   +--------+--------+--------+--------+
   |<--------------->|<--------------->|
     16 network bits   16 host bits
    
Class C:
   +--------+--------+--------+--------+
   |110     |        |        |        |
   +--------+--------+--------+--------+
   |<------------------------>|<------>|
         24 network bits      8 host bits

Class A: 1-126 = 126 networks of 2^24 ~~ 16M hosts each
Class B: 128-191 = 64 * 255 networks of 2^16 ~~ 64K hosts
Class C: 192-223 = 32 * 255 networks of 255 hosts

Address space is depleted. Not enough Class B addresses. Blocks of Class C addresses swells router tables.

NIC used to give Class A, B, or C network address. Local network administrator assigns host addresses within that network address.

MU is 134.48
pascal is 134.48.4.38

More recently, use RFC 1518 and RFC 1519 Classless Inter-Domain Routing (CIDR), a combination of addresses and subnet masks.

 

Submitted by Zachary Lund:

 

 

Routing

Gateways deliver data to the correct network on a hop-by-hop basis.

Routing domains are co-equal collections of autonomous systems. They exchange routing information using Border Gateway Protocol (BGP). Each routing domain makes routing decisions for itself, based on routing tables.

Pascal routing table:

cmd > netstat -nr | more

Routing Table: IPv4
  Destination           Gateway           Flags  Ref   Use   Interface
-------------------- -------------------- ----- ----- ------ ---------
134.48.4.0           134.48.4.38          U         1   7262  bge0
224.0.0.0            134.48.4.38          U         1      0  bge0
default              134.48.4.1           UG        1   4598  
127.0.0.1            127.0.0.1            UH        44355576  lo0

Routing Table: IPv6
  Destination/Mask            Gateway                   Flags Ref   Use   If  
--------------------------- --------------------------- ----- --- ------ -----
fe80::/10                   fe80::203:baff:fe2e:328     U       1      0 bge0 
ff00::/8                    fe80::203:baff:fe2e:328     U       1      0 bge0 
default                     fe80::203:baff:fe2e:328     U       1      0 bge0 
::1                         ::1                         UH      3 12986445 lo0

Flags:
U -- Up and operational
H -- To a specific host
G -- Uses a gateway

Use: Number of packet transmitted since ?

127.0.0.1 is a special "loopback" address

Each gateway looks in its routing table to see where to send the packet, but how does it translate the name into the IP address?

Domain Name Service (DNS)

Host Table

On pascal:

cmd > more /etc/hosts
#
# Internet host table
#
127.0.0.1       localhost
134.48.4.7      rescue
134.48.4.19     euclid euclid.mscs.mu.edu       
134.48.4.30     neumann.mscs.mu.edu     
134.48.4.22     fourier fourier.mscs.mu.edu
134.48.4.34     turing turing.mscs.mu.edu
134.48.4.38     pascal pascal.mscs.mu.edu loghost       
134.48.4.230    offlp1
134.48.4.231    faclp1
134.48.4.233    colorlp1
134.48.4.234    proglp1 
134.48.4.235    classlp1
134.48.4.237    studlp1  
134.48.4.239    faccolorlp1
134.48.87.92    copier
134.48.13.142   usa2 usa2.lab.mscs.mu.edu

Problems:
Get from DDN Network Information Center (no longer)
Does not scale
No guarantee that new host information is disseminated

Enter DNS:
No central database -- fully distributed
Scales well
Guarantees dissemination of new host information

Root domain
Top level domains: edu, com, in, ca, ...
    Second level domains: mu.edu, yahoo.com, ...

Non-recursive query:

  • On studsys, send to www.pku.edu.cn
  • Studsys: Need IP address of www.pku.edu.cn
  • Studsys: Contact local server: Who is www.pku.edu.cn?
  • Local server: I don't know
  • Local server: Contact root server: Who is www.pku.edu.cn?
  • Root server to local server: ask xxx.edu.cn
  • Local server to xxx.edu.cn: Who is www.pku.edu.cn?
  • xxx.edu.cn: I don't know
  • xxx.edu.cn to local server: Contact xxx.pku.edu.cn
  • Local server to xxx.pku.edu.cn: Who is www.pku.edu.cn?
  • 202.112.7.12
  • Studsys: Cache www.pku.edu.cn = 202.112.7.12
  • studsys: 202.112.7.12 is not in my routing table
  • Studsys: send to 134.48.4.100

Example of traceroute:

cmd > traceroute www.pku.edu.cn
traceroute to sun1000e.pku.edu.cn (202.112.7.12), 30 hops max, 40
byte packets
 1  gate4 (134.48.4.100)  7 ms  3 ms  3 ms
 2  wisgw.mu.edu (134.48.1.250)  6 ms  4 ms  4 ms
 3  milwaukee-marquette.wiscnet.net (140.189.32.1)  27 ms  73 ms 65 ms
 4  Kathakt.nap.net (207.112.247.14)  76 ms *  211 ms
 5  sl-chi-19-H11/0-T3.sprintlink.net (144.228.159.17)  87 ms  145 ms *
 6  sl-chi-6-F0/0.sprintlink.net (144.228.50.6)  91 ms  104 ms  130 ms
 7  144.228.10.54 (144.228.10.54)  161 ms  136 ms  86 ms
 8  sl-stk-6-F/T.sprintlink.net (198.67.6.6)  96 ms  182 ms  183 ms
 9  gsl-stock-3-Fddi0/0.gsl.net (204.59.128.197)  197 ms *  415 ms
10  204.59.160.246 (204.59.160.246)  655 ms  634 ms  708 ms
11  202.112.1.205 (202.112.1.205)  737 ms  601 ms  626 ms
12  202.112.1.197 (202.112.1.197)  755 ms  843 ms  679 ms
13  beijing-rgw.net.edu.cn (202.112.1.66)  742 ms  672 ms  640 ms
14  202.112.5.6 (202.112.5.6)  604 ms  726 ms  688 ms
15  sun1000e.pku.edu.cn (202.112.7.12)  674 ms  692 ms  751 ms

Multiplexing

Protocol and port numbers deliver data to the correct software module within the host.

Network layer receives information for many applications

Protocol numbers identify Transport Layer protocols. On pascal:

cmd > cat /etc/protocols
#ident  "@(#)protocols  1.6     01/09/04 SMI"   /* SVr4.0 1.1   */

#
# Internet (IP) protocols
#
ip              0       IP              # internet protocol, pseudo protocol number
icmp            1       ICMP            # internet control message protocol
igmp            2       IGMP            # Internet Group Management
ggp             3       GGP             # gateway-gateway protocol
ipip            4       IP-IP           # IP in IP (encapsulation)
tcp             6       TCP             # transmission control protocol
cbt             7       CBT             # Core Based Trees
egp             8       EGP             # exterior gateway protocol
igp             9       IGP             # any private interior gateway
pup             12      PUP             # PARC universal packet protocol
udp             17      UDP             # user datagram protocol
mux             18      MUX             # Multiplexing
hmp             20      HMP             # host monitoring protocol
xns-idp         22      XNS-IDP         # Xerox NS IDP
rdp             27      RDP             # "reliable datagram" protocol
idpr            35      IDPR            # Inter-Domain Policy Routing Protocol
idpr-cmtp       38      IDPR-CMTP       # IDPR Control Message Transport Protocol
sdrp            42      SDRP            # Source Demand Routing Protocol
idrp            45      IDRP            # Inter-Domain Routing Protocol
rsvp            46      RSVP            # Resource Reservation Protocol
gre             47      GRE             # Generic Routing Encapsulation
mobile          55      MOBILE          # IP Mobility
ospf            89      OSPFIGP         # Open Shortest Path First
pim             103     PIM             # Protocol Independent Multicast
ipcomp          108     IPComp          # IP Payload Compression Protocol
vrrp            112     VRRP            # Virtual Router Redundancy Protocol
sctp            132     SCTP            # Stream Control Transmission Protocol

#
# Internet (IPv6) extension headers
#
hopopt          0       HOPOPT          # Hop-by-hop options for IPv6
ipv6            41      IPv6            # IPv6 in IP encapsulation
ipv6-route      43      IPv6-Route      # Routing header for IPv6
ipv6-frag       44      IPv6-Frag       # Fragment header for IPv6
esp             50      ESP             # Encap Security Payload for IPv6
ah              51      AH              # Authentication Header for IPv6
ipv6-icmp       58      IPv6-ICMP       # IPv6 internet control message protocol
ipv6-nonxt      59      IPv6-NoNxt      # No next header extension header for IPv6
ipv6-opts       60      IPv6-Opts       # Destination Options for IPv6

Transport protocols use port numbers to identify applications. On pascal:

cmd > more /etc/services
#
#
# Copyright (c) 1999-2001 by Sun Microsystems, Inc.
# All rights reserved.
#
# Network services, Internet style
#
tcpmux          1/tcp
echo            7/tcp
echo            7/udp
discard         9/tcp           sink null
discard         9/udp           sink null
systat          11/tcp          users
daytime         13/tcp
daytime         13/udp
netstat         15/tcp
chargen         19/tcp          ttytst source
chargen         19/udp          ttytst source
ftp-data        20/tcp
ftp             21/tcp
ssh             22/tcp                          # Secure Shell
telnet          23/tcp
smtp            25/tcp          mail
time            37/tcp          timserver
time            37/udp          timserver
name            42/udp          nameserver
whois           43/tcp          nicname         # usually to sri-nic
domain          53/udp
domain          53/tcp
bootps          67/udp                          # BOOTP/DHCP server
bootpc          68/udp                          # BOOTP/DHCP client
kerberos        88/udp          kdc             # Kerberos V5 KDC
kerberos        88/tcp          kdc             # Kerberos V5 KDC
hostnames       101/tcp         hostname        # usually to sri-nic
pop2            109/tcp         pop-2           # Post Office Protocol - V2
pop3            110/tcp                         # Post Office Protocol - Version 3
sunrpc          111/udp         rpcbind
sunrpc          111/tcp         rpcbind
imap            143/tcp         imap2           # Internet Mail Access Protocol v2
ldap            389/tcp                         # Lightweight Directory Access Protocol 
ldap            389/udp                         # Lightweight Directory Access Protocol
submission      587/tcp                         # Mail Message Submission
submission      587/udp                         #    see RFC 2476
ldaps           636/tcp                         # LDAP protocol over TLS/SSL (was sldap)
ldaps           636/udp                         # LDAP protocol over TLS/SSL (was sldap)
 . . .

Port numbers:
Well-known ports, e.g. 8080 is http server
Dynamically allocated ports

E.g. TELNET:
First user gets random source port and destination port 23
Second user gets different source port and same destination port
Pair of ports (source and destination) determine network connection
Destination is told in TCP or UDP header

Combination of IP address + port number = socket

 

 
  Marquette University. Be The Difference. Marquette | Corliss |