You are on page 1of 25

Chapter 1 Elements of a network

4 elements of a network: • Rule • Medium • Messages • Devices Network connections can be wired or wireless. At some point wireless networks are connected to wired ones. network mediums • copper: electrical signals - twisted pair telephone cable ‣ category 5 Unshielded Twisted Pair (UTP) - coaxial cable • optical fiber: light signals • wireless (earthʼs atmosphere/ space): microwaves Industry standard = TCP/ IP (Transmission Control Protocol/ Internet Protocol) Specifies formatting, routing and addressing for delivering messages.

Service World Wide Web (WWW) E-mail

Protocol HTTP (Hypertext Transport Protocol) SMTP (Simple MaiL Transport Protocol) POP (Post Office Protocol) XMPP (Extensible Messaging and Presence Protocol) OSCAR (Open System for Communication in Realtime) SIP (Session Initiation Protocol)

Instant Message (Jabber, AIM)

IP Telephony

- Messages are converted into binary code before they are sent to a destination. - Network Interface Card: generates electrical signals to represent bits, places them on # # # medium - Bits arrive at first network device Router: joins two or more networks, passes information from one network to another. Ensures that a message goes to its destination in the quickest en most efficient way. - Destination device converts bits back to a readable message.

Charlie Misonne


Converged network: a network allowing voice, video and data over the same IP network. # # # In the past those were separate.

Network architectures characteristics • Fault tolerance Limiting the impact of HW/ SW failure and quick recovery path fail -> routing over different link - Connection orientated = circuit switched (telephone) - Packet switched • Scalability The ability of expanding and adding new users quickly The internet is a network of networks, each level can be extended. Internet service providers cooperate to make this possible. • Quality of service - The guarantee of a certain performance level, in accordance with requests from the application program. - Managing packet loss and delay. - Prioritize packet types: in each environment different types get different priority • Security The secureness of exchanging confidential and private information - Infrastructure: physical securing of devices, preventing unauthorized access to network management software. - Content: Protect content of packets and stored information. Goals: - Ensuring confidentiality Allowing only the authorized recipients (user authentication, strong passwords) - Maintaining Communication Integrity Assuring that data has not changed during transport (digital signatures, gashing algorithms, checksum) - Ensuring availability Data must be always accessible to authorized users. Preventing denial of service attack (DoS), prevent virus attacks. (firewall, server and PC anti virus)

Charlie Misonne


Increases reliability. When a path is congested. a part of the packets can take another way. Components Devices: HW of network . do not change content Media: Connects devices Services: SW running on network devices terms: WAN (Wide Area Network) LANʼs separated by geographic distance are connected by a WAN Internetwork Global mesh of interconnected networks (example: internet) Intranet Private connection of LANʼs and WANʼs belonging to an organization NIC (network interface card) or LAN adapter Provides connection to the physical layer for a host Physical port connector on network device where media is connected to other device Interface Specialized port on internetworking device that connects to individual network Protocols suite Group of inter related protocols (rules of communication) Charlie Misonne 3 .Divide data in smaller packages . client or both .intermediary device ensure data flow.end devices = hosts hosts can act as server. only that part has to be sent again.Different conversations can be interleaved on the network = multiplexing . When a part doesnʼt arrive.Chapter 2 segmentation .

example: TCP/IP Reference model: Provides reference for maintaining consistency within all types of # # protocols and services. assign appropriate address. select best path. How signals are sent over media. Data Link 1. multi-use. Transport TCP/IP Application Represents data to user Encoding. Error recovery. Network Access Protocol Data link management and physical transmission of data on the media.7 provide functionality to end user applications OSI 7. Divides HTTP message in smaller pieces (segments). Presentation 5. multi-vendor networks. how they are interpreted by receiving clients. IP (Internetwork Protocol) Taking formatted segments from TCP. dialog control PDU (protocol data unit) Data Transport Communication Segment between diverse devices on different networks Choses best path Controls devices and media Packet Frame 3. Layered Model Helps in the design of complex. Control size and rate at which message are exchanged.TCP Manages individual conversations between web servers and clients. Network 2. Session 4. Application 6. example: OSI Encapsulation process 1 .2 procedures to access media 1 send data over network 3 Address message for routing through network (IP in TCP/IP suite) 4 individual conversations between sender/ receiver. encapsulate them into packets. acknowledgment. sequencing (TCP and UDP in TCP/IP suite) 5 . Protocol model: Closely matches structure of particular protocol suite. Physical Internet Network Access Bits Charlie Misonne 4 . Take packets from IP and format them to be transmitted over media.

