Pages

Saturday, January 31, 2015

Configuring Web IOU

Web IOU is a very useful software for novice network engineers as it provides the ability to simulate routers as well as switches and give you a simulation environment without taking much memory and processing power as GNS 3 does.

Steps to configure:

1. Create a virtual machine in VMWare Worskstation
          Download VM Ware Workstation. Clik Open under File and select the iou-web file.

2. VMWare Settings:
         In the virtual machine, click on Edit virtual machine settings. Make sure that you have a network adapter (VMNet1 Host Only) . This is a host only adapter which is used to connect to host machine as we need to use web browser in host to access the GUI.



3. Network Settings:
         A static ip address need to be provided to the virtual machine. Since, this is a linux machine, we can use the same command as we use in linux.

Also, In the Properties of your VMWare adapter(as highlighted below) listed in the network connections,set the ip address to 192.169.80.1 and check whether you can ping the above configured ip address. If it pings then you have successfully configured the web-iou.
                                                                                                                                                                   

Sunday, January 4, 2015

Transfer files between Host OS and Mininet VM

It is possible to transfer files between mininet VM and the host OS. The protocol that is used for doing this is called SCP(Secure Copy Protocol).It is based on Secure Shell Protocol(SSH). It is a means of securely transferring computer files between a local host and and a remote host or between two remote hosts.

Follow the steps below to achieve this.


Step 1: Make sure that the mininet VM has a host-only network adapter configured.

In virtualbox network setting make sure that you have a NAT interface enabled that allows you to connect to internet. It will have an ip address like this : 192.168.56.103 ie a class C address.

Step 2: Install WinSCP

Download WinSCP from this link (Download WinSCP) and install the program.

A window like below will appear after installation.

3. Enter the credentials and connect

File Protocol: SCP
Host Name : 192.168.56.103 (or the ip in your host only adapter interface)
User name : mininet
Password : mininet

Click on Login. A window like below will appear.








Friday, January 2, 2015

NX-OS Overview

The cisco NX-OS , next generation operating system was built with modularity, resiliency and serviceability at its foundation. It is based on SAN-OS(Cisco Storage Area Network-Operating System).

Advantage of NX-OS:

1. Unified data center operating system: NX-OS can handle both LAN traffic and SAN traffic.

2. Robust and rich feature set with a variety of Cisco Innovations: Features like ISSU and             PSS(described later)

3. Flexibility and scalability :

4. Modularity : Virtual Device Contexts (VDC)

5. Virtualization :

6. Resiliency

7. IPv4 and IPv6 ip routing and multicast features

8.Comprehensive security , availability, serviceability and management features

Key Features and benefits of NX-OS

1.  Virtual Device Contexts: Available on Cisco Nexus 7000 switches only, these switches can be segmented into multiple virtual devices. These virtual devices function as independent switches and can run independent of each other. VDCs provide benefits like fault isolation, administration plane, seperation of data traffic and enhanced security.

2. Virtual Port Channels(VPCs) : This feature enables a server or switch to use an EtherChannel across two upstream switches without and STP blocked port to enable use of all available uplink bandwidth.

3. Continuous System Operation : Maintenance , upgrades and software certifications can be performed without service interruptions because of the modular nature of NX-OS and features such as In Service Software Upgrade and the ability for processes to restart dynamically.

4. Security : Cisco NX-OS provides outstanding data confidentiality and integrity, supporting standard IEEE 802.1AE link-layer cryptography with 128-bit Advanced Encryption Standard (AES) cryptography. In addition to CTS, there are many additional security features such as access control lists (ACLs) and port-security.

5. Overlay Transport Virtualization (OVT) : Enables layer 2 extension between distributed data centers over any transport layer 3 network.

6. NX-OS Persistant Storage Service :  The PSS is a lightweight database that maintains runtime information state. PSS provides reliable persistant storage to the software components to checkpoint their internal state and data structures enabling non-disruptive restart . If a fault occurs in a process such as OSPF the NX-OS high availability (HA) manager determines best recovery action.


  • Restart a process
  • Switch over to a redundant supervisor module
