Saturday, December 27, 2014

Huawei and Cisco – Connect eNSP to GNS3 (Simulators)

Huawei eNSP (Enterprise Network Simulation Platform) is a network simulator developed by Huawei and freelly available. eNSP use Oracle Virtual Box (bundled within the eNSP installer), where each device is emulated from a single Virtual Box VM. eNSP uses a GUI to create and manage devices so no Virtual Box knowledge is needed.

Below we are going to show how to connect eNSP (v1.2.00.330) with GNS3 (v1.2.1), so that the equipments in both simulators can comunicate with each other.

Setting Up eNSP (Huawei Simulator)

ScreenShot005

Two interfaces must be added:

  • Ethernet Internal (UDP) port: used between eNSP GUI and Virtual Box ASR2 instance;
  • Ethernet Public port: used between eNSP GUI and the GNS3

Both interfaces must implement (Port Mapping) a Two-way Channel.

ScreenShot006

ScreenShot007

ScreenShot008

ScreenShot009

ScreenShot010.1

ScreenShot010.2

ScreenShot011

ScreenShot012

ScreenShot013

 

Setting Up GNS3 (Cisco Simulator)

ScreenShop001

ScreenShop003

ScreenShop004

ScreenShop005

ScreenShop007

ScreenShop008

ScreenShop009

ScreenShop010

Now just configure GE0/0/0 on AR2 (eNSP) and Fa0/0 on R1 (GNS3) on the same subnet and start pinging.

Related Links:

Friday, December 5, 2014

Cisco – IP SLA Basics

IP SLA BASICS

MAY 6, 2011 TONY MATTKE

IP SLA is a function of Cisco’s IOS enabling you to analyze a Service Level Agreement (SLA) for an IP application or service. IP SLAs use active traffic-monitoring to continuously monitor traffic across the network. This is very different from SNMP or Netflow data which give you more volume oriented statistics. Many different metrics can be analyzed using IP SLA, here is a break down of a few.

  • UDP Jitter – Probably the most used operation in all of IP SLA. This IP SLA generates UDP traffic and measures Round-trip Delay, One-way Delay, One-way Jitter, One-way Packet Loss, and overall Connectivity.
  • ICMP Path Jitter – Hop-by-hop Jitter, Packet Loss, and Delay.
  • UDP Jitter for VoIP – Enhanced test for VoIP monitoring. It can simulate various codecs and spits out voice quality scores (MOS, and ICPIF). Also shows us Round-trip Delay, One-way Delay, One-way Jitter, and One-way Packet Loss.
  • UDP Echo – Round-trip Delay for UDP traffic.
  • ICMP Echo – Round-trip Delay, full path.
  • ICMP Path Echo – Round-trip Delay and Hop-by-hop round trip delay.
  • HTTP – Round-trip time using simulated http traffic.
  • TCP Connect – Allows us to sample the time to connect to a target using TCP.
  • FTP – Round-trip time for file transfers.
  • DHCP – Round-trip time for dynamic host configuration.
  • Frame-Relay –Round-trip Delay, and the Frame Delivery Ratio. Mostly used for circuit availability.

IP SLA Configuration

There are 2 parts to the IP SLA configuration. Our testing source, and the responder. Typically our responder is a device local to the data center, while the test host is device at a remote site. The test host sends data to the responder and the responder sends a reply back. The configuration for the responder is nothing but really, really simple…

ip sla responder

Seriously. Now lets take a look at the configuration of the testing source. Any questions I don’t answer here should be easily available via IOS context help… Here is an example I’m using in production.

ip sla 10 ! New IP SLA Instance #10
udp-jitter 10.1.1.1 16800 source-ip 10.2.2.2 codec g711ulaw ! udp jitter w/Voice codec
tos 184 ! TOS bit, using EF here
frequency 300 ! testing interval

ip sla schedule 10 life forever start-time now ! start now, never stop

So, what does this get us? Here are the stats output by our IP SLA source..

Router#sh ip sla statistics 10 ! Omit the # to view all SLA stats.
IPSLAs Latest Operation Statistics

IPSLA operation id: 10
Type of operation: udp-jitter
    Latest RTT: 42 milliseconds
Latest operation start time: 18:28:06.603 UTC Thu May 5 2011
Latest operation return code: OK

RTT Values:
    Number Of RTT: 1000 RTT Min/Avg/Max: 39/42/154 milliseconds
   
Latency one-way time:
    Number of Latency one-way Samples: 1000
    Source to Destination Latency one way Min/Avg/Max: 25/26/41 milliseconds
    Destination to Source Latency one way Min/Avg/Max: 13/15/127 milliseconds

Jitter Time:
    Number of SD Jitter Samples: 999
    Number of DS Jitter Samples: 999
    Source to Destination Jitter Min/Avg/Max: 0/2/15 milliseconds
    Destination to Source Jitter Min/Avg/Max: 0/2/90 milliseconds

Packet Loss Values:
    Loss Source to Destination: 0 Loss Destination to Source: 0
    Out Of Sequence: 0 Tail Drop: 0
    Packet Late Arrival: 0 Packet Skipped: 0
   
