CommunicationsContentsMore Specialized Network NodesGatewayContentionCollision DetectCollision Detect (cont.)Token PassingMessage SlotsTCP/IP Protocol LayersNetwork ServiceSocketsPortsSocket CommunicationServers and ThreadsSummary01/13/19 CS241 © 2005 Roy Campbell, All Rights Reserved1CommunicationsCS 241 Lecture 33T: Ch 8Roy Campbell01/13/19 CS241 © 2005 Roy Campbell, All Rights Reserved2ContentsConnection StrategiesContentionTypes of NetworksServer ClientSummary01/13/19 CS241 © 2005 Roy Campbell, All Rights Reserved3More Specialized Network Nodes Bridges. Overcome difficulties of joining Ethernets/physical networks together.Intelligent Hubs. On a star Ethernet, filters out traffic not destined for host down link.Passive Hubs. On a star Ethernet, broadcasts every packet down each link.Firewall. Filter on link that removes/transfers selected packets based on IP numbers, applications, or port addresses.01/13/19 CS241 © 2005 Roy Campbell, All Rights Reserved4Gateway01/13/19 CS241 © 2005 Roy Campbell, All Rights Reserved5ContentionCollision DetectToken PassingMessage Slots01/13/19 CS241 © 2005 Roy Campbell, All Rights Reserved6Collision DetectBefore transmitting, listen to network for free link.During transmission, listen to make sure that there is not a simultaneous transmission.When collision occurs, use back off strategy to avoid busy wait.Wait for random number of time units.01/13/19 CS241 © 2005 Roy Campbell, All Rights Reserved7Collision Detect (cont.)Wait for exponential amount of time based on number of attemptsDoes not prevent indefinite wait to transmit.01/13/19 CS241 © 2005 Roy Campbell, All Rights Reserved8Token PassingPass token around network -- special message.When receive token, can transmit one message but must then pass on the token.Provides fair message transmission.Lost tokens must be replaced. Use time out.Use election algorithm to choose a node to create a token.01/13/19 CS241 © 2005 Roy Campbell, All Rights Reserved9Message SlotsA number of empty messages continuously circulate around the network.Node grabs empty slot, fills it with message.Receiving node removes message and replaces empty message.01/13/19 CS241 © 2005 Roy Campbell, All Rights Reserved10TCP/IP Protocol LayersEND USER APPLICATIONIEEE802.X/X.25IPTCP UDPFTP, TELNET, SMTP, NSP, SNMPLAN/WANLayers 5-7Layers 1-3Layers 401/13/19 CS241 © 2005 Roy Campbell, All Rights Reserved11Network ServiceService ExampleConnection-orientedReliableMessage streamPages in bookReliable byte stream Remote loginUnreliable connection Digitized VoiceConnectionless Unreliable datagram Test packetsAcknowledged Datagram Registered mailRequest-Reply Database query01/13/19 CS241 © 2005 Roy Campbell, All Rights Reserved12SocketsCommunication endpoint(IP address, Port number)Client-server – server listens to a portTelnet Port 23, ftp port 21, web server port 8001/13/19 CS241 © 2005 Roy Campbell, All Rights Reserved13PortsPorts < 1024, standardPorts > 1024, user createdAll connections unique(161.25.19.8:20)01/13/19 CS241 © 2005 Roy Campbell, All Rights Reserved14Socket CommunicationClient socket(146.86.5.2/1625)Web server socket(161.25.19.9/80)01/13/19 CS241 © 2005 Roy Campbell, All Rights Reserved15Servers and ThreadsServerReq 1 Req 2 Req 3 Req 4Create a thread for each request to avoid blocking in a single threadIncoming requests01/13/19 CS241 © 2005 Roy Campbell, All Rights Reserved16SummaryContentionTypes of NetworksNodes in a NetworkServer
View Full Document