Test the network speed between two Ubuntu/Linux Machines

Test the network speed between two Ubuntu/Linux Machines

 

iperf: It’s a client server arrangement in that you run it in server mode at one end and connect to its from another computer on the other side of the network.

One both machines run:

$ sudo apt-get install iperf

We’ll start an iperf server on one of the machines:

$ iperf -s

And then on the other computer, tell iperf to connect as a client:

$ iperf -c <address of other computer>

On the client machine, you’ll see something like this:

zen@pwning:~$ iperf -c 192.168.0.5
————————————————————
Client connecting to 192.168.0.5, TCP port 5001
TCP window size: 16.0 KByte (default)
————————————————————
[  3] local 192.168.0.4 port 37248 connected with 192.168.0.5 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec  1.04 GBytes    893 Mbits/sec

Advertisements

How to set Static IP Address & Default Gateway in Ubuntu

How to set Static IP Address & Default Gateway in Ubuntu

Edit “/etc/network/interfaces” to reflect something like this:

sudo vi /etc/network/interfaces

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
address xxx.xxx.xxx.xxx (enter your ip here)
netmask xxx.xxx.xxx.xxx (mine was 255.255.255.0)
network xxx.xxx.xxx.xxx (enter Network id IP here)
broadcast xxx.xxx.xxx.xxx (enter Broadcast id IP here)
gateway xxx.xxx.xxx.xxx (enter gateway ip here,usually the address of the router)
dns-nameservers xxx.xxx.xxx.xxx (enter DNS IP here)

Then do a:

sudo /etc/init.d/networking restart

Check:

ifconfig eth0

 

To Set Default Gateway

sudo route add default gw <GATEWAY_IP> eth0

What is Network latency?

  1. Network latency is an expression of how much time it takes for a packet of data to get from one designated point to another. In some environments (for example, AT&T), latency is measured by sending a packet that is returned to the sender; the round-trip time is considered the latency.

CCNA- Routing Basics Interview Questions & Answers

What is a Switch?

A Switch is a networking device that

Switches data packets between devices on the same network (or same LAN -Local Area Network).

-Switch is a Layer2 device.

————————————————————————————–

What is Switching?

The function of Switching is to

Switch data packets between devices on the same network (or same LAN -Local Area Network).

————————————————————————————–

What is a router?

A Router is a networking device that

Routes packets between different networks (between different LANs – Local Area Networks).

-Router is a Layer3 device.

————————————————————————————–

What is Routing?

The function of Routing is to

Route packets between different networks (between different LANs – Local Area Networks).

————————————————————————————–

What are the diff types of ports of a Router?

1. Data Ports- Fast Ethernet (for LAN’s) ; Serial(for WAN’s)

2. Virtual Ports- Loopback, VTY ports

3. Management Ports- Console, Auxiliary

————————————————————————————–

What are the diff ways to manage a ROUTER?

A>Non-Network

Console Port:- By connecting the router’s console port to a workstation through a console cable.

The console port is the management port which is used by administrators to log into a router directly-that without using a network connection. You require a terminal emulator application like hyperterminal or PuTTY to connect to router.

Auxiliary Port:- By using a remote computer through a modem that calls another modem connected to the router with a cable using the Auxiliary Port on the router.

Auxiliary Port (AUX Port) allows a direct, non-network connection to the router, from a remote location.

B>Over the Network

The routers can be managed over the network by using standard TCP/IP protocols like Telnet, SSH, HTTP or HTTPS.

Telnet:- A Telnet client and server application ships with Cisco’s IOS software.

SSH:- SSH is a more secure way to configure routers, since the SSH communication is encrypted.

HTTP or HTTPS:- Cisco IOS also has a HTTP server to managed web based communication with the router.

What type of Cable is used to Manage a Router or Switch using Console Port?

Router or Switch end has a RJ45 port used as console port and a Serial/COM  port of a Computer are connected by a Roll-Over Cable.

Roll-Over Cable :- One end of the cable is RJ45 type and a DB9 to RJ45 converter is molded on the other end.

————————————————————————————–

What are the diff types of router memory?

ROM, Flash Memory, NVRAM, RAM

ROM– Instructions for POST, Bootstrap program, Mini-IOS is stored here

Flash Memory– IOS is stored here

NVRAM– Start up Configuration file: startup-config  is stored here

RAM– Running configuration file: running-config is stored here

————————————————————————————–

What should be the value of Configuration Register for Bootstrap to load IOS from FLASH?

0x2102

————————————————————————————–

What is Bootstrap program responsible for?