Voice Score Values:
Calculated Planning Impairment Factor (ICPIF): 1

MOS score: 4.34
Number of successes: 7
Number of failures: 0

Operation time to live: Forever

Conclusion

Cisco’s IP SLA features can be a huge benefit to any engineer trying to track down issues on the network. Using IP SLA in combination with a SNMP management suite, or even an EEM script can provide real time alerting for adverse network conditions, allowing you to respond faster and perform better.

Author: Tony Mattke

Taken From: http://routerjockey.com/2011/05/06/ip-sla-basics/?subscribe=success#blog_subscription-3

Monday, November 24, 2014

Change MAC Address on Linux (Ubuntu / Debian)

Temporary MAC Address Change

When you change the MAC address for an interface, you need to have the network interface disabled (down) and than to set the new MAC.

You can do both this things with the command:

$ sudo ifconfig eth0 down hw ether AA:BB:CC:DD:EE:FF && ifconfig eth0 up

This sets down the eth0 interface, changes the mac to AA:BB:CC:DD:EE:FF and turns the interface back down.

Or, do it in the old fashioned way:

$ sudo ifconfig eth0 down
$ sudo ifconfig eth0 hw ether AA:BB:CC:DD:EE:FF
$ sudo ifconfig eth0 up

Read more about the ifconfig command here.

 

Permanent MAC Address Change

To set the hardware address (MAC), open the /etc/network/interface file in your favourite text editor:

$ sudo vim /etc/network/interfaces

After the network interface configuration, paste this line: hwaddress ether AA:BB:CC:11:22:33.
Note: AA:BB:CC:11:22:33 is just a sample, replace it with the MAC address you want to set for your interface.

Example, with dhcp enabled network interface:

auto eth0
iface eth0 inet dhcp
hwaddress ether AA:BB:CC:11:22:33

Example, with a network interface having a static ip:

auto eth0
iface eth0 inet static
address 192.168.0.100
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1
hwaddress ether AA:BB:CC:11:22:33

To apply the MAC change, restart the network interface:

$ sudo /etc/init.d/networking restart

Based On:

Sunday, November 23, 2014

Raspberry Pi (Linux) – TigthVNC Server + File Transfer

How to Configure Your Raspberry Pi for Remote Shell, Desktop, and File Transfer

So you have a Raspberry Pi and you would like to maximize its tiny footprint by turning into a totally stand alone box—no monitor, keyboard, or other input peripherals. Read on as we show you how to set up remote shell, desktop, and file transfer access on your Pi.

Why Do I Want to Do This?

The Pi, even clad in a sturdy case, is a tiny computer. It’s perfect for tucking somewhere out of sight without a gaggle of wires sticking off of it—for many projects you simply don’t need a permanent monitor and peripheral accompaniment.

That doesn’t mean, however, that you won’t need to connect to the box to make changes, update things, transfer files, and so on. A perfect example of this is the cool little rain indicator we built as part of our Build an LED Indicator with a Raspberry Pi (for Email, Weather, or Anything) article. It doesn’t need all that stuff attached right to it, but we still would like the ability to hop onto the device and easily make changes or try out a new experiments with the LED module without having to drag it back into the workshop, and hook it up to a monitor, keyboard, mouse, etc. By configuring it for remote shell, remote desktop, and remote file transfer, we make it super simple to always interact with our Pi unit from the comfort of our desktop computer as if we’ve hooked the unit up to a full work station.

What Do I Need?

If you’re brand new to working with the Raspberry Pi, we strongly suggest checking out The HTG Guide to Getting Started with Raspberry Pi to get a handle on the basics of the device and get up to speed.

For this tutorial you will need the following things:

  • A Raspberry Pi running Raspbian.
  • A desktop or laptop computer.
  • A local Wi-Fi or wired network to connect the Pi and your computer.

First, most of the steps in this tutorial should work with other Linux-based Pi distributions butwe’re going to be using Raspbian. You should have little trouble adapting the tutorial to other distributions.

Second, we’re using a Windows machine as our networked computer to interact with the Raspberry Pi unit as the remote head/interface. When appropriate, we’ll do our best to link to tutorials and suggested reading regarding performing parallel tasks and tools on OS X and Linux.

Setting Up and Connecting to the SSH Server
clip_image002

Remote command line access to your Raspbian installation is about the handiest little tweak you can make to your system, and it’s down right simple to enable.

Open up the terminal in Rasbian, the shortcut is LXTerminal on the desktop, and type in the following command:

sudo raspi-config

Navigate down to ssh and hit enter. When prompted about the SSH server, select Enable and hit enter again. You will be returned to the Raspi-config panel; navigate down to Finish and hit enter to close out the configuration tool. That’s all you need to do to turn on SSH access to your Pi. The default SSH login and password is pi and raspberry, respectively.

