Select Page

Network Bonding On Centos.

 

Network interface bonding is a Linux kernel feature which allows to aggregate multiple interfaces (eth0,eth1) into one virtual link such as bond0. Network card bonding is an effective way to increase the available bandwidth. If bonded the interfaces appears as same physical device and they have same MAC address. The other names for network interface bonding are port trunking, NIC teaming channel bonding and link aggregation. The main advantage of bonded network interface is to increase data throughput by load balancing and to provide redundancy by allowing fail over from one component device to another.

## How to create a network interface bond?

Create a file named ifcfg-bondN in the directory /etc/sysconfig/network-scripts, Here "N" is the number of interfaces. Then edit the contents of ifcfg-bondn and make it similar to the configuration settings for an Ethernet interface except  that DEVICE is set to bondn instead of ethn.

For example;

DEVICE="bond0"

IPADDR=192.168.1.121

NETMASK=255.255.255.248

NETWORK=192.168.1.0

BROADCAST=192.168.1.255

ONBOOT=yes

BOOTPROTO=none

USERCTL=no

TYPE=Ethernet

BONDING_OPTS="bonding parameters separated by spaces"

For each interface that you want to bond, edit its ifcfg-interface file so that it contains MASTER=bondN and SLAVE entries. An example is given below.

DEVICE="eth0"

NAME="System eth0"

IPADDR=192.168.1.101

NETMASK=255.255.255.0

BROADCAST=192.0.2.255

NM_CONTROLLED="yes"

ONBOOT=yes

USERCTL=no

TYPE=Ethernet

BOOTPROTO=none

DEFROUTE=yes

IPV4_FAILURE_FATAL=yes

IPV6INIT=no

PEERDNS=yes

PEERROUTES=yes

MASTER=bond0

SLAVE

Create the file bonding.conf in the directory/etc/modprobe.d/, so that it contain entry for each bonded interface, for example:

alias bond0 bonding

It ensures that the kernel loads the bonding module is loaded when bring up the bonded interface. All bonded interfaces require entry in this file.

# ip link set eth0 down >> bring interface down

# ip link set eth1 down >> bring interface down

# ip link set bond0 up >> bring interface up

HAPPY BONDING 🙂

How to retrieve a serial from a remote computer

To find serial number of a given system ,you need system host-name of targeted machine , and it has to be online in the lan (network)

then open "cmd" then ping your hostname 

if you receive all 4 packets back that means your targeted machine is online in the lan

now type following command in the command prompt

wmic /NODE: "INDIA-L090" bios get serialnumber

In this tutorial i have used "INDIA-L090" as host name this may vary in your case

 

enjoy

How to remove WOUtempAdmin User Profile

I have got this error after updating system using WSUS Offline utility,after successful update system restarts And the login screen by default shows the username of WOUTempAdmin. Not a big deal as I can log in with my admin account. But still a pain.

to fix this issue you have to follow the steps:

Press "Windows Key" and "R"

type "regedit" press Ok

Run "regedit" this will open Registry Editor

Note* Be careful when editing the registry. Don’t go into the registry editor and delete anything or change a setting unless you know exactly what you’re doing. If you do know what you’re doing and are careful to modify only the correct values, you shouldn’t have any problems. However, if you start deleting folders (known as “registry keys”) or modifying other values, you could seriously damage your Windows installation. When using the registry editor, always bear this warning in mind.

Navigate to HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon

 

Change DefaultUserName to your default user for eg: Administrator , i have used fragadmin0608 instead of Administrator this may vary

 

then within the registry you can find AutoAdminLogon

Press F3 and search for any entry containing "woutemplogin" and delete it as long as the searchphrase can't be found any more,then restart your system

After restart if you can see your login screen with your default username .then your issue is fixed

best of luck .

How to Convert batch file to Exe

Things you need

  • advancedbattoexeconverter.exe
  • a batch file

 

Now we have to add script to script file and verify it , if its works we can continue to further setup, then download advancedbattoexeconverter.exe and install in your system, Click to download app

 

I am using a simple script "which will show ipconfig result"for this tutorial , SORRY i have mistakenly named script file to ping.bat instead of ipconfig.bat 😀

Right click the batch file and click on "Open with Advanced BAT to EXE" option

Within the app you can read or edit script you have created, there are a lot of customization available, but i am skipping it and going to build exe, click on the "Build Exe" Button

This will popup a new windows, there you can add EXE icon, version file embed files and password, But for this tutorial i am going to just build the app, for that just click on Build EXE button , this will ask to save the exe file

 

save the file as exe, now you can run this file just like an application

 

Converting script to an exe will ensure more security, others will not get much confidential details whats running background and for the users this will be much more easier to click on a single app installed of executing a script file which is more complex and difficult for them, you can also create silent installation scripts to install application to systems using this kind of method

Login with an SSH Private key in Linux or Mac Terminal

First you need following things :

  • generate private key from your hosting site ( i used godaddy cpanel )
  • username of cpanel
  • password of cpanel
  • finally passphrase which you have given when creating private key

Download your private key from your hosting site to your desktop , i have download my key from godaddy cpanel , you can find a file named " newssh " which is a private ssh key * name of private may vary

i have renamed the file " newssh " to " newssh.txt " , i have just changed the file extension , so that it can readable by terminal or you can read it using any text based editor like vim , nano or gedit

now you need to move this file from Desktop to your Home Directory , because when you open your directory it will mount home as the default directory

now you can see the " newssh.txt " file is listed in the terminal home directory

Run the following command to change the file permissions to 600 to secure the key. You can also set them to 400. *This step is required:

 

chmod 600 newssh.txt

 

To login you need to type the following details in the terminal , which loads the key in file newssh.txt and logs in as user ,to IP your server ip

 

ssh -i newssh.txt user@yourserverip

 

then press Enter key , now it will ask you for the passphrase which you have given at the time for private key creation , type the passphrase  , Press Enter

 

 

Congratulation you have successfully login to your server using ssh

 

 

 

How to create Vhd from Physical Disk

Its very easy to create vhd from physical disk,
First you need to download Disk2vhd utility from this url https://technet.microsoft.com/en-us/sysinternals/ee656415.aspx

Then run it as Administrator

Now you can see all drives which is associated with the hdd , select drive which you want to convert

to save it give vhd file name and location , then click create

after process complete you can find vhd file in the given exported path

now you can attach this vhd file to any hypervisor or windows diskmanager to access files in it , if it is bootable you can boot that inside virtualbox or vmware workstation

Pin It on Pinterest