Sunday, December 31, 2017

Move Etherchannel Port from vlan 1 to other Vlan

interface Port-channel1
 switchport trunk native vlan 10
 switchport mode trunk
 no ip address
 flowcontrol send off
!
interface FastEthernet0/1
 no ip address
!
interface FastEthernet0/2
 switchport trunk native vlan 10
 switchport mode trunk
 no ip address
 channel-group 1 mode on
!
interface FastEthernet0/3
 switchport trunk native vlan 10
 switchport mode trunk
 no ip address
 channel-group 1 mode on
!
interface FastEthernet0/4
 no ip address
!
interface FastEthernet0/5
 switchport access vlan 10
 no ip address

Wednesday, December 27, 2017

Move Trunk Port to Vlans

int fasthernet 0/1
switchport trunk native vlan 10
exit
 same on fiber




A native vlan is only correct terminology when the port is in trunk mode.  To change it use the following command:

switchport trunk native vlan <vlan number>

Tuesday, December 5, 2017

How to set up a Microsoft Network Load Balancing (NLB) in Windows 2008 R2

OVERVIEW
Here is a quick guide how to set up two Web Servers that will be serving out the same web page for redundancy and load balancing purposes.  When we go to www.mywebsite.com address, the name will resolve to the Load Balancing IP/Cluster IP (192.168.10.30) and then the Load Balancing manager will either take us directly to WebServer-1 (192.168.10.10) or WebServer-2 (192.168.10.20) depending on the load and server availability.
I have set this up where each machine is using only one network adapter, this will still work perfectly fine but you will get a pop up message every time you open the Load Balancing Manager complaining about the machines may not be able to communicate with each other.  The problem is that in Unicast mode the machines get an identical MAC address and the machines may not be able to communicate with each other.
As per Microsoft’s best practice you should set this up the same way but add an additional network card and make that your primary IP for this machine.  The IP’s and network adapters involved in load balancing should only be used for load balancing.
Mywebsite.com
|
Load Balancing IP (192.168.10.30)
/                \
WebServer-1 (192.168.10.10)               WebServer-2 (192.168.10.20)

WebServer-1 (192.168.10.10)
=======================
1. Ipconfig on WebServer-1
ipconfig initial configuration




2. Go to Server Manager and add “Network Load Balancing” feature.
Load balancing feature add





3. Administrative tools > Network Load Balancing Manager, Cluster > New
Network Load Balancing Manager





4. Enter the name of the first Host, this will be the first: WebServer-1.mylab.local
First Web Server Load balancing cluster






5. Click Next, you should see only one IP of the first WebServer
Cluster Parameter






6. Load Balancing IP (Cluster IP)
Cluster IP Address







7. Enter Cluster Parameters, Unicast gives you the same MAC for both machines where you might have to add a static ARP entry to your switch.  Multicast gives the two machines unique MAC addresses.
Cluster parametrs






8. Port Rules, leave default.
port rules






9. First host is set up and running
load balancing first host done





10. “Network Load Balancing (NLB) should already be checked automatically when you configure the load balancer, double check it.
network adapter settings







11. Advanced TCP/IP Settings on WebServer-1 should list WebServer-1 IP and the Load Balancer IP (Cluster IP).
network adapter







12. Ipconfig,we can see an additional Load Balancer ip 192.168.10.30
ipconfig after cluster set up





WebServer-2 (192.168.10.20)
=======================
1. Ipconfig
ipconfig 2



2. Open up the “Network Load Balancer Manager” on WebServer-1.  You should already have it open from configuring WebServer-1.
add host to cluster






3.  Add the second host to the cluster which is WebServer-2.mylab.local
connect second host to cluster







4. Leave this default and click next.
host parameters 2






5. Leave the port rules default.
port rules






6. Tow hosts are attached to cluster and are in Converged state.
Load balancer all set up





7. “Network Load Balancing (NLB) should already be checked automatically when you configure the load balancer, double check it.
connection properites







8. Advanced TCP/IP Settings on WebServer-2 should list WebServer-2 IP and the Load Balancer IP (Cluster IP).
Advanced TCP/IP Settings







9.  IPconfig after we are all done, you shuld see an additional IP 192.168.10.30 wich is the Load Balancer IP (Cluster IP)
ipconfig after setting up the load balancer



10. run “wlbs query” to see stats.
wlbs query
This entry was posted in Networking, Windows and tagged , , . Bookmark the permalink.

Monday, September 25, 2017

Restore disk image Clonezilla

Restore disk image

