You are on page 1of 17

Basic TCP/IP

Networking

WeeSan Lee <weesan@cs.ucr.edu>


http://www.cs.ucr.edu/~weesan/cs183/
Roadmap
 The Internet
 How the Internet is managed?
 TCP/IP
 IP Addresses
 CIDR
 IPv6
 IP Address Allocation
 NAT
 Hostname and IP Address Assignment
 Routing vs Forwarding
The Internet
 Inter-networks via TCP/IP
 Originated from ARPANET
 Established in 1969 by DARPA
 Not invented by Al Gore!!!
 ARPANET → NSFnet
 NSFnet was commercialized in 1994
 With help from Routing Arbiter Project
 Now, the Internet is a collection of networks
managed by ISPs, who exchange traffic at NAPs
How the Internet is
managed?
 ISPs manage their own networks
 Several organizations involve
 ICANN
 The Internet Corporation for Assigned Names and
Numbers
 IETF
 The Engineering Task Force
 RFC-Editor
 Request For Comments
 RFC2555, 30 Years of RFCs
TCP/IP

HTTP FTP SSH SMTP DNS Application layer

TCP UDP Transport layer

ICMP IP IGMP Network layer

ARP/RARP Hardware Interface Link layer


TCP/IP (cont)

 "Be liberal in what you accept, and


conservative in what you send." – Jon Postel
(1943-1998)
TCP/IP (cont)

HTTP HTTP

TCP TCP

IP IP
The
The
Ethernet Internet
Internet Ethernet
IP Addresses

 IPv4
 4 bytes, eg. 138.23.169.9
 Network & Host portion
 Historical Internet address classes
 A1-126 N.H.H.H
 B128-191 N.N.H.H
 C192-223 N.N.N.H
 D224-239
 E240-255
IP Addresses (cont)

 Problems
 Class B addresses were running out by 1995
 Routing tables were too big to fit into memory
 Fragmentation
 Solutions
 Short-term
 CIDR – Classless Inter-Domain Routing
 Long-term
 IPv6
CIDR

 No more classes
 Uses prefix, /00 notation, eg.
 138.23.0.0/16
 Can be difficult to compute, eg. /26
 Uses http://www.jodies.de/ipcalc
IPv6

 16 bytes
 128 bits
 Consume more memory on routers?
 Ready for years but too costly to deploy
IP Address Allocation

 ICANN delegates blocks of addresses to 5


regional Internet registries
 ARIN
 APNIC
 RIPE
 AfriNIC
 LACNIC
NAT

 Network Address Translation


 Translation private IP addresses into public
 Private IP addresses (RFC1918)
 A10.0.0.1/8
 B172.16.0.0/12
 C192.168.0.0/16
 It’s a hack but it works
 Some researchers hate it since it breaks e2e
Hostname and IP Address
Assignment
 /etc/hosts
 127.0.0.1 localhost
 138.23.169.9 eon.cs.ucr.edu eon
 DNS
 Domain Name System
 DHCP
 Dynamic Host Configuration Protocol
Hostname and IP Address
Assignment (cont)
 /bin/hostname
 Set or display current hostname
 /bin/ifconfig
 Enable and disable a network interface
 $ ifconfig eth0 up
 $ ifconfig eth0 down
 Set IP address, subnet mask, broadcast address
 $ ifconfig eth0 138.23.169.9 netmask 255.255.255.128
 $ ifconfig eth0
 $ ifconfig -a
Routing vs Forwarding
 Routing
 A process to build up a routing table
 Forwarding
 A process to forward packets from one NIC to another by
consulting the routing table
 Routing table
 $ netstat -rn
 Kernel IP routing table
 Destination Gateway Genmask Flags MSS Window irtt Iface
 192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
 169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
 0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 eth0
Reference

 LAH
 Ch 12: TCP/IP Networking

You might also like