..::You can change the world with the knowledge::..

Subnetting, NetMask, Gateway and Broadcast

  • Subnetting

We also have to master the concept of subnetting to get a new IP address,which in this way we can create a new network ID of a network that we had before. Subnetting is used to split one network into several smaller networks.

To reproduce the network ID of an existing network id, where the host ID sacrificed in part for use in making additional ID

Remember the formula to find a lot of subnets is 2 n - 2
N = number of bits that are shrouded in

And the formula to find the number of hosts per subnet is 2 m - 2
M = number of bits that have not been shrouded in

Examples of cases with the settlement:

Ip address 130.200.0.0 with a subnet mask of 255.255.224.0 identified as class B.

Subnet mask: 11111111.11111111.11100000.00000000
3 bits of the octet to 3 have been used, residu 5 bits that have not been shrouded in so many groups of subnets that can be used is a multiple of 2 5 =32 (256-224 = 32)
32 64 96 128 160 192 224

So the IP group which can be used :

130.200.0.0 - 130.200.31.254  loopback subnet
130.200.32.1 - 130.200.63.254
130.200.64.1 - 130.200.95.254
130.200.96.1 - 130 200 127 254
130.200.128.1 - 130 200 159 254
130.200.160.1 - 130 200 191 254
130.200.192.1 - 130 200 223 254
  • NETMASK / SubnetMask

For the grouping of addressing, in addition to the IP number or netmask is also known subnetmask. Equal to the IP number is 32 bits. There are three major groupings with a subnet mask is known, ie 255.0.0.0, 255.255.0.0 and255.0.0.0.
In the networking world, subnetmask were grouped called the class knownthree classes namely:
1. Class A, is all the IP numbers that have subnetmask 255.0.0.0
2. Class B, are all numbers that have the IP 255.255.0.0 Subnet mask
3. Class C, is all the IP numbers that have a 255.255.255.0 Subnet mask

The combination of IP and Netmask is addressing computer use. Both of thesecan not escape. So the writing is usually as follows:

IP: 202.95.151.129
Netmask: 255.255.255.0

An IP number with the IP number of our neighbors is considered one group (a network) when the IP and Netmask we converted to binary and “AND” , as well as neighbors and Netmask IP number is converted to binary and “AND”, if both results were the same then a single network. And we can relate directly.
  • GATEWAY / ROUTER
Gateways are computers that have at least 2 pieces of network interface for connecting 2 pieces of tissue or more. On the Internet addresses can be reached via a gateway-gateway which provide a path / route in the direction which must be passed so that the data packet to its destination. Most gateways running a routing daemon (a program that dynamically updating routing tables).Because it is also usually serves as a gateway router. Gateway / router can be shaped like a router box is in production Cisco, 3COM, etc. or it could be a computer running Network Operating System plus the routing daemon. Suppose the PC installed and running FreeBSD Unix program Routed or Gated. But in NATD usage, routing daemons do not need to run, so just installed the gateway only.
Because the gateway / router set up the traffic data packets between networks, then it can be fitted with a mechanism or a security restriction (filtering) the data packets. This mechanism is called a Firewall.
In fact firewall is a program that runs on the gateway / router that is in charge of checking every data packet that passes then compare it with the rule is applied and finally decide whether the packet should be forwarded or rejected. The purpose is essentially as a security that protects internal networks from external threats. But in this paper Firewalls are used as the basis for running the Network Address Translation (NAT).
In FreeBSD, the program is run as a firewall is ipfw. Before you can run the ipfw, GENERIC kernel should be modified in order to support the functions of a firewall. Ipfw set of traffic data packets based on IP of origin, destination IP, port number and protocol type. To run NAT, IP DIVERT option must be enabled in the kernel.

Divert (kernel packet diversion mechanism)
Divert socket is the same with ordinary IP sockets, except that the divert socket can bind to specific divert port via the bind system call. IP address in the bind is not considered, only the port number are noted. A socket is  bind divert to divert port will receive all packets on the port diversion by the mechanism in the kernel that is run by the implementation of filtering and ipfw program. 
  • BROADCAST
This address is used to send / receive information that should be known by all hosts on a network. As is known, each packet has a header destination address of the IP address of hosts that will be addressed by the package. With this address, only the destination host to process the package, while others will host it. What if a host wants to send a packet to all hosts in the network ?Inefficient if he should make a number of host replication purposes. Bandwidth usage / pathway will increase the workload and the host increases, the contents of the packages is the same. Therefore, created the concept of broadcast address. Host simply send to the broadcast address, all hosts in the network will receive the packet. Consequently, all hosted on the same network must have the same broadcast address and the address should not be used as and IP number for a particular host.
So, actually, each host has two addresses to receive the packet: the first is the IP number which is unique and the second is the broadcast address on the network where the host is located. Broadcast address is making all the host bits in the IP number to 1. So, for a host or IP address 167.205.9.35167.205.240.2, broadcast addresses is 167205255255 (2 last segment of the IP Address 11111111.11111111 are valuable, so it is unreadable 255 255decimal). The type of information is usually broadcast routing information.



0 comments:

Post a Comment

Powered by Blogger.
== Friends & Link ==

Followers

Contributors

Blog Top Sites