In this example: Restore an image on 2nd disk (sdb) to 1st disk (sda) (Step by step)
  1. Boot the machine via Clonezilla live
  2. The boot menu of Clonezilla live
  3. Here we choose 800x600 mode, after pressing Enter, you will see Debian Linux booting process
  4. Choose language
  5. Choose keyboard layout
  6. Choose "Start Clonezilla"
  7. Choose "device-image" option
  8. Choose "local_dev" option to assign sdb1 as the image home
  9. Select sdb1 as image repository, then choose "restoredisk" option
  10. Select image name and destination disk
  11. Clonezilla is restoring disk image on 2nd disk (sdb) to 1st disk (sda)
  • Boot the machine via Clonezilla live     ^TOP^
  •  In this example, the machine has 2 disks, 1st disk's name is sda (device name in GNU/Linux), 2nd disk's device name is sdb. We already have a Clonezilla image in sdb, the image name is called "xenial-x64-20170924":
    root@debian:~# ls -lh /home/partimag/
    total 28K
    drwxr-xr-x 2 root root 4.0K Sep 24 04:29 Docs
    drwx------ 2 root root  16K Sep 24 03:45 lost+found
    drwxr-xr-x 2 root root 4.0K Sep 24 04:29 Photos
    drwxr-xr-x 2 root root 4.0K Sep 24 04:51 xenial-x64-20170924
    
    root@debian:~# ls -lh /home/partimag/xenial-x64-20170924/
    total 447M
    -rw-r--r-- 1 root root  755 Sep 24 04:51 blkdev.list
    -rw-r--r-- 1 root root  407 Sep 24 04:51 blkid.list
    -rw-r--r-- 1 root root 4.7K Sep 24 04:51 clonezilla-img
    -rw-r--r-- 1 root root  159 Sep 24 04:51 dev-fs.list
    -rw-r--r-- 1 root root    4 Sep 24 04:51 disk
    -rw-r--r-- 1 root root 273K Sep 24 04:51 Info-dmi.txt
    -rw-r--r-- 1 root root  187 Sep 24 04:51 Info-img-id.txt
    -rw-r--r-- 1 root root 124K Sep 24 04:51 Info-lshw.txt
    -rw-r--r-- 1 root root 4.6K Sep 24 04:51 Info-lspci.txt
    -rw-r--r-- 1 root root  224 Sep 24 04:51 Info-packages.txt
    -rw-r--r-- 1 root root   97 Sep 24 04:51 Info-saved-by-cmd.txt
    -rw-r--r-- 1 root root    5 Sep 24 04:51 parts
    -rw------- 1 root root 446M Sep 24 04:51 sda1.ext4-ptcl-img.gz.aa
    -rw-r--r-- 1 root root  512 Sep 24 04:51 sda2-ebr
    -rw-r--r-- 1 root root   36 Sep 24 04:51 sda-chs.sf
    -rw-r--r-- 1 root root 1.0M Sep 24 04:51 sda-hidden-data-after-mbr
    -rw-r--r-- 1 root root  512 Sep 24 04:51 sda-mbr
    -rw-r--r-- 1 root root  405 Sep 24 04:51 sda-pt.parted
    -rw-r--r-- 1 root root  366 Sep 24 04:51 sda-pt.parted.compact
    -rw-r--r-- 1 root root  250 Sep 24 04:51 sda-pt.sf
    -rw-r--r-- 1 root root   53 Sep 24 04:51 swappt-sda5.info
    
    Now the image "xenial-x64-20170924" will be restored to disk sda.
    Once you have the bootable Clonezilla Live CD/DVD or USB flash drive, you can boot the machine you want to clone via Clonezilla live. Remember to use the Clonezilla live CD or USB flash drive to boot the machine. For example, if you have Clonezilla Live in USB flash drive, you have to boot it via USB device (Ex. USB-HDD or USB-ZIP). If necessary, you can set the first boot priority in the BIOS as USB-HDD or USB-ZIP so that it can boot Clonezilla Live from your USB flash drive.
    Here we take CD as an example. You can either set CD as first boot priority in machine's BIOS like this:


    Or by pressing a hotkey (e.g. Esc or F9) when you boot the machine, you will see the boot menu of BIOS like this:


    Check your motherboard manual for more details about how to boot your machine via CD.


  • The boot menu of Clonezilla live     ^TOP^
  •  Here is a screenshot of Clonezilla Live boot menu:


    The first one is the default mode for Clonezilla Live. It will default to framebuffer mode with a resolution of 1024x768.
    There are more modes which you can choose in the 2nd choice "Other modes of Clonezilla live", e.g. 800X600 or 640x480 one if you want, as shown here:


    The choice, "Default settings, KMS" is for you to use KMS (Kernel Mode Setting) for your graphics card. If you have some problem to use the framebuffer mode of your graphics card, you can try it.
    The choice, "Clonezilla live (To RAM. Boot media can be removed later)", is the same function with the 1st one except when Clonezilla live booting finishes, all the necessary files are copied to memory. Therefore you can remove the boot media (CD or USB flash drive) then.
    If you do not need Chinese or Japanese environment or if your computer experiences problems in the framebuffer mode, you can choose the one "Clonezilla Live (no framebuffer)" to clone in the English environment.
    The choice, "Clonezilla live (failsafe mode)", is for something goes wrong when you are not be able to boot your machine, such as ACPI of your machine is not supported in the kernel.
    If you want to boot local OS in your harddrive, you can choose the one "Local operating system in harddrive (if available)". This is an extra function in the boot media that has nothing to do with Clonezilla Live.
    The choice, "FreeDOS", allows you to boot your machine into Free DOS. This is an extra function in the boot media that has nothing to do with Clonezilla Live.
    The choice, "Memory test using Memtest86+," is for memory testing using Memtest86+. This is an extra function in the boot media that has nothing to do with Clonezilla Live.
    The choice, "Network boot via iPXE" is used to perform a network boot via iPXE. If your computer does not have a PXE network, you can use this to do boot from a network. This is an extra function in the boot media that has nothing to do with Clonezilla Live.

  • Here we choose 800x600 mode, after pressing Enter, you will see Debian Linux booting process     ^TOP^
  •  


  • Choose language     ^TOP^
  •  


  • Choose keyboard layout     ^TOP^
  •  

    The default keyboard layout is US keybaord, therefore if you are using US keyboard, just press enter (i.e. use the option "Don't touch keymap").
    If you want to change keymap, you can either choose "Select keymap from arch list" or "Select keymap from full list".
    ///NOTE/// There is a bug when choosing French keymap in "Select keymap from arch list", so use "Select keymap from full list" to change keymap if you are using French keyboard.

  • Choose "Start Clonezilla"     ^TOP^
  •  


  • Choose "device-image" option     ^TOP^
  •  

    Pay attention to the hints, too. You might need that:
    ///Hint! From now on, if multiple choices are available, you have to press space key to mark your selection. A star sign (*) will be shown when the selection is done///

  • Choose "local_dev" option to assign sdb1 as the image home     ^TOP^
  •  

    There are other options, e.g. sshfs, samba, nfs or webdav, AWS S3 or Openstack Swift , you can use when network is available. This is very useful when 2nd local disk is not available.
    Since we choose "local_dev" option, we can use 2nd disk or USB flash drive to save 1st disk's image. If using USB flash drive as repository, inster USB flash drive and wait a few secs.


    Clonezilla will scan the disks on the machine in every few secs, and show you the results:


    Once you see the device you have inserted shown on the status, you have to press Ctrl-C to quit the scanning report.

  • Select sdb1 as image repository, then choose "restoredisk" option     ^TOP^
  •  

    Choose the directory name on /dev/sdb1 as the image repository. Here we put image on the top directory (i.e., Current selected dir name is "/"):

    If you are not familiar with the disk or partition name in GNU/Linux, read the hints:
    'The partition name is the device name in GNU/Linux. The first partition in the first disk is "sda1", the 2nd partition in the first disk is "sda2", the first partition in the second disk is "sdb1" or "sdb1"... If the system you want to save is MS windows, normally C: is sda1, and D: could be sda2, or sda5...'

    Then Clonezilla shows you the disk usage report:


    Here we choose "Beginner" mode:


    If you choose "Expert" mode, you will have some chances to choose advanced parameters, e.g. imaging program, compression program, etc.. You can see more details here.

    Now you can select "restoredisk" option:




  • Select image name and destination disk     ^TOP^
  •  Choose the Clonezilla live image as source image:


    Select the destination disk "sda" we want to restore:


    Choose to check the image integrity before really restoring the image to disk sda:


    It's recommended to check the image before restoring it. You will not know if the image is broken or not. If you are really sure about the integrity is OK, then of course you can choose "-scr" to skip checking.

    Select the mode you want after the image saving is done:


    By default we will choose later, but if you have decided, you can choose to reboot or poweroff the machine.

    Clonezilla will prompt us the command to restore the image. This command is very useful when you want to create a customized Clonezilla live:


    Before starting to restore the disk image to disk sda, Clonezilla will ask you to confirm that TWICE:





  • Clonezilla is restoring disk image on 2nd disk (sdb) to 1st disk (sda)     ^TOP^
  •  Clonezilla now is restoring the selected disk image to 1st disk (sda). The job is done by restoring:
    • MBR (by dd), and Boot loader (by grub)
    • Partition table (by sfdisk).
    • Data on every partition or LV (logical volume) (by partimage, ntfsclone, partclone or dd. It depends on the image of each partition or LV.)






    When everything is done, Clonezilla will prompt you if you want to run it again (when something goes wrong or you want to choose different options),
    1. 'Stay in this console (console 1), enter command line prompt'
    2. 'Run command "exit" or "logout"'


    Then you can choose to:
    • Poweroff
    • Reboot
    • Enter command line prompt
    • Start over (image repository /home/partimag, if mounted, will be umounted)
    • Start over (keep image repository /home/partimag mounted)
    • Start over (Remount subdir in medium of current repository)


    Here we choose Poweroff, then when the shutdown process is done, it will ask you to remove the disk and close the try (if any) then press ENTER if you boot Clonezilla live from CD. If you boot Clonezilla live from USB flash drive, then there is no such prompt.


    That's all. The 1st disk (sda) is ready to be used.

Configure NIC Teaming in VMware First go to Windows Server 2012  then go to Server Manger Click on All Server then right click on your...