Thursday, September 2, 2010

vmware tips

cannot connect to host error in vmware

Solution:

1.

Sometimes while trying to access the console of a virtual machine using the VMware Virtual Infrastructure Client (connected to the ESX host or the virtual center) the following error appears:

Error connecting: cannot connect to host : A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. Do you want to try again?

This error could be produced if a firewall exists between the virtual infrastructure client and the host where the virtual machine is running blocking the TCP 903 port. If this is the case configure your firewall to allow trafic from the vi client to the physical host on port 903.

In other cases the only way to solve this is to enable the vmauthd proxy on the service console of the host. To do that we need to edit the file /etc/vmware/config adding the following line:

vmauthd.server.alwaysProxy = “TRUE”

The file should look like this:

libdir = “/usr/lib/vmware”
authd.fullpath = “/usr/sbin/vmware-authd”
authd.client.port = “902″
vmware.fullpath = “/usr/bin/vmware”
control.fullpath = “/usr/bin/vmware-cmd”
serverd.fullpath = “/usr/sbin/vmware-serverd”
serverd.init.fullpath = “/usr/lib/vmware/serverd/init.pl”
authd.proxy.vim = “vmware-hostd:hostd-vmdb”
authd.proxy.nfc = “vmware-hostd:ha-nfc”
authd.proxy.nfcssl = “vmware-hostd:ha-nfcssl”
authd.soapServer = “TRUE”
authd.proxy.vpxa-nfc = “vmware-vpxa:vpxa-nfc”
authd.proxy.vpxa-nfcssl = “vmware-vpxa:vpxa-nfcssl”
vmauthd.server.alwaysProxy = “TRUE”


Check for vpxa version: rpm -qa |grep vpxa
You should see something like VMware-vpxa-2.5.0-104215, you'll use this later

Stop the VMware management service: service mgmt-vmware stop

Stop the vpx agent: /etc/init.d/vmware-vpxa stop

Uninstall vpx agent: rpm -e VMware-vpxa-2.5.0-104215
Expect the following, ‘warning: /etc/vmware/vpxa.cfg saved as /etc/vmware/vpxa.cfg.rpmsave'

Verify vpxa has uninstalled: rpm -qa |grep vpxa (or vpx just in case)

Start the VMware management service: service mgmt-vmware start

Now go back into VirtualCenter and remove the disconnected host and add the host. Initially, it may fail with bad username or password or another error, but try again and it should work.



Saturday, May 29, 2010

ERX ROUTER CONFIGURATION

The Juniper Networks ERX-1440 Broadband Services Router is the highest performance routing platform in the E-series product line. Each Juniper ERX-1440contains a 40 Gbps switch fabric / route processor (SRP) with optional SRP redundancy for high availability and 12 slots dedicated to line modules. The ERX-1440 utilizes the same ASIC-based line modules and I/Os from the E-series product.

The Juniper Networks ERX-1440 meets the diverse requirements at the service provider network edge. In more than 260 production networks worldwide, service providers rely on robust Edge Service Processors (ESP) programmable ASIC technology for predictable performance and service flexibility. The innovative design of the ERX-1440 provides a fast path for IP traffic by taking the route processor out of the forwarding path and distributing route and policy information to each line module.


Step1

Login to the router console


Step2

enable

Step3

Configure

Step4

hostname "hostname"

Step5

interface FastEthernet 6/0/0 or 6/0

Step 6

ip address "ip address" subnetmask

Step7

ip route "ip address" "DGW"

Saturday, February 20, 2010

IOS and JunOS commands

IOS and JunOS commands

Here’s a small “translation” table for IOS and JunOS commands with a comment about their scope.

