Vi t l E i tVirtual Environments: Networking Basicsg
Anthony SteedAnthony Steed
Department of Computer ScienceDepartment of Computer ScienceUniversity College London
http://www.cs.ucl.ac.uk/teaching/VE
Introduction
• Networks at the heart of networked VRM t k t l t th• Many network protocols are out there– TCP, UDP, multicast, RTP, etc
C– Choice based on needs• Programming networking in XVR
2
Network properties
• Latency (Round Trip Time)Jitt• Jitter
• Bandwidth (Capacity)• Loss (Congestion, Reliability)
3
Internet Protocol - IP
ApplicationFTP SMTP DNS SNMP
Transport
TCP UDP
Internet Protocol
Transport
IPICMP
IGMP
Data Link
G
ARP/RARPEthernet FDDI
4
Ethernet, FDDI
Protocols: UDPProtocols: UDP
• ConnectionlessNo state is maintained– No state is maintained
– No setup timeLight weight– Light-weight
• No Quality of Service Postal ServicePostal Service– No guarantee delivery– No order delivery
TCP
• Connection Oriented– State is maintained at routers– State is maintained at routers– Setup Handshake– Heavy-weightHeavy weight
• Quality of Service– FIFO delivery– FIFO delivery– Flow Control– Error RecoveryError Recovery
• Mechanisms– Timers Acknowledgements etcTimers, Acknowledgements, etc
6
Multicast: OverviewMulticast: Overview
WANBroadcast
WAN
UnicastWAN Multicast
7
Multicast: ModelMulticast: Model
• UDP class D address – No physical meaningM lti t i f LAN• Multicast is free on LANs
• An address defines a logical group• A sender is oblivious to receivers• Join/Leave operationsJoin/Leave operations• Tree Based Routing
8
Socket
• End-point for communicationN t k ti b d k t• Network connections based on sockets
• Socket identified by – Host address – numeric or name– Port number
• 0-1023 : well known services (e.g. http traffic on 80)• 1024-49151: registered ports (less well known)
49152 65536: private applications or dynamic use• 49152-65536: private applications or dynamic use
9
Socket communication
Listener Client
N d t t k t
Needs to create a socket to connectt li t i k tNeeds to create a socket
to listen to incoming connectionrequests
to listening sockets
10
The Client/Server logic
Server Client
C t k t f li t iCreate socket for listeningincoming connections Create socket for
connecting to Server
Listen Request connection
Accept and create thread
Send/Receive message
Send/Receive message
11
XVR functions
Server Client
N tC t Ch lTCP( )NetCreateChannelTCP( )
NetConnectTCP( )NetAcceptTCP ( )
Accept and create thread
NetSendToTCP() /NetReceiveFromTCP()
NetSendToTCP() /NetReceiveFromTCP()
12
Top Related