Join And Earn Real Rewards from Amazon..

Wednesday, 21 May 2014

What is Hot Standby Router Protocol (HSRP) ? Why we use HSRP in Router ?


Hot Standby Router Protocol (HSRP) is a routing protocol that allows host computers on the Internet to use multiple routers that act as a single virtual router, maintaining connectivity even if the first hop router fails, because other routers are on "hot standby" - ready to go. Configured on Cisco routers running the Internet Protocol (IP) over Ethernet, Fiber Distributed-Data Interface (FDDI), and token ring local area networks (LANs), HSRP provides automatic router backup. The protocol is fully compatible with Novell's Internetwork Packet Exchange (IPX), AppleTalk, and Banyan VINES, and (in some configurations) with Xerox Network Systems (XNS) and DECnet.
Developed by Cisco and specified in IETF Request for Comments (RFC) 2281, HSRP ensures that only a single router (called the active router) is forwarding packets on behalf of the virtual router at any given time. A standby router is chosen to be ready to become the active router, in the event that the current active router fails. HSRP defines a mechanism used to determine active and standby routers by referring to their IP addresses. Once these are determined, the failure of an active router will not cause any significant interruption of connectivity.
On any given LAN, there may be multiple, possibly overlapping, hot standby groups, each with a single Media Access Control (MAC) address and IP address; the IP address should belong to the primary subnet, but must be different from any actual or virtual addresses allocated to any routers or hosts on the network.

Thursday, 30 May 2013

Download Offline Installers: Microsoft .NET Framework 4.0, 3.5 SP1, 3.5, 3.0 & 2.0 From Microsoft Servers

As many of the new Microsoft Windows applications are developed using .NET Framework, it is becoming mandatory to install .NET Framework on our personal computers.

\
Microsoft provides .NET Framework installer as a free download available to everyone. But it is an online installer. That means, initially we have to download a small piece of installer and upon starting the installation process the installer automatically connects to Microsoft servers and downloads the required components and completes the installation.
The online installers works great as long as we have internet connectivity always. But many of us require offline installer to install the software on computers not connected to internet, to save the bandwidth while installing on many computers, etc.
Below are set of links on Microsoft servers from where you can download the offline installers of .NET Framework 4.0, 3.5, .NET Framework 3.5 Service Pack 1, .NET Framework 3.0 and .NET Framework 2.0.
.NET Framework 4.0 Setup
.NET Framework 3.5 Setup
.NET Framework 3.5 Setup Service Pack 1
.NET Framework 3.0 Setup
.NET Framework 2.0 Setup
.NET Framework Client Profile Offline Installer

Thursday, 23 May 2013

What’s the Difference Between 127.0.0.0 and 127.0.0.1?




Sometimes the most elementary of questions yield teachable moments; read on as we delve into how a single digit change between 127.0.0.0 to 127.0.0.1 offers a chance to look at network topology.
The Question
What’s the Difference Between 127.0.0.0 and 127.0.0.1?
I know that both are loopback IPs, but they have another ip mask.
What’s the difference between them? Can they be used interchangeably?
===========================================================================

IPv4 routes
===========================================================================
Active routes:
Destination               Mask          Gateway        Interface Metric
      0.0.0.0          0.0.0.0      192.168.1.1      192.168.1.6     26
[...]
    127.0.0.0        255.0.0.0         On-link         127.0.0.1    306
    127.0.0.1  255.255.255.255         On-link         127.0.0.1    306
What kind of information can we tease out from this table?

Thursday, 25 April 2013

How to change TTL of TCP packets for windows (XP/NT/2000) & LINUX (Kernel 2.4.x) ?

How to change TTL of TCP packets for windows (XP/NT/2000) & LINUX (Kernel 2.4.x) ?

For windows , you can change the TTL value, by editing registry value; 
======================================================================
1. run ---> regedit
2. Go to the below Path and Add new DWORD Value

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters

3. Right. Click. on Right. Pane ---> New ---> DWORD value
4. Rename it to DefaultTTL and set the value (0-255).
5. Restart your System.
6. Ping from other system or try Ping localhost

================================================================

For Linux (Kernel ver-2.4.x & 2.6.x.x)
=============================
I have done it, which is given below,