While you’re still sitting at the command line, now is a great time to check the IP of your Raspberry Pi unit on the local network. Type ifconfig at the prompt and then look at the output of the command. If you’re using the Ethernet port you want to look for the init addr in the eth0section; if you’re using Wi-Fi, you want to look for the init addr in the wlan0 section. In addition to checking and noting the IP address, this is also a great time to set up a static IP entry in your router so you don’t have to hunt for the IP in the future.

Now that we have the SSH server enabled, we know the login, and we know the IP address of the machine, it’s time to connect in via SSH and test it out. To do so from Linux and OS X you can simply use the ssh command at the terminal. Windows users, however, will need an SSH client like PuTTY.

Since we’re using a Windows box to remotely manage our Pi, PuTTY it is. Install a copy of PuTTY or extract the portable version and fire it up. There are a lot of settings you can mess with in PuTTY, but we only need to worry about a single thing to connect to our Pi. On the main Session interface, just type in the IP address of your Pi and select SSH below it:

clip_image003

Hit Open at the bottom and PuTTY will launch a terminal window for you, connect to your Pi, and prompt you to log in. Go ahead and log in with pi / raspberry:

clip_image005

Once your SSH connection is functional, you could technically complete the rest of this tutorial remotely from the comfort of your desk—although we’d advise leaving the head and keyboard on your system until you have finish the whole project and have everything running smoothly.

Before we move on, there’s some extra functionality we can squeeze out of SSH. In addition to managing the command line remotely, you can also remotely transfer files using Secure Copy. It’s command line intensive and not particularly convenient for transferring a large number of files sourced from multiple directories, but for a one-off configuration file transfer or other small dump, it’s pretty handy. Check out our guide to copying files over SSH using the SCP command here.

We’re going to be looking closer more user-friendly/GUI-based file transfer techniques later in the tutorial.

Setting Up and Configuring Your Remote Desktop

clip_image006

Remote command line access is awesome, but so is having access to the desktop for GUI-focused activities. Let’s bring the powers of the command line and the powers of the desktop together.

Although we’ve been referring to it as “remote desktop” to this point, the tool we’re actually installing is known as Virtual Network Computing (VNC)—iterations of which many are familiar with such as RealVNC and TightVNC. For this tutorial, we’ll be installing TightVNC on the Pi. In order to access the Pi-based TightVNC session, you will need a remote client such as:

Grab a copy now, and we’ll be trotting it out later in this section. For now, let’s get down to installing the TightVNC server on your Raspberry Pi. Open up the terminal. Enter the following command to get started:

sudo apt-get install tightvncserver

This will download and unpack the installation files; when prompted to continue press Y. After the installation is complete, you’ll be returned to the prompt.  You can start the VNC one of two ways. Simply running the command for the server like so:

tightvncserver

clip_image007

Will prompt you enter a password to access your VNC desktop—as seen in the screenshot above. The password needs to be 4-8 characters long. Once you confirm the password, you will be prompted to set a view-only password (you can opt out of the step, as we did).

 

Continue reading to learn how to configure your server and setup file transfer tools.

Alternatively, you can use a much more precise, albeit longer to type out, command that gives you more control over how the remote computer will see the desktop—most importantly, what resolution the desktop will display so you can enjoy a full screen view on the remote computer. To specify the resolution of the VNC desktop, use the following command, swapping out the resolution value (the fourth item in the command) for the resolution of the remote desktop:

vncserver :1 -geometry 1600×900 -depth 16 -pixelformat rgb565:

If at any point you make a mistake in setting up your VNC server instance and/or you want to shut down the VNC server, simply enter the following (changing the number after the colon to the number of the VNC instance you want to kill):

vncserver –kill :1

Now that we have the VNC server up and running, let’s connect into it from our remote desktop. Fire up TightVNC viewer on your computer and plug in the IP address of the Raspberry Pi unit followed by :1 like so:

clip_image008

And here’s our reward for successfully configuring our VNC server—a nice full screen view of our remote Raspberry Pi unit:

clip_image010

There’s a known issue with TightVNC and Rasbian that, thanks to a wonky permission change, will cause trouble with the actual monitor-is-attached desktop (while leaving the remote desktop interface provided by the VNC server untouched).  To fix this issue before it even becomes a problem for you, head right to the command line and enter the following command:

sudo chown pi /home/pi/.Xauthority

This command changes the ownership of the .Xauthority file back to the user pi—for the curious, the .Xauthority file is used by the X-windows system in Rasbian and something during the TightVNC server installation and configuration process causes that little permissions hiccup.

With that little minor detour out the way, let’s get back to finishing our remote desktop configuration.

Now that we have full command line and desktop access to the Raspberry Pi, there’s one not-so-trivial tweak we need to make. The Raspi-config tool set the SSH server to automatically start on boot for us, but the VNC server is not yet configured in such a fashion. You can skip this step and manually start the server at the command line via SSH when you need it, but we’re trying to make this as fuss-free as possible for future use. Let’s take a minute now and create a startup file for the VNC server.

In order to automatically start the VNC server, we need to set up an init, or initialization, file that Raspbian will use to cleanly start and shut down the server during the boot and shut down process. Let’s create the init file now. At the command line type in the following command:

