strokestrokestrokestroke
 Addressing the host :: DHCP Config
You don’t really wanna do this if it’s not a special requirement for your home network. Most of the cases, if you just activate the default DHCP server and allow your computers to get an IP address automatically, it will just work. This section is useful for them those who want to run (or already running) their home network in a different subnet other than the default 255.255.255.0 one.
 
The default primary IP address of the hub is 191.168.1.254/24 and the default dhcp pool is LAN_private, starting from the address 192.168.1.64 and onwards. Another IP address i.e. 10.0.0.138/24 is also assigned to the hub; the hub can be accessible (i.e. http://10.0.0.138) by this address but your computer can’t get any IP address from this block.
 
So again, we will go back to our good old telnet and log in as admin as usual. Lets check what we already have as default in there. First thing to check the global IP interface configuration.
 
{admin}=>:ip config    
Forwarding enabled
Sendredirects enabled
IP options enabled
NetBroadcasts disabled
Default TTL 64
Fraglimit 64 fragments
Fragcount currently  0 fragments
Defragment mode : enabled
Address checks : dynamic
Mss Clamping : enabled
NAT Loopback : enabled
Bitrate window (sec), multiple of 10 : 3600
 
 
We normally don’t need to modify any of the above. Next have a look at the different IP interfaces:
 
{admin}=>:ip iflist
Interface                   Group     MTU   RX       TX       Admin  Oper   HW-address
0   loop                      local       65535 20209604 3721495  UP     [UP]   00:14:7f:xx:yy:zz
1   ipsec0                   tunnel     65535 0        0        UP     [UP]   54:55:4e:xx:yy:zz
2   Internet                wan        1500  192852838 43340203 UP     UP    
3   LocalNetwork    lan          1500  46610245 210868056 UP     [UP]   00:14:7f:xx:yy:zz
 
 
Nothing to  modify here as well. Issue: ip iflist expand=enabled if you want to see a more detailed list. And finally we will have a look what IP addresses are already configured on the hub. This is what I have on my hub now.
 
{admin}=>ip iplist
Interface                   Type               IP-address       P-t-P IP | Mask
3   LocalNetwork    Ethernet       *10.0.11.1            255.255.255.128
3   LocalNetwork    Ethernet       192.168.1.254      255.255.255.0
2   Internet               Serial             86.140.208.67     217.47.166.142
0   loop                     Internal         127.0.0.1             255.255.255.255
 
 
The * sign indicates the preferred primary IP address of the hub. Now we will add the IP address of our choice.      
 
{santanu}=>ip ipadd
intf = LocalNetwork
addr = <the_new_ip _address>
netmask = <255.x.x.x>                                     # See below for sub-netmask [optional]
pointopoint = <remote_ip_address>            # for creating a dedicated point-to-point link [optional]
addroute = enabled
 
 
In IPv4 world, there could be a variety of reasons you want to use the netmask, including preservation of address space, and security or most commonly to control network traffic. Applying subnet mask to an IP address helps to identify the network and the host parts of the address. In short, Subnetting an IP network allows a single large network to be broken down into several smaller logical ones. The network bits are represented by all 1s in the mask, followed by the 0s for the node bit. Hence only those numbers representing such sequences i.e. 0, 128, 192, 224, 240, 248, 252, 254, and 255 are allowed for the netmask. IPv4 addresses are divided, mainly into three classes:
 
Class        IP range                                Default netmask        CIDR
--------        -----------                                     ----------------------          -------                                              
A               10.0.0.0 - 126.0.0.0                    255.0.0.0                             /8                
B                128.0.0.0 - 191.255.0.0              255.255.0.0                        /16
C                192.0.0.0 - 223.255.255.0          255.255.255.0                    /24
 
For example, to understand the meaning of the default IP address i.e. 192.168.1.254, with a subnet mask of 255.255.255.0, first we need to convert the ip address in binary form:
 
        IP address:    11000000.10101000.00000001.11111110         (192.168.11.254)
 
To determine the class of the IP address,
        if the first bit is 0 it is a Class A address
        if the first two bits are 10 it is a Class B address
        if the first three bits are 110 it is a Class C address
 
Hence it’s a Class C address (we already know that ) and the default subnet mask would be:
 
        Netmask:    11111111.11111111.11111111.00000000            (i.e. 255.255.255.0)
 
which simply means we want 256 nodes/hosts per network. The formula to figure out the number of 'host' bits in a subnet mask is:    
        2^n={number of nodes}     (2^n  means '2' to the power of 'n')
 
Since we already know the number of nodes i.e. 256, “n” would be 8 as 256 = 2^8. That means we want to leave 8 zero(0) bits in the subnet mask. Thus, the netmask is: 11111111.11111111.11111111.00000000
 
If we want, say 64 nodes per network, we get “n = 6”, since 64 = 2^6. So, the netmask would be:
        11111111.11111111.11111111.11000000        i.e. 255.255.255.192
 
In IPv6 classless world, this is called as Classless Inter-Domain Routing (CIDR). Okay, no more 1s or 0s; now we know how to determine the netmask, so we can choose one as required.
 
Next, to tell the hub to use the newly added IP as the primary IP  address
 
{admin}=>ip ipconfig
addr = <newly_added_ip-address>
preferred = enabled                                     # make preferred IP address for that subnet.
primary = enabled                                      # make primary IP address for the interface.
 
 
Issue :ip iplist once again to check every thing is in order. Now we need to create a suitable DHCP pool for our nodes (commonly know as dhcp clients). The DHCP server is already running - right? (otherwise how you doing this, unless you using static IP, lol). We can check that right now though:
 
{admin}=>dhcp server config
State: enabled
 
If not running then just do “:dhcp server config state = enabled” and it’s done and also check the current pool configuration. The default dhcp pool is LAN_private and you will see something like that:
 
{admin}=>dhcp server pool list
Pool                        Start                  End                    Intf                       State
0  LAN_private     192.168.1.64     192.168.1.253     LocalNetwork    STATIC      
 
 
“0” is the pool index, indicates the primary pool (highest priority). A higher number means lower priority. Leave that pool alone for the moment. We gonna create a new pool now.
 
{admin}=>dhcp server pool add
name = <name_of_the_new_pool>                       # say LAN_home  
index = 0                                                                    # because we gonna make it our primary pool
          
 
 Now he most important thing: to configure the newly added pool:with appropriate values.
 
{admin}=>dhcp server pool config
config name = LAN_home                                                  # or the name you call your pool as
intf = LocalNetwork
index = 1
poolstart = <ip-address>                                                    # ip-address of your choice from the same block
poolend = <ip-address>                                                      # same as above by higher than “poolstart”
netmask = <255.x.x.x>                                                         # the same one we applied during “:ip ipadd”
gateway = <the_newly_added_ip-address>                    # the ip-address we added earlier
server = <the_newly_added_ip-address>                        # same as above
primdns = [<ip-address|none>]                                        # better to leave it blank; the hub will pick one  
secdns = [<ip-address|none>]                                           # same as above
dnsmetric = [<any_number_from_0-100]                         #
primwins = [<ip-address|none>]                                      # ip-address of promary WINS, if you have one      
secwins = [<ip-address|none>]                                         # same as above, but secondary one  
leasetime = [<number{0-1814400}>]                                  # say, 10800 (sec.) i.e. 3 hrs. (n/a for static DHCP)
unnumbered = [<disabled|enabled>]                                #
localgw = [<disabled|enabled>]                                       # proxy for a virtual default
                                            (* the values in the [square braces] are optional *)  
 
 
So, this is our pool, lets see how does it look like. We should have something like this:
 
{admin}=>dhcp server pool list
Pool                        Start                  End                    Intf                       State
0  LAN_home         10.0.1.100         10.0.1.125          LocalNetwork    STATIC
1  LAN_private     192.168.1.64     192.168.1.253     LocalNetwork    STATIC
 
 
At this point, we are almost done. Save the configuration file as we always do:
 
{admin}=>config save filename = user
:config save filename=user
 
 
Finger crossed!!! restart the hub to take effect:
 
{admin}=>system reboot
. . . . . .
     (lost session connectivity due to reboot)
. . . . . .
 
If you are lucky enough and didn’t do any thing wrong, when the hub is ready again, check the ip-address of your computer (“ipconfig \all” maybe from a DOS shell) to see your computers’ new address.
 
Next Page >>
Page :: Three
<< Previous Page IPv4 vs IPv6:
To a great extent, IPv6 is a conservative extension of IPv4. Most transport and application layer protocols need little or no change to work over IPv6; exceptions are a few applications protocols e.g. FTP or NTPv3. It uses 128-bit addressing system and allows 50 octillion addresses and normally written as eight groups of four hexadecimal digits whereas IPV4 uses 32-bit system with only 4.3 billion unique address capacity.