Tuesday, 11 October 2016

Internet Protocol (IP)

Each host in a network and all interfaces of a router have a logical address called the IP address. All hosts in a network are grouped in a single IP address range which is called its net or subnet and each host having a unique address from that range. Each network has a different address range and routers that operate on layer 3 connect these different networks.


As IP receives segments from TCP or UDP, it adds a header with source IP address and destination IP address amongst other information. This PDU is called a packet. When a router receives a packet, it looks at the destination address in the header and forwards it towards the destination network. The packet may need to go through multiple routers before it reaches the destination network. Each router it has to go through is called a hop.


The IP address fields in the IP header play a very important role in sending a data through different hops. In fact, IP addresses are so important in a network that the next Chapter is entirely dedicated to IP Address. Following is IPv4 header and its important fields:-


 ip-header


                Figure 1-12 IPv4 Header


 


There are two versions of the Internet Protocol(Version 6 and Version 4). Version 4 is the most used version in today networking. Figure 1-12 shows the header structure of IPv4. The following fields make up the header:-


Version 


IP version number. For IPv4 this value is 4.


Header Length


This specifies the size of the header itself. The minimum size is 20 bytes. The figure does not show the rarely used options field that is of a variable length. Most IPv4 headers are 20 bytes in length.


DS Field


The Differentiated Services field is used for marking packets. Different Quality-Of-Service (QoS) levels can be applied to different markings. For example, data belonging to voice and video protocols have no tolerance for delay. The DS field is used to mark packets carrying data belonging to these protocols so that they get priority treatment through the network. On the other hand, peer-to-peer traffic is considered a major problem and can be marked down to give in best effort treatment.


Total Length


This field specifies the size of the packet. This means the size of the header plus the size of the data.


Identification


When IP receives a segment from TCP or UDP; it may need to break the segment into chunks called fragments before sending it out to the network. Identification fields serve to identify the fragments that make up the original segment. Each fragment of a segment will have the same identification number.


Flags


Used for fragmentation process.


Fragment Offset


This field identifies the fragment number and is used by hosts to reassemble the fragments in the correct order.


Time to Live


The Time to Live (TTL) value is set to the originating host. Each router that the packet passes through reduces the TTL by one. If the TTL reaches 0 before reaching the destination, the packet is dropped. This is done to prevent the packet from moving around the network endlessly.


Protocol


This field identifies the protocol to which the data it is carrying belongs. For example, a value of 6 implies that the data contains a TCP segment while a value of 17 signifies a UDP segment. Apart from TCP and UDP, there are many protocols whose data can be carried in an IP packet.


Header Checksum


This field is used to check for errors in the header. At each router and at the destination, a cyclic redundancy check performed on the header and the result should match the value stored in this field. If the value does not match, the packet is discarded.


Source IP address – This field stores the IP address of the source of the packet.


Destination IP address – This field stores the IP address of the destination of the packet.

Transmission control protocol(TCP)

Transmission Control Protocol (TCP)


TCP is basically designed to the TCP/IP suite and hence the name of the model. When application layer sending a large amount of data, it sends the data to transport layer for TCP or UDP to transport it across the network. TCP first sets up a connection between the source and the destination in a process called three-way handshake. Then it breaks down the data into segments, adds a header to each segment and sends them to the Internet layer.


The TCP header is 20 to 24 bytes in size and the format is shown in Figure 1-9. It is not necessary to remember all fields or their size but most of the fields are discussed below.


tcp-header-trailer


             Figure 1-9 TCP header


When the Application layer sends data to the transport layer, TCP sends the data across using the following sequence:


Connection Establishment


TCP uses a process called three-way handshake to establish a connection with the destination. The three-way handshake uses the SYN and ACK flags in the Code Bits section of the header. This process is necessary to initialize the sequence and acknowledgment number fields. These fields are important for TCP and will be discussed in the following. 


tcp-syn


 Figure 1-10 TCP three-way handshake


As shown in Figure 1-10, the source starts the three-way handshake by sending a TCP header to the destination with the SYN flag set. The destination responds back with the SYN and ACK flag sent. Examine in the figure that destination uses the received sequence number plus 1 as the Acknowledgement number. This is because it is assumed that 1 byte of data was contained in the exchange. In the final step, the source responds back with only the ACK bit set. After this, the data flow can commence.


Data Segmentation


The size of data that can be transmitted across in a single Internet layer PDU is limited by the protocol used in that layer. This limit is called the maximum transmission unit (MTU). The application layer may send data much larger than this limit; hence TCP has to break down the data into smaller chunks called segments. Each segment is limited to the MTU in size. Sequence numbers are used to identify each byte of data. The sequence number in each header signifies the byte number of the first byte in that segment.


Flow Control