sudo nano /etc/init.d/tightvnc

This will create a file in the initialization directory called “tightvnc” and open the nano editor so we can paste in our script. In the nano editor, paste the following code (make sure to change the 1600×900 resolution value to match the screen of your remote computer:

#!/bin/sh
### BEGIN INIT INFO
# Provides: tightvncserver
# Required-Start:
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: start vnc server
# Description:
### END INIT INFO

case “$1″ in
start)
su pi -c ‘vncserver :1 -geometry 1600×900 -depth 16 -pixelformat rgb565:’
echo “VNC Started”
;;
stop)
pkill Xtightvnc
echo “VNC Terminated”
;;
*)
echo “Usage: /etc/init.d/tightvnc {start|stop}”
exit 1
;;
esac

In addition to modifying the screen resolution portion of the script, there is one other thing you can modify. In line 14 you can change the command “su pi -c” to any other user account besides “pi” if you wish to VNC to the specific desktop for that account.

Once you have pasted and modified the code, it’s time to save it. Press CTRL+X to exit and save your work in nano. Once you are back at the command line, we need to make a few quick changes to the permissions of the file:

sudo chmod 755 /etc/init.d/tightvnc

Now the initialization file is executable. We can test it from the prompt:

sudo /etc/init.d/tightvnc start

sudo /etc/init.d/tightvnc stop

The last change we’re going to make is to update the rc.d file (which tracks which initilization scripts are in the /init.d/ folder):

sudo update-rc.d tightvnc defaults

After you enter that command, you’ll get a confirmation that the file was updated. Now it’s time for the real test: does the file load properly after reboot? Enter the following at the command line to reboot and be prepared with your VNC client to test the connection in a moment:

sudo reboot

Once the system has finished rebooting, log in with your VNC client. If your VNC session fails, visit the command prompt and run the tightvnc start command (from the test portion above) again to double check that the file is executable and that the password was saved properly.

At this point, we’re even further along in our mission to totally remote-control our Raspberry Pi unit. With remote command line access via SSH and remote desktop access via VNC under our belts, let’s move on to simplifying the process of transferring files between our Pi and desktop computer.

 

Setting Up and Configuring File Transfer Tools

clip_image012

Since we already have SSH set up, the easiest way to set up dead simple file transfer between our Pi and remote computers is to piggy back a GUI interface on the SSH connection. Remember how we talked about using SCP over SSH earlier in the tutorial? Running it from the command line gets real tedious, real fast. With a GUI wrapper, we’ll be able to spend more time moving files and playing with our Pi and less time pecking at the keyboard.

While there are a variety of GUI wrappers for the SCP command, we’re going to go with a cross-platform tool that many people already know, have, and love (and may even be unaware that it does SCP transfers): FileZilla. It’s available for Windows, OS X, and Linux—you can grab a copy here.

Once you have installed FileZilla, fire it up and go to File –> Site Manager. Create a new site entry, name it, and plug in user name and password for your Pi.

clip_image013

Finally, make sure to set the port to 22 and the Servertype to SFTP – SSH File Transfer Protocol. Click connect at the bottom and you’ll be treated to a view similar to this one:

clip_image014

Your local directories are in the left-hand pane and the remote directories on the Pi are in the right-hand pane. Moving files between the two is as simple as drag and dropping them.

Taking advantage of the existing SSH file transfer is the easiest way to get at the files on the Pi with no additional configuration necessary but if you want to configure your Pi to receive and share files without the remote user requiring any fancy tools (like an SCP capable FTP client such as FileZilla), we highly recommend checking out the Samba configuration portion of our guide:How to Turn a Raspberry Pi into a Low-Power Network Storage Device. Reading over that will familiarize you with setting up a basic Samba share on Pi to create a shared folder easily accessible by just about anyone on your network without any additional tools.

You’ve configured SSH, you’ve configured VNC, and you’ve set up simple SFTP and/or Samba access to your Pi—at this point you can boot down your Raspberry Pi, strip away the monitor, keyboard, and mouse, and tuck it away as a silent and headless machine.

Have an idea for Raspberry Pi project and you’re dying for us to write a tutorial for it? Sound off in the comments or shoot us an email at tips@howtogeek.com and we’ll do our best to help.

Taken From: http://www.howtogeek.com/141157/how-to-configure-your-raspberry-pi-for-remote-shell-desktop-and-file-transfer/all/

Sunday, November 9, 2014

Cisco – Interface History Command (IOS 15)

The "history" command is new with 15.1T. This, along with the new "show interface history" command, allows an interface to maintain utilization history in a graphical format similar to CPU history.

This history can be maintained as either packets per second (pps) or bit per second (bps).

interface fastEthernet 0/1
history xxx
  bps  Maintain history in bits/second
  pps  Maintain history in packets/second

Along with the rate, the user can monitor the many/various interface counters. As with CPU history, there are graphs for the last 60 seconds, last 60 minutes and last 72 hours. Separate graphs are maintained for input and output. This is a total of 6 graphs.