Network addressing Each OSI layer adds addressing information in the headers OSI layer Physical Data Link Added info Timing and synchronization bits Destination and source physical addresses Destination and source logical addresses Destination and source process number (ports) refers to end device in single local network MAC address refers to one local network IP address contains info about where host is located Process/ service running on receiver that will act on data. Defined by Port number Network Transport Session Presentation Application Encoded application data Charlie Misonne 5 .

network spooling Making provisions for applications and services Client server model protocols describe format of requests and responses. they listen for requests. Application Layer Protocols • DNS (Domain Name Service Protocol) Resolve internet names to IP addresses • HTTP (Hypertext Transfer Protocol) Transfer files that make up web pages • SMTP (Simple Mail Transfer Protocol) Transfer of mail messages and attachments • Telnet Provide remote access to servers and network devices • FTP (File Transfer Protocol) Interactive file transfer between systems Application Layer Software Network Aware Applications Implement Application layer protocols and are able to communicate directly with lower layers. Charlie Misonne 6 . Running in the background. Send appropriate message after request. may also require control information such as authentication and identification server runs a daemon. web browsers Application Layer Services Programs needing assistance of application layer services to use network resources Example: file transfer. Example: mail clients.Chapter 3 Application Layer Functionality and Protocols Application layer Provides interface between applications used to communicate and the underlying network Presentation Layer Conversion and encryption of data and decrypting when arriving Session Layer Maintain connection between source and destination application.

Peer-to-peer model P2P network Two computers connected in a network can share resources without a dedicated server Every end device can be server or client at the same time Decentralization of resources on a network User accounts and access right must be set individually on each device P2P applications Allows a device to act as server and . but once connected the communication takes place between the two peers only. Every server is a client and vice . . Hierarchical system Top level domains represent country or type of organization. It can also help connect. Sometimes with an index server showing the location of the required resource stored on another peer. Lower level refer more specifically Charlie Misonne 7 .org . Application Layer Protocols and Examples DNS Services en Protocol DNS uses a distributed set of servers to resolve the domain names associated with numbered IP addresses DNS is a special client/server service. The ISP usually provides the DNS addresses to use for the DNS servers..

subnet mask. Uses authentication and encryption. When a host powers down or is taken away the address goes back to the pool for availability. Computers may run their own MTA when sending email in a same company FTP 1. also transfer between MTA E-mail server operates two separate processes • Mail Transfer Agent (MTA) for forwarding (routing) emails when destination mailbox is not on this server • Mail Delivery Agent (MDA) Mail is passed to MDA when destination mailbox is on current local server can also resolve final delivery uses such as virus scanning and spam filtering Other email systems are Lotus Notes (IBM). Server sends HTML code Browsers converts HTML code to formatted page GET: client request for data POST: incudes data in the message sent to the server PUT: uploads data to the web server HTTPS (secure): used for secure POST and PUT.WWW service and HTTP URL: Uniform Resource Locator URI: Uniform Resource Identifier Exchange (Microsoft) Alternative to MUA is web browser for some email Using HTTP browser sends GET request to server and asks the right HTTP (protocol scheme) 2. www. web-server.htm (specific file name requested) DNS server returns numeric address. gateway to devices on a network DCHP choses address from a pool of addresses and leases it to a host for a set period. Client opens second connections to server for data traffic Data can be downloaded (pull) and uploaded (push) by the client DHCP (Dynamic Host Configuration Protocol) service automates dynamic assignment of IP (server name) 3. Charlie Misonne 8 . Client opens connection to server for control traffic 2. Groupwise (Novell).htm 1. E-mail services and SMTP/ POP protocols POP: for receiving emails by a MUA (mail user agent) SMTP: sending emails by a MUA.

