Linux-Server-Practise-3-Network-Adapters-Troubleshoot

download Linux-Server-Practise-3-Network-Adapters-Troubleshoot

of 7

description

Troubleshoot Linux Server Network Adapters

Transcript of Linux-Server-Practise-3-Network-Adapters-Troubleshoot

  • Contents

    Assumptions ............................................................................................................................................ 2

    Verify Network ........................................................................................................................................ 2

    Verify New Hardware Addresses ............................................................................................................. 3

    Network Scripts Creation ........................................................................................................................ 4

    Modify Network Scripts ........................................................................................................................... 4

    The Rules File ........................................................................................................................................... 5

  • Assumptions

    Let's assume you clone a Linux VM esp. on Oracle Virtual Box and the first adjustments to be

    done is with Network Adapters. That has to be troubleshoot.( Using commands to clone a

    VM to set up another one is very fast) Say, for example, you want to build a Oracle RAC or

    similar etc.

    The Oracle Master had already given the tip on the link given below. See the section "Clone

    Virtual Machine" If you are new to this

    https://oracle-base.com/articles/11g/oracle-db-11gr2-rac-installation-on-oracle-linux-6-

    using-virtualbox#clone_the_vm

    The below steps show you how you can do it if you have had trouble to do that (these steps

    applies definitely to RHEL clones and the steps might differ for other systems such as Ubuntu

    or Fedora)

    Assuming you have had cloned an existing Linux machine now and started it

    You have attached let say 3 Network Adapters to this new machine and previous machine

    had 2 Network Adapters ! Hence, the target cloned Linux machine should have 3 working

    Network Adapters

    The Steps

    Verify Network

    Verify the old Network Adapters

    Verify now with "ifconfig" to get an overview of IP Addresses etc.

    Let say you have Gnome too and you see on the top right now these disco colours/balls !!!

    That's a Network Connections icon

    Right click on it and click on "Edit Connections"

  • Voila ! you see below now there are huge numbers ! Nothing to get panic!

    Actually there were only 3 Network Adapters attached and needs to be fixed

    Verify New Hardware Addresses

    Verify the real Network Adapters and their MAC / Hardware Address (HWaddr)

    This is the location of Network Scripts (On Linux everything is Files, directories, Permissions

    etc)

    So, with that you can see it shows now 2 Files. But, we want another file too

    Verify, whether you can bring down a Network Adapter! Not a clean one and confusing !

  • Network Scripts Creation

    Verify a Network Script that is already there

    The command "cp -p" is really not needed here and that's how you can copy a file with

    similar permissions, just good to know

    Copied the files and renaming it with eth0, eth1 and eth2 (we want 3 Network Adapters to

    work perfectly !)

    Modify Network Scripts

    Here is little bit confusing if things are not clear to you. But, let's make it simple

    The eth0 is to be connected to internet and the IP comes from DHCP (NAT Adapter for

    example)

    The eth1 is, let's say, 'Host Only' Adapter and IP is set manually (User defined)

    The eth2 is, let's say, 'Internal Network' Adapter and IP is set manually (User defined)

    This is a copy of eth5 and it is clearly saying with "BOOTPROTO" and "DEFROUTE"

  • So, eth0 is fine with IP, delete UUID and assign MAC Address that we found in former step

    i.e. eth7 Hardware Address

    The next steps are described - deleted UUID, assigned IP etc.

    The important thing here is also the new Name we are assigning "Auto eth2"

    We want eth0, eth1 resp.

    Another important thing to observe is that the characters of the HWADDR are in capital

    The Rules File

    Here are the rules that define the Name etc.

    The above screenshot informs that Capital Characters are in Network Scripts and small in the

    rules file

    When you open the file you can see that difference clearly

  • At the bottom I see the 3 Network Adapters' Address - eth7,eth8 and eth9

    Simply copy that and paste that in the eth0, eth1 and eth2 lines resp. by deleting what's

    already there

    The very important thing to do now is to comment the remaining lines except eth0, eth1 and

    eth2

    Those 3 we want and want to keep it working

    The below screenshot example shows that was done

    Deleting of a file is always not the right thing so, just move and rename it with another name.

    That's what I did and many Linux Gurus informed that already

    We do not need the old ones eth5 and eth6 because we have now the 3 new ones

  • Set the hostname, IP etc in these 2 files

    It is good to know to restart the "udev rules " file. But, this is a test system so you can simply

    restart it

    Once the System is restarted you are presented with what we want

    Verify whether all that changes works good, and watch with "ifconfig"

    Happy Networking !!!