The show interface history command allows a display of all 6 graphs or only a subset based on needs:

show interface [type number] history [all | 60sec | 60min | 72hour] [both | input | output]

Example

interface fastEthernet 0/23
history bps

show interfaces FastEthernet 0/24 history

image

image

image

image

image

image

Related Links:

Saturday, November 8, 2014

Wake on Lan - Linux

HowTo: Wake Up Computers Using Linux Command [ Wake-on-LAN ( WOL ) ] by NIXCRAFT on APRIL 3, 2012

Wake-on-LAN (WOL) is an Ethernet networking standard that allows a server to be turned on by a network message. You need to send 'magic packets' to wake-on-lan enabled ethernet adapters and motherboards, in order to switch on the called systems. Make sure you connect the NIC (eth0 or eth1) with the motherboard, and enable the WOL function in the BIOS. This is a quick guide to enable WOL under RHEL / Fedora / CentOS / Debian / Ubuntu Linux.

Client Software

You need to use software to send WoL magic packets. You will find various tools for all modern oses, including MS-Windows, Apple OS X, Linux, and many smart phones.
Linux Install etherwake Under Debian / Ubuntu Linux
etherwake command can be used to send a Wake-On-LAN "Magic Packet" under Linux operating systems. Type the following command to install the same under Debian / Ubuntu Linux desktop:

$ sudo apt-get install etherwake

[sudo] password for vivek:
The following NEW packages will be installed:
  etherwake wakeonlan{a}
0 packages upgraded, 2 newly installed, 0 to remove and 11 not upgraded.
Need to get 20.9 kB of archives. After unpacking 98.3 kB will be used.
Do you want to continue? [Y/n/?] y
Get:1
http://mirror.anl.gov/debian/ squeeze/main etherwake amd64 1.09-3 [9,564 B]
Get:2
http://mirror.anl.gov/debian/ squeeze/main wakeonlan all 0.41-10 [11.4 kB]
Fetched 20.9 kB in 2s (10.3 kB/s)
Selecting previously deselected package etherwake.
(Reading database ... 195338 files and directories currently installed.)
Unpacking etherwake (from .../etherwake_1.09-3_amd64.deb) ...
Selecting previously deselected package wakeonlan.
Unpacking wakeonlan (from .../wakeonlan_0.41-10_all.deb) ...
Processing triggers for man-db ...
Setting up etherwake (1.09-3) ...
Setting up wakeonlan (0.41-10) ...

Note: Red Hat Linux and friends user should use net-tools package which is installed by default.

How Do I Send WOL Magic Packets Under Linux?

Type the following command:
# wakeonlan MAC-Address-Here
OR
# etherwake MAC-Address-Here
# etherwake -D MAC-Address-Here

RHEL / Centos / Fedora Linux user, try:
# ether-wake MAC-Address-Here
If your MAC address were xx:yy:zz:11:22:33, you would type:
# wakeonlan xx:yy:zz:11:22:33
OR
# etherwake xx:yy:zz:11:22:33

Where, xx:yy:zz:11:22:33 is remote servers mac address. You can obtained mac address using combination of ping and arp command - 'ping -c 4 server3 && arp -n'.

How Do I Verify That Remote Linux Server Supports Wake-on-LAN (WOL)?

First, reboot the remote server and go to BIOS > Power Management > "Wake On LAN". Turn it on. Next, save and close the bios. After activating Wake On LAN in hardware (BIOS) it is also necessary to activate it using ethtool. The ethtool will configure eth0 to respond to the magic packet:

# ethtool -s eth0 wol g

Where,
1. -s eth0: Your NIC. Feel free to replace eth0 with your actual network interface device name.
2. wol g: Sets Wake-on-LAN options using MagicPacket.

Type the following command to see current status of wol for eth0:
# ethtool eth0
Settings for eth0:
    Supported ports: [ ]
    Supported link modes:
    Supports auto-negotiation: No
    Advertised link modes:  Not reported
    Advertised auto-negotiation: No
    Speed: 100Mb/s
    Duplex: Full
    Port: MII
    PHYAD: 1
    Transceiver: internal
    Auto-negotiation: off
        Supports Wake-on: g
       Wake-on: g

    Link detected: yes


If you are using RHEL / SL / Fedora / CentOS Linux, edit /etc/sysconfig/network-scripts/ifcfg-eth0:

# vi /etc/sysconfig/network-scripts/ifcfg-eth0
Add / modify the following line:
 
ETHTOOL_OPTS="wol g"

OR
ETHTOOL_OPTS="wol g autoneg off speed 100 duplex full "

 
Save and close the file. If you are using Debian / Ubuntu Linux, edit /etc/network/interfaces:

# vi /etc/network/interfaces
Append the following to eth0:

auto eth0
iface eth0 inet static
address 192.168.1.1
netmask 255.255.255.0
gateway 192.168.1.254
        post-up /sbin/ethtool -s eth0 wol g
        post-down /sbin/ethtool -s eth0 wol g
 

