CCNA Study Guide Logo
Showing posts with label Describe how a network works. Show all posts
Showing posts with label Describe how a network works. Show all posts

Monday, August 23, 2010

1.4 Common TCP and UDP Network Applications

Before you continue reding this topic, please make sure you already understand our previous topic about OSI and TCP/IP Model.

In TCP/IP, a port is mecanism that allow a computer to have more than one session to communicate with other computer or other devices in internetwork. A port can identify a specific process to which a computer or other network message need to be forwarded when it arrives at a destination device.

A port number is 16 bit that will append to header of message unit. 16 bit mean 2^16 equal to 65536 ports (0 to 65535). Based on the protocol, port can be categorize to Transmission Control Protocol (TCP) and User Datagram Protocol (UDP).

So, what is TCP and UPD ?
  • Transmission Control Protocol (TCP)
    TCP is the transport level protocol that provides reliability and ordered delivery of stream. Major internet application rely on TCP, such as WWW, e-mail, FTP, etc.
  • User Datagram Protocol (UDP)
    UDP is a simple transmission model with no hand-shaking process for guaranteeing reliability, ordering, or data integrity. UDP provides an unreliable transmission, a datagrams may arrive out of order, duplicated, or can go missing without any notice to sender nor receiver. No error checking and error correction performed to avoiding overhead processing at network. UDP mostly used by time sensitive application that prefer dropping packet than waiting for delay (opposed to TCP transmission). Because of this nature, UDP is very usefull for servers that answer small queries from huge number of clients. Common application : Domain Name System (DNS), Voice over IP (VoIP), Trivial File Transfer Protocol (TFTP), etc.

Based on the numbering, TCP and UDP divided into 3 categories :
  • Well-known Port
    According to Internet Assigned Number Authority (IANA), well-known port numbers are port 0 to 1023. This list specifies the port used by the server or application process as its contact port.
  • Registered Port
    Range 1024 to 49151. These ports used by computer vendors for their applications and operating systems. Registered port also register to IANA.
  • Dynamically Assigned Port
    Range 49152 to 65535. These ports assigned by applications or operating system to serve request from clients/users.

There are many TCP and UDP ports number that can be found in IANA site. But lets make it easy, with some list of common TCP and UDP ports that you can find at table 1 below.

Table 1. Common TCP and UDP Ports
TCP
UDP
Port
Application
Port
Application
20
FTP Data
53
DNS
21
FTP Control
69
TFTP
22
SSH
161
SNMP
23
Telnet
25
SMTP
80
HTTP
110
POP3
443
HTTPS

You can find more common TCP and UDP ports by identifying your day to day basis application port number, such as Network Time Protocol (NTP), Remote Desktop, etc.

Tuesday, August 17, 2010

1.3 OSI and TCP/IP Model

The Open Systems Interconnection model (OSI model) defined by Open Systems Interconnection, while the Transmission Control Protocol/Internet Protocol (TCP/IP) model was created by Departement of Defense (DoD).

Lets take a look at OSI 7 layer model and comparison to TCP/IP model.

