Softeng 364: exam revision
Switches
- Are nodes - Transparent - Hosts communicating are not aware of a switches presence - Operates in the link layer, used to connect two or more network segments and regulate traffic. - Self learning - hosts have dedicated connection to switches - Full duplex - Link layer (ethernet) protocols used on each link but has no collision -- each link has its own collision domain - Switch forwarding table -- attr(Mac address, interface line, time to live) - records sender location pari in table
Even Parity
- Check that the number of 1's in the data are even, if not the parity bit becomes a 1. -> transmit data - if the receiver detects that the number of bits, including the parity, are odd then there is an error.
Odd Parity
- Check that the number of 1's in the data are odd, if not the parity bit becomes a 1. -> transmit data - if the receiver detects that the number of bits, including the parity, are even then there is an error.
Multiple access protocol
- Co-ordination must use same channel as communication. - Distributed
Sending NIC Adapters
- Encapsulate data in a frame - Adds headers -- Error checking bits -- rdt -- Flow control
Frame
- Encapsulates a datagram - All data from lower level protocols -- Including lower level headers -- And its own header --- protocol identifier --- tag control information -- And its own trailer ---error detection bits, CRC, parity, etc. - Uses MAC addressing
IP
- Hierarchical assigned by isp's local router and global isps - Routing calculations are based on destination address IPv4 - 32 bit - used in network layer linking IPv6 - 128bit - used in network layer linking
Nodes
- Hosts and routers - Exist physically in space - All nodes contain an NIC -- Except Switches
MPLS vs IP
- IP route calculation based only on destination address - MPLS based on source and destination address -- Also has dedicated backups
Link Layer Services
- Identifies existence of a connection - Verifies if a connection is free to access - single bit error detection -- Single bit parity - Single bit error correction -- 2D parity - Multi bit error correction -- CRC - Flow control -- Allows everyone on the network to have a chance to transmit - Adjacent node traffic control - Duplex - Half-duplex - Full-duplex
Receiving NIC Adapters
- Looks for errors - Extracts datagram and passes to higher layer protocols
Token passing
- Nodes with a token are the only nodes in the network that are allowed to use the link - token has a ttl - when a node has finished transmitting it passes the token to another node on the network - Token passing has token overhead -- Nodes will wait forever to transmit if a node fails to relinquish control of a token
Multiple access links
- Point to point -- Dial up - Broadcast -- Shared RF; Satellite, wifi. -- Shared wire
Taking turns
- Polling - Token passing
2D parity
- Put all data segments into a matrix. - Horizontal parity check - Vertical parity check - if an error is detected then parity will be off in two dimensions and single bit error can be corrected
MAP Protocols
- Random access - Taking turns - channel partitioning
ALOHA
- Random access protocol - When information is received from the higher protocol layers transmit it immediately - Huge chance of collision - maximum successful usage of the line is 18%
Slotted Aloha
- Random access protocol - all frames in traffic through the node are the same size - Allocated time frame for nodes to begin sending - Nodes are synchronized - All nodes aware of collisions occurring - best case usage of line 37% - when nodes' transmissions collide then nodes send jamming signal and cancel transmission, they wait until next sequence and then have a probability to send again.
Random access protocols
- When a node has a packet to send, attempt to transmit the node at band rate. - No co-ordination among nodes - Nodes don't attempt to avoid collisions but try to recover from them -- collision detection -- collision correction
Polling
-Master node controls slave nodes transmissions -Slave nodes have no processing and just follow instructions -Single point of failure for the connection if master node drops - sub par latency - Violates decentralized node transmission ideal.
Ideal MAP
1. When a single node wants to transmit it is able to use the entire available bandwidth, R 2. When more than one node, M nodes, wish to transmit they can transmit at an average rate of R/M 3. Fully decentralized -- No special transmission controller node -- No clock synchronization. 4. Simple
Switch filtering algorithm
1. record frame destination and source 2. index table using mac destination address 3. if (entry found for destination){ if(entry destination same as source){ drop }else{ send to destination mentioned in frame }else{ flood network }
Packet switching calculation example
1Mbit/s link Each user requires: • 100kbit/s when active • 10% of the time Circuit switching (dedicated lines) • Max 10 users Packet switching • p(user is active) = 0.1 ○ What is the probability that a user is active • Out of 35 users 1 user is transmitting. whats that probability ○ P(active) = 0.1 ○ P'(active) = 0.9 ○ (0.1)1 * (0.9)34 = 0.00278 • What is the probability that any one of those 35 users are transmitting and the remainder are not ○ 35 * 0.1 * 0.9^34 = 0.097 • What is the probability that 11 or more users are active at any time ○ ∑35_(i=11)^35▒〖(35¦i)∗(0.1)^i∗(0.9)^(35−i) 〗 = 0.0004
Internet
A network of networks. -hosts -Communication links -packet switches
Protocols
A protocol can be analogous to a human protocol a defined format and order among transactions. -Human protocol: A:Hi B:Hi A:got the time? B:2:00 -Machine protocol: A:TCP request connection B:TCP connection response A:Get site B:<file>
ARP
Address resolution protocol - Each node on a network has an arp table -- Arp tables map MAC addresses to IP addresses -- IP address; MAC address; TTL - TTL(Time to live) is the time that the mapping will remain in the table before deletion -- A mappings TTL will be renewed when a connection to the node holding the table is made from that attribute -- 20 minutes by default - network layer
HTTP response
All responses contain a status code in the first line -200 OK -301 Moved permanently -400 Bad request --Request message not understood -404 File not found -403 Access denied -505 HTTP version not supported
Internet protocol stack
Application layer -FTP, SMTP, HTTP -message Transport layer -TCP, UDP -segment Network layer -IP, ARP, DHCP -datagram Link layer -Ethernet, PPP, WEP -frame Physical -Bits on the wire
Physical media
Bit -Propagates between transmitter and receiver Physical link -Actual cable connecting two nodes
Content provider networks
Bypassing teir-1 isps providing data directly to their customers.
CSMA
Carrier sense multiple access - Wait for line to be idle then transmit - If multiple nodes realize that the channel is idol then they can still transmit simultaneously - When a collision occurs entire packet delivery time is wasted
CSMA/CD
Carrier sense multiple access w/ collision detection - Same as CSMA but more - Collision detection -- easy in wired lan can detect signal strength -- harder in wireless lan since transmissions further away can be masked by closer signals - Binary exponential back off -- every time a collision occurs double the time till re-transmit. - efficiency = 1/(1+(5*Tprop)/Ttrans) - Better performance than ALOHA
Cookies
Cookies help make the illusion of state -Cookies sent by client in the http request header
CRC
Cyclic redundancy check - View data as a binary number, D - a generator is chosen heuristically, G -- Generator must be r+1 bits long -- Both the sender and receiver know what G is - Divide D*2^r by G -- Calculating R requires you to multiply D by 2^r - Can detect all burst errors less than r+1 length.
Error detection/correction
Cyclic redundancy check (CRC) Data is divided by a generator known to the sender and receiver. Parity Data inside of the frame is cut up into sections of size d, at the end of every section a single bit is added. - Even parity - Odd parity - 2D parity
Circuit switching
Dedicated lines connecting two hosts. Allows for full throughput through connection -Common through telephone lines
DSL
Digital subscriber line -Uses existing phone line to connect to a central office DSLAM (Digital service line access multiplexer) which organizes packets into messages that can be sent to the isp -~2.5 Mbps upstream -~24Mbps downstream
Hosts
End systems, running network applications
Addressing processes
Every process must have an identifier to receive messages. -Hosts have a singular ip address at a time, not enough flexibility since a host can run multiple processes therefore we need ports too.
FTP protocol
File transfer protocol
FDMA
Frequency division multiple access - Channel partitioning - channel divided into multiple frequency bands - unused transmission bands idle - not time sensitive - each node uses its own frequency band
Cable network
Frequency division multiplexing: different channels transmitted on different frequency bands -HFC, Hybrid fiber coaxial --Asymmetric: up to 30Mbps downstream transmission rate, 2Mbps upstream transmission rate -No Administration office to split voice from data.
Network edge
Hosts -Clients and servers
HTTP
Hypertext transfer protocol Web application layer protocol. Client server model. Clients: -Browsers that requests and receive objects to display Server: -Sends objects in response to requests -Uses TCP on port 80 -Stateless, server maintains no information about past requests Can either be persistent or non-persistent: -Non-Persistent --Client downloads webpage 1st then sequentially downloads all objects --Multiple tcp connections are made -Persistent --Server leaves connection open after sending response --Client sends request as soon as it see's a referenced object
Collision
If a node receives two or more signals at the same time. Data from both transmissions interfere and information is corrupted
Network core
Interconnected routers that form networks, and connections between networks -Routing -Forwarding
Application layer sockets
Interface between a processor in a computer network -any in/outbound message from the application layer must be done through a socket
IXP
Internet exchange point
Packet transmission delay
L/R = Time needed to transmit L-bit packet = packet transmission delay
MAC
Media Access Control - Unique to every host - Companies that produce devices capable of net communication buy MAC address ranges from IEEE. - 48 bit -- split up into 6 8bit chunks, consisting of 2 Hexadecimal numbers(4bit words) - Flat. The same everywhere.
MPLS
Multi protocol label switching - avoids complex lookups in routing tables -- uses fixed length identifiers as opposed to shortest prefix - keeps ip address - implements traffic engineering -- Has precalculated backup routes - MPLS routing decisions can differ from IP - MPLS is protocol independent and allows the use of multiple network layer protocols in a network.
teir-1 isps
National and international coverage -Sprint -AT&T -NTT
NIC
Network interface card - Outside of CPU - Contains hardware and firmware - Consists of a controller attached to a physical wire link
VLAN
Port based - Acts as if it were multiple physical devices - communications between two VLANS on the same switch must still be done through a router or switch -- even though they're on the same device - traffic isolation -- frames destined for one host on a VLAN can not be sent to the other VLAN - Trunking -- One of the ports in a vlan can lead to another physical switch which contains further isolated links for this vlan -- Allows the spanning of multiple switches
Client process
Process that initiates communication -Rules governed by hosts operating system
Server process
Process that waits to be contacted -Rules governed by standardized operations over local network
Process
Programs running within a host
Web caches
Proxy servers Store website content for commonly browsed sites, common in institutes. -Caches act as servers and clients, requesting data from the net and waiting for requests from clients. Conditional Get, Don't sent get message to net unless cache version is out of date:
Unguided media
Radio: -Signal carried in the electromagnetic spectrum -No physical media -bidirectional -interference -Terrestrial microwave --45Mbps -Lan --54Mbps -3G --~3-4 Mbps -Satellite --45Mbps channel --270 msec delay
Packet switching
Router makes a queue of packets from hosts trying to transmit through it. Packets are interleaved and transmitted appropriately. -Packets will be dropped if buffer overflows. Binomial formula
Wireless Access networks
Shared wireless access network connects end systems to routers -Wireless lans --Within a building 40m radius -802.11b/g -54Mbps transmission rate -Wide-area wireless access --Provided by cellular provider --between 1 & 10Mbps
TDMA
Time division multiple access - Channel partitioning - Divides timeframe into slots which repeats -- slot length = transmission time - nodes connected to this node will have designated slots to transmit - unused slots go idle
TCP
Transmission control protocol -Reliable -flow control -congestion control -connection-oriented --Overhead for setup and tear-down
Guided media
Twisted pairs: -Two wires with one way current -1000Mbps - 1Gbps Coaxial cable -Goes in both directions -broadband Fiber optic cable -Glass fiber carrying high speed pulses -Super high speed -low error rate -dozens or hundreds of Gbps
HTTP request
Two types of http messages; request and response. GET: -Requests a page -Host requests data for a page POST: -Host transmits data to server containing information HEAD: -Asks server to omit certain parts of data PUT: -Uploads file in entity body DELETE: -Deletes the files specified in the url feild
UDP
Universal datagram protocol -Unreliable data transfer -No flow control --Fire and forget -No overhead, much faster
Enterprise access networks (Ethernet)
Used by companies -10Mbps, 100Mbps, 1Gbps, 10Gbps transmission rates -Most end systems typically connect into an Ethernet switch
Packet transmission
When we send data we cut it up into smaller packets. On the way they pass through all these routers which determines where the packets are going. At every router there is a potential to be delayed because • The headers have to be read • They have to be redirected to the correct router • There is a buffer queue in a router ○ This queue is used if packets are received faster than they are sent ○ If the routers buffer is full packets will be lost
Access networks
Wired or wireless connection to network core
Four sources of packet delay
d_nodal = d_proc + d_queue + d_trans + d_prop d_proc -Nodal processing -Checking bit errors -Routing output link -Typically <msec d_queue -Queuing delay -Time waiting at output link for node to transmits packet in queue -Depends on router congestion -if (L*a)/R > 1 then the average queuing delay can be infinite. where "a" is the average packet arrival rate d_trans -Transmission delay -The delay taken to transmit the bits of information in the packets (d_trans = L/R) d_prop -Propagation delay -Physical time taken for electrons to transmit through material