1. Setting temporary TTL (active till system reboot)
-------------------------------------------------------
...]#echo "123" > "/proc/sys/net/ipv4/ip_default_ttl"

The above command will change the default TTL(64) to 123.

2. Setting TTL Permanently
-----------------------------
I have done nothing ,but automated it -:)...

...]#vi /etc/rc.d/rc3.c/S99local
.
.
# added
echo "123" > "/proc/sys/net/ipv4/ip_default_ttl"
.


Note : Second Way to change TTL in Linux

You can change your Default TTL value of LINUX by editing the /etc/sysctl.conf file and add the line ,

net.ipv4.ip_default_ttl = <0-255>

&

Reboot your system ...

Sunday, 28 October 2012

Layer by Layer Troubleshooting with a Cisco Router



OSI Model - Bottom Up Troubleshooting

If you will recall, the OSI model starts with the physical layer (layer 1) and goes up to layer 7 (application). When troubleshooting with a Cisco router, much of your time will be spent working in layers 1-3. They are:

  • Layer 3 - Network
  • Layer 2 - Data Link
  • Layer 1 - Physical

Because these layers build on each other, Layer 1 is most critical, without layer 1, layer 2 will not function. Without layer 1 & 2, layer 3 will not function, and so on. For this reason, I start troubleshooting at layer 1, physical, and move on up from there.

Here is what you look for:

  • Is the interface UP?
  • Is the line protocol UP?
  • If both the interface and line protocol are NOT up, your connection is never going to work.
  • To resolve a line down, I look at the cable or the keepalives
  • To resolve a line protocol down, check to make sure that the protocols match on each side of the connection(notice the "line protocol" on each of the interfaces above).
  • Are you taking input, CRC, framing, or other errors on the line (notice how the serial interface above does show errors)? If so, check your cable or contact your provider.

In general, verify that you have a good cable on each side, verify that line protocols match, and that clocking settings are correct.

If this is an Ethernet connection, is there a link light on the switch?

If this is a serial connection, do you have an external CSU/DSU? If it is an external CSU, check that the Carrier Detect (CD) light & data terminal ready (DTR) lights are on. If not, contact your provider. This also applies if you have an internal Cisco WIC CSU card. If that is the case, take a look at this Cisco link on understanding the lights on that card.

You can, of course, use the Cisco IOS test commands to test your network interfaces with internal staff and with your telecommunications providers.

Do not proceed to upper level layers until your Physical interface on the router shows as being UP and your line protocol is UP. Until then, don't worry about IP addressing, pinging, access-lists or anything like that.


I would recommend taking this interface configuration and comparing it, side by side, with the remote WAN connection to ensure they are the same. Ask yourself questions like:

  • Are these interfaces on the same IP network?
  • Do these interfaces have the same subnet mask?
  • Are there any access-lists (ACL) that are blocking your traffic?
  • Can you remove all optional IP features to make sure that the basic configuration works before adding additional features that could be causing trouble?

Router Troubleshooting at OSI Layer 3 - Network