Table 1 – OSI Model Summary
Layer
Function Description
Sample Protocols/Technologies
7. Application Interfacing between communications software and any applications that need to communicate outside the computer. It also define proccess for user authentication.
HTTP, Telnet, DNS,DHCP, SNMP, FTP, TFTP, SMTP, POP3, NTP
6. Presentation Data representation (define and negotiate data formats),encryption and decryption.
SSL, Shells and Redirectors, MIME
5. Session Interhost communication. How to start, control, and end conversations (called session). An application can be notified if some of series of messages are completed. Allow presentation layer to have view of an incoming stream of data.
NetBIOS, Sockets, RPC
4. Transport End-to-end connections and reliability,error recovery, and Flow control
TCP and UDP, SPX, NetBEUI/NBF
3. Network Three main feature : logical addressing, routing (forwarding), and path determination. IP Address, routing protocols, and routing table belong to this layer
IPv4, IPv6, IP NAT, IPsec, ICMP, IPX, Routing protocols
2. Data Link Defines how data is formatted for transmission and how access to the network is controlled. This layer has been divided by the IEEE 802 standards committee into two sublayers: media access control (MAC) and logical link control (LLC).
IEEE 802.2 LLC, Ethernet Family; Token Ring; FDDI, IEEE 802.11 (WLAN, Wi-Fi),ATM, SLIP and PPP
1. Physical Media, signal and binary transmission. Refer to standard of physical characterstics of transmission medium such as connector, pins, use of pins, electrical currents, encoding, light modulation, and other rules about physical medium
Physical layers technologies (RS-232, Full duplex, RJ45, V.35,T1, E1, 10BASE-T, 100BASE-TX, POTS, SONET, SDH, DSL, 802.11a/b/g/n, etc

Table 2 will show you comparison of OSI model and TCP/IP model, also encapsulation at each layers.

Table 2 - OSI vs TCP/IP Model, and encapsulation at each layers
OSI Layer
TCP/IP Layer
Encapsulation Units
Encapsulation Proccess
7. Application 4. Application Data Data
6. Presentation Data Data
5. Session Data Data
4. Transport 3. Transport Segments TCP/UDP HeaderData
3. Network 2. Internet Packets IP HeaderTCP/UDP HeaderData
2. Data Link 1. Network Access Frames MAC HeaderIP HeaderTCP/UDP HeaderDataCRC
1. Physical Bits Transmit into Physical Media (Bit Format)

Talking about encapsulation, bits transmitted from sender over physical media, at the receiving device will de-encapsulated from bits into frames, and so on untill arrived at Application layer.

Please find Sample CCNA exam (OSI and TCP/IP Model) to check if you already understand this material.

Thursday, August 12, 2010

1.2 Devices required to meet a network specification

As mentioned in section 1.1, we already knows something about router, switch, and hub, also bridge as addition in internetwork. Figure below shows how network look with all of those internetwork devices in place. Please note that left and right part of this figure are not commonly use this day (we can say that bridge and hub are old technology). Typical network this day can be found in middle part (switch 1, 2, and 3).

Devices required to meet a network specification
Figure 1

Remember that a router will not only break up broadcast domain in every LAN interfaces, but also it will break up collision domain as well.

Notice that we use bridge, it break up collision domain, operate similary with switch. Hub does not break up collision domain, we can say that every devices connected to hub belong to the same collision domain.

The best network connected to the router is the LAN switch network in the middle. Why ? Because each port on switch has its own collision domain. Well, we still can enhance this LAN switch in the middle. Since its still belong to the same broadcast domain, it can turn into bad thing. Imagine if the broadcast domain too large, so all devices must listen to all broadcast transmitted, the users then have less bandwidth and require to proccess more broadcast, as result network response time will slow. We can do enhancement by using separate VLAN (Vitual LAN) for each switches to meet bussiness requirement. For example Switch 2 using VLAN 100 to serve users in IT Departement, Switch 3 using VLAN 200 to server Accounting Departement. This will separate or break up broadcast domain, router still need for interVLAN communication.

Ok, let’s back to Figure 1 above ..
How many broadcast and collision domains are in this internetwork ?
Leave your answer in comment box below .. C U..

Tuesday, August 10, 2010

1.1 Sample CCNA exam (Describe how a network works)

This sample CCNA exam intend to review your knowledge about segment 1.1 Describe the purpose and functions of various network devices on Cisco CCNA 640-802 exam blue print. So, did you know already ?

Questions :
  1. What is biggest benefit of using switch instead hub for network connectivity in LAN ?
  2. Explain true characteristics regarding the use of hubs and switches ..
  3. Mention functions of a router ..
  4. Network devices : switch, hub, bridge, and repeater. Categorise those network devices based on what OSI layer they operate ..
  5. Giving device capabilities : Allowing simultaneous frame transmissions and Filtering frames based on MAC addresses. What device has both capabilities ?
  6. Network administrator want to replace a hub on LAN with switch, what two results would occurs ?





Answers :
Please read archive with tag/label Describe how a network works for detail explanations.
  1. The biggest benefit of using switches instead of hubs in your internetwork is that each switch port is actually its own collision domain (we can say switch increase the number of collision domains). Hub creates only one large collision domain
  2. Please find the drawbacks of Hub and advantages of Switch
  3. Basicly, function of the router are to interconnecting networks by selecting best path (routing/path selection) for a packet to travel, and forward packet (packet switching) to outgoing interface using best path in routing table. As an additional feature, routers are capable of providing filtering on a network address and application port level (Access Controll List).
  4. Layer 1 devices : hub and repeater.


    Hub actually performs OSI layer 1 functions, repeating an electrical signal. Repeater does not interpret what the bits mean, but does examine and generate electrical signals, a repeater is considered to operate at Layer 1.
    Layer 2 devices : bridge and switch.
    Both bridges and switches operate at the second layer of the OSI model, rocessing and forwarding frames from the data-link layer. Bridges are software based and switches are hardware based. Switches have more ports than bridges. Both ridges and switches forward frames based on MAC addresses.
  5. Switch

  6. The number of broadcast domains would remain the same, the number of collision domain would increase

Sunday, August 8, 2010

1.1 What is Collision Domain, Broadcast Domain, and How to Count Them

We have talked about collision domain in switch and hub. So, what is collision domain, broadcast domain and how to count them ?

What is collision domain and broadcast domain ?

Collision Domain is a group of Ethernet or Fast Ethernet devices in a CSMA/CD LAN
that are connected and compete for access on the network. Only one device in the collision domain may transmit at any one time, and the other devices in the domain listen to the network in order to avoid data collisions. A collision domain is sometimes referred to as an Ethernet segment.

Broadcast Domain, broadcasting sends a message to everyone on the local network (subnet). An example for Broadcasting would be DHCP Request from a Client PC. The Client is asking for a IP Address, but the client does not know how to reach the DHCP Server. So the client sends a DHCP Discover packet to EVERY PC in the local subnet (Broadcast). But only the DHCP Server will answer to the Request. Another simple example is if we have LAN segment 192.168.100.0/24, then we can say that all IP addresses range of 192.168.100.0/24 are in the same broadcast domain.

How to count Collision and Broadcast Domain ?

Please refer to post 1.1 Difference Between Switch and Hub for basic understanding about switch and hub.

Collision Domain on Switch :
Each connection from a single PC to a Layer 2 switch is ONE Collision domain. For example, if 2 PCs are connected with separate cables to a switch, so we have 2 Collision domains. If this switch is connected to another switch or a router, we have one collision domain more (3 collision domain in total). Please refer to figure 1.1.1.
Collision Domain on Switch
Figure 1.1.1. Collision Domain on Switch

Collision Domain on Hub :
If 2 Devices are connected to a Hub, this is ONE Collision Domain. Each device that is connected to a Layer 1 device (repeater, hub) will reside in ONE single collision domain. If a hub or repeater connected to a switch on LAN, the collision domain on LAN will remain the same. Hub or repeater just extend collision domain from switch’s port connected to it. Please refer to figure 1.1.2.
Collision Domain on HubFigure 1.1.2. Collision Domain on Hub

Broadcast Domain :
No matter how many hosts or devices are connected together, if they are connected with a repeater, hub, switch or bridge, all these devices are in ONE Broadcast domain (assuming a single VLAN). A Router is used to separate Broadcast-Domains (we could also call them Subnets - or call them VLANs). So, if a router stands between all these devices, we have TWO broadcast domains. Please refer to figure 1.1.3
Broadcast DomainFigure 1.1.3. Broadcast Domain

Saturday, August 7, 2010

1.1 Difference Between Switch and Hub

In this section we will discuss about difference between Switch and Hub (Switch vs Hub). Before Switch were introduced, Hub were standard device to interconnecting PC and/or another devices on Local Area Network (LAN).

Hub work in layer 1 at OSI Model. The drawbacks with hubs :
  • Hub is very simple device that accept a single data packet then sends it out to all the computers that are connected to it. Only one data packet can pass through the hub at a time and all the data must wait for its turn
  • When a hub receives a packet at one of its ports from a PC on the network, it transmits (repeats) the packet to all of its ports and, thus, to all of the other PCs on the network. This mean bandwidth was wasted because all traffic was sent to all ports
  • A lot of collisions, because a hub only have one collision domain on it’s device
  • If two or more PCs on the network try to send packets at the same time then a collision occur. When that happens all of the PCs have to retransmit with different time to resolve the conflict. The process is prescribed in the Ethernet Carrier Sense Multiple Access with Collision Detection (CSMA/CD) protocol

Here what switch do to overcome drawbacks of hub :
  • Switch work in layer 2 at OSI Model. Switches are capable of filtering frames based on any Layer 2 fields. For example, a switch can be programmed to reject (not forward) all frames sourced from a particular network. Furthermore, filters can be helpful in dealing with unnecessary broadcast and multicast packets
  • Supports simultaneous connections
  • Switches only sends traffic to the destination port for that traffic, saving bandwidth. This can be done because switches keeps a table of all MAC addresses traversing the switch and what port they are on (this table is called the bridge forwarding table or CAM table). If destination MAC address can’t find in its bridge forwarding table, the switch then flood or send that frame out to all ports. After destination MAC address found on one of its port, then this particular MAC address will add to bridge forwarding table, and next frame destined to this MAC will send out only to single port where this destination MAC exist
  • Single collision domain for each port. That why each device connected to the switch gets the full bandwidth of the switch port

Please refer to post 1.1 What is Collision Domain, Broadcast Domain, and How to Count Them, to get better understanding about collision and broadcast domain.

The biggest benefit of using switches instead of hubs in your internetwork is that each switch port is actually its own collision domain. (Conversely, a hub creates one large collision domain). But even we use a switch, we still can't break up broadcast domains. Neither switches nor hub will do that, router is the only device can do this kind of job. Switches and hubs can be equally efficient in processing frames, in theory. In practice, switches are generally more efficient as they usually have more CPU and memory allocated to them, and are generally much more expensive than a simple hub.

1.1 Router

Major network component : router, switch, hub, and bridge.

A router is a device that interconnects two or more computer networks. Basicly, function of the router are to interconnecting networks by selecting best path (routing/path selection) for a packet to travel, and forward packet (packet switching) to outgoing interface using best path in routing table. Routing or selecting best path in a router is only based on destination layer 3 address (IP), although this decision can be altered using source interface or source addresses, this method named Policy Based Routing (hopefully we can discuss this topic later).

A router operates in two operational plane (sub system) in order to accomplish those two basic functions of the router :
  • Control plane : where a router builds a table (called routing table) as how a packet should be forwarded through which interface, by using either statically configured statements (called static routes) or by exchanging information with other routers in the network through a dynamical routing protocol
  • Forwarding plane: where the router actually forwards traffic (called packets in IP) from ingress (incoming) interfaces to an egress (outgoing) interface that is appropriate for the destination address that the packet carries with it, by following rules derived from the routing table that has been built in the control plane.
As an additional feature, routers are capable of providing filtering on a network address and application port level (Access List).

Routers use destination IP address to forward packets, the path a packet takes is determined after a router consults information in the routing table. After router determines the best path, packet is encapsulated into a frame, frame is then placed on network medium in form of Bits. Vise versa proccess apply for de-encapsulation proccess. This (de-)encapsulation proccess will discuss more deeper in OSI 7 layer section.
 
© Copyright 2010. CCNA Study Guide. All rights reserved | CCNA Study Guide is proudly powered by Blogger.com | Template by o-om.com
Edited by CCNA Study Guide August 2010.