The Bootstrap program is responsible for

1.Initializing hardware

2.Finding where IOS program is located and then

3.Loading IOS image

————————————————————————————–

What are the possible locations of IOS image?

FLASH, TFTP Server

————————————————————————————–

What is ROM Monitor?

If the Bootstrap program is not able to find a valid IOS image, it will act as ROM Monitor.

————————————————————————————–

What can be done with ROM Monitor?

ROM Monitor is capable of providing a command line environment that can be used to perform certain configuration tasks, such as

-Downloading IOS image using TFTP

-Recovering a lost password

-Changing the configuration register value etc.

————————————————————————————–

What is Unicast?

  1. It is a One to One Communication.
  2. Unicast is a type of communication, where there is only one sender & one receiver.

Example:

1)      Browsing a website. (Webserver is the sender and your computer is the receiver.)

2)    Downloading a file from a FTP Server. (FTP Server is the sender and your computer is the receiver.)

What is Multicast?

  1. It is a One to Many communication.
  2. In Multicast, the sender transmit only one copy of data and it is delivered and/or processed to many devices who are interested in that traffic(Not as delivered and processed by all devices as in Broadcast).
  3. Devices which are interested in a particular Multicast traffic must join to that Multicast group to receive the traffic.
  4. IP Multicast Groups are identified by Multicast IP Addresses (IPv4 Class D Addresses)

Example :

Multicast Windows Deployment Services (WDS) OS deployment traffic, IP TV etc

————————————————————————————–

What is Broadcast?

  1. In Broadcast, there is only one sender and the data is sent only once. But the Broadcast data is delivered to all connected devices.
  2. Switches by design will forward the broadcast traffic and Routers by design will drop the broadcast traffic.

Example:

1)      ARP Request message,

2)    DHCP DISCOVER Message

————————————————————————————–

What are the different modes in Router?

1.User Mode;  2.Privilege Mode;  3.Global Configuration Mode;

Each Mode has access to different set of IOS commands.

————————————————————————————–

What is the command to enter PRIVILEGE mode from USER mode?

>enable

————————————————————————————–

What is the command to enter Global Configuration mode from PRIVILEGE Mode?

#configure terminal

————————————————————————————–

What are the sub modes of Global configuration mode?

1.Interface Mode(Router physical interface configuration mode):-

Router(config-if)

2.Sub Interface Mode(Router sub-interface configuration mode):-

Router(config-subif)#

3.Line Mode(Router line configuration mode – console, vty etc):-

Router(config-line)#

4.Router Configuration Mode(Routing protocols configuration mode):-

Router(config-router)#

————————————————————————————–

What is the command to backup IOS to TFTP server and in which mode it is done?

In Privilege Mode.

The command is :- #copy flash tftp

————————————————————————————–

What is the command to backup running configuration to TFTP server and in which mode it is done?

In Privilege Mode.

The command is:- #copy running-config tftp

————————————————————————————–

What is the command to Reboot a Router?

#reload

————————————————————————————–

What is the command to erase the contents of Flash?

#erase flash

————————————————————————————–

What is the command to upgrade IOS from a TFTP server?

#copy tftp flash

————————————————————————————–

What is to be done in order for the router to use the newly copied IOS image from TFTP to Flash?

The Router has to Reboot to use the newly copied IOS Image.

————————————————————————————–

What is a Static Route?

A static route is a route that is manually configured on the router by a network administrator.

————————————————————————————–

What is Default Route?

v A Default Route (also known as the gateway of last resort) is a special type of static route.

v Where a static route specifies a path a router should use to reach a specific destination, a default route specifies a path the router should use if it doesn’t know how to reach the destination.

v Default Route is the network route used by a router

when there is no other known route exists for a given IP datagram’s destination address.

All the IP datagrams with unknown destination address are sent to the default route.

————————————————————————————–

What is a Dynamic Route?

Dynamic routes are routes that a router learns by using a routing protocol. Routing protocols will learn about routes from other neighboring routers running the same routing protocol.

————————————————————————————–

What is a Routed Protocol?

A Routed Protocol is a network protocol which carries data from one network to another network. Routed Protocol carries user traffic such as e-mails, file transfers, web traffic etc.

Examples:-  IP (Internet Protocol), IPX (Internetwork Packet Exchange) and AppleTalk

————————————————————————————–

What is Routing Protocol?

Routing Protocols learn the routes (network paths) and provide the best routes (network paths)  from one network to another network.

Examples: – RIP (Routing Information Protocol) , EIGRP (Enhanced Interior Gateway Routing Protocol) and OSPF (Open Shortest Path First).

