squeak!
Syllabus Homepage
Course Overview
Course resources
Day 1
Day 2
Day 3
Day 4
Common errors
Internet Glossary
About Your Instructor
Credits: This site powered by the vi text editor, apache webserver, perl scripting, and Debian linux.
squeak!

TCP/IP Networking in UNIX - Day 1

Admin

Texas state survey and Roll.

Goals

In this session you will:
  • understand Network Access Layer - ARP
  • understand the Internet Layer - IP, routing, ICMP
  • understand the Transport Layer - UDP and TCP
  • examine typical application layers: telnet, ftp, smtp, dns, RIP, NFS

Introductory notes

  • tcp/ip as a generic term, or family of technologies
  • DOD suite
  • tcp/ip dominant for net/unix
  • compare to IPX, AppleTalk, etc.

generic networks

  • concerns
    • Naming/addressing: the ability to locate and talk to a particular node
    • Segmenting: busting up long packets for resource sharing and error correction (consider max size v. error rate).
    • Flow control: handling over-saturation
    • Synchronization: keeping distributed processes in sync
    • Prioritization: packet priority
    • Error control: checksums, reliability v. unreliability
  • topology
    • bus - single wire
    • ring - good for large physical distances
    • star topology - most common, uses much wire
  • layered protocols
    • modularity - cf. winsock
    • flexibility - change one layer
    • standardization

The OSI 7-layer burrito, err, model


Layer 0 is sometimes used to refer to the hardware level.
  1. "Physical": not the wire, but the impulse, current
  2. Data-link: packet building, checksums, MAC level [bridges, switches]
  3. Network: IP, IPX, routing tables [routers]
  4. Transport: TCP
  5. Session: TCP, NetBIOS, SPX
  6. Presentation: na
  7. Application layer: applications

TCP/IP networks

  • twisted pair, rj-45, hubs, routers, switches
  • collision: Carrier Sense with Multiple Access (CSMA): listen politely. Transmit. If node detects a collision, send jamming pulse. Random delay, timeout doubles, x10. Complicated by delays: .65C.
  • What is the format of an address in TCP/IP?:
    • every network must have a unique name, and ever node must have a unique name. No publically-visible names may compete.
    • dotted quad: xxx.xxx.xxx.xxx.
    • Math: 4 byte segments, 0-255
    • class c= 2^8 = 256 theoretical nodes
    • class b= 2^16 = 65,536 theoretical nodes
    • class a= 2^32 = 4,294,967,296 (aka, the internet, hence IPv6)
    • network and node sections of the IP and network notation
    • multicast (usually 255.255)
    • routers must have a local IP for every network they are on
    • local delivery = peer to peer = data link layer.
      If both IPs are on the same network (see above), the node will try to deliver locally.
      1. on same wire
      2. find IP: ARP for MAC address. Cache arp.
      3. talk directly to MAC - others ignore
      //pseudocode for endnodes
      
      //	receiving packets
      if ((destAddress == myAddress) or (destAddress == broadcast)) {
      	
      	process the packet
      }
      
      
      else {
      
      	drop the packet
      
      }
      
      
      //	sending packets
      if (destNet == myNet) {
      
      	deliver locally (ARP or cache)
      
      }
      
      
      else {
      	send to the router
      }
      
      
      
      //	#############################################################
      //pseudocode for routers
      
      if ((destAddress == myAddress) or (destAddress == broadcast)) {
      	
      	process the packet
      }
      
      
      else if (destNet is directly connected) {
      
      	deliver (arp)
      }
      
      
      
      else if (destNet in table) {
      
      	deliver to next router
      
      }
      
      
      else {
      
      	drop the packet
      
      }
      
      
      
      
      
      
    • Question: what happens if destination is not on the network, and there is no router?
  • How do devices get an address:
    • manual configuration
    • automagic assignment: dhcp/bootp
  • How is the address mapped onto the physical address?:
    • MAC addresses: your isp, bridges, etc. vendor + serial: 08:00:20:0A:8C:6D
    • why? hardware hot swaps and local routing
    • how ARP works: FF:FF:FF:FF:FF:FF "What is the MAC for a particular IP?"
  • How does an end node find a router?:
    • Gateway (default route)
    • other routing commands
    • sniffing RIP traffic
  • How do routers learn network topology?: Cost; hops. Cost/hop of 0 means direct connection.
    • manual config
    • RIP or other learning algorithms
  • How do users find services on the network? IP numbers are unfriendly...
    • HOST files
    • DNS = distributed name lookup

TCP and UDP

Homework

  • browse the usenet groups mentioned in the course resources


http://www.mousetrap.net/syllabus/tcpip/day1.html
$Id: day1.orb,v 1.8 2002/03/13 22:14:10 mouse Exp $

Remember, your login is based on your machine's hostname, not on any other number.
~/[initials] refers to the subdirectory under your homedir, named after your initials. Everything except for .dotfiles will be stored in your ~/[initials] directory.


© 1995-2001 jason carr
Distributed under the terms of the GNU Free Documentation License.