Hello everyone.
Since we are on a network configuration part of the Linux We'll talk about neck bonding.
We're exactly the neck bonding is just Sulit you know neck bonding is one of the very important and
critical aspect in the next number configuration and this type of questions are asked often time in
an interview.
So let's see a neck and neck stands for network interface card that attaches to your computer.
So if you look at your laptop or behind your PC you will see a little port in there and that port is
your neck red neck which network interface card.
Bonding is also known as network bonding.
It can be defined as the aggregation or combination of multiple neck into a single bond interface.
Its main purpose is to provide high visibility and redundancy.
So let's look at our picture.
We have this for NIC cards on our computer.
So what we do in Nick bonding is we take two ports.
We combine them together.
And the reason we combine them.
Because what if one port dies we still have another port.
So this is for the redundancy.
So another way to make two ports redundant or to have them high availability is you combine them together.
If a port is one gig and the other port is one good you combine them together to aggregate them and
get them to put off to get.
This is achieved for high visibility and link aggregation.
So Nick bonding procedure is that you type maade prob bonding which is to get the configuration of your
driver in for wanting to get the information of your bonding.
Then you create a file called ifconfig Bond 0.
You added the first in Internet one you added the second eat the net and you combine them and point
to bond 0.
If you have Nick one file you create another nick to file for the second Nick and then you create a
third file called bonzer.
You point your nick 1 and Nick two files to word bonzer.
And then what do you do at the end you should restart the network of your computer.
So the command is system CTO or restart network.
So without further ado I will log into my system and tell you exactly how Nic bonding can be done.
And before we start this virtual box I want you to take a snapshot.
The reason I'm taking a snapshot is so record regrew work back to a state which is where it is right
now after we do all the configuration.
So click on right here you see a snapshot click on snapshot and right here says take.
Click on the take leader snapshot number one as a name default and click OK.
Now it has taken the snapshot.
Now I want you to click on setting go to work click on network adapter to check and enable network adapter
and select bridged adapter.
Now we will have two next on our computer which is one here adapter one and adapter two if one more
adapters we could go to after three and four and check on and they will never adapter but we will work
only up to one and adapter two at this time.
And aren't you.
OK.
So once the setting is done go ahead and click on start.
Go ahead and log in as yourself.
OK when you have the desktop right click on your desktop.
Open up your terminal.
I would like to make the console the terminal on the bigger could go ahead and type of config and do
more on the output.
And here you will see.
Now you have two network interfaces.
One is and ENP zoo has three.
And the second one is Ian and these are state in 0 8 is the one that we just added to Oracle Warshel
box.
Now what we want to do is we want to combine these two three and eight together and make a bond out
of these two interfaces become room to First
let's clear the screen.
Now I will open up a document that I have that has all the commands and configuration in my document.
This document is also added as part of your handouts.
So before you do this exercise I want you to also open up this document form your hand out have it side
by side while you do the configuration of bonding.
So I have already opened this document.
OK so now it says Just follow the directions this is an in your neck.
If it does not exist install bonding driver maade prob in bonding you'll need to install this.
If you don't have bonding Nabl Let's see if you do have it or not.
So Newmar info bonding and I want you to do more on it and once you do more and if you get the output
and description says it Internet a child bonding driver word $3.7 one that means you already have the
driver installed which is demat prob in the next so you don't have to worry about installing it.
So you can move one to the next step.
OK the next step is to create a new file called ICF G dash on zero right here and I have to create this
file in this directory in this path.
So if I copy and paste is not going to work so I have to type it so that I go back into our machine
and I do the I see says config network
scripts see if G dash on.
Now you are in vi mode hit I need to insert and I want you to start typing exactly what's written in
there.
Please make sure don't make a mistake.
Type as Bond.
Name of this bon bons zero.
Bonding master meaning is the master of this bonding.
Is it a self.
So yes it's a board Prato.
So when you type in non or static it means the same thing.
So type none on boot.
Yes
IP address.
I'm sorry there's a mistake I should be just I p a d d r the IP that I have picked is 192.
Are 168.
1. 80 because I have already typed this IP before and I know this IP does not exist nobody has taken
it.
But if you wanted to confirm if this IP is not taken you could just go into.
You could open up another terminal and paying one to 168 or one to 80 and you will see you and you are
not getting a response back on that IP.
So I mean it's not taken.
So use IP.
I'm assigning the static IP mask to 5 5 2 4 5 2 5 0.
Gateway gateway is the IP address of your modem and then bonding underscore options call mode 5 picking
mode 5 and what exactly modified is or me on Mon.
As this is the speed and the state.
I have also included that in my document.
Exactly what these options mean and I want you to review them and you will know exactly what it means.
So now you could just save and exit the file
OK once you have that says of bonding options d 2 can be found here.
You see right here it has all the option pect if you remember we picked option 5 which is Strassmann
load balancing.
You can read about it and then am I am and which is a monitoring am I link monitoring frequency in milliseconds
be picked on grid.
OK.
So next step is is edit the first Nic file which is E and PS or three.
So I am in the root directory.
I'll go into it and see this config.
You just drag this a little more so you can see a better system fix the network script.
And in this directory I already have a file called that see see if sheet ENP 0 3.
And now I have here I said delete the entire contents.
How do you delete it in the way you do.
Dee Dee dee dee dee dee dee dee keep doing dee dee dee dee dee until you go to the bottom you are at
the bottom and says no lines in Bachar that's good.
Now hit enter.
Sorry hit answer you have.
You probably have to hit a couple of times to get it.
So now keep typing what exactly it's in there.
Type the net
approval on device B and P 0 3
on boot.
Yes you want to have the hardware address.
This is a new one.
Now this is the MAC address off your e and PS Your S3.
So what is my hardware MAC address.
You will have to open up another terminal and about drug and then just type config and do more and you
will see ENP or S3 has a MAC address of this
or what I will do is track a little bit on top of the other window in the bar in the back.
And now I could type the address 0 8 0 0 0 2 7 see 3 0 0 8 year point it verified to 7c 328.
Yes.
And then at her master it's asking you who's your master.
The master is bonzer which is the other file that we created before that hit enter slave.
Are you a slave.
Meaning this interface.
Is it a slave.
Will say yes to.
Check again.
Would Prato would of missed one.
Oh no we did not.
It's their type pro-law device on boot hardware address which is the mac address master is bonzer enslaves
us in our Save and Exit dock.
Now follow the directions.
Now it says create the second NIC file for ENP 0 8.
I can create a second one or I could just copy this ENP 0 3 and change the name and MAC address so it
will be easier I could just copy in PS or S-3 and I name it.
C F G dash.
Ian page a street and take up your place 3 that eight it's copied.
Now VI.
If he pays you s 8.
Now in 0 8 now you have to change this.
Third line says device 0 3 with 8.
Yes yes and now the MAC address would be different.
Well back to you.
Other commanders open it up and you will see here the McEnroe's for ENP 0 8 is this.
So once you have it highlighted drag it down so you can see it and now change it.
It does change after the three uploads though.
Zero d 17 9 B.
Ok bonzer master is the Bonsor or slave.
Yes slave for Bonzo.
Then why quit and save the file the files saved.
Now I want to restart Service System CTO restore the network service restart it enter by running if
config do the more on it and you will see now the IP that I have assigned.
Or so says right get one I to 168 1 to 80.
Its master and the other ports.
Sorry the next.
P zero as 3 in s 8.
You see here right here it says you are slave and slave.
So IP assigned is given 1 9 2 1 2 one to 80.
I'm going to take this IP.
Plug it into my possession and see if I could connect to it one night to sixty eight I wonder 80 hour
yes I could connect.
This is just a sausage key warning sign you could just accept it to save it and log in.
And yes there you go.
So now you know that your interface is combined together too and pointing it to bonzer any other instructions
that we have.
We could go down.
We could also see here it's telling me that I could verify the setting
by doing Kathe at pro neck bonding and bonzer and I do that I should not have to make this bigger.
And now you'll see here when I did the cat.
You see it says currently active slave.
Is this one.
It is load balancing slave interfaces.
This second slave interfaces this.
Now once it is done I want you to revert back to your original VM so just close it powered off close
and says power of the machine is powered off.
Now go to your oracle word for machine right here and first.
Once.
Wait for it to power off then go to setting and then come to network come good network data to check
the one we checked before.
Click OK now.
It should not have the second adapter but I wanted to click now to the snapshot one and click on restore.
This is going to restore to the original state where we had it before here it will create another snapshot
of your current state which I don't want to do so.
Uncheck this box and click restart.
Now it is restored to exactly the same way where it was before we started this lesson.
All right guys I hope you enjoyed it and please try it on.
This is this.
This is one of the topic is very important.
You will be working on a physical machines most of the time when you have to do the bonding.