post-up and post-down execute a comand or a script when the interface comes up and when it goes down. Here we used it for  ethtool, but you can use it for anything you want.


Recommend readings
- man pages - ethtool, ether-wake / etherwake, arp, wakeonlan
- Wake-on-LAN

Taken From: http://www.cyberciti.biz/tips/linux-send-wake-on-lan-wol-magic-packets.html

Saturday, November 1, 2014

How to Create Bootable USB Drives and SD Cards For Every Operating System

How to Create Bootable USB Drives and SD Cards For Every Operating System

clip_image001

Creating installation media for your operating system of choice used to be simple. Just download an ISO and burn it to CD or DVD. Now we’re using USB drives, and the process is a little different for each operating system.

You can’t just copy files form an ISO disc image directly onto your USB drive. The USB drive’s data partition needs to be made bootable, for one thing. This process will usually wipe your USB drive or SD card.

From a Linux ISO

Ubuntu recommends the Universal USB Installer for creating bootable Linux USB drives on Windows. This tool can create bootable disc images for many different Linux distributions.UNetbootin is another popular alternative.

Download the Linux distribution you want to use in .ISO form. Run the tool, select your desired distribution, browse to your downloaded ISO file, and choose the USB drive you want to use. The tool will do the rest.

clip_image002

You can use similar tools on Linux. For example, Ubuntu includes a Startup Disk Creator tool for creating bootable Ubuntu USB drives. UNetbootin also runs on Linux, so you can use that too.

clip_image003

From an IMG File

Some operating system projects provide an IMG file instead of an ISO file. An IMG file is a raw disk image that needs to be written directly to a USB drive.

Use Win32 Disk Imager to write an IMG file to a USB drive or SD card. Provide a downloaded IMG file and the tool will write it directly to your drive, erasing its current contents. You can also use this tool to create IMG files from USB drives and SD cards.

clip_image004

Linux users can use the dd command to directly write an IMG file’s contents to a removable media device. Insert the removable media and run the following command on Ubuntu:

sudo dd if=/home/user/file.img of=/dev/sdX bs=1M

Replace /home/user/file.img with the path to the IMG file on your file system and /dev/sdX with the path to your USB or SD card device. Be very careful to specify the correct disk path here — if you specify the path to your system drive instead, you’ll write the contents of the image to your operating system drive and corrupt it

clip_image005

From a Windows 7 ISO

Provide the ISO file and a USB flash drive and the tool will create a bootable drive.

clip_image006

From a Windows 8 or 8.1 Product Key

If you have a Windows 8 or Windows 8.1 product key, you can download installation media directly from Microsoft and create a USB drive all at once. Download the appropriate tool from the Upgrade Windows with only a product key page. Run it, provide your product key, and tell the wizard you want to create a bootable USB drive.

Note that Windows 8 and Windows 8.1 have different product keys, so you’ll need to jump through hoops if you want to install Windows 8.1 with a Windows 8 product key. You may just want to install Windows 8 and upgrade to Windows 8.1 from within Windows 8 — that’s Microsoft’s officially supported method.

clip_image007

From a Windows 8 or 8.1 ISO

If you already have a Windows 8 or 8.1 ISO file and you want to create installation media without redownloading anything, you can actually use the Windows 7 USB/DVD download tool for this.

Just provide the Windows 8 or 8.1 ISO file when prompted. The tool will happily create Windows 8 or 8.1 installation media if you provide the appropriate ISO file.

clip_image008

If you need to boot into DOS to use a low-level firmware upgrade, BIOS update, or system tool that still requires DOS for some reason, you can use the Rufus tool to create a bootable DOS USB drive.

Rufus uses FreeDOS, an open-source implementation of DOS that should run whatever DOS program you need to use.

clip_image009

From Mac OS X Installation Files

You can create a bootable drive with Mac OS X on it by downloading the latest version of OS X from the Mac App Store. Use Apple’s included “createinstallmedia” tool in a terminal or by run the third-party DiskMaker X tool.

The Mac OS X drive can be used to install OS X on other Macs or upgrade them to the latest version without any long downloads.

clip_image011

From a Windows ISO for Mac

If you plan on installing Windows on a Mac via Boot Camp, don’t bother creating a bootable USB drive in the usual way. Use your Mac’s Boot Camp tool to start setting things up and it will walk you through creating a bootable Windows installation drive with Apple’s drivers and Boot Camp utilities integrated.

You can use this drive to install Windows on multiple Macs, but don’t use it to install Windows on non-Apple PCs.

clip_image012

Some of these tools overlap — for example, Rufus can also be used to create bootable drives from Linux ISOs, IMG files, and even Windows ISO Files. We suggested the most popular, widely recommended tools for each task here.

Image Credit: USBMemoryDirect on Flickr

Taken From: http://www.howtogeek.com/191054/how-to-create-bootable-usb-drives-and-sd-cards-for-every-operating-system/

Monday, October 27, 2014

Huawei – Router on a Stick (Router and Switch Config)

How to Configure Huawei router-on-a-stick