Once you have Layers 1 & 2 working (your show interface command shows the line is "UP & UP", it is time to move on to layer 3 - the OSI Network layer. The easiest thing to do here to see if layer 3 is working is to ping the remote side of the LAN or WAN link from this router. Make sure you ping as close as possible to the router you are trying to communication with - from one side across to the other side.

Router Troubleshooting at OSI Layer 1 & 2 - Physical & Data link

Remember, if Layer 1 isn't up, nothing else will work so make sure you start here. Examples of layer 1 are your T1 circuit or your Ethernet cable - physical connectivity. I usually troubleshoot layer 1 and layer 2 in union because they are so closely paired. Examples of layer 2 - data link - are your line protocol (such as Ethernet, ATM, 802.11, PPP, frame-relay, HDLC, or PPP).

To troubleshoot at these layers, the first thing I would do on your router is a show interface

Router Troubleshooting at OSI Layers 4 - 7

Now, let's say that you have made it to the point where you can ping from LAN to LAN, through your WAN. Congratulations - that is a very good sign. If you are still having trouble, it must be in OSI Layers4-7. Here are those layers listed out and possible issues you might experience in each layer:

  • Layer 4 - Transport - in the transport layer are TCP and UDP - you could be have an ACL or QoS feature blocking or slowing this traffic. Your TCP traffic could also be fragmented to the point that it could not be reassembled. Another option is that you may not be receiving an ACK back from your traffic that was successfully sent.

  • Layer 5 - Session - in the session layer are protocols like SQL, NFS, SMB, or RPC - you could be taking errors on any one of these session protocols. I would recommend using a protocol analyzer like Wireshark to analyze your session data.

  • Layer 6 - Presentation - in the Presentation layer are data encryption, compression, and formatting - your VPN tunnel could be failing or perhaps you are sending one type of data (like a MPEG) and the receiver is trying to view it as a WMV file.

  • Layer 7 - Application - in the Application layer are, of course, your applications like FTP, HTTP, SCP, TFTP, TELNET, SSH, and more - you could be trying to connect to a telnet server with the SSH protocol, for example.

  • Layer 8 - End User - the standing joke is that "Layer 8" is the user - the user could be just mistyping their username or password or you, the network admin, could have been troubleshooting the wrong IP address all along.

Summary

In summary, using the OSI model to troubleshoot connectivity issues is the fastest and most efficient way to troubleshoot any network issue. Even if someone calls you to work on a Windows share problem, all of the same principles in this article apply to that troublesooting process. So remember, the next time you work on a network issue - remember the OSI model and how to use the bottom-up approach to troubleshooting! It could same you a while lot of time!

What is Spanning Tree? What is PortFast?

Question
What is Spanning Tree and Portfast ?


Answer
The Spanning-Tree Protocol (STP) was created to overcome the problems of transparent bridging in redundant networks. The purpose of STP is to avoid and eliminate loops in the network by negotiating a loop-free path through a root bridge. This is done by determining where there are loops in the network and blocking links that are redundant.

Spanning-Tree Protocol executes an algorithm called the Spanning-Tree Algorithm (STA). In order to find redundant links, STA will choose a reference point called a Root Bridge, and then determines all the available paths to that reference point. If it finds a redundant path, it chooses for the best path to forward and for all other redundant paths to block. This effectively severs the redundant links within the network.

All switches participating in STP gather information on other switches in the network through an exchange of data messages. These messages are referred to as Bridge Protocol Data Units (BPDUs). The exchange of BPDUs in a switched environment will result in the election of a root switch for the stable spanning-tree network topology, election of designated switch for every switched segment, and the removal of loops in the switched network by placing redundant switch ports in a backup state.

During the execution of the Spanning-Tree Algorithm, Spanning-Tree will force the ports to go into five different states:
  • Blocked
  • Listen
  • Learn
  • Forward
  • Disabled

A Description of each state follows:

  • Blocked—All ports start in the blocked mode in order to prevent the switch from creating a loop.
  • Listen—The port transitions from the blocked state to the listen state. It uses this time to attempt to learn whether there are any other paths to the root bridge. This state is really used to indicate that the port is getting ready to transmit but it would like to listen for a little longer to make sure it does not create a loop.
  • Learn—When in this state, the switch will add information it has learned through the listening process to its address table. It is still not allowed to send data.
  • Forward—This state means the port can send and receive data.
  • Disabled—The switch can disable a port for a variety of reasons including: hardware failure, deletion of the ports native VLAN, and being administratively disabled.

The transitioning period from state to state takes the following times by default:

  • From blocking to listening: 20 seconds
  • From listening to learning: 15 seconds
  • From learning to forwarding: 15 seconds

Spanning-Tree protocol is running by default on all ports of the switch. The spanning-tree protocol makes each port wait up to 50 seconds before data is allowed to be sent on the port. This Delay in turn can cause problems with some applications/protocols (PXE, Bootworks, etc.). To alleviate the problem, Porfast was implemented on Cisco devices, the terminology might differ between different vendor devices.

PortFast causes a port to enter the forwarding state almost immediately by dramatically decreasing the time of the listening and learning states. Portfast minimizes the time it takes for the server or workstation to come online, thus preventing problems with applications such as DHCP, DNS, Novell IPX, PXE, BootWorks, etc.

The spanning-tree protocol is always running even when the port is in forwarding state so that it can still detect loops, however the use of Portfast should only be implemented when the port on the switch is directly connected to a server/workstation and never to another hub/switch.

To enable portfast on Cisco switches you must enter the following command:
On set based switches: at the Switch>(enable)" prompt: 
Set Spantree portfast <mod_number/port_number>
on IOS based switches: at the "switch(config-if)#" prompt: 
spantree start-fowarding 

Monday, 18 June 2012

Interview Questions for Check Point Firewall Technology


Question 1 – Which of the applications in Check Point technology can be used to configure security objects?
Answer:SmartDashboard

Question 2 – Which of the applications in Check Point technology can be used to view who and what the administrator do to the security policy?
Answer:SmartView Tracker

Question 3 – What are the two types of Check Point NG licenses?
Answer:Central and Local licenses

Central licenses are the new licensing model for NG and are bound to the SmartCenter server. Local licenses are the legacy licensing model and are bound to the enforcement module.

Question 4 – What is the main different between cpstop/cpstart and fwstop/fwstart?
Answer:Using cpstop and then cpstart will restart all Check Point components, including the SVN foundation. Using fwstop and then fwstart will only restart VPN-1/FireWall-1.

Question 5 – What are the functions of CPD, FWM, and FWD processes?
Answer:CPD – CPD is a high in the hierarchichal chain and helps to execute many services, such as Secure Internal Communcation (SIC), Licensing and status report.

FWM – The FWM process is responsible for the execution of the database activities of the SmartCenter server. It is; therefore, responsible for Policy installation, Management High Availability (HA) Synchronization, saving the Policy, Database Read/Write action, Log Display, etc.

FWD – The FWD process is responsible for logging. It is executed in relation to logging, Security Servers and communication with OPSEC applications.

Question 6 – What are the types of NAT and how to configure it in Check Point Firewall?
Answer:Static Mode (Manually Defined)

Intrusion Detection Systems Interview Questions


This section is also a very good resource for preparation of job interviews for IDS.

What is Intrusion Detection?
Intrusion Detection is the active process to document and catch attackers and malicious code on a network. It is described in two types of software: Host based software and Network based software.
Why is an Intrusion Detection System (IDS) important?
Computers connected directly to the Internet are subject to relentless probing and attack.While protective measures such as safe configuration, up-to-date patching, and firewalls are all prudent steps they are difficult to maintain and cannot guarantee that all vulnerabilities are shielded. An IDS provides defense in depth by detecting and logging hostile activities. An IDS system acts as "eyes" that watch for intrusions when other protective measures fail.

What is the difference between a Firewall and a Intrusion Detection System?
A firewall is a device installed normally at the perimeter of a network to define access rules for access to particular resources inside the network. On the firewall anything that is not explicitly allowed is denied. A firewall allows and denies access through the rule base.

An Intrusion Detection System is a software or hardware device installed on the network (NIDS) or host (HIDS) to detect and report suspicious activity.

In simple terms you can say that while a firewall is a gate or door in a superstore, a IDS device is a security camera. A firewall can block connection, while a IDS cannot block connection. An IDS device can however alert any suspicious activities.
An Intrusion Prevention System is a device that can start blocking connections proactively if it finds the connections to be of suspicious in nature.

If an IDS device cannot prevent a hack, then why have IDS devices?

Agreed that an IDS device cannot prevent a hack and can only alert any suspicious activities. However, if we are to go by past experiences, hacks and system compromises are not something that happens over night. Planned compromise attempts can take several days, weeks, months and in some cases even years. So a IDS device can alert you so that you can take the desired precaution in protecting the resources.
What is a network based IDS system?

An IDS is a system designed to detect and report unauthorized attempts to access or utilize computer and/or network resources. A network-based IDS collects, filters, and analyzes traffic that passes through a specific network location.
< Are there other types of IDS besides network based?

The other common type of IDS is host-based. In host-based IDS each computer (or host) has an IDS client installed that reports either locally or to a central monitoring station. The advantage of a host-based IDS is that the internal operation and configuration of the individual computers can be monitored.
What is the difference between Host based (HIDS) and Network based IDS (NIDS)?

HIDS is software which reveals if a machine is being or has been compromised. It does this by checking the files on the machine for possible problems. Software described as host based IDS could include File Integrity checkers (TripWire), Anti-virus software (Norton AV, MacAfee), Server Logs (Event viewer or syslog), and in some ways even backup software can be a HIDS. ISS Realsecure has many HIDS products.
NIDS is software which monitors network packets and examines them against a set of signatures and rules. When the rules are violated the action is logged and the Admin could be alerted. Examples of NIDS software are SNORT, ISS Real Secure, Enterasys Dragon and Intrusion.
Are there are any draw backs of host based IDS systems?

There are three primary drawbacks of a host-based ID:
(1) It is harder to correlate network traffic patterns that involve multiple computers;
(2) Host-based IDSs can be very difficult to maintain in environments with a lot of computers, with variations in operating systems and configurations, and where computers are maintained by several system administrators with little or no common practices;
(3) Host-based IDSs can be disabled by attackers after the system is compromised.

Why, when and where to use host based IDS systems?

Host based IDS systems are used to closely monitor any actions taking place on important servers and machines. Host based IDS systems are used to detect any anomalies and activities on these important and critical servers. You use Host based IDS systems when you cannot risk the compromise of any server. The server has to be very important and mission critical to use Host based IDS systems on these servers. Host based IDS systems are agents that run on the critical servers. The agent is installed on the server that is being monitored.
What is a Signature?

A signature is Recorded evidence of a system intrusion, typically as part of an intrusion detection system (IDS). When a malicious attack is launched against a system, the attack typically leaves evidence of the intrusion in the system’s logs. Each intrusion leaves a kind of footprint behind (e.g., unauthorized software executions, failed logins, misuse of administrative privileges, file and directory access) that administrators can document and use to prevent the same attacks in the future. By keeping tables of intrusion signatures and instructing devices in the IDS to look for the intrusion signatures, a system’s security is strengthened against malicious attacks.
Because each signature is different, it is possible for system administrators to determine by looking at the intrusion signature what the intrusion was, how and when it was perpetrated.

What are the common types of attacks and signatures?

There are three types of attacks:

Reconnaissance These include ping sweeps, DNS zone transfers, e-mail recons, TCP or UDP port scans, and possibly indexing of public web servers to find cgi holes.

Exploits Intruders will take advantage of hidden features or bugs to gain access to the system.

Denial-of-service (DoS) attacks Where the intruder attempts to crash a service (or the machine), overload network links, overloaded the CPU, or fill up the disk. The intruder is not trying to gain information, but to simply act as a vandal to prevent you from making use of your machine.

Note:The signatures are written based on these types of attacks.

ROUTING - Inetview Questions


ROUTING

Default Administrative distance :
Connected Interface – 0
Static Route - 1
External BGP -20
Internal EIGRP -90
IGRP – 100
OSPF-110
IS-IS- 115
RIP V1, V2-120
External EIGRP-170
IBGP-200
Unknown-255

Distance vector Protocol:
It finds best path by using distance i.e Hops. Ex: RIP, IGRP

Link State Protocol:
Using 3 tables finds best path (Neighbor Table, Topology Table, and Routing Table).( OSPF,IS-IS).
Link state protocols using Area architecture.
The link state Protocol advertise its all routes to neighbor, even though the neighbors not using those routes.

Hybrid Protocol:
Mixing of Distance vector and Link state. (EIGRP).
EIGRP advertise only the best route about its neighbors, to its neighbor. So that only EIGRP is not coming under Link state routing protocol.

ROUTING Preference
1. Specific subnet Mask
2. Administrative difference
3. Metric

EIGRP - Network Interview Questions


EIGRP

I ) EIGRP Features
  1. Fast convergence –It is using DUAL (Diffusing update algorithm). Router running Eigrp stores backup route (feasible successor).
  2. Minimum Bandwidth usage- It does not make periodic updates (NON PERIODIC). It partial updates when the topology changes and Bounded.
  3. Multiple Network layer protocol support- It supports IPX/SPX, Apple talk.
  4. It supports VLSM, classless routing.
  5. It supports load balancing of equal and unequal cost paths (up to 6 paths. Default is 4)
  6. Use multicast (224.0.0.10) instead of broadcast
  7. Summarization can do any router running in EIGRP. But in OSPF only in ABR and ASBR.
  8. Combines best of distance vector and link state
  9. hello packets from any EIGRP - 5 sec, hold-on time is 3 times to hello
  10. Hello Packet on NBMA is - 60 sec and hold-on time is 3 times (180 sec)