Discover: broadcast to identify any available DHCP server Offer: lease offer message with an assigned IP address. Mac can also share with SMB P2P and Gnutella Protocol Making files on hard disk available to others for downloading with a Gnutella client. Back to # # discover Before the lease expires a new request must be sent. client uses Telnet client With Telnet connection users can perform any authorized function on the server Does not support encryption! For this. Telnet services and Protocol VTY (Virtual Terminal) = connection using Telnet Using software to create virtual device that provides same features of a terminal session with access to the server command line interface (CLI) Server runs Telnet Daemon. DNS server. File Sharing Services and SMB Protocol SMB (Server Message Block) = long term connection to server used in Windows UNIX OS can share with Windows using SAMBA. default gateway. Secure Shell (SSH) is the secure alternative Charlie Misonne 9 . duration of lease Request: client got multiple offers. return ACK message acknowledging the client that # # the lease is finalized # # If offer is no longer valid: returns NAK (negative acknowledgement). # subnet mask. broadcast packet identifying chosen server and lease # offer Acknowledge: when offer is still valid.

theyʼre sent as best effort used for: DNS. video streaming. Segment overhead of 20 bytes. Reassembling segments Reassemble segments to the original data stream. (VoIP. VoIP TCP (Transmission Control Protocol) Connection orientated. same order delivery and reliable delivery. Flow control. Charlie Misonne 10 . web pages. provides for low overhead (8bytes) data delivery. used for: data transfer. Pieces are called datagrams. useful for the application layer. IP telephony) TCP and UDP UDP (User Datagram Protocol) Connectionless. Identifying the applications Assign an application identifier (port number) Controlling the conversations • • • • • Segmentation and Reassembling Establishing a session Reliable delivery (resend lost/ corrupt data) Same order delivery (number and sequence segments) Flow Control (reduce data flow when too much) Supporting reliable communication Not all applications need reliability. e-mail Port Addressing IANA (Internet Assigned Numbers Authority) assigns addressing standards under which port numbers.Chapter 4 Transport Layer Prepares application data for transport over the network and processes network data for use by applications Roles of the transport layer Responsibilities Tracking individual conversations Maintain the different communication streams between applications on different end devices Segmenting Data Prepare data to be sent across the media in manageable pieces (segments) Adding a header to each piece of data to indicate to which communication it is associated.

Divide and Conquer TCP and UDP handle this differently TCP Each segment header contains a sequence number allowing the destination host to reassemble the segments in the order they were transmitted UDP No sequencing.Communicating with Reliability TCP is reliable thanks to connection oriented sessions. The destination sends acknowledgments for the segments it receives.Well know ports (0-1023) for services and applications Registered Ports (1024-49151) for user processes or applications (installed by user) Dynamic or Private Ports (49152-65535) Ephemeral Ports assigned dynamically to client applications when establishing connection Segmentation and Reassembly . Three-way handshake for establishing TCP connection Charlie Misonne 11 . The transport layer initiates a process to create connection with the destination. elsewhere the source retransmits the lost segment after a time. data may arrive in an incorrect order The TCP protocol .

TCP Acknowledgment with Windowing Charlie Misonne 12 .Two way handshake for finishing TCP connection TCP Segment Reassembly During session setup ISN (Initial Session Setup) is set. itʼs the starting value for a session. The sequence number is incremented by the number of bytes transmitted each time. This way missing segments can be identified.

. the flow can be controlled by reducing the size. Charlie Misonne 13 . UDP . no way to reorder datagrams UDP Server Processes and Requests UDP based server applications are also assigned Well Known or Registered port numbers.. Reliability Some applications can tolerate some loss of data (DNS. UDP Client Processes As with TCP the source port is randomly assigned.Low Overhead vs. So ACKʼs will be sent more frequently.) Connectionless: sessions are not established before sending data Does not keep track of sequence numbers. VoIP. DHCP..TCP Retransmission Handling segment loss: resend segments when no ACK was returned Flow Control TCP adjusts the maximum flow a network can handle without loss Window size = number of byte sent before ACK is expected Acknowledgement number = number of next expected byte When using dynamic windows size. online games.

