TCP/IP, Connecting LANs
Tom Kelliher, CS 318
Feb. 23, 2000
Collect project 1.
Why perl and sockets?
Remember reading: Chs. 1--10, 14--16.
OSI Layers.
- Introduction to TCP/IP.
- LANs, connecting LANs.
Socket programming.
Message transmission example:
Goals:
- Minimize cost.
- Have high reliability.
Basics:
- Point-To-Point networks.
- connections --- expensive.
- Does not scale well.
- Used for long-haul networks.
- LANs: a shared communication medium.
- Principle of locality: temporal, physical/spatial.
- Star: what you have with a hub.
Hub broadcasts everything.
- Ring.
Nodes on a ring retransmit data.
- Bus.
How can a star be a bus?
- Shared bus.
- Speeds: 10 Mbps, 100 Mbps, gigabit.
- CSMA --- ``carrier'' sense multiple access. Listen before
transmitting. Idle.
- CD --- collision detection. Listen to what you've transmitted.
- Binary exponential backoff. Upon collision, wait for up to d time
units, randomly chosen, before retransmitting.
The exponential part.
- What is a token?
- How do I transmit on the token ring?
- ``Pass'' nodes.
- How do I receive? How do I know it's for me?
Why is this efficient: Layering. The NIC is responsible for determining
which host a message is for, etc., not the CPU.
- Transmitter can do error detection.
Two connected segments:
- Physical layer devices. Amplify, retime (?) the signal.
- Connected segments in same collision domain: length restrictions.
- Forwards everything: noise, damaged frames, frames not destined for
the other segment, etc.
- Data link layer.
- Connected segments in unique collision domains.
- Completely reads a frame from one segment, then transmits it to other
segment.
- Bridged hosts don't know they're bridged. Buffering?
- ``Learning'' bridges forward frames only when necessary, after
learning the hosts on each segment.
- A switch is like a hub, but each host is on its own segment:
- Hub bandwidth: R.
- Switch bandwidth: . where R is the data
rate and P the number of ports.
- One topology: switch --- hubs --- hosts.
- Network layer.
- Connected segments may differ in: media, physical addressing, frame
format.
Form:
- 32-bit, dotted decimal
- different from ethernet address (ARP, RARP)
- Class A: 0, 7 bit netid, 24 bit hostid
0.0.0.0 to 127.255.255.255
- Class B: 10, 14 bit netid, 16 bit hostid
128.0.0.0 to 191.255.255.255
- Class C: 110, 21 bit netid, 8 bit hostid
192.0.0.0 to 223.255.255.255
- Domain Name System
- Data
- Application layer
- TCP/UDP layer --- TCP frame
- IP layer --- IP datagram
- Ethernet layer --- ethernet frame: 46--1500 bytes (MTU)
Demultiplexing
How do processes on separate machines communicate?
- Client/Server
- ``Well-known'' addresses
- Multiple telnet clients
Thomas P. Kelliher
Tue Feb 22 19:04:44 EST 2000
Tom Kelliher