IOSJunOSPurpose
clear countersclear interface statisticsClears the interface counters
clear arp-cacheclear arpClears the ARP cache
clear ip bgpclear bgp neighborClears all BGP sessions
clear ip bgp neighborclear bgp neighbor peerClears BGP session to a specifis neighbor
clock setset dateSet the actual time
ping destping dest rapid (for cisco like output)Simple Ping
ping (setting source int)ping dest bypass-routingPing with specific source interface
reloadrequest system rebootReboot the system
sendrequest messageSend a message to other users
show arpshow arpShows ARP cache
show clns interfaceshow isis interfaceShows IS-IS information from participating interfaces
show clns neighborsshow isis adjacencyShows ES-IS and IS-IS neighbors
show clockshow system uptimeDisplay current date
show controller interfaceshow interfaces interface extensiveDisplays physical port informations
show diagsshow chassis hardwareDisplays hardware diagnostics and status
show environment allshow chassis environmentInfos about Voltage, Power consumption, Temperature,…
show historyshow cli historyShows recent entered commands
show interface interfaceshow interfaces interface detailShows interface configuration, counters and status
show interface description (newer IOS)show interfaces descriptionShows description, status and interface name
show ip bgp neighbor peer advertised-routesshow route advertising-protocol bgp peerShows whether a neighbor supports the route refresh capabilty
show ip bgp neighbors neigh received-routesshow route receive-protocol bgp peerShows whether a neighbor supports the route refresh capability
show ip bgp peer-groupshow bgp groupDisplays BGP informations about all peer-groups
show ip bgp peer-group groupshow bgp group groupDisplays BGP informations about a specific peer-group
show ip bgp network maskshow route protocol bgp prefixBGP informations about a specific prefix
show ip bgp network mask longer-prefixesshow route range prefixBGP informations about a specific prefix as well as longer prefixes
show ip bgp regexp regexshow route aspath-regexp “regex”Shows routes matching AS path filter regex
show ip bgp summaryshow bgp summaryShows all BGP IPv4 neighbors
show ip interface briefshow interface terseDisplays IPv4 addresses per interface (in JunOS: IPv6 and ISO as well)
show ip ospf databaseshow ospf databaseShows the OSPF database
show ip ospf neighborshow ospf neighborDisplays all OSPF neighbors
show ip ospf interfaceshow ospf interfaceShows OSPF informations for the interface (e.g. state, dead time,…)
show ip routeshow routeDisplays the global routing table
show ip route isisshow isis routes / show route protocol isisDisplay only IS-IS originated routes
show ip route ospfshow ospf route / show route protocol ospfDisplay only OSPF originated routes
show ipv6 neighborsshow ipv6 neighborsDisplay discovered IPv6 neighbors
show ipv6 routeshow route table inet6.0Display IPv6 routing table
sh bgp ipv6 summary / show bgp ipv6 unicastshow bgp summaryDisplays IPv6 BGP neighbors
show tcp briefshow system connectionShows established TCP connections from/to router (BGP, SSH, Telnet,…)
show ip trafficshow system statisticShows infos about IP related traffic (BGP, EIGRP, PIM, ARP, ICMP)
show isis topologyshow isis spf briefShows the resulting IS-IS topology table after spf calculation
show loggingshow log messagesShows infos about loghost (IOS only) and local buffered log file content
show processes cpushow system processDisplays CPU utilization
show route-mapshow policyShows all configured route-maps (JunOS also shows Prefix-Lists,…)
show route-map mapnameshow policy name mapnameShows content of route-map mapname
show running-configshow configurationDisplays the actual running-configuration
show usersshow system usersShows logged in users
show tech-supportrequest support infoDisplays a lot of information. Often needed for TAC request.
show versionshow versionInformation about running software release (IOS also shows hardware infos)
terminal length 0set cli screen-length 0Continous output to terminal without more-breaks
terminal monitormonitor start messagesStart logging to terminal (when connected remotely)
terminal no monitormonitor stopStop logging to terminal (when connected remotely)

JUNOS Configuration

JUNOS Configuration on M series and T Series routers

I.B. Junos® Software Features :

1. Command Line Interface (CLI)

a. Operational Mode

b. Configuration Mode

2. Router Interface Configuration

a. Interface Types

b. Interface Configuration Syntax

c. Examples of Router Interface Configuration

3. RIP configuration using Junos®

I.B. The following paragraphs discuss the features of JUNOS CLI with a few configuration examples. The purpose is to provide the reader with an overall idea of JUNOS, and its configuration.

1. Command Line Interface (CLI)

The operating system software that powers the Juniper routers is called JUNOS™. The software is modular and standards based. Another important feature of JUNOS™ is that the software is platform independent (within Juniper hardware systems, not to be confused with other vendor hardware), thus delivering the same scalability and security across several hardware platforms.

JUNOS CLI is a simple to use, text-based command interface. We give various commands on CLI for configuring, troubleshooting and monitoring the software.

JINOS primarily supports two types of command modes.

a) Operational Mode

b) Configuration Mode

a) Operational Mode:

When we log in to the router and the CLI starts, we are at the top level of the CLI operational mode. In this mode, we enter the commands for

1. Controlling the CLI environment, and

