Showing posts with label address. Show all posts
Showing posts with label address. Show all posts

Tuesday, July 13, 2010

Basics of IP Addresses

In IPv4 the address is 32 bit (4 bytes) long. We represent the address using dotted decimal notation. i.e. decimal numbers 0-255 (represent a byte), is called octet, and each of that octets separated by '.',

for e.g. 192.168.1.1 the hex equivalent (hexadecimal) of this address is C0.A8.1.1 and binary (1100 0000. 1010 1000. 0000 0001 . 0000 0001) i.e. the equivalent integer is 3232235777 in decimal and C0A80101 in hex.

IP Classification
  • IP addresses are classified into 5 categories
  • Helps in orderly arrangement and efficient application of addresses along different networks
  • classes can be A, B, C, D, E
Class NameStarting bits of of MSO (Most
significant bits of Most significant
Octet i.e.Left most octet)
Range of Left Most Octet
A00-127
B10128-191
C110192-223
D1110224-239
E1111240-255

Number of octets to represent net id and host id in different ip classes:- netid always start from left most octet. Based on the bits the default subnet mask can be determined so that to identify the netid and hostid.


IP Address divided into Net and Host Portions

Class A ip address (Address start with a number between 0 to 127 )

Class B IP Address (Address start with a number between 128 to 191 )

Class C IP Address ( Address start with a number between 192 to 223)

Class Name -(net id/host id )
A -(1/3)
B -(2/2)
C -(3/1)
thus the default subnet masks can be determined by checking the starting bits and the corresponding host and net id division above, thus the default subnet masks for each class is,
A - 255.0.0.0
B - 255.255.0.0
C - 255.255.255.0

This kind of addressing is classful addressing, but it result in wasting/insufficient number of ip addresses in different classes so there is another kind of routing that use classless routing and is known as CIDR (Classless Inter Domain Routing), it uses an ip with CIDR value denoted by preceding / (e.g. 192.168.1.1 /16) instead of the default subnet mask for classful address. Thus the classless addressing can use variable length blocks of ip addresses and thus solving the issue of address wasting or insufficient address in a particular class.

Reserved IP addresses
127.0.0.0 - Default Routing
255.255.255.255 - Global broadcast address

Private IP address ranges for different classes
class A - 10.0.0.0 to 10.255.255.255
class B - 172.16.0.0 to 172.31.255.255
class C - 192.168.0.0 to 192.168.255.255

Types of addresses
Unicast - one to one
Multicast - One to many
Broadcast - One to All
Not:e:-
IPv6 address is 128bit i.e. 16 byte long.

Monday, July 12, 2010

Why IP and MAC Addresses?

The MAC address is 48bit unique address assigned to any networking/inter networking device, which is embedded on the device and will not change anyway. But the IP may vary each time the device is plugged on to the network (if assigned a dynamic IP address), but there will be only that system on the network with the assigned IP (i.e. address is unique).

MAC address is used only in local communication, i.e. inside a local network only, if it goes out of a network it will use IP address to identify the device/machine.

MAC address is also called Physical address.

As we discussed, the IP address and MAC address are unique, i.e there will be no more than one system with same IP address or same MAC address. So there will be a confusion why to use both addresses?both are unique then why cant use IP or MAC itself?Why both are used in communication?Why the overhead/headache of confusing with both addresses?

Here the answer is,

The MAC address will vary each time the packet of data enters a new network, i.e. the source MAC address and Destination MAC address vary each time the packet reaches a new network, since the physical address is used to locate a system in a local network. The source and destination ip address will remain same always and is not altered with respect to the network changes, the ip should remain same to locate the destination, since the physical (MAC) address varies with network.

Sunday, July 11, 2010

Basics of computer Networking

There is no need to say what is computer networking, and what the use of it, all of you will be familiar with that all, so we are not discussing that topics, but just highlighting the basic terms related to computer networking,
  1. Different topologies :- Mesh, Ring, Star, Bus
  2. OSI Layers :- Physical, Data link, Network, Transport, Session, Presentation, Application
  3. Data link sub layers :- MAC (Media Access Control) and LLC (Logical Link Control)
  4. IP Address :- Unique 32bit (IPv4)/128bit (IPv6) number assigned to the devices in a network (Including Routers,Switches,Computers etc)
  5. Different networking and inter networking protocols :- TCP, UDP, ARP, RARP, ICMP, IGMP, DHCP etc
  6. Port numbers :- Port numbers like 80 for http, 21 -ftp, 22 -SSH, 23- Telnet etc
  7. MAC Address :- 48bit Physical Address (Unique)
  8. Networking and Inter networking devices :- Routers, Hub, Switches, Bridges etc
  9. Concept of Routing protocols, Gateways etc
  10. Concept of net id, host id, network address, sub netting, super netting, subnet Mask, simplex, half duplex and full duplex modes of communication
There are more terms related to networking, and we are not going through that all, and will discuss whenever necessary in future discussions.

The ip address is unique for the system in a network. An ip address has 2 parts, a network portion and a host portion. Network portion defines in which network that address belongs to; where as the host portion determine the position of that ip within that particular network.The subnet mask has the role of dividing the ip address in to network portion and host portion.

Cabling
the two ends of 8 color wires of Ethernet cable are connected in 3 different ways to for 3 types of cables as below,


Straight through

Orange white - Orange White
Orange - Orange
Green white - Green white
Blue - Blue
Blue white - Blue white
Green - Green
Brown white - Brown white
Brown - Brown

The straight through cables are used to connect dissimilar devices like PC and Hub, PC and Switch etc.
Cross over cable

Orange white - Green white
Orange - Green
Green white - Orange white
Blue - Blue
Blue white - Blue white
Green - Orange
Brown white - Brown white
Brown - Brown

Cross over cables are used to connect similar devices like hub to hub, PC to PC switch to switch etc.
Rolled or Roll over cable

Orange white - Brown
Orange - Brown white
Green white - Green
Blue - Blue white
Blue white - Blue
Green - Green white
Brown white - Orange
Brown - Orange white