————————————————————————————–

What is an Autonomous System?

An Autonomous System (AS) is a group of networks under a single administrative control which could be an Internet Service Provider (ISP) or a large Enterprise Organization.

————————————————————————————–

What is an Autonomous System number (ASN)?

An Autonomous System Number (ASN) is a 32-bit binary number used to identify the Autonomous Systems.

v 32-bit (4-Octet) AS numbers are represented as either as simple integers,

or in the form x.y, where x and y are 16-bit numbers.

v 32-bit Autonomous System Number (ASN) is also known as 4-Octet Autonomous System Number (ASN).

————————————————————————————–

What is IGP?

An Interior Gateway Protocol (IGP) refers to a routing protocol that handles routing within a single autonomous system.

IGPs include RIP, IGRP, EIGRP, and OSPF.

OR

Interior Gateway Protocol (IGP) is a Routing Protocol which is used to find network path information within an Autonomous System.

————————————————————————————–

What is EGP?

An Exterior Gateway Protocol (EGP) refers to a routing protocol that handles routing between different Autonomous Systems (AS).

Border Gateway Protocol (BGP) is an EGP.

OR

Exterior Gateway Protocol (EGP) is a Routing Protocol which is used to find network path information between different Autonomous Systems.

————————————————————————————–

What is Administrative Distance (AD)?

Administrative Distance is the trust worthiness Or the reliability of a routing protocol.

Administrative Distance (AD) is a value that routers use

in order to select the best path when there are two or more different routes to the same destination from two different routing protocols.

————————————————————————————–

What are the Range of AD values?

0 to 255

v A smaller Administrative Distance (AD) is more trusted by a router, therefore the best Administrative Distance being 0 and the worst, 255.

             Routing Protocol  Administrative Distance Value
Connected Interface 0
Static 1
EIGRP 90
IGRP 100
OSPF 110
IS-IS 115
RIP 120

————————————————————————————–

What is the Syntax for Static Route?

Router(config)#ip  route  <Dest. Network>  <SubnetMask>  <NextHop>

————————————————————————————–

What are the advantages of Static Routing?

v Reduced routing protocol router overhead

v Reduced routing protocol network traffic.

————————————————————————————–

What are the disadvantages of Static Routing?

v Network changes require manual reconfiguration in routers

v Network outages cannot be automatically routed around.

v Also it is difficult to configure static routing in a complex network.

————————————————————————————–

What is Distance-Vector Routing Protocol?

  • Ø Distance vector routing protocols use the distance and direction (vector) to find paths to destinations.
  • Ø A router which is running a Distance Vector routing protocol informs its neighbors about the network topology changes periodically.

Examples:

  1. Routing Information Protocol Version1 (RIPv1)
  2. Interior Gateway Routing Protocol (IGRP)

————————————————————————————–

What is Link-State Routing Protocol?

  • Ø Each router running a link state routing protocol originates information about the router, its directly connected links, and the state of those links. This information is sent to all the routers in the network as multicast messages.
  • Ø Link-state routing always try to maintain full networks topology by updating itself incrementally only whenever a change happen in network.

Examples:

  1. Open Shortest Path First (OSPF)
  2. Intermediate System to Intermediate System (IS-IS)

————————————————————————————–

What is Hybrid Routing Protocol?

A Hybrid Routing protocol has the advantages of both Distance Vector and Lin k State Routing protocols and merges them into a new protocol.

v (EIGRP) sends traditional Distance Vector updates

v (EIGRP) has Link State characteristics also. It synchronizes routing tables between neighbors at startup, and then it sends specific updates only when a network topology change happens.

Examples:

  1. Enhanced Interior Gateway Routing Protocol (EIGRP)
  2. Routing Information Protocol Version2 (RIPv2)

————————————————————————————–

What is Metric?

v If the router has more than one route found by two different routing protocols, for the same destination network, the router chooses Administrative Distance to choose the best one.

v But in some cases, there will be two paths found by the same protocol, to the same destination network.

v Here the Routing Protocol will use Route Metric value to find the best path. For every protocol there is a parameter used

RIP – Hop Count; IGRP & EIGRP – Bandwidth, Delay, Reliability & Load; OSPF, IS-IS – Cost.

————————————————————————————–

What is Hop Count?

Hop count is the number of routers (number of hops) from the source router through which data must pass to reach the destination network.

Hop CountClick on the Image to see it

————————————————————————————–

What is Bandwidth?

The data capacity of a link in Kbps.

————————————————————————————–

What is Delay?