2. Monitor and troubleshoot network connectivity, and

3. Initiating the Configuration Mode.

Frequently used commands in this mode include ping, show, traceroute, configure, etc.

b) Configuration Mode:

We use the Configuration mode for configuring the JUNOS software by creating a hierarchy of configuration statements. We enter the configuration mode by using the command “configure” as shown below:

user@host> configure

entering configuration mode

[edit]

user@host#

Issuing the commands one at a time using CLI can configure a JUNOS™ router or alternately, we can configure by creating a text (ASCII) file that contains the statement hierarchy. Remember to activate the configuration by using the command “commit” on the router.

As shown in the above example, the generic configuration prompt is user@host#. Ofcourse, we can change the prompt tby using appropriate command.

Statement Hierarchy:

We use the above configuration mode commands to create a statement hierarchy, and then configure the JUNOS software. The term “statement hierarchy” is used to define the sequence of commands used for configuring a particular feature (or features) of the router. An example statement hierarchy is given below:

user@host> configure

entering configuration mode

[edit] ----Top level

user@host#edit protocols ospf

[edit protocols ospf] ----protocols ospf hierarchy level

user@host#

“set” commands are used to configure specific leaf statements.

Ex.: user@host# set hello-interval 14

2. 0 Router Interface Configuration:

a. Types of Interfaces

Juniper Networks platform has primarily two types of interface. These are:

  1. Permanent interfaces, these are always present in the router and
  2. Transient interfaces, these can be inserted or removed from the router by user.

1. Permanent Interfaces:

Each router has two permanent interfaces. These are:

a. Management Ethernet interface: This interface enables us to access the router using ssh, and telnet. The interface uses out-of-band connectivity, and does not provide packet forwarding capabilities for the transit data packets.

b. Internal Ethernet interface: Connects the Routing Engine (running the JUNOS Internet software) to the Packet Forwarding Engine. The router uses this interface as the main communications link between the JUNOS software and the components of the Packet Forwarding Engine. The Internal Ethernet interface is configured automatically when the JUNOS software boots.

2. Transient Interfaces:

Transient Interfaces are the interfaces that receive user’s data packets from the network and transmit the packets to the network. These interfaces are physically located on a Physical Interface Card. They can be inserted and removed at any time.

These interface need to be configured before using it. We can also configure the interfaces that are not in the chassis. When the JUNOS software activates the router’s configuration it finds out the interfaces that are present and activates only those interfaces.

In addition, each router has two serial ports, labeled console and auxiliary. Console port can be used to connect tty-type terminals to the router. The auxiliary port can connect to a modem.

b. Interface Representation and Command Syntax:
Using JUNOS software, a typical interface configuration will have the following syntax:

media_type-fpc/pic/port.unit

media_type: is the one that uniquely identifies the type of physical interface. It is a two-character word.

fpc: is the physical slot number in the chassis where the interface is located.

Pic: is the slot number on the FPC where the interface is located.

port: is the location on the PIC where the interface port (to which the interface is connected) is located.

unit: is the logical portion of the interface that is being configured.

Note:

Some Physical interfaces use channel numbers instead if unit numbers. These numbers are represented using colon instead of period like media_type-fpc/pic/port:channel Number

C. Examples of Router Interface Configuration:

Following are some of the examples that configure the JUNOS software using CLI. Note that these are provided only to give a broad idea, and not necessarily accurate.

Example 1: Configuring a hostname on a router.

user@host>configure

[edit]

user@host#edit system

[edit system]

user@host#set host-name juniper

[edit system]

user@juniper#

Example 2: Assigning an IP Address to a router interface.

user@host>configure

[edit]

user@host#edit interfaces so-0/0/0

[edit interfaces so-0/0/0]

user@host# edit unit 0

[edit interfaces so-0/0/0 unit 0]

user@juniper#edit family inet

[edit interfaces so-0/0/0 unit 0 family inet]

user@juniper#set address 192.168.1.1/24

[edit interfaces so-0/0/0 unit 0 family inet]

user@juniper#

3. RIP Configuration using JUNOS.

user@host>configure

[edit]

user@host#edit protocols

[edit protocols]

user@host#edit rip

[edit protocols rip]

user@host#edit group neighbors

[edit protocols rip group neighbors]

user@host#set neighbor so-0/0/0.0;

[edit protocols rip group neighbors]

user@host#set neighbor so-0/0/1.0;

[edit protocols rip group neighbors]