Upload
george-greer
View
213
Download
0
Tags:
Embed Size (px)
Citation preview
LSVE: A Network PrimerLSVE: A Network Primer
Manuel OliveiraManuel OliveiraComputer Science DepartmentComputer Science Department
University College LondonUniversity College London
Audience AssessmentAudience Assessment
• Know about networks?Know about networks?
• Know what TCP, UDP, multicast is?Know what TCP, UDP, multicast is?
• Know how a router works inside?Know how a router works inside?
• Know about multicast routing algorithms?Know about multicast routing algorithms?
ContentsContents
• MotivationMotivation
• How to Talk to Network People?How to Talk to Network People?
• Network ElementsNetwork Elements
• Network Properties Network Properties
• Protocols Protocols
• Multicast Multicast
• How to Access the NetworkHow to Access the Network
• DiscussionDiscussion
Motivation: ApplicationsMotivation: Applications
• Remote TrainingRemote Training
• Combat SimulationCombat Simulation
• GamesGames
• EducationEducation
• VisualizationVisualization
• CollaborationCollaboration
• Socialization Socialization
Motivation: EvolutionMotivation: Evolution
MUDs
GraphicalMUDs
OnlineGames
VE
MATRIX
Presence
Evolution
Motivation: Games?Motivation: Games?
Motivation: Games PerspectiveMotivation: Games Perspective
• Humans are Social BeingsHumans are Social Beings• CollaborationCollaboration• Share ExperiencesShare Experiences
• UO most popular activity?
• CompetitionCompetition• Online categories: achievers, explorers, socializers and
killers
• A Human is better than AI/ALA Human is better than AI/AL
Motivation: Games Better than VE?Motivation: Games Better than VE?
Games VE*
Big budgets2-3 years cycleContent drivenEntertainment
RobustCool graphics
Network is not cool
Budget?PhD, masters or undergraduate
Functionality drivenTest research ideas
HacksCool slow graphicsNetwork less bad
* DIS systems are an exception
How to Talk to Network People: OSI ModelHow to Talk to Network People: OSI Model
Layer n+1
Layer n
Host A
Network
Layer n+1
Layer n
Host B
protocol
API
How to Talk to Network People: OSI ModelHow to Talk to Network People: OSI Model
Layer n+1
Layer n
Host A
Data
PDU n+1 Data
PDU n+1 DataPDU n
How to Talk to Network People: OSIHow to Talk to Network People: OSI
Physical
Data Link
Network
Transport
Session
Presentation
Application
How to Talk to Network People: OSI ModelHow to Talk to Network People: OSI Model
How to Talk to Network People: OSIHow to Talk to Network People: OSI
Physical
Data Link
Network
Transport
Session
Presentation
Application
Physical
Data Link
Network
Transport
Session
Presentation
Application
How to Talk to Network People: OSI ModelHow to Talk to Network People: OSI Model
Data Link
How to Talk to Network People: OSI vs IPHow to Talk to Network People: OSI vs IP
Internet Protocol
Transport
Application
Physical
Data Link
Network
Transport
Session
Presentation
Application
OS
Data Link
How to Talk to Network People: IPHow to Talk to Network People: IP
Internet Protocol
Transport
Application
TCP UDP
IPICMP
IGMP
ARP/RARPSNAPEthernet, FDDI
FTP SMTP DNS SNMP
Network Elements: OverviewNetwork Elements: Overview
• AddressAddress• HostHost
• User’s computer has unique IP address
• RouterRouter• Routes the data packets across the network
• Queues per link for incoming packets
• Lookup table
• GatewayGateway• Router that does protocol conversion
• Class A Class A (network ID = 7 bits)(network ID = 7 bits)
• Class B Class B (network ID = 14 bits)(network ID = 14 bits)
• Class C Class C (network ID = 21 bits)(network ID = 21 bits)
• Class D Class D (multicast)(multicast)
• Class E Class E (reserved for future use)(reserved for future use)
Network Elements: Address + PortNetwork Elements: Address + Port
0 Network ID Host ID
1 Network ID Host ID
1 Host ID
1 Multicast group
1 reserved
1 1 0
1 0 Network ID
0
1 1 1 0
Network Elements: IP PacketNetwork Elements: IP Packet
Version Hdr len Type Of Service Packet Len
Identification Flags Fragment Offset
TTL Protocol ID Hdr Cheksum
Source address
Destination address
Options (if any)
Data
20 bytes
Network Elements: IP RoutingNetwork Elements: IP Routing
UDP TCP
ICMP
RoutingTable
Next Hop?
Local?
Options
Queue
Other
Network Interface
Admin commands
yn
src routing
routingredirects
Network PropertiesNetwork Properties
• Latency (Round Trip Time)Latency (Round Trip Time)
• JitterJitter
• Bandwidth (Capacity)Bandwidth (Capacity)
• Loss (Congestion, Reliability)Loss (Congestion, Reliability)
ProtocolsProtocols
Transport Level:Transport Level:• User Datagram Protocol (UDP)
• Transport Control Protocol (TCP)
• ApplicationApplication• Real Time Protocol (RTP)
• Network Time Protocol (NTP)
• File Transfer Protocol (FTP)
• Domain Name Service (DNS)
Protocols: UDPProtocols: UDP
• ConnectionlessConnectionless• No state is maintained
• No setup time
• Light-weight
• No Quality of ServiceNo Quality of Service• No guarantee delivery
• No order delivery
Postal ServicePostal Service
Protocols: UDP packetProtocols: UDP packet
Source Port Destination Port
Length Hdr Cheksum
Data
8 bytes
Protocols: TCPProtocols: TCP
• Connection OrientedConnection Oriented• State is maintained at routers
• Setup Handshake
• Heavy-weight
• Quality of ServiceQuality of Service• FIFO delivery
• Flow Control
• Error Recovery
• MechanismsMechanisms• Sliding Window, Timers, Acknowledgements
Telephone ServiceTelephone Service
Protocols: TCP Peek under the HoodProtocols: TCP Peek under the Hood
Host A Host B
TimerPacket N
Ack N
Protocols: TCP Peek under the HoodProtocols: TCP Peek under the Hood
Host A Host B
Timer
Ack N
Packet N
TimerPacket N
Protocols: TCP packetProtocols: TCP packet
Source port Destination port
Sequence number
Ack number
Window size
Urgent Pointer
Options (if any)
Data
20 bytes
Checksum
FlagsHdr len Options
Multicast: OverviewMulticast: Overview
WAN
UnicastWAN
BroadcastWAN
Multicast
Multicast: ModelMulticast: Model
• UDP class D address – No physical meaningUDP class D address – No physical meaning
• Multicast is free on LANsMulticast is free on LANs
• An address defines a logical groupAn address defines a logical group
• A sender is oblivious to receiversA sender is oblivious to receivers
• Join/Leave operationsJoin/Leave operations
• Tree Based RoutingTree Based Routing
Multicast: Routing OverviewMulticast: Routing Overview
Multicast Routing Protocol
Internet GroupManagement Protocol (IGMP)
Multicast: RoutingMulticast: Routing
• Three types:Three types:• Flood/Prune (or Reverse Path Multicast) – basis for MBone
• Steiner - never implemented, just simulated
• Centred Based – begins to be deployed
• Some Protocols: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)
Multicast: Core Based TreesMulticast: Core Based Trees
IGMP
CBT
join
join
join
Multicast: Core Based TreesMulticast: Core Based Trees
IGMP
CBT
join-ack
join-ack join
join
Multicast: Core Based TreesMulticast: Core Based Trees
IGMP
CBT
join-ack
Multicast: Core Based TreesMulticast: Core Based Trees
IGMP
CBT
Multicast: ProblemsMulticast: Problems
• Deployment problemsDeployment problems• mainly interdomain routing
• No pricing model
• Membership Authorisation
• Security
• Address Allocation:Address Allocation:• Scope
• Clashes
• Announce/Listen (sdr)
• TCP-Friendliness (congestion)TCP-Friendliness (congestion)• Error Recovery is a nightmareError Recovery is a nightmare
Multicast: Temporary SolutionMulticast: Temporary Solution
• Single Source Multicast (SSM)Single Source Multicast (SSM)
• IGMPv3 – who to listen toIGMPv3 – who to listen to
• Multicast Source Discovery Protocol (MSDP) – RP exchangeMulticast Source Discovery Protocol (MSDP) – RP exchange
• Multicast Address Dynamic Client Allocation Protocol Multicast Address Dynamic Client Allocation Protocol (MADCAP) – Multicast DHCP(MADCAP) – Multicast DHCP
How to Access Network: CHow to Access Network: C
• Creating a SocketCreating a Socketint sock;
if ((sock = socket (PF_INET, SOCK_STREAM, 0))<0) {
do error handling
return
}
Protocol Family Socket Type
Protocol0 = default
How to Access Network: CHow to Access Network: C
• TCP - ServerTCP - Serverstruct 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;
}
How to Access Network: CHow to Access Network: C
• TCP - ServerTCP - Serverstruct 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
How to Access Network: CHow to Access Network: C
• TCP – ClientTCP – Clientstruct 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
}
How to Access Network: CHow to Access Network: C
• TCP – ClientTCP – Client• int write(int /*socket*/,
byte * /*data*/,
int /*data len*/)
• int read(int /*socket*/,
byte * /*buffer*/,
int /*max to read*/)
DiscussionDiscussion