The Time it takes to reach the destination.

————————————————————————————–

What is Reliability?

The path with the least amount of errors or downtime.

————————————————————————————–

What is Load?

The amount of utilization of a path.

Or

The amount of activity on a network resource, such as a router or link

————————————————————————————–

What is MTU?

The IEEE 802.3 specification limits the data portion of the 802.3 frame to a maximum of 1500 bytes. The Data field was designed to hold Layer 3 packets; the term maximum transmission unit (MTU) defines the maximum Layer 3 packet that can be sent over a medium. Because the Layer 3 packet rests inside the data portion of an Ethernet frame, 1500 bytes is the largest IP MTU allowed over an Ethernet.

————————————————————————————–

What are the Metrics for diff Routing Protocols?

Protocol Metric Explanation
RIP Hop Count Number of routers (number of hops) from the source router through which data must pass to reach the destination network.
OSPF Cost Measurement in the inverse of the bandwidth of the links
EIGRP Bandwidth The capacity of the links in Kbps (T1 = 1554)
EIGRP Delay Time it takes to reach the destination
EIGRP Load The path with the least utilization
EIGRP MTU The path that supports the largest frame sizes
EIGRP Reliability The path with the least amount of errors or down time

————————————————————————————–

What is Convergence?

If the network topology changes, for example a link fails the routers should react by advertising that some routes have failed, and pick a new current best route. This process is called convergence.

————————————————————————————–

What is Converged Network Topology?

A converged network topology means all the routers agree on which links are up, which links are down, which links are running fastest etc.

————————————————————————————–

What is Convergence Time?

Convergence time is the time which a group of routers reach the state of convergence.

————————————————————————————–

What is CDP?

  • Ø CDP-Cisco Discovery Protocol is a proprietary protocol of CISCO to help administrators collect information about both locally attached and remote devices.
  • Ø By using CDP, you can gather hardware and protocol information about neighbor devices, which is useful information for troubleshooting and documenting the network.

————————————————————————————–

What is the Command to see Cisco device neighbors?

To see the summary of Cisco device neighbors, run the “show cdp neighbors” IOS command from privilege mode.

————————————————————————————–

What is Null Interface?

v Null interfaces are virtual interfaces and are always up.

v Null interfaces never forward or receive traffic; packets routed to a null interface are dropped.

v Null interface is also known as bit bucket because the IP datagram reaching Null interface are dropped as soon as they are received.

v The Null interface in a Cisco Router is a mechanism for preventing routing loops. EIGRP creates a route to the Null0 interface when it summarizes a group of routes.

CCNA- Switching: VLAN Interview Questions & Answers

What is VLAN?

By default, all ports on a switch are in the same broadcast domain. A Virtual Local Area Network, Virtual LAN, or VLAN, can be used to divide a single broadcast domain to multiple broadcast domains in a layer 2 switched network.

———————————————————————————————————————–

What are the VLAN membership types?

Static VLANs & Dynamic VLANs

———————————————————————————————————————–

What is Static VLAN?

In a static VLAN, the network administrator creates a VLAN and then assigns switch ports to the VLAN. Static VLANs are also called port based VLANs. The association with the VLAN does not change until the administrator changes the port assignment. End-user devices become the members of VLAN based on the physical switch port to which they are connected.

  • Ø The ports on a single switch can be assigned multiple VLANs. Even though two devices are connected to different ports on a same switch, traffic will not pass between them if the connected ports are on different VLANs. We need a layer 3 device (typically a Router) to enable communication between two VLANs.

———————————————————————————————————————–

What is Dynamic VLAN?

In a dynamic VLAN, the switch automatically assigns the port to a VLAN using information from the user device like MAC address, IP address etc. When a device is connected to a switch port the switch queries a database to establish VLAN membership. A network administrator must configure VLAN database of a VLAN Membership Policy Server (VMPS).

———————————————————————————————————————–

What are the types of VLAN connection links?

There are two types of VLAN connection links and they are Access link and Trunk link.

access and trunk linksClick on the Image to see it

The solid lines in above picture are access links and dotted line connecting two switches together is a trunk link. The access links are part of only one VLAN and carry traffic to only the end devices connected to that particular VLAN. But a trunk link is used to connect switches to other switches or to routers and can carry traffic from multiple VLANs.

———————————————————————————————————————–

What is VLAN Frame Tagging?

To identify the VLAN that a frame belongs to, Cisco switches support different identification techniques (VLAN Frame tagging).

———————————————————————————————————————–

What are the different VLAN Frame tagging techniques?