The source starts sending data in groups of segments. The Window bit in the header determines the number of segments that can be sent at a time. This is done to avoid irresistible the destination. At the start of the session the window in small but it increases over time. The destination host can also decrease the window to slow down the flow. Hence the window is called the sliding window. When the source has sent the number of segments allowed by the window, it cannot send any further segments till an acknowledgment is received from the destination. Figure 1-11 shows how the window increases during the session. Notice the Destination host increasing the Window from 1000 to 1100 and then to 1200 when it sends an ACK back to the source.


flow-control


Figure 1-11 TCP Sliding Window and Reliable delivery


 Reliable Delivery with Error recovery


 When the destination receives the last segment in the agreed window, it has to send an acknowledgment to the source. It sets the ACK flag in the header and the acknowledgment number is set to the sequence number of the next byte expected. If the destination does not receive a segment, it does not send an acknowledgment back. This tells the source that some segments have been lost and it will retransmit the segments. Figure 1-13 shows how windowing and acknowledgment are used by TCP. Notice that when the source does not receive acknowledgment for the segment with sequence number 2000, it retransmits the data. Once it receives the acknowledgment, it sends the next sequence according to the window size.


 Ordered Delivery


TCP transmits data in the order it is received from the application layer and uses the sequence number to mark the order. The data may be received at the destination in the wrong order due to network conditions. Thus TCP at the destination orders the data according to the sequence number before sending it to the application layer at its end. This order delivery is part of the benefit of TCP and one of the purposes of the Sequence Number.


Connection Termination


After all, data has been transferred, the source initiates a four-way handshake to close the session. To close the session, the FIN and ACK flags are used.

Sunday, 9 October 2016

Was this lawyer-turned-WWII-spy the basis for James Bond?

Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Temporibus autem quibusdam et aut officiis debitis aut rerum necessitatibus saepe eveniet ut et voluptates repudiandae sint et molestiae non recusandae. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.

At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio.

On the other hand, we denounce with righteous indignation and dislike men who are so beguiled and demoralized by the charms of pleasure of the moment, so blinded by desire, that they cannot foresee the pain and trouble that are bound to ensue; and equal blame belongs to those who fail in their duty through weakness of will, which is the same as saying through shrinking from toil and pain. These cases are perfectly simple and easy to distinguish. In a free hour, when our power of choice is untrammelled and when nothing prevents our being able to do what we like best, every pleasure is to be welcomed and every pain avoided. But in certain circumstances and owing to the claims of duty or the obligations of business it will frequently occur that pleasures have to be repudiated and annoyances accepted. The wise man therefore always holds in these matters to this principle of selection: he rejects pleasures to secure other greater pleasures, or else he endures pains to avoid worse pains.

Friday, 7 October 2016

Well Known Port Numbers

Port Numbers


A host in a network can send traffic to or receive traffic from different hosts at the same time. The system has no way to know which data belongs to which application. TCP and UDP solve this problem by using port numbers in their header. Common application layer protocols have been assigned port numbers in the range of 1 to 1024.TCP and UDP on the receiving host know which application to send the data to based on the port numbers received in the headers.


On the source host, each TCP or UDP session is assigned a random port number above the range of 1024. So that returning traffic from the destination can be identified as belonging to the originating application. A combination of the IP address, Protocol (TCP or UDP) and the Port number forms a socket at both the sending and receiving hosts. in view of the fact that each socket is unique, an application can send and receive data to and from multiple hosts.


Figure 1-8 shows two hosts communicating using TCP to a single host. Notice that the hosts A and host C are sending traffic to host B. Both A and C are sending traffic destined to Port 80 but from different source ports. Host B is able to handle both the connections at the same time because of the combination of IP address, Port numbers and Protocols makes each connection different.
Figure 1-8 Multiple Sessions using Port Numbersport-numbers


Following table shows the transport layer protocol and port numbers used by different common application layer protocols.


Well-known Port Numbers


POP (Post Office Protocol) is an Internet standard that defines an email server (the POP server) and a way to retrieve mail from it (using a POP client).


 












































































Application Protocol



Transport Protocol



Port Number



Description



HTTP



TCP



80



HTTP is the most commonly used protocols over the Internet and private networks. HTTP is the main protocol that is used by all web browsers and is thus used by any client that uses files located on these servers.



FTP (control)



TCP



21



FTP is one of the protocols which is regularly used for the file transfer on the Internet and within private networks. An FTP server provides the ability to easily transfer files from one system to another. With little networking knowledge, anybody can set up an FTP server. FTP control is handled on TCP port 21 and its data transfer can use TCP port 20 as well as dynamic ports depending on the specific configuration.



FTP (data)



TCP



20



SSH



TCP



22


 SSH is used to connect and manage network device remotely. It is typically used as a secure substitute to Telnet which does not support secure connections.

Telnet



TCP



