vi t l e i tvirtual environments: networking basics › ... › 2008-2009 › week11 ›...

12
Vi t lE i t Virtual Environments: Networking Basics Anthony Steed Anthony Steed Department of Computer Science Department of Computer Science University College London http://www.cs.ucl.ac.uk/teaching/VE

Upload: others

Post on 23-Jun-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Vi t l E i tVirtual Environments: Networking Basics › ... › 2008-2009 › week11 › NetworkingBasics.pdf · 2008-11-14 · Vi t l E i tVirtual Environments: Networking Basics

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

Page 2: Vi t l E i tVirtual Environments: Networking Basics › ... › 2008-2009 › week11 › NetworkingBasics.pdf · 2008-11-14 · Vi t l E i tVirtual Environments: Networking Basics

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

Page 3: Vi t l E i tVirtual Environments: Networking Basics › ... › 2008-2009 › week11 › NetworkingBasics.pdf · 2008-11-14 · Vi t l E i tVirtual Environments: Networking Basics

Network properties

• Latency (Round Trip Time)Jitt• Jitter

• Bandwidth (Capacity)• Loss (Congestion, Reliability)

3

Page 4: Vi t l E i tVirtual Environments: Networking Basics › ... › 2008-2009 › week11 › NetworkingBasics.pdf · 2008-11-14 · Vi t l E i tVirtual Environments: Networking Basics

Internet Protocol - IP

ApplicationFTP SMTP DNS SNMP

Transport

TCP UDP

Internet Protocol

Transport

IPICMP

IGMP

Data Link

G

ARP/RARPEthernet FDDI

4

Ethernet, FDDI

Page 5: Vi t l E i tVirtual Environments: Networking Basics › ... › 2008-2009 › week11 › NetworkingBasics.pdf · 2008-11-14 · Vi t l E i tVirtual Environments: Networking Basics

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

Page 6: Vi t l E i tVirtual Environments: Networking Basics › ... › 2008-2009 › week11 › NetworkingBasics.pdf · 2008-11-14 · Vi t l E i tVirtual Environments: Networking Basics

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

Page 7: Vi t l E i tVirtual Environments: Networking Basics › ... › 2008-2009 › week11 › NetworkingBasics.pdf · 2008-11-14 · Vi t l E i tVirtual Environments: Networking Basics

Multicast: OverviewMulticast: Overview

WANBroadcast

WAN

UnicastWAN Multicast

7

Page 8: Vi t l E i tVirtual Environments: Networking Basics › ... › 2008-2009 › week11 › NetworkingBasics.pdf · 2008-11-14 · Vi t l E i tVirtual Environments: Networking Basics

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

Page 9: Vi t l E i tVirtual Environments: Networking Basics › ... › 2008-2009 › week11 › NetworkingBasics.pdf · 2008-11-14 · Vi t l E i tVirtual Environments: Networking Basics

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

Page 10: Vi t l E i tVirtual Environments: Networking Basics › ... › 2008-2009 › week11 › NetworkingBasics.pdf · 2008-11-14 · Vi t l E i tVirtual Environments: Networking Basics

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

Page 11: Vi t l E i tVirtual Environments: Networking Basics › ... › 2008-2009 › week11 › NetworkingBasics.pdf · 2008-11-14 · Vi t l E i tVirtual Environments: Networking Basics

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

Page 12: Vi t l E i tVirtual Environments: Networking Basics › ... › 2008-2009 › week11 › NetworkingBasics.pdf · 2008-11-14 · Vi t l E i tVirtual Environments: Networking Basics

XVR functions

Server Client

N tC t Ch lTCP( )NetCreateChannelTCP( )

NetConnectTCP( )NetAcceptTCP ( )

Accept and create thread

NetSendToTCP() /NetReceiveFromTCP()

NetSendToTCP() /NetReceiveFromTCP()

12