• Inter-Switch Link (ISL): Cisco proprietary VLAN frame tagging. No much support from other vendors. Supported only in old Cisco Switch models.

• IEEE 802.1Q: IEEE industry standards VLAN frame tagging.

• LAN Emulation (LANE): LANE is used to communicate with multiple VLANs over ATM.

• 802.10 (FDDI): Protocol for sending VLAN information over FDDI.

———————————————————————————————————————–

What is Native VLAN?

Normally a Switch port configured as a trunk port send and receive IEEE 801.q VLAN tagged Ethernet frames.

If a switch receives untagged Ethernet frames on its Trunk port, they are forwarded to the VLAN that is configured on the Switch as native VLAN. Both sides of the trunk link must be configured to be in same native VLAN.

———————————————————————————————————————–

What is VTP?

VLAN Trunking Protocol (VTP) is used to communicate VLAN information between switches in the same VTP domain.

———————————————————————————————————————–

What is VTP Domain?

  • Ø A VLAN Trunking Protocol (VTP) domain is one switch or several interconnected switches sharing the same VLAN Trunking Protocol (VTP) environment.
  • Ø A switch can be configured only in one VLAN Trunking Protocol (VTP) domain.
  • Ø Switches in different VTP domains do not share VLAN Trunking Protocol (VTP) information.

———————————————————————————————————————–

What are the VLAN Trunking Protocol (VTP) Modes?

A network switch, which is participating in VLAN Trunking Protocol (VTP), can have three different modes.

• Server Mode

• Client Mode

• Transparent Mode

———————————————————————————————————————–

What is VTP Server Mode?

VLAN Trunking Protocol (VTP) Server mode is the default VTP mode for all Catalyst switches.

At least one Server is required in a VTP domain to propagate VLAN information within the VTP domain.

We can create, add, or delete VLANs of a VTP domain in a Switch which is in VTP Server mode.

The changes made in a switch in server mode are advertised to the entire VTP domain.

———————————————————————————————————————–

What is VTP Client Mode?

VLAN Trunking Protocol (VTP) client mode switches listen to VTP advertisements from other switches and modify their VLAN configurations accordingly.

———————————————————————————————————————–

What is VTP Transparent Mode?

VLAN Trunking Protocol (VTP) transparent mode switches do not participate in the VTP domain, but VTP transparent mode switches can receive and forward VTP advertisements through the configured trunk links.

———————————————————————————————————————–

What is VTP Pruning?

VLAN Trunking Protocol (VTP) pruning is a feature in Cisco switches, which stops VLAN update information traffic from being sent down trunk links if the updates are not needed.

———————————————————————————————————————–

CCNA- Switching: STP Interview Question & Answers

What is STP?

  • Ø The function of Spanning Tree Protocol (STP) is to prevent Layer 2 switching loops and broadcast storms in a Local Area Network (LAN) because of redundant links.
  • Ø STP allows redundant links in a network to prevent complete network failure if an active link fails.

———————————————————————————————————————–

Who developed STP?

  • Ø Spanning Tree Protocol (STP) is based on an algorithm, which was developed by Radia Perlman at DEC (Digital Equipment Corporation, now part of HP).
  • Ø The Spanning Tree Protocol (STP) was then standardized by IEEE as IEEE 802.1D.

———————————————————————————————————————–

What is the reason for developing another version STP i.e. RSTP?

Because of the slow convergence time of Spanning Tree Protocol (STP) IEEE 802.1D, another version of Spanning Tree Protocol (STP IEEE 802.1W) is developed, which is also known as Rapid Spanning Tree Protocol (RSTP), which has much better convergence time.

———————————————————————————————————————–

What is Bridge Protocol Data Unit (BPDU) frame?

  • Ø The Spanning Tree Protocol (STP) enabled switches in a redundant Local Area Network (LAN) need to exchange information between each other for Spanning Tree Protocol (STP) to work properly.
  • Ø Bridge Protocol Data Units (BPDUs) are messages exchanged between the switches inside an interconnected redundant Local Area Network (LAN).
  • Ø Bridge Protocol Data Units (BPDUs) frames contain information regarding the Switch ID, originating switch port, MAC address, switch port priority, switch port cost etc.
  • Ø When Bridge Protocol Data Units (BPDUs) are received, the Switch uses a mathematical formula called the Spanning Tree Algorithm (STA) to know when there is a Layer2 Switch loop in network and determines which of the redundant ports needs to be shut down.

———————————————————————————————————————–

What is the destination MAC address used by Bridge Protocol Data Units (BPDUs)?