II) Advertisement distance :Cost between next hop router and destination router.

Feasible Distance : Cost between next hop router and destination router (AD) + Cost between local router and next hop router. Lowest FD is the best path (successor).


Successor: Best route stored in routing table and Topology table.


Feasible successor: Backup route stored in Topology table.To be considered A feasible successor, the AD must be less than the FD of the successor. Because of prevent the loop.


Passive Route: Passive state is a state when the router has identified the successor(s) for the destination.


Active Route: Active state when current successor no longer satisfies the Feasibility Condition.

Neighbor Table: List of directly connected routers.
Topology Table: List of routers learned from each neighbor.
Routing Table: List of best routes.


Neighbor table update the routing information in Topology table and routing table is created taking the best paths form the topology table


EIGRP Packets:

Hello- Establish neighbor relationships ( multicast)
Update- send routing updates
Query-Ask neighbors about routing information.
Reply- Respond to query
Ack- Acknowledge all reliable pocket except Hello pocket.

Note: No auto-summary command prevents to advertisement all interfaces in the router. Also it turns on Classless characteristics of EIGRP.

Metric: Bandwidth, Delay, Reliability ,Loading, MTU


Real (default) Metric : 256* (BW+Delay)

BW= 10^7/BW
Delay= Delay in Micro seconds.


