Networking
HYPERVISORS
There are 2 types of hypervisors
· Type 1 hypervisor: hypervisors run directly on the system hardware – A “bare metal” embedded hypervisor,
· Type 2 hypervisor: hypervisors run on a host operating system that provides virtualization services, such as I/O device support and memory management.
Type1 Hypervisors –
1. VMWare ESX and ESXi
2. Microsoft Hyper-V
3. Citrix XenServer
4. Oracle VM ( build on top on opensource Xen)
Type2 Hypervisors –
1. VMWare workstation/fusion/player
2. VMWare severs
3. Microsoft Virtual PC
4. Oracle VM – Virtual Box
5. Red Hat Enterprise Virtualization
· Kernel based VM (KVM) has qualities of both hosted and bare-metal virtulization. It can turn the Linux kernel itself into a hypervisor so the VMs have direct access to the physical hardware
Protocol TCP
Open Sytems Communications
OSI Model - Sets the rule for all standard communcation
7. Application
6. Presentation
5. Session
4. Transport
3. Network
2. Data Link
1. Physical
To remember – All People Seem To Need Data Processing
Please Do Not Throw Sausage Pizza Away
Please Do Not Take Sales Peoples Advice
When data is sent from computer sending computer to receiving computer, each layers adds header to it A > P > S > T > N > D (adds header along with trailer which is used for data checking for corruption) > P
TCP/IP – Transmission Control Protocol/Internet Protocol
TCP/IP (DARPA) Model
Application
Transport
Internet
Network Access
Comparison between OSI and TCP/IP or DARPA
TCP and UDP
Transmission Control Protocol and User Datagram Protocol
TCP is connection oriented. Large packet size– 20bytes. Is used for high reliability. Use by other protocols http, telnet, ftp. Uses 3 way handshake communication.
UDP is connection less protocol. Small – 8bytes. Not reliable but fast. Useful for servers that answer small queries from huge numbers of clients such as games. Use by other protocols DNS, DHCP, SNMP, VOIP. And is generally used for streaming audio and video.
IP – Internet Protocl
IP - Addressing and Routing
ARP – Address Resolution Protocol – Resolves an IP address to hardware address
Computers communicate using physical hardware address and IP address routing and identifying themselves.
ICMP – Internet Control Message Protocol - Diagnostic and error reporting
IGMP – Internet Group Management Protocol - Manages IP multicast group management.
Types of TCP/IP Communication
1. Unicast – One to One
2. Multicast – One to Many
3. Broadcast – (One to All)
4. Anycast – Ipv6 only (One to one of many) - This is like a combination of unicast and multicast. Many computers are listinging to the IP and the sender picks the shortest route (from routing table) and from then one to one communication link is established between the sender and receiver.
IP Address Planning
IP address is 32 bit address.
First part is network id – where the computer sits ( like street name)
Second host id – identifies the computer on its network
With the IP address we will not able to find which portion of the IP is Network Id and which is host ID. With the Subnet we would be able to identify it.
SubnetMast - Used to identify the network id and hosted from IP address.
Subnet starts with 255 – which represents the network ID and ends with zero which represents host ID. Subnet is not an options component and it will go with the IP always.
Rules of IP Addressing
Each of the 4 numbers in IP are called an octet(8 bit) oct=eight. Each octet can only have a number from 0 to 255. 00000000=0 and 11111111=255
First octet cannot be 127 – because it is reserved for diagnostics
127.0.0.1 – is a called loopback address. It is something to refer yourself.
All 0’s represent Network ID and all 255 represents broadcast address.
Classful IP Address
A Class – 1-126 255.0.0.0
126 Networks – 16,777,214 hosts(around 17mil) – which is used mostly by ISPs
B Class – 128-191 255.255.0.0
16,3484 Networks -- 65,534 Hosts
C Class – 192-223 255.255.255.0
2,097,152 Networks – 254 Hosts
D Class – 224 – 239 Multicast
E Class – 240=243 Experimental
Totally there around 4billiong host address available all together.
Private and Public IP Addressing
Following IP address ranges cannot be used – routers cannot accept
10.0.0.0 – 10.255.255.255. (class A)
172.16.0.0 – 172.31.255.255 (class B)
192.168.0.0 – 192.168.255.255 (class C)
169.254.0.0 – 169.254.255.255 - Reserved for automatic IP addressing if no DHCP is available.
Host assigned private IP address can get to the Internet through Network Address Translator(NAT)
Binary Numbers
Binary or base 2 – and number choices can be only 0-1 (ex 20 21 22 23 24)
Decimal or base 10 and number choices 0-9 (ex 100 101102 103)
Any thing to the power of zero is 1. With binary as base 2
20 21 22 23 24 = 1 2(1*2) 4(2*2) 8(4*2) 16(8*2) 32 (16*2)
Convert Binary to Decimal
Say you have a binary 10101010
To convert
Here multiply B with A - Any thing multiplied by 0 is 0 so cancel out all the numbers with zero and add the rest, which will give the decimal value i.e 128+32+8+2 = 170
So the decimal of 1010101 is 170.
Convert Decimal to Binary
Find the closed number which is less than the given decimal number and put 1 under it. Then subtract the decimal number with the close number. With the result follow the same steps until zero is arrived. Add zero below the numbers where there is no 1.
Given that 3482 is the decimal number
So decimal 3486 = 110110011010
Internetworking
Routers
Machines can only communicate within the same network. If connection to other network should be made, it can be done through router. One role router plays is to connect different networks.
Default Gateway
The only way for computers to communicate with a computer on a different network is through a router(Inter-networking).
Default Gateway represents the IP address of a router that a computer uses to communicate outside of its network.
Subnetting
Subnetting is the process of taking a large network and dividing it into smaller networks to increase efficiency and manageability.
CIDR ( Classless Interdomain Routing) and VLSM
IP v4 – 4billion unique IP addresses – 32bit
IP v6 – 340 trillion-trillion-trillion - 128 bit
Class A – support 16,777,214 hosts
Class B – supports 65,534 hosts
Class C – 254 hosts
Since Class A, B, C supports fixed hosts. Say there is a need for 2000 hosts, choosing Class B we would be wasing around 63k hosts or we could choose few class C routing which will be make the routing table complex to manage. The solution for these scenarious would be CIDR with VLSM( Variable Length Subnet Masks).
It is not necessary to use 255 always, and we can choose others as well.
When you convert the decimal in the subnet (say 255) the binary is 11111111. For zero it is ‘0’. So we can use subnet numbers as long as the numbers in the binaries in the left starts with one and zeros to the right. The way binary is arrived is by continuously dividing the number by 2.
11111111 – 255
11111110 – 254
11111100 - 252
111111000 – 248
11110000 – 240
11100000 – 224
11000000 – 192
10000000 – 128
00000000 – 0
Formulas
To calculate the number of subnets needed we use the formula
· 2n
· n = Number of 1’s in the Subnet ID
To calculate number of host address
· 2n – 2
· n = Number of 0’s in the Host ID
· Host ID cannot be all 0’s or all 1’s
Example:
11111111.1111111.11111000.0000000
25 = 32 subnets
211 - 2 = 2046 Available hosts in each subnet.
In this example we moved the host id to 5 spaces. Which represents 2 to the power of 5 which is 32 that amount to the number of subnets we can use. Available hosts would be 2 to the power of the number of zero which is 11. After discount 2 ( since 255 and 0 cannot be used in decimals, since we are working with binaries all 0 and all 1 cannot be used in the subnet i.e First one is with zero is network id which cannot be used and the last one is broadcast Id) we will have 2046 available hosts in each subnet. Convert 11111000 to decimal which will be 248, so the subnet address would be 255.255.248.0
CIDR Notation
With CIDR Notation 192.168.10.1 - 255.255.255.248
With CIDR Notation 192,168,10.1/29
Here 29 cidr notation represents the network id leaving 3 bits for host id.
Fundamentals of IPV6
Disadvantages of IPV4
· Not enough addresses
· Cluttered the internet routing tables.
o Orignally it was Flat routing infrastructure – every single address prefix should have its own routes in the internet backbone routers
· Difficult to configure
o Assigning IP for all devices in the network is tedious even with DHCP maintain DHCP infra which has its own problems
· Security was optional - IPsec is optional – now it is not optional.
IPv6 Solution
· Plenty of Addressess – 3.4 * 1038
· Simplified Internet Routing Tables
· Easy and Automated Configuration – Even without DHCP devices will be able to get IP address automatically with IPv6
· Security is Required
IPv6 Addressing
· 128 bits long
o 1111111110100…….0001
· 128 bits divided by 16bit chunks and convert into hexa decimal blocks
o Fe80:0000:0000:0000:05EE:00FF:0238:47B1
· Simplify by supressing the leading 0’s
o FE80:0:0:0:4EE:FF:238:47B1
· Further compress by expressing a single contiguous set of 0 blocks into “::”
o FE80::5EE:FF:238:47B1
Types of IPv6 Addressess
· Unicast(one to one) - Always starts with FE80
o Global Addresses (Public IP address) which is recognized by internet routers
o Link-Local Addresses - There is an important difference between IPv6 link-local addresses and IPv4 APIPA(Automatic Public IP Adressing which are in 168 range and for clients lesser than 25). Once a PC receives an IPv4 address from a DHCP server, the APIPA address is no longer reachable. However, with IPv6, a network interface always has a link-local address even if you assign another IPv6 address manually or if the NIC receives an IPv6 address from a DHCP server. This means that computers on a link can always communicate through IPv6 using link-local addresses, which is not the case in IPv4 because APIPA addresses are not in the same subnet as private or public IPv4 addresses. Thus, if the local DHCP is unavailable, the computers can still access local services through IPv6 but won't be able to reach the Internet or services in other links.
o Unique Local Address – Always starts with FC or FD (same as private IP)
- ULA addresses can be routed (except on the public Internet).
· Multicast (One to Many)
o One sender many receiver
· Anycast (One to One of Many)
o There are set of interfaces known as Anycast Group which listens to anycast address. When a packet is sent to the anycast group it routes the packets to the nearest host listening in the anycast group address. Anycast is like bringing unicast and multicast together.