Bridge Protocol Data Units (BPDUs) frames are sent out as multicast messages regularly at multicast destination MAC address 01:80:c2:00:00:00.

———————————————————————————————————————–

What are the different types of BPDUs?

Three types of Bridge Protocol Data Units (BPDUs) are

  1. Configuration BPDU (CBPDU),
  2. Topology Change Notification (TCN) BPDU
  3. Topology Change Notification Acknowledgment (TCA) BPDU

———————————————————————————————————————–

What is the basic purpose of the BPDUs and STA?

The basic purpose of the Bridge Protocol Data Units (BPDUs) and the Spanning Tree Algorithm (STA) is to avoid Layer2 Switching loops and Broadcast storms.

———————————————————————————————————————–

What is Configuration BPDU?

What is TCN BPDU?

What is TCA BPDU?

What is Bridge Protocol Data Unit (BPDU) Frame Format?

———————————————————————————————————————–

What is Switch Priority Value (Bridge Priority)?

  • Ø Every Switch Participating in a Spanning Tree Protocol network is assigned with a numerical value called Switch Priority Value.
  • Ø Switch Priority Value is a 16-bit binary number.
  • Ø The Switch Priority, which is a numerical value defined by IEEE 802.1D, which is equal to 32,768 by default.
  • Ø Switch Priority value decides which Switch can become Root Bridge (Root Switch).
  • Ø The Switch Priority value is used to find the Switch ID.

———————————————————————————————————————–

What is Switch ID (Bridge ID)?

  • Ø Switch ID decides which Switch can become Root Switch. A Switch with lowest Switch ID will become the Root Switch.

The Switch ID (Bridge ID) is made from two values.

  • Ø The Switch Priority which is a numerical value defined by IEEE 802.1D, which is equal to 32,768 by default.
  • Ø The MAC Address of the Switch.

———————————————————————————————————————–

What is Root Switch (Root Bridge)?

  • Ø The root bridge function is only for the spanning tree protocol.
  • Ø The other switches refer to the root switch to find redundant paths so as to ensure NO Layer 2 Loops exist.
  • Ø The main function of the root switch is to broadcast network topology changes to all the switches in the network.
  • Ø When a switch detects a topology change (i.e., a trunk goes down) it sends a topology change notification (TCN) BPDU to the root switch. The root switch then broadcasts that topology change out to the other switches.
  • Ø If each switch could broadcast change notifications to the other switches it would be total chaos.

———————————————————————————————————————–

What is Path Cost or Spanning Tree Path Cost value?

  • Ø Spanning Tree Path Cost value can be defined as the accumulated port costs from a Switch to reach the Root Switch.
  • Ø The Spanning Tree Cost Value is inversely proportional to the associated bandwidth of the path and therefore a path with a low cost value is more preferable than a path with high cost value.

The following table lists the Port Cost value for different bandwidths.

Link Speed or Link Bandwidth Cost Value
   
10 Gbps   2
1 Gbps   4
100 Mbps   19
10 Mbps   100

———————————————————————————————————————–

What is Root Port?

  • Ø Once the Root Switch is elected, every other Switch in the network must select a single port on itself to reach the Root Switch.
  • Ø The single selected port on a Switch with least Path Cost to reach the Root Bridge is called the Root Port.
  • Ø Root Bridge (Switch) will never have a Root Port.

———————————————————————————————————————–

See the Diagram for Root Port

root portClick on the Image to see it

The above layout of Switches shows that Switch 4 has two ports to reach the Root Bridge. If there are multiple ports present in a Switch to reach the Root Bridge (Switch). Spanning Tree Protocol Algorithm must select the best port from them to reach the Root Bridge. Here the port with least path cost (4+4=8) is marked as Root Port.

———————————————————————————————————————–

What is Spanning Tree Port Priority?

Each port of a Switch has a Spanning Tree Port Priority value associated with it, which is equal to 128 by default.

———————————————————————————————————————–

What is Spanning Tree Port ID?

  • Ø Spanning Tree Port ID is formed by adding the 4-bit port priority value (the default value of 128) to 12-bit interface identifier (total 16 bits).
  • Ø Normally, a Port ID is denoted in Hexadecimals similar as 0x8015, which is equivalent to 128.21 in decimals, where the first part is the default Port Priority number and second part is the switch interface identifier.

———————————————————————————————————————–

What is Extended System ID?

extended system idClick on Image to see it

The Extended System ID is utilized by spanning-tree to include the VLAN ID information inside 16-bit STP Bridge Priority value. Extended System ID is the least significant 12-bits in 16-bit STP Bridge Priority value.