Requirements: The range on the host broadcast domain of communication can be reduced by VLAN configuration to the switch on the LAN. You can use a router that supports 802.1Q to realize interoperability of VLAN on the condition that part of the hosts need to communicate among VLAN while the switches doesn’t support the huawei three-layer switch, which requires the establishment of a sub-interface on the Ethernet port, assignment of the IP address as the related VLAN gateway, and start 802.1Q at the same time.

Networking: Connect E0 port of the router with uplink trunk port (24th ports) of the switch on the router, and divide 3 VLAN on switch downward port with several hosts.

Router Config

interface Ethernet0/0/4
ip address 10.0.0.1 255.255.255.0

interface Ethernet0/0/4.1           
  ip address 172.16.1.1 255.255.255.0
  vlan-type dot1q vid 1

Specify the Ethernet sub-interfaces belonging to VLAN1, and this command is applied to the Ethernet sub-interface. Only this command is configured, the Ethernet sub-interface will be embedded VLAN tag in the Ethernet frame header according to the configuration of the VLAN ID number so that the switch port connected to the switch interface can deal with the received frame correctly only the command has been configured.             

interface Ethernet0/0/4.2                     
ip address 172.16.2.1 255.255.255.0
dot1q termination vid 2

interface Ethernet0/0/4.3
  ip address 172.16.3.1 255.255.255.0

  dot1q termination vid 3

interface Ethernet0/0/4
  undo shut
% Interface Ethernet0/0/4 is up

Connect the E0 port with the 24th port of S3026 with the network cable                             
%19:46:32: Interface Ethernet0/0/4 changed state to UP
%19:46:32: Line protocol ip on interface Ethernet0/0/4, changed state to UP
%19:46:32: Line protocol ip on interface Ethernet0/0/4.1, changed state to UP
%19:46:32: Line protocol ip on interface Ethernet0/0/4.2, changed state to UP
%19:46:32: Line protocol ip on interface Ethernet0/0/4.3, changed state to UP

 

Switch Config

vlan 1

vlan 2
interface eth 0/17
interface eth 0/18
interface eth 0/19
interface eth 0/22

vlan 3
interface eth 0/21

interface eth 0/24
port link-type trunk
port trunk permit vlan all

Check out the TRUNK port configuration
display port trunk    
Now, the following trunking ports exist:
Ethernet0/24

Check out the VLAN2 configuration
display vlan 2     
VLAN ID: 2
VLAN Type: static
Route Interface: not configured
Description: VLAN 0002

Tagged Ports:
Ethernet0/24

Untagged Ports:
Ethernet0/17 Ethernet0/18 Ethernet0/19 Ethernet0/22

Check out the VLAN3 configuration
display vlan 3     
VLAN ID: 3
VLAN Type: static

Route Interface: not configured
Description: VLAN 0003

Tagged Ports:
Ethernet0/24

Untagged Ports:
Ethernet0/21

Check the network connectivity on the workstation. This workstation is connected to the 21st port of S3026, belonging to VLAN2.

C:\Documents and Settings\Administrator>ipconfig
windows 2000 IP Configuration
Ethernet adapter             Local connection:
Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : 172.16.2.22
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 172.16.2.1


C:\Documents and Settings\Administrator>ping 172.16.3.1

Pinging 172.16.3.1 with 32 bytes of data:

Reply from 172.16.3.1: bytes=32 time<10ms TTL=255
Reply from 172.16.3.1: bytes=32 time<10ms TTL=255
Reply from 172.16.3.1: bytes=32 time<10ms TTL=255
Reply from 172.16.3.1: bytes=32 time<10ms TTL=255

Ping statistics for 172.16.3.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms

View the routing table on the Huawei router, can be found, as each of the network segments on the 172.16 are connected to the router directly, so the communication between the VLAN can be realized without starting the routing protocols or static routing.

[Router]display ip routing-table

Routing Tables:

Destination/Mask Proto Pref Metric Nexthop Interface

10.0.0.0/24 Direct 0 0 10.0.0.1 Ethernet0
10.0.0.1/32 Direct 0 0 127.0.0.1LoopBack0
127.0.0.0/8 Direct 0 0 127.0.0.1 LoopBack0
127.0.0.1/32 Direct 0 0 127.0.0.1 LoopBack0
172.16.1.0/24 Direct 0 0 172.16.1.1 Ethernet0.1
172.16.1.1/32 Direct 0 0 127.0.0.1 LoopBack0
172.16.2.0/24 Direct 0 0 172.16.2.1 Ethernet0.2
172.16.2.1/32 Direct 0 0 127.0.0.1 LoopBack0
172.16.3.0/24 Direct 0 0 172.16.3.1 Ethernet0.3
172.16.3.1/32 Direct 0 0 127.0.0.1 LoopBack0

Based On:

Related Links:

Monday, September 29, 2014

Boot Linux ISOs From Hard Drive ( GRUB )

How to Boot Linux ISO Images Directly From Your Hard Drive

Linux’s GRUB2 boot loader can boot Linux ISO files directly from your hard drive. Boot Linux live CDs or even install Linux on another hard drive partition without burning it to disc or booting from a USB drive.