23


 Telnet is the primary method used to manage network devices remotely. Like SSH it does not provide a secure connection, it simply provides a basic unsecured connection. Many lower level network devices support Telnet and not SSH as it required some additional processing. Caution is important when connecting to a device using Telnet over a public network as the login credentials will be transmitted in the clear.

DNS



TCP, UDP



53


 The DNS is used to translate domain names into IP addresses, typically it is used for network routing. It converts the alphabetic names into numeric IP addresses. For example, when a Web address (URL) is typed into a browser, DNS servers return the IP address of the Web server associated with that name.

SMTP



TCP



25


 SMTP has two primary functions, transfer mail (email) from source to destination between mail servers and end users email to a mail system.

DHCP



UDP



67/68



DHCP is used on networks for assigning IP address automatically. A DHCP server can be set up by an administrator or engineer with a pool of IP addresses that are available. When a client device is turned on it will send a request for assigning an IP address to the local DHCP server, the local server then assigns an IP address to a client device. This assignment is not on a permanent basis, all IP addresses are assigned on a lease basis. If an address renewal is not requested and the lease expires the address will be put back into the poll for assignment.



TFTP



UDP



69


TFTP offers a method of file transfer without the session establishment. It is used where user authentication and directory visibility are not required. TFTP is used by devices to upgrade software and firmware, this includes Cisco and other network vendors’ equipment.

POP2



TCP, UDP



109


Post Office Protocol is an Internet standard that defines an email server (the POP server) and a way to retrieve mail from it. POP has three version POP1, POP2, and POP3. POP was designed to allowing a client to retrieve the complete contents of a server mailbox and then deleting the contents from the server by a simple way.

POP3



TCP, UDP



110



 

PERSONAL PROTECTIVE EQUIPMENT'S ( PPE)

 Foot and leg protection




  1. leg protectionThere are many types of foot and leg protection. Often more than one type is worn by many workers within one organization or department. Some examples include.




Safety boots or shoes



  • Clog,

  • Foundry boots.

  • Anti-static footwear

  • Conductive footwear

  • Gaiters

  • Ballistic trousers (chainsaw use)


Safety footwear can possess features such as:



  • Steel toe-caps.

  • Midsole protection.

  • Slip resistance for a variety of situations.

  • Insulation against wet, extreme heat.

  • Good insulation against heat.

  • Shock absorbers.


Typical hazards posed to feet and legs include:




  • Wet and cold.




  • Chemicals/ molten metal




  • Impact,




  • Slipping.




  • cuts.




  • Puncture,




  • Electrostatic buildup.




  • Hand and arm protection




Protection of the hand and arms can be achieved using.




  • Chemical protection gloves of various grades and materials.




  • Contact/ gripper gloves.




  • Wrist cuffs.




  • wrist cuffs,




  • contact/gripper gloves




  • mitten




Typical hazards include:




  • chemical




  • impact




  • Contamination and diseases.




  • Puncture/ cuts.




  • Extremes of temperature




  • Abrasions




Selecting suitable hand protection


Specialist advice should be sought from the manufacturer or other competent people when selecting gloves to form the wide range available. There are two main points to consider.



  • That they give adequate protection against a hazard.

  • That they fit well and are comfortable to wear.


https://www.britsafe.org/training/health-safety-and-environmental-management-training-courses


Note – If you think your friends would find this useful, Please share it with them I’d really appreciate it.

Common Protocol in Networking

What are protocols?


When two humans make conversation with each other, they may have to use the same language but they generally understand each other without having to adhere to rigid rules of grammar or formal language frameworks. Computers, on the other hand, have everything openly defined and structured. If computers wish to communicate with one another, they have to know in advance exactly how information is to be exchanged and precisely what the format will be. Therefore, standard methods of transmitting and processing various kinds of information are used and these methods are called "protocols". Protocols are established by international agreement and ensure that computers everywhere can talk to one another. There are many protocols for different kinds of information and functions. This article will discuss some of the common protocols.


Telnet 


Telnet is a terminal protocol used to access the resources of a remote host. A host, called the Telnet server, runs a telnet server application (or daemon in Unix terms) that receives a connection from a remote host called the Telnet client. This connection is presented to the operating system of the telnet server as though it is a terminal connection connected directly (using keyboard and mouse). It is a text-based connection and usually provides access to the command line interface of the host. Remember that the application used by the client is usually named telnet also in most operating systems. You should not confuse the telnet application with the Telnet protocol. Telnet is application layer protocol.


HTTP 


HTTP is also in application layer protocol. It is the foundation of the World Wide Web. It is used to transfer Web pages and such resources from the Web Server or HTTP server to the Web Client or the HTTP client. When you use a web browser such as Internet Explorer, Google Chrome or Firefox, you are using a web client. It uses HTTP to transfer web pages that you request from the remote servers.


File Transfer Protocol (FTP)