Encapsulation Adds Network header to layer 4 PDU.Decapsulation Destination device controls if packet was addressed to this device The Network layer operates without regard of data and end application type.Best effort (unreliable): No overhead used for guaranteeing packet delivery.IP Source Address 32 bit binary value . Enabling QoS . . This prevents routing loops.Routing A packet must follow a path through different routers and other devices.Time-to-live (TTL) 8 bit binary value. Determines priority of packets. Decreased by at least 1 each time a packet is processed by a router. Indicates data payload type packet is carrying.Protocol 8 bit binary value. For enabling network layer to pass data to appropriate upper layer protocol. the PDU is now called a packet.Addressing Address end device with unique IPv4 number . .Chapter 5 OSI Network Layer IPv4 Communication from host to host 4 basic processes: . Network layer protocols IPv4 IPv6 Novell Internetwork Packet Exchange (IPX) Apple Talk Connectionless Network Service (CLNS/ DEC Net) Example Network Layer Protocol IPv4 basic characteristics .Media independent Types of media can however transport a maximum PDU size = MTU (Maximum Transmission Unit) Routers can fragment packets when too large Packet Header . Charlie Misonne 14 . Connection willing this can use TCP in layer 4.Connectionless: no connection is established before sending data . (hop). It contains source and destination address . When 0 packet is dropped. .IP Destination Address 32 bit binary value .Type-of-Service (ToS) 8 bit binary value.

Address management Hosts know the IPʼs in their own local network. gateways provide the addresses for hosts outside current network Charlie Misonne 15 .Header Checksum Used for error checking packet header . Indicating a fragment is not the last one of a packet.Header Length (IHL) Size of packet header .Separating Hosts into Common Groups Dividing networks Smaller networks called subnets due to a large amount of hosts.Security issues separating by user access rights .Performance degradation Dividing reduces traffic on internetwork ..Fragment Offset The order of packets to reassemble due to MTU fragmentation. Not allowing fragmentation. Packet will be discarded by router when fragmentation was necessary.Version IP version number (4) .By ownership .Options other rarely used things Dividing hosts into groups Networks . .Geographical . The division can be .Identification Identifying fragments of an original IP packet .By purpose Issues with large networks . . .More Fragments Flag (MF) 1 bit.Packet Length Entire packet size .Donʼt Fragment Flag 1 bit.

The gateway address is configured on each host A route . Packet is sent to network Using the default route 1. Router re-encapsulates packet 6. Keeping this up to date is not easy when the network structure changes.The Way Out of Our Network A packet with a destination outside the current network is sent to the gateway . second part host identifier Routers only need to know how to reach each network To split a network. Router checks router table for a match 4. Charlie Misonne 16 . not forwarded and not returned How Routes are Learned Static Routing Static routing means manually configuring the next hop addresses. Router checks router table for a match 4. Packet Forwarding . So the packet is send to the next hop router. How our Data Packets are Handled Supporting communication outside our network Gateways enable communication between networks A Gateway . Using it to determine where to send data The Destination Network default route (0. Used for forwarding packets for which there is no entry in the routing table.The Path to a Network routing table: table stored in memory of a router that keeps track of routes to network destinations. when there is/ are routing entries the most specific one will be used. Packet is sent to default gateway No Route Entry and No Default Route Packet is dropped.Moving the Packet Toward its Destination Next Hop Selection 1. Router extracts destination IP address 3.0. Router removes Layer 2 encapsulation 2. Router extracts destination IP address 3.0) : will match all destination networks. First part network identifier. host bits can be borrowed for extending the network portion. Network is found in the routing table 5. Router re-encapsulates the packet 6.Hierarchical Addressing IPv4 address: 4 groups of 8 bits.0. Network is not found in routing table -> but default route exists (gateway of last resort) 5. Router removes Layer 2 encapsulation 2.

Dynamic Routing Routing tables can be updated dynamically using protocols.Routing Information Protocol (RIP) .Open Shortest Path First (OSPF) Charlie Misonne 17 .Enhanced Interior Gateway Routing Protocol (EIGRP) . .