———————————————————————————————————————–

What is PVST or PVST+?

Per-VLAN spanning tree protocol plus (PVST+) is a Cisco proprietary protocol that expands on the Spanning Tree Protocol (STP) by allowing a separate spanning tree for each VLAN.

Cisco first developed this protocol as PVST, which worked with the Cisco ISL trunking protocol, and

then later developed PVST+ which utilizes the 802.1Q trunking protocol.

———————————————————————————————————————–

What is PVST?

Cisco first developed a protocol that expands on the Spanning Tree Protocol (STP) as PVST, which worked with the Cisco ISL trunking protocol.

———————————————————————————————————————–

What is PVST+?

Cisco later developed PVST+ which utilizes the 802.1Q trunking protocol.

———————————————————————————————————————–

What is the working of PVST or PVST+?

By creating a separate spanning tree for each VLAN, data traffic from the different VLANs can take different paths across the network, as opposed to all switched traffic taking the same path. This can effectively create a load balancing situation and improve network efficiency.

By default the Cisco switches in Packet Tracer appear to be using PVST+ as the default implementation of spanning tree protocol.

———————————————————-

What is RSTP?

Rapid Spanning Tree Protocol (RSTP) is an enhancement of the original STP 802.1D protocol. The RSTP 802.1w protocol is an IEEE open implementation.

——————————————————————————————————————–

What is Rapid-PVST+?

Cisco has its own proprietary implementation of RSTP, that includes the benefits of its Per-VLAN spanning tree protocols, called Rapid-PVST+.

——————————————————————————————————————–

What is the working of RSTP and Rapid-PVST+?

Rapid-PVST+ and RSTP are important enhancements to the original STP protocol because they can switch ports from blocking to forwarding without relying on timers, execute spanning tree calculations and converge the network faster than STP.

In STP, network convergence can take up to 50 seconds, with RSTP and Rapid-PVST+ network convergence can happen in just over 6 seconds.

——————————————————————————————————————–

CCNA- Basic Switching Interview Question & Answers

What is Switch?

A Network Switch is a device which is used to connect multiple computers inside Local Area Network (LAN).

Network Switches operate at Layer Two (Data Link Layer) of the OSI model.

———————————————————————————————————————–

What is LAN?

Local Area Network (LAN) is a network, which is limited to a small office, single building, multiple buildings, college campus etc.

———————————————————————————————————————–

What is the basic function of a Switch?

The basic function of a Switch is to forward Layer 2 packets (Ethernet frames) from source device to destination device.

———————————————————————————————————————–

What are the features of a Switch?

ü Switches are used to connect network devices together in a Local Area Network (LAN).

ü Switches can learn Layer 2 (MAC) addresses and forward Layer 2 packets (Ethernet frames) to exact destination.

ü Switches can control of who has access to various parts of the network.

ü Switches have provision to monitor network usage.

———————————————————————————————————————–

What are the differences between a Switch and Bridge?

switch and bridgeClick on the Image

———————————————————————————————————————–

What is a Switching method?

A Switching Method determines how a switch receives, processes, and forwards a Layer 2 Ethernet frame.

———————————————————————————————————————–

What are the diff Switching Methods?

Important Switching Methods are

  1. Store & Forward
  2. Cut-Through
  3. Fragment-Free

———————————————————————————————————————–

What is Store and Forward Switching?

  • Ø In Store and Forward Switching, Switch copies each complete Ethernet Frame into the switch memory and computes a Cyclic Redundancy Check (CRC) for errors.
  • Ø If a Cyclic Redundancy Check (CRC) error is found, the Ethernet Frame is dropped and if there is no Cyclic Redundancy Check (CRC) error, the switch forwards the Ethernet frame to the destination device.

———————————————————————————————————————–

What is the disadvantage of Store and Forward Switching?

Store and Forward Switching can cause delay in switching since Cyclic Redundancy Check (CRC) is calculated for each Ethernet frame.

———————————————————————————————————————–

What is Cut-Through Switching?

  • Ø In Cut-Through switching, the switch copies into its memory only the destination MAC address (first 6 bytes of the frame) of the frame before making a switching decision.
  • Ø A switch operating in cut-through switching mode reduces delay because the switch starts to forward the Ethernet frame as soon as it reads the destination MAC address and determines the outgoing switch port.

———————————————————————————————————————–

What is the disadvantage of Cut-Through Switching?

Problem related with Cut-Through switching is that the switch may forward bad frames.

———————————————————————————————————————–

What are Ethernet runt frames?