If want to change the other metrics manually use this command.This command is not in Cisco website; Very rarely known and used.

#
router eigrp 10
#metric weights (tos) k1 k2 k3 k4 k5
Tos- Type of service. It always 0.

Trouble shooting commands:
Show IP EIGRP topology, Show IP EIGRP neighbor, Show IP EIGRP traffic

Summarization:
#IP summary-address EIGRP 1 172.16.0.0 255.255.255.248

Unequal cost load balancing:

#Variance 2 (2 is multiplier)
#Variance 1 ( equal cost load balancing)

Stuck in Active:A router sends query message for identify the backup route to other routers through its active interfaces. The router will wait for 3minits to get reply messages from all routers even though it gets a backup route from any of one routers.


Methods to Prevent STA : 1) Summary route 2) Stub configuration


NewYork#sh ip eigrp neighbor

IP-EIGRP neighbors for process 10
H Address Interface Hold Uptime SRTT RTO Q Seq
(sec) (ms) Cnt Num
1 172.16.251.2 Se0/1 10 00:17:08 28 2604 0 7
0 172.16.250.2 Se0/0 13 00:24:43 12 2604 0 14.

Router# show ip eigrp topology
IP-EIGRP Topology Table for process 77
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply, r - Reply status
P 172.16.90.0 255.255.255.0, 2 successors, FD is 0
via 172.16.80.28 (46251776/46226176), Ethernet0
via 172.16.81.28 (46251776/46226176), Ethernet1
via 172.16.80.31 (46277376/46251776), Serial0
P 172.16.81.0 255.255.255.0, 1 successors, FD is 307200
via Connected, Ethernet1
via 172.16.81.28 (307200/281600), Ethernet1
via 172.16.80.28 (307200/281600), Ethernet0
via 172.16.80.31 (332800/307200), Serial0

CHECK POINT FIREWALL-1: EXTENSIBLE STATEFUL INSPECTION

Check Point FireWall-1’s Stateful Inspection architecture utilizes a unique,patented INSPECT™ Engine which enforces the security policy on the gateway on which it resides. The INSPECT Engine looks at all communication layers and extracts only the relevant data, enabling highly effi cient operation, support for a large number of protocols and applications, and easy extensibility to new applications and services.

The INSPECT Engine is programmable using Check Point’s powerful INSPECT Language. This provides important system extensibility, allowing Check Point, as well as its technology partners and end users, to incorporate new applications, services, and protocols, without requiring new software to be loaded. For most new applications, including most custom applications developed by end users, the communication-related behavior of the new application can be incorporated simply by modifying one of FireWall-1’s built-in script templates via the graphical user interface. Even the most complex applications can be added quickly and easily via the INSPECT Language. Check Point provides an open application
programming interface (API) for third-party developers .

Ref - www.checkpoint.com