Title: LSVE: A Network Primer
1LSVE A Network Primer
- Manuel Oliveira
- Computer Science Department
- University College London
2Audience Assessment
- Know about networks?
- Know what TCP, UDP, multicast is?
- Know how a router works inside?
- Know about multicast routing algorithms?
3Contents
- Motivation
- How to Talk to Network People?
- Network Elements
- Network Properties
- Protocols
- Multicast
- How to Access the Network
- Discussion
4Motivation Applications
- Remote Training
- Combat Simulation
- Games
- Education
- Visualization
- Collaboration
- Socialization
5Motivation Evolution
MATRIX
VE
Presence
Online Games
Graphical MUDs
MUDs
Evolution
6Motivation Games?
7Motivation Games Perspective
- Humans are Social Beings
- Collaboration
- Share Experiences
- UO most popular activity?
- Competition
- Online categories achievers, explorers,
socializers and killers - A Human is better than AI/AL
8Motivation Games Better than VE?
Games
VE
Big budgets 2-3 years cycle Content
driven Entertainment Robust Cool graphics Network
is not cool
Budget? PhD, masters or undergraduate Functionalit
y driven Test research ideas Hacks Cool slow
graphics Network less bad
DIS systems are an exception
9How to Talk to Network People OSI Model
Host A
Host B
protocol
Layer n1
Layer n1
API
Layer n
Layer n
Network
10How to Talk to Network People OSI Model
Data
Host A
Layer n1
PDU n1
Data
Layer n
PDU n1
Data
PDU n
11How to Talk to Network People OSI
How to Talk to Network People OSI Model
Application
Presentation
Session
Transport
Network
Data Link
Physical
12How to Talk to Network People OSI
How to Talk to Network People OSI Model
Application
Application
Presentation
Presentation
Session
Session
Transport
Transport
Network
Network
Data Link
Data Link
Physical
Physical
13How to Talk to Network People OSI vs IP
Application
Application
Presentation
Session
Transport
Transport
OS
Internet Protocol
Network
Data Link
Data Link
Physical
14How to Talk to Network People IP
Application
FTP
SMTP
DNS
SNMP
TCP
UDP
Transport
ICMP
Internet Protocol
IP
IGMP
Data Link
ARP/RARP SNAP
Ethernet, FDDI
15Network Elements Overview
- Address
- Host
- Users computer has unique IP address
- Router
- Routes the data packets across the network
- Queues per link for incoming packets
- Lookup table
- Gateway
- Router that does protocol conversion
16Network Elements Address Port
- Class A (network ID 7 bits)
- Class B (network ID 14 bits)
- Class C (network ID 21 bits)
- Class D (multicast)
- Class E (reserved for future use)
0
Network ID
Host ID
1
Network ID
Host ID
0
1
Host ID
1
0
Network ID
1
Multicast group
1
1
0
1
reserved
1
1
1
0
17Network Elements IP Packet
Version
Hdr len
Type Of Service
Packet Len
Identification
Flags
Fragment Offset
20 bytes
TTL
Protocol ID
Hdr Cheksum
Source address
Destination address
Options (if any)
Data
18Network Elements IP Routing
UDP
TCP
Other
Admin commands
y
n
Local?
ICMP
redirects
routing
Options
Next Hop?
Routing Table
src routing
Queue
Network Interface
19Network Properties
- Latency (Round Trip Time)
- Jitter
- Bandwidth (Capacity)
- Loss (Congestion, Reliability)
20Protocols
- Transport Level
- User Datagram Protocol (UDP)
- Transport Control Protocol (TCP)
- Application
- Real Time Protocol (RTP)
- Network Time Protocol (NTP)
- File Transfer Protocol (FTP)
- Domain Name Service (DNS)
21Protocols UDP
- Connectionless
- No state is maintained
- No setup time
- Light-weight
- No Quality of Service
- No guarantee delivery
- No order delivery
Postal Service
22Protocols UDP packet
Source Port
Destination Port
8 bytes
Length
Hdr Cheksum
Data
23Protocols TCP
- Connection Oriented
- State is maintained at routers
- Setup Handshake
- Heavy-weight
- Quality of Service
- FIFO delivery
- Flow Control
- Error Recovery
- Mechanisms
- Sliding Window, Timers, Acknowledgements
Telephone Service
24Protocols TCP Peek under the Hood
Host A
Host B
25Protocols TCP Peek under the Hood
Host A
Host B
26Protocols TCP packet
Source port
Destination port
Sequence number
20 bytes
Ack number
Window size
Flags
Hdr len
Options
Urgent Pointer
Checksum
Options (if any)
Data
27Multicast Overview
28Multicast Model
- UDP class D address No physical meaning
- Multicast is free on LANs
- An address defines a logical group
- A sender is oblivious to receivers
- Join/Leave operations
- Tree Based Routing
29Multicast Routing Overview
Multicast Routing Protocol
Internet Group Management Protocol (IGMP)
30Multicast Routing
- Three types
- Flood/Prune (or Reverse Path Multicast) basis
for MBone - Steiner - never implemented, just simulated
- Centred Based begins to be deployed
- Some Protocols
- Distance Vector Router Multicast Protocol (DVRMP)
- Multicast Open Shortest Path First (MOSPF)
based on link info - Core Based Trees (CBT)
- Protocol Independent Multicast (PIM)
- Sparse Mode (SM), Dense Mode (DM)
31Multicast Core Based Trees
CBT
IGMP
32Multicast Core Based Trees
CBT
IGMP
33Multicast Core Based Trees
CBT
IGMP
34Multicast Core Based Trees
CBT
IGMP
35Multicast Problems
- Deployment problems
- mainly interdomain routing
- No pricing model
- Membership Authorisation
- Security
- Address Allocation
- Scope
- Clashes
- Announce/Listen (sdr)
- TCP-Friendliness (congestion)
- Error Recovery is a nightmare
36Multicast Temporary Solution
- Single Source Multicast (SSM)
- IGMPv3 who to listen to
- Multicast Source Discovery Protocol (MSDP) RP
exchange - Multicast Address Dynamic Client Allocation
Protocol (MADCAP) Multicast DHCP
37How to Access Network C
- Creating a Socket
- int sock
- if ((sock socket (PF_INET, SOCK_STREAM, 0))
- do error handling
- return
-
38How to Access Network C
- TCP - Server
- struct sockaddr_in auxAddr
- bzero((char )auxAddr, sizeof(auxAddr))
- auxAddr.sin_family PF_INET
- auxAddr.sin_addr.s_addr htonl(INADDR_ANY)
- auxAddr.sin_port htons(800)
- If (bind(sock, (struct sockaddr )auxAddr,
sizeof(auxAddr)) -1) - do error handling
- return
39How to Access Network C
- TCP - Server
- struct sockaddr_in clientAddr
- int clientSock
- listen(sock, 20)
- while (clientSock accept(sock, (struct sockaddr
) clientAddr, sizeof(clientAddr)) ! -1) - process the clientSock, use threads!
-
- do error handling
40How to Access Network C
- TCP Client
- struct sockaddr_in auxAddr
- bzero((char )auxAddr, sizeof(auxAddr))
- auxAddr.sin_family PF_INET
- auxAddr.sin_addr.s_addr inet_addr(137.158.128.5
) - auxAddr.sin_port htons(800)
- if (connect(sock, (struct sockaddr )auxAddr,
sizeof(auxAddr)) -1) - do error handling
-
41How to Access Network C
- TCP Client
- int write(int /socket/,
- byte /data/,
- int /data len/)
- int read(int /socket/,
- byte /buffer/,
- int /max to read/)
42Discussion