Ethernet frames smaller than 64 bytes are called Ethernet runt frames.

———————————————————————————————————————–

What is Fragment-free (runt-less switching) switching?

  • Ø Fragment-free (runt-less switching) switching is an advanced form of cut-through switching. The switches operating in cut-through switching read only up to the destination MAC address field in the Ethernet frame before making a switching decision.
  • Ø The switches operating in fragment-free switching read at least 64 bytes of the Ethernet frame before switching it to avoid forwarding Ethernet runt frames (Ethernet frames smaller than 64 bytes).

———————————————————————————————————————–

What is Half-Duplex?

  • Ø In a half-duplex Local Area Network (LAN) a device can only, either send or receive frames at a time but not both at the same time.
  • Ø In a half-duplex mode, one device sends the frame and all other devices in the collision domain listen for the frame. Collision is a problem in half duplex networks.
  • Ø Half-duplex Local Area Networks (LANs) are networks of the past.

———————————————————————————————————————–

What is Full-Duplex?

  • Ø In a Local Area Network (LAN) operating in full duplex mode, a device can send and receive frames simultaneously at the same time.
  • Ø In a full-duplex mode, there are separate channels to send and receive frames. There is no collision detection in devices operating in full duplex mode, since collision detection is not required.
  • Ø Almost all current networks operate in full-duplex mode.

———————————————————————————————————————–

What are the Basic functions of a Switch?

Three basic functions of a switch are

1. Learning; 2. Forwarding;  3. Preventing Layer2 Loops.

———————————————————————————————————————–

What is the Learning function of a Switch?

  • Ø Learning is the process of obtaining the MAC address of connected devices.
  • Ø When a frame reaches into the port of a switch, the switch reads the MAC address of the source device from Ethernet frame and compares it to its MAC address table (also known as CAM (Content Addressable Memory) table). If the switch cannot find a corresponding entry in MAC address table, the switch will add the address to the table with the port number via the Ethernet frame arrived.
  • Ø If the MAC address is already available in the MAC address table, the switch compares the incoming port with the port already available in the MAC table. If the port numbers are different, the switch updates the MAC address table new port number. This will normally happen when network administrators remove the cable from one port and attach it to another port.

———————————————————————————————————————–

What is the Forwarding function of a Switch?

  • Ø Forwarding is the process of passing network traffic of a device connected to one port of a Switch to another device connected to another port on the switch.
  • Ø When a Layer2 Ethernet frame reaches a port on the Switch, it not only reads the source MAC address of the Ethernet frame as a part of learning function, but also reads the destination MAC address as a part of forwarding function. The destination MAC address is important to determine the port number which the destination device is connected.
  • Ø As the destination MAC address is found on the MAC address table, the switch forwards the Ethernet frame via the corresponding port of the MAC address.

———————————————————————————————————————–

What is Flooding?

  • Ø If the destination MAC address is not found on the MAC address table, the switch forwards the Ethernet frame through all its ports except the source port. This is known as flooding.
  • Ø When the destination device receives the Ethernet frame and sends a reply frame to the source device, the switch reads the MAC address of the destination device and adds it to the MAC address table, which is the function of learning process.

———————————————————————————————————————–

What is Filtering?

If the source MAC address is same as the destination MAC address, the switch will drop the Ethernet frame. This is known as filtering.

———————————————————————————————————————–

What is a Redundant Link?

In practical Local Area Networking, Redundant links are created to avoid complete network failure in an event

of failure of one link.

redundant links Click on the Image

———————————————————————————————————————–

What is Disadvantage of a Redundant Link?

Redundant links can cause Layer2 Switching Loops and Broadcast Storms.

———————————————————————————————————————–

What is Layer2 Switching Loop?

———————————————————————————————————————–

What is Broadcast Storm?

———————————————————————————————————————–

What is Management VLAN?

  • Ø Management VLAN is used for managing the switch from a remote location by using protocols such as telnet, SSH, SNMP, syslog etc.
  • Ø Normally the Management VLAN is VLAN 1, but you can use any VLAN as a management VLAN.
  • Ø Cisco recommends not to use VLAN 1 and not to use any VLAN that carries user data traffic as Management VLAN.
  • Ø You must configure IP address and default gateway for Management VLAN.

———————————————————————————————————————–

Configuring Management VLAN:-

Switch>enable

Switch#configure terminal

Switch(config)#interface vlan 1

Switch(config-if)#ip address 192.168.100.28 255.255.255.0

Switch(config-if)#no shutdown

Switch(config-if)#exit

Switch(config)#ip default-gateway 192.168.100.1