E&CE 358: Tutorial 1 Instructor: Sherman (Xuemin) Shen TA: Miao Wang Email: m59wang@uwaterloo.ca 1
About Tutorials TA: Miao Wang Office: EIT 3133; Tutorials: Th 4:30 5:20 pm Topics Supplementary knowledge to lectures Assignments Any other you want, tell me. 2
Roadmap OSI Model TCP/IP protocol model Network protocol analyzer 3
Layered Network Model Why layering? Extremely wide range of services. Phone, email, file transfer, multimedia streaming Business/industry critical functions (funds transfer, base update and query) Traditional radio and television Flexibility Grouping of communication function Adapt to future services 4
Open System Interconnection (OSI) Reference Model Layers 7 Application 6 Presentation 5 Session 4 Transport 3 Network 2 Data Link 1 Physical 5
Application Layer Layers 7 Application 6 Presentation 5 Session 4 Transport 3 Network 2 Data Link 1 Physical Network Applications Mail Web File Transfer Management Remote connections Datagram called Upper Layer Data/Message 6
Presentation Layer Layers 7 Application 6 Presentation 5 Session 4 Transport 3 Network 2 Data Link 1 Physical Context for communication between layers (format conversion) Encryption and decryption (security) Data Compression Datagram called Upper Layer Data 7
Session Layer Layers 7 Application 6 Presentation 5 Session 4 Transport User ID; Login for end-to-end transmission Duplexing, termination, restart Datagram called Upper Layer Data 3 Network 2 Data Link 1 Physical 8
Transport Layer Layers 7 Application 6 Presentation 5 Session 4 Transport 3 Network 2 Data Link Provides transparent transfer of TCP and UDP End-to-end connection Reliability Flow control Datagrams called Segments 1 Physical 9
Network Layer Layers 7 Application 6 Presentation 5 Session 4 Transport Provides connections between hosts on different networks IPv4 and IPv6 Routing of packets Datagrams are called Packets 3 Network 2 Data Link 1 Physical 10
Data Link Layer Layers 7 Application 6 Presentation 5 Session 4 Transport Provides connections between hosts on the same network Ethernet MAC address Datagrams are called Frames 3 Network 2 Data Link 1 Physical 11
Physical Layer Layers 7 Application 6 Presentation 5 Session 4 Transport Describe electrical and physical specifications for devices Bit movement Data is called Bits 3 Network 2 Data Link 1 Physical 12
A Summary of OSI Model Layers Description Datagrams 7 Application Allows user access to network, provide services to users. 6 Presentation Data representation, encryption and decryption, etc 5 Session Set up, maintain the session (connection), Login, etc. 4 Transport Reliable transmission of packets from source to destination (end to end). 3 Network Routing: guides the packet from source to destination 2 Data Link Reliable transmission from node to node 1 Physical Transmits raw bit stream over channel Upper layer Upper layer Upper layer Segment Packet Frame Bits 13
Protocol Reference Model of OSI Layers Application Presentation Session Transport Network Data Link Physical Data unit Data Data Data Segments Packet/ Datagram Frame Bit Data encapsulation and decapsulation a)header or trailer attached at each layer aim to perform certain functions at each layer. b) Headers are added while a unit is going down the stack at each layer. c) Each protocol on the different layer has its own format. 14
Protocols at Each Layer Layer Application Presentation Session Transport Network Data Link Physical Protocols Telnet, SMTP, HTTP, FTP, IMAP, POP3, SNMP MPEG, ASCII, TLS, SSL NetBIOS, SAP TCP, UDP IPv4, IPv6, ICMP, IPSec, ARP, MPLS MPLS, RARP, Ethernet, 802.11x, PPP, ATM, FDDI, Fiber Channel DSL, 10BaseT, 100BaseTX, ASK, PSK, FSK 15
TCP/IP Model (Transmission Control Protocol/Internet Protocol) 7 Application 6 Presentation 5 Application 5 Session 4 Transport 4 Transport 3 Network 3 Internet 2 1 Data Link Physical 2 1 Data Link Physical Network Interface Layer OSI Model Layers TCP/IP Protocol Model The application layer in TCP/IP is equivalent to the combined session, presentation, and application layers in the OSI model. 16
TCP/IP Protocol Model Application layer : responsible for providing services to the user. e.g., FTP, SMTP, Http, etc Transport layer : responsible for the delivery of application from source to destination. e.g., TCP(reliable delivery), UDP. Internet layer : responsible for the delivery of individual packets from the source host to the destination host. Main functions: forwarding and routing. e.g., IP, etc Data link layer: responsible for hop-to-hop (node-to-node) delivery Major duties: framing, flow control, error control, access control. e.g., Ethernet, 802.11(Wireless lan), etc Physical layer : responsible for movements of individual bits from one hop (node) to the next over a physical medium. It maps incoming bits from the link layer into signals appropriate to the channel. 17
Data encapsulation and transmission source segment packet frame MAC IP TCP H t H n TCP IP TCP application transport internet link physical MAC IP TCP link physical switch segment packet frame MAC IP TCP H t H n TCP IP TCP destination application transport internet link physical MAC IP H n TCP IP TCP internet link physical MAC IP TCP router 18
Communication at application layer A B Application Legend Source Destination D Data H Header Application Transport Network Data link Physical R1 R3 R4 Transport Network Data link Physical D5 D5 Message The unit of communication at the application layer is a message/. D5 D5 Message 19
Communication at transport layer Transport A Legend Source Destination D Data R1 R3 R4 H Header B Transport Network Network Data link Data link Physical Physical D4 H4 Segment The unit of communication at the transport layer is a segment. D4 H4 Segment 20
Communication at transport layer The port number is used in the transport layer header to indicate to which application that piece of is associated. Sequence numbers are assigned in the header of each segment to reassemble the segments into the original order. 21
Communication at the internet layer Legend Source Destination D Data H Header A R1 R3 R4 B Network Network Data link Data link Physical Physical D3 H3 Datagram The unit of communication at the internet layer is a gram/packet. The IP address of source and destination never change in transmission. D3 H3 Datagram 22
Communication at the internet layer Network layer receive the from the transport layer, ie., the segment, and add IP header to create the packet/gram. Network layer provides services to guide/direct the packet to the destination host. 23
Communication at the link layer Legend Source Destination D Data H Header A R1 R3 R4 B Data link Data link Physical Link 1 Link 3 Link 5 Link 6 Physical D2 H2 Frame D2 H2 Frame D2 H2 Frame The unit of communication at the link layer is a frame. D2 H2 Frame 24
Communication at the link layer Data Link layer protocols governs how to format a frame for use on different media ( e.g., copper, fiber, and wireless network media.). Different protocols may be in use for different media. (ethernet frame, 802.11 wireless frame, etc) 25
Communication at the physical layer Legend Source Destination Physical layer A R1 R3 R4 B Physical layer Link 1 Link 3 Link 5 Link 6 011... 101 011... 101 011... 101 011... 101 The unit of communication at the physical layer is a bit. For different physical medium, the physical layer might choose different techniques. 26
Communication at the physical layer The Physical layer controls how is transmitted on the communication media. The role of the Physical layer is to encode the binary digits that represent Data Link layer frames into signals and to transmit and receive these signals across the physical media - copper wires, optical fiber, and wireless - that connect network devices. It is also the job of the Physical layer to retrieve these individual signals from the media, restore them to their bit representations, and pass the bits up to the Data Link layer as a complete frame. 27
Network protocol analyzer Wireshark is the world's leading network protocol analyzer. It lets you capture and interactively browse the traffic running on a computer network. Let s use Wireshark to analyze the frames and understand how the layers work in real life. 28
Summary Layering TCP/IP protocol suite Network Analyzer: Wireshark 29