We performed this process on Ubuntu 14.04 — Ubuntu and Ubuntu-based Linux distributions have good support for this. Other Linux distributions should work similarly.

Get a Linux ISO File

How to Configure the GRUB2 Boot Loader’s Settings
Ubuntu and most other Linux distributions now use the GRUB2 boot loader. You can change its settings to select a... [Read Article]

This trick requires you have a Linux system installed on your hard drive. Your computer must be using the GRUB2 boot loader, which is a standard boot loader on most Linux systems. Sorry, you can’t boot a Linux ISO file directly from a Windows system using the Windows boot loader.

Download the ISO files you want to use and store them on your Linux partition. GRUB2 should support most Linux systems. if you want to use them in a live environment without installing them to your hard drive, be sure to download the “live CD” versions of each Linux ISO. Many Linux-based bootable utility discs should also work.

Check the Contents of the ISO File

You may need to look inside the ISO file to determine exactly where specific files are. For example, you can do this by opening the ISO file with the Archive Manager/File Roller graphical application that comes with Ubuntu and other GNOME-based desktop environments. In the Nautilus file manager, right-click the ISO file and select Open with Archive Manager.

Locate the kernel file and the initrd image. If you’re using a Ubuntu ISO file, you’ll find these files inside the casper folder — the vmlinuz file is the Linux kernel and the initrd file is the initrd image. You’ll need to know their location inside the ISO file later.

clip_image002

Determine the Hard Drive Partition’s Path

GRUB uses a different “device name” scheme than Linux does. On a Linux system, /dev/sda0 is the first partition on the first hard disk — a means the first hard disk and 0 means its first partition. In GRUB, (hd0,1) is equivalent to /dev/sda0. The 0 means the first hard disk, while the1 means the first partition on it. In other words, in a GRUB device name, the disk numbers start counting at 0 and the partition num6ers start counting at 1 — yes, it’s unnecessarily confusing. For example, (hd3,6) refers to the sixth partition on the fourth hard disk.

You can use the fdisk -l command to view this information. On Ubuntu, open a Terminal and run the following command:

sudo fdisk -l

You’ll see a list of Linux device paths, which you can convert to GRUB device names on your own. For example, below we can see the system partition is /dev/sda1 — so that’s (hd0,1) for GRUB.

clip_image003

Create the GRUB2 Boot Entry

The easiest way to add a custom boot entry is to edit the /etc/grub.d/40_custom script. This file is designed for user-added custom boot entries. After editing the file, the contents of your /etc/defaults/grub file and the /etc/grub.d/ scripts will be combined to create a /boot/grub/grub.cfg file — you shouldn’t edit this file by hand. It’s designed to be automatically generated from settings you specify in other files.

You’ll need to open the /etc/grub.d/40_custom file for editing with root privileges. On Ubuntu, you can do this by opening a Terminal window and running the following command:

sudo gedit /etc/grub.d/40_custom

Feel free to open the file in your favorite text editor. For example, you could replace “gedit” with “nano” in the command to open the file in the Nano text editor.

Unless you’ve added other custom boot entries, you should see a mostly empty file. You’ll need to add one or more ISO-booting sections to the file below the commented lines.

clip_image004

Here’s how you can boot an Ubuntu or Ubuntu-based distribution from an ISO file. We tested this with Ubuntu 14.04:

menuentry “Ubuntu 14.04 ISO” {
set isofile=”/home/name/Downloads/ubuntu-14.04.1-desktop-amd64.iso
loopback loop (hd0,1)$isofile
linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=${isofile} quiet splash
initrd (loop)/casper/initrd.lz
}

Customize the boot entry to contain your desiredmenu entry name, the correct path to the ISO file on your computer, and the device name of the hard disk and partition containing the ISO file. If the vmlinuz and initrd files have different names or paths, be sure to specify the correct path to those files, too.

(If you have a separate /home/ partition, omit the /home bit, like so: set isofile=”/name/Downloads/${isoname}”).

Important Note: Different Linux distributions require different boot entries with different boot options. The GRUB Live ISO Multiboot project offers a variety of menu entries for different Linux distributions. You should be able to adapt these example menu entries for the ISO file you want to boot. You can also just perform a web search for the name and release number of the Linux distribution you want to boot along with “boot from ISO in GRUB” to find more information.

clip_image005

If you want to add more ISO boot options, add additional sections to the file.

Save the file when you’re done. Return to a Terminal window and run the following command:

sudo update-grub

clip_image006

The next time you boot your computer, you’ll see the ISO boot entry and you can choose it to boot the ISO file. You may have to hold Shift while booting to see the GRUB menu.

If you see an error message or a black screen when you attempt to boot the ISO file, you misconfigured the boot entry somehow. Even if you got the ISO file path and device name right, the paths to the vmlinuz and intird files on the ISO file may not be correct or the Linux system you’re booting may require different options.

Taken From: http://www.howtogeek.com/196933/how-to-boot-linux-iso-images-directly-from-your-hard-drive/