File Transfer Protocol (FTP) lives up to its name and provides a method for copying files over a network from one computer to another. More generally, it provides for some simple file management on the contents of a remote computer. It is an old protocol and is used less than it was before the World Wide Web came along. Today, Its primary use is uploading files to a Web site. It can also be used for downloading from the Web but, more often than not, downloading is done via HTTP. Sites that have a lot of downloading (software sites, for example) will often have an FTP server to handle the traffic. If FTP is involved, the URL will have FTP: at the front.


SMTP


Simple Mail Transfer Protocol is used to send e-mails. When you configure an email client to send emails you are using SMTP. The mail client acts as an SMTP client here. SMTP is also used between two emails servers to send and receive emails. However, the end client does not receive emails using SMTP. The end clients use the POP3 protocol to do that.


TFTP


Trivial File Transfer Protocol is a stripped down version of FTP. Where FTP allows a user to see a directory listing and perform some directory related functions, TFTP only allows sending and receiving of files. It is a small and fast protocol, but it does not support authentication. Because of this inherent security risk, it is not widely used.


DNS


Every host in a network has a logical address called the IP address. These addresses are a bunch of numbers. When you go to a website such as www.cisco.com you are actually going to a host which has an IP address, but you do not have to remember the IP Address of every WebSite. This is because Domain Name Service (DNS) helps map a name such as www.google.com to the IP address of the host where the site resides. This obviously makes it easier to find resources on a network. When you type in the address of a website in your browser, the system first sends out a DNS query to its DNS server to resolve the name to an IP address. Once the name is resolved, an HTTP session is established with the IP Address.


DHCP


As you know, every host requires a logical address such as an IP address to communicate in a network. The host gets this logical address either by manual configuration or by a protocol such as Dynamic Host Configuration Protocol (DHCP). Using DHCP, a host can be provided with an IP address automatically. To understand the importance of DHCP, imagine having to manage 5000 hosts in a network and assigning them IP address manually! Apart from the IP address, a host needs other information such as the address of the DNS server it needs to contact to resolve names, gateways, subnet masks, etc. DHCP can be used to provide all these information along with the IP address.


TCP


TCP will be discussed in detail in next lesson.


IP


IP(Internet protocol) will be discussed in coming lesson and also be discussed in its own chapter in detail.


UDP


User Datagram Protocol (UDP) is used together with IP when small amounts of information are involved. It is simpler than TCP and lacks the flow-control and error-recovery functions of TCP. Thus, it uses fewer system resources. Different between UDP and TCP is that UDP is sending data without ack but TCP is ever required ack. 


ICMP


A different type of protocol is Internet Control Message Protocol (ICMP). It defines a small number of messages used for diagnostic and management purposes. It is also used by Ping and Traceroute.

Tuesday, 4 October 2016

personal protective equipments (PPE)

Definition:


PPE includes all equipment designed to be worn or held by a person to protect against one or more risks. Some of the common examples of PPE are



  • Apron 

  • clothing for adverse weather conditions

  • gloves

  • safety footwear 

  • safety helmets

  • eye protectors

  • breathing apparatus

  • safety harnesses


It is good practice for a company to eliminate or reduce the risk by some other means before resorting to PPE. where there are no other effective means of protecting worker the provision and use of PPE vital. The step must be taken to control risk at their source to prevent the need for PPE, since:


PPE as a Last Report


its good practice advises employers to:



  • identify and assess the risk

  • ensure the most appropriate means of reducing risk at an acceptable level

  • consider the hierarchy of risk control measure before providing PPE to the worker.


Personal protective equipment


EYE PROTECTION:


The eye is particularly vulnerable to injury from impact of foreign bodies and, as the are also the only son entrance to the brain, the use of suitable eye protection may not merely save a person`s sight but also their life.


typical hazards to the eye include:



  • projectiles

  • foreign bodies e.g rust and dust

  • chemicals/ molten metal splashes

  • gas and vapors

  • radiation


it is possible to classify eye protection into four main groups,



  • safety spectacles 

  • eye-shields.

  • safety goggles

  • face shields (visors)


safety spectacles:


Spectacles are made up in some countries, (mainly Europe) to meet the requirements of certain standards and are standards and generally tested to low energy impact resistance level ( denoted by the letter F marked on the lens.


For those employees who normally wear prescription spectacles safety version are available. these are tested to increased robustness level only. CE mark must be present on the frame and lens.


Eye shields:


Shields is similar to safety spectacles nut are heavier and designed either a frameless one-piece molded lens.


Safety Goggles:

Basically, there are two styles of the gaggle, panoramic with curved lens and a wide field of vision and the more traditional box type.



  • impact.

  • chemical splash

  • dusts

  • gases


Face shields:


 Shields with varying degrees of green filter are also available for welding 


these provide protection against ultra-violet and strong light.