Broadcast.Types of communication Unicast: from one host to individual host Broadcast: from one host to all hosts in network Directed broadcast: to all hosts in specific network (non-local network) Limited broadcast: communication limited to local network Multicast: from one host to selected group of hosts a host can subscribe to a multicast group. all hosts in the network have the same network bits.0.255. Network address Refers to the network.4.0.255. Value between network and broadcast address. 8 host bits Unicast.0.. 10..0 to 255.0.0/24 -> 24 network bits. For research or experimentation from 244.0. Network prefixes Indicates the number of bits that gives the network portion 172. Host addresses: Different for each host. Reserved IPv4 Address Ranges Experimental addresses Reserved for future use.0.255 3.IPv4 IPv4 Addresses The anatomy of an IPv4 Address 32 bit address represented as dotted decimal format: 4 octets separated by dots Addresses for different purposes Types of Addresses in an IPv4 Network 1. 10.254 Charlie Misonne 18 . Lowest address in range. 10.129 or 10.29 .0.0. Highest address in range.0.16. Multicast . Broadcast address Refers to all hosts in the network.0.Chapter 6: Addressing the Network .0 2.

.0 /12) • /16) Addresses are not unique among outside networks.0.255 ( (172.255 # # for multicast across internet .0 to to 192.168.0.reserved link local: /8) • 172. Charlie Misonne 19 . Time to live is always 1.255 divided in: .1.255 (10.0 to 10.0 to Network address translation (NAT) Translates private to public address to have access to Internet.16.0.globally scooped: 244.(administratively scooped addresses) Public and Private Addresses Private addresses • 10.0 to to 244.0.Multicast addresses from # # for multicast on local network. Implemented on device at the edge of private network Public addresses Used for hosts publicly accessible from Internet.0. Used by host to redirect to itself (127.255. System abandoned in 1990ʼs Now we use classless system Charlie Misonne 20 . to 127.0.Special IPv4 Addresses Network and broadcast address Default route 0.255 Automatically assigned to local host by the OS when no IP configuration is available.2.0.0 to 192.255 Teaching and learning purposes but devices will accept them in LAN configuration (not internet) Legacy IPv4 Addressing Historic Network Classes Historically unicast ranges were grouped into classes ** All zeros(0) and all ones(1) are invalid host addresses Limits to the Class-based system Wasted many addresses.0 Loopback 127.0.255 is reserved) Link-Local addresses TEST_NET Addresses 192.0 to 169. less availability of IP addresses.254.

Middle East. Who Assigns the Different Addresses? An organization wishing to have host accessible to the Internet must have a block of public addresses assigned.Assigning Addresses Planning to Address the Network The allocation of addresses must be planned for the purpose of: . address returns to pool after disconnection. Including host IP.Providing and Controlling Access . Addresses for Intermediary Devices Should also have static IP. Global Regional Internet Registries Charlie Misonne IANA AfriNic Africa APNIC Asia/ Pacific LACNIC Latin America and Caribbean ARIN North America RIPE NCC Europe. Routers and Firewalls Should have highest of lowest IP address in range. Internet Assigned Numbers Authority (IANA) The master holder of IP addresses. subnet mask and default gateway.Monitoring Security and Performance If there are more devices than available public addresses. the devices that directly connect require a public address or with the use of NAT service sharing a public address. Central Asia 21 .Preventing Duplication of Addresses . Static or Dynamic Addressing for End User Devices Addresses for User Devices Static or dynamic IP assignment Static Assignment of Addresses Network admin manually configures network info for a host. Addresses are leased for a period of time. Addresses for Hosts that are Accessible from Internet Devices providing network resources should have a static IP. Dynamic Assignment of Addresses Witch DHCP. This use is regulated. and address pool contains a block of addresses for assigning IPʼs to hosts. Assigning Addresses to Other Devices Addresses for Servers and Peripherals Resources such as printers and servers should always have a static IP.

Most ISPʼs are from this type. ISP services To get access to the services we connect our data network using an ISP. QoS mechanisms • Authentication and privacy capabilities . Also provides DNS service. Creating expanded addressing capabilities was the most integrate security IPv6 is not merely a new Layer 3 protocol . Overview of IPv6 In 1990ʼs the Internet Engineering Task Force (IETF) was worrying about the exhaustion of IPv4 addresses.for increased scalability/longevity and improved packet handling • Flow labeling capability . They began the development of IPv6. They have IT resources the operate own services such as e-mail. advantages for customers: speed and reliability Tier 2 Focus on business customers. Charlie Misonne 22 .. Focus on retail and home markets. ISP Tiers ISPʼs are designated by hierarchy based on level of connectivity to the Internet backbone Tier 1 Large national or international ISPʼs directly connected to Internet is a new protocol suite. . Tier 3 Purchase their internet service from tier 2. it also impacts the underlying expand addressing capabilities • Header format simplification . Due to the increased size of the header.ISPʼs The Role of the ISP An ISP rents IP addresses to organizations/ improve packet handling • Improved support for extensions and options . Other issues were also considered: • Improved packet handling • Increased scalability and longevity • QoS mechanisms • Integrated security IPv6 offers: • 128-bit hierarchical addressing . New routing and messaging protocols were developed. e-mail and website.

A subnetmask 255.255.Determining an acceptable route for an incoming packet .Determining if packet must be send to host in LAN or to gateway Calculating Addresses Basic subnetting Subnetting allows to create multiple logical networks. Formula for calculating number of subnets 2n = # subnets (n = # borrowed bits) Formula for calculating number of hosts 2n . ANDing .255. Host 192 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 Subnet (/16) 255 255 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Network 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 192 0 0 0 Reasons of using AND . We can now make 2 subnets.0 becomes 255.255.Defining the Network and Host Position The prefix and the subnet mask are different ways of representing the same thing: the network portion of an address.2 = # hosts (n = # bits left for hosts) Charlie Misonne 23 . Itʼ created by placing a 1 at each bit position of the network portion.Is it On my Network? The Subnet Mask . a 0 at each position of the host portion.255. By borrowing host bits and use them as network bits. ANDing between subnet mask and address gives the network address.128 when we use 1 bit of the host portion as network bit.What is In Our Network? AND is used for determining the network address to which a host is associated.

Continue with the next largest subnet. if possible make a subnet of a subnet to spare network addresses.Subnetting . VLSM Chart A tool for address planning with splitting subnets.Subnetting a Subnet Using VLSM (Variable Length Subnet Mask) we are able the make subnets of a subnet. Maximizing addressing while minimizing waste Getting More Subnets for Less Hosts When subnets donʼt need a large amount of hosts we can make subnets of a subnet leaving the other subnets available for future networks. start with the one requiring the most hosts. Chose the right prefix. When a number of subnets have to be made. Charlie Misonne 24 .

Testing the Local Stack Ping is a utility for testing IP connectivity between hosts. returning address 2nd router. time between request and reply is measured. Pinging the Local Loopback (127.. TTL gets incremented by one next time. First packet gets TTL 1. returning the address of first router. Until the destination is reached. Testing the Network Layer Traceroute (tracert) .0.Testing the Path tracert allows to observe the path between hosts. The messages provide feedback about issues related to the processing of IP packets under certain conditions.Testing Connectivity to the Local LAN Using Ping to test ability to communicate on the LAN. Ping Gateway . Sends out request for responses from specific host address. Uses ICMP Echo Request Datagram. ICMP messages are not required and often not allowed for security reasons. Gets respond: ICMP Echo Reply Diagram. Ping Remote Host . Round Trip Time (RTT) The time a packet takes to reach the remote host and for the response from the host to return. Time to Live (TTL) Used to limit the numbers of hops a packet can cross. ICMP messages may include: • Host confirmation • Unreachable Destination or Service • Time exceeded • Route redirection • Source quench Charlie Misonne 25 .Testing Connectivity to Remote LAN Using Ping for testing ability to communicate over Internetwork..1) Response indicates that IP is properly installed on the host.0. This provides the trace of with the address of each hop. Pinging a host on a remote network.The Protocol Supporting Testing and Messaging IPv4 is not reliable but provides messages for error checking called “Control Messaging Protocol”.1 .0. It is used by Ping and tracert.Testing the Network Layer Ping 127. ICMPv4 . Generally done by pining the gateway because the router is normally always operational.Uses a layer 3 protocol part of TCP/IP suite called Internet Control Message Protocol (ICMP). .0.