7. Fabric Path : This is similar to link state protocol which enables each device to build an overall view of the topology. Each device is identified by a swtich id. This eliminates spanning tree to maximize network bandwidth and flexibility.
For more datails on fabric path refer to : Fabric Path



Sunday, December 28, 2014

Introduction to Fabric Path

What is Fabric Path ?

        Cisco Fabric Path is an innovation in Cisco NX-OS software that brings the stability and performance of Layer 3 routing to Layer 2 switched networks to build a highly resilient and scalable Layer 2 fabric. Cisco FabricPath is a foundation for building massively scalable and flexible data centers.. Thus it is a layer 2 routing protocol also sometimes called MAC in MAC Routing.

This is an alternative to running STP. Thus if there is a layer 2 failure due to link cut or layer 2 crash, the entire spanning tree does not need to re-converge which is a feature of STP thus increasing the availabilty of the system. In addition to that, there are no redundant paths as in STP which gives higher bandwidth between the switches by implementing equal cost paths among the links.

How does it work ?

        Cisco Fabric  Path introduces entirely new Layer 2 data plane by encapsulating the frames entering the fabric with a header that consists of routable source and destination addresses. These addresses are called Switch IDs. These addresses are the address of switch in which the frame was received and the address of the destination switch to which the frame is heading. From there the frame is routed until it reaches the remote switch where it is decapsulated and delivered in its original Ethernet format. The figure below shows this simple process.


Fabric Path Terminologies:


Classical Ethernet (CE): It is the regular ethernet with regular flooding and regular STP etc.
The classical ethernet domain has been marked with green border in the figure above.

Leaf Switches : These switches connect CE(Classical Ethernet) domain to FP(Fabric Path) domain.
The switches in the middle of the picture are the leaf switches which are implemented using nexus 5k devices, more precisely nexus 5500 and 7000 F1 and F2 line card modules as nexus 5000 does not support fabric path because fabric path is implemented in hardware.

Spine Swtiches: These switches FP backbone switch with all ports in the FP domain only. The switches on the top of the picture are the spine switches which are implemented using nexus 7k devices.

FP Core Ports: Links the leaf up to spine or between spine switches. The ports in nexus switches are by default in classical ethernet mode ie access mode. Ports within the red border in above picture.To configure it for fabric path the following command should be used.

N7K-1#conf t
N7K-1(config)#int ethernet 1/1
N7K-1(config-if)#switchport mode fabricpath

CE Edge Ports: These ports link the leaf switches connecting to regular classical ethernet domain.
Ports within the green border in above picture.

Fabric Path Switch ID:

           This is analogous to OSPF router id or IS-IS NET id. This identifies the node in IS-IS SPT(Shortest path tree).  This id is automatically generated by default. It can also be assigned manually using the following command in global config mode.

N7K-1#conf t
N7K-1(config)#fabricpath switch-id

Fabric Path Control Plane:

FabricPath IS-IS replaces STP as the control-plane protocol within the FabricPath domain. In other words, FabricPath IS-IS determines the forwarding topology STP(Shortest path tree) instead of STP(Spanning Tree Protocol).    

IS-IS is an industry standard link-state routing protocol. The FabricPath IS-IS implementation is implemented as a single-level IS-IS domain and extended through the definition of FabricPath-specific Type-Length-Value (TLV) fields.

Several characteristics of IS-IS make it ideally suited for use as a Layer 2 forwarding protocol:

●   Has no IP dependency - IS-IS does not require IP reachability in order to form adjacency between devices. While the majority of modern networks do provide IP connectivity for network infrastructure, using IS-IS ensures that no strict requirement for in-band IP connectivity among switches exists.It does not use IP to carry routing information messages. IS-IS is neutral regarding the type of network addresses for which it can route.
●   Easily extensible - Using custom TLVs, IS-IS devices can exchange information about virtually anything. In the case of Layer 3 IS-IS, routers exchange IP prefix reachability. In the case of FabricPath, switches exchange Switch ID reachability.
●   Provides SPF routing - SPF routing protocols have been proven to be scalable, flexible, and fast to converge. In addition, IS-IS supports equal-cost multipath (ECMP) forwarding, allowing data-plane packets to follow any available parallel path rather than restricting forwarding to a single path.
While IS-IS forms the basis of FabricPath, enabling FabricPath in your network requires no specific knowledge of IS-IS - the configuration is plug-and-play. Much as a network operator simply “turns on” STP and interconnects switches, you can enable FabricPath on interfaces and begin forwarding through the FabricPath fabric with minimal configuration.    

Sunday, December 14, 2014

Custom topologies in Mininet : With and without the mn script

There are two ways to run custom mininet topologies.

Without the mn script:

One is without the mn script in the command line. In this case, we simply run the file just as we run a python file. If the custom topology is in a file named mytopo.py, the file should be run as follows.

mininet@mininet-vm:~$ sudo python mytopo.py

With the mn script:

 In this case, the topology named should be given the command line.

For eg.: If there is a custom topology in a python file named 'mytopo.py', there should be a line like below in the file.

topos = { 'mytopo': ( lambda: MyTopo() ) }

topos is a dictionary which stores a custom name as a key and the class name as the value.The name 'mytopo' here can be any name you want to give.It need NOT be same as the filename  MyTopo() is the class name that we have defined in the custom topology which is a sub-class of Topo class that needs to be imported as follows

from mininet.topo import Topo

The above file can be run as follows:

mininet@mininet-vm:~$ sudo mn --custom ~/mininet/custom/mytopo.py --topo mytopo --mac

Here mytopo is the key defined in topos dictionary and ~/mininet.custom/mytopo.py is the file location of the file.

Monday, December 8, 2014

Connecting Mininet Hosts to Internet

While working on my project on open vswitch I had to connect mininet hosts to internet to enable some functionalities in mininet hosts. After working on it for two days, I came to realise that its just 4 easy steps. If you are struggling with the same here is the solution.

Step 1: Make sure that your guest OS ie mininet OS is connected to the internet.

In virtualbox network setting make sure that you have a NAT interface enabled that allows you to connect to internet. It will have an ip address like this : 10.0.3.15 ie a class A address
Test by pinging www.google.com to make sure you are connected to internet from the guest OS ie Mininet OS.




Step 2: Start the network

Start a mininet netowrk with a switch and a host or any topology you prefer.

sudo mn  --switch ovsk --mac --topo single,2

The above command creates a network with single switch and two hosts.
This will create a switch s1 and two hosts h1 and h2.

Step 3: Connect the guest interface(that connects to the internet) to the ovs bridge

The command used to achieve this is an ovs-vsctl command which is used for quering and configuring openvswitchd(this is a process of openvswitch).

Open an xterm window for s1 as this command does not run directly on mininet.For this you need to ssh the guest OS from the host OS. If you don't know how to do this, you can refer to my earlier post titled "Error: Cannot Connect to Display"

Check the openvswitch configuration using the command: ovs-vsctl show
My switch had the following configuration.

root@mininet-vm:~# ovs-vsctl show
d27a9060-3edf-4ee7-a4cf-09e705c93f56
    Bridge "s1"
        Controller "ptcp:6634"
        Controller "tcp:127.0.0.1:6633"
            is_connected: true
        fail_mode: secure
        Port "s1-eth1"
            Interface "s1-eth1"
        Port "s1-eth2"
            Interface "s1-eth2"
        Port "s1"
            Interface "s1"
                type: internal
    ovs_version: "2.0.1"

Now, run the following command to connect eth1 to s1: ovs-vsctl add-port s1 eth1

Check the configuration again using ovs-vsctl show. The new interface that is added has been highlighted in red.

root@mininet-vm:~# ovs-vsctl show
d27a9060-3edf-4ee7-a4cf-09e705c93f56
    Bridge "s1"
        Controller "ptcp:6634"
        Controller "tcp:127.0.0.1:6633"
            is_connected: true
        fail_mode: secure
        Port "eth1"
            Interface "eth1"
        Port "s1-eth1"
            Interface "s1-eth1"
        Port "s1-eth2"
            Interface "s1-eth2"
        Port "s1"
            Interface "s1"
                type: internal
    ovs_version: "2.0.1"

Step 4: Run dhclient on hosts.

Open  xterm windows for h1 and h2 and run the following commands. The first command removes the ip from h1-eth0,the second command gets the ip address for h1-eth0 from dhcp server. The second command shows the interface description.

root@mininet-vm:~# ifconfig h1-eth0 0
root@mininet-vm:~# dhclient h1-eth0
root@mininet-vm:~# ifconfig
h1-eth0   Link encap:Ethernet  HWaddr 00:00:00:00:00:01
          inet addr:10.0.3.16  Bcast:10.0.3.255  Mask:255.255.255.0
          inet6 addr: fe80::200:ff:fe00:1/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:24 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:3304 (3.3 KB)  TX bytes:1764 (1.7 KB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:1252 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1252 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:151432 (151.4 KB)  TX bytes:151432 (151.4 KB)

Now check the internet connectivity using ping.

root@mininet-vm:~# ping www.google.com
PING www.google.com (216.58.216.164) 56(84) bytes of data.
64 bytes from sea15s02-in-f4.1e100.net (216.58.216.164): icmp_seq=14 ttl=54 time=61.9 ms
64 bytes from sea15s02-in-f4.1e100.net (216.58.216.164): icmp_seq=15 ttl=54 time=60.7 ms
^C
--- www.google.com ping statistics ---
15 packets transmitted, 2 received, 86% packet loss, time 14065ms
rtt min/avg/max/mdev = 60.707/61.336/61.965/0.629 ms

Summary:

The command that we have used to achieve internet connectivity to hosts are:

ovs-vsctl add-port s1 eth1
ifconfig h1-eth0 0
dhclient h1-eth0

Sunday, November 30, 2014

Error: Cannot Connect to display

In some virtual box images which does not have GUI support, the error mentioned in the title is encountered. This is because it does not support GUI and so it cannot display a graphical interface.

However, whether you are using Windows or Linux,there is a solution to this.

Step 1: Make sure you have host only networking adapter on your vm.

Make sure that you add an adapter with host only networking enabled on that adapter.
If you have host-only networking enabled, you will see an interface on your image with a class C ip address.
The IP Address is a class C address like 192.168.56.103.

To know this address use the commands ifconfig(if your image is linux based) or ipconfig(if your host is windows based.)

It will also have a class A address like 10.0.0.3 if you have NAT adapter enabled. This is used for connecting the virtualbox to the internet.

Step 2: Connecting to guest from host.

If you are accessing the guest using a command line, use the following command to access the guest and you do not need to follow step 3.

ssh -X username@address        ----------where -X enables X11 forwarding, username is the username  of the image and address is the host-only address of the guest.

If you are using a Windows host.

Make sure that you enable X11 forwarding in the ssh client(Eg, Putty, Secure Crt) you are using.

In Putty,Go to Connection > SSH > X11 > Check mark the X11 Forwarding option.
In Secure Crt, Go to Connection--> Port Forwarding--> Remote/X11 and check the Enforce X11 authentication checkbox

Step 3: Start Xming(If you are using Windows host)

Download Link : http://www.straightrunning.com/XmingNotes/

If you are using the Windows as a host you will need to start Xming first, which is a display server for Windows.

Now, to display the GUI for applications use the command xterm to open the GUI.
For eg.: In case of mininet use 'xterm s1' to display the xterm window for switch 1.