Network Kings

Multi-Access Year Deal

Get 55+ courses now at the best price ever! Use Code:    MULTIYEAR

d :
h :
m

Basic OSPF Configuration: Explained

ospf configuration
ospf configuration

It is not just essential to understand the concepts of any routing protocol but also to know how to configure it. Understanding of configuration also helps in troubleshooting the network.

In this post, we will go through a basic OSPF configuration for Single Area and Multi Area OSPF.

Single Area OSPF Configuration

OSPF (Open Shortest Path First) is a routing protocol used in computer networks to decide the best pathway for data packets to travel from one network to another.

In single area OSPF configuration, all routers in the network possess a single OSPF area. This is used in smaller networks where there is no requirement for multiple areas.
 

How does Single Area OSPF get configured?

Let us understand how a Single Area OSPF is configured. 

The topology is given below-

single area ospf configuration

ShapeSyntax: –  

R(config)#router ospf <Process ID > 

R(config-router)#network <IP Address> <Wildcard Mask> area<numerical value of the area> 

R1#config t 

R1(config)#router ospf 1 

R1(config-router)#network 1.0.0.0 0.255.255.255 area 0 

R1(config-router)#network 192.168.1.0 0.0.0.255 area 0 

R2#config t 

R2(config)#router ospf 1 

R2(config-router)#network 1.0.0.0 0.255.255.255 area 0 

R2(config-router)#network 192.168.2.0 0.0.0.255 area 0 

NOTE: Here, I used 1 as the process ID and 0 as my area.

As soon as OSPF is configured on the interfaces of both routers, a message like the above pops up. They start to exchange routes with each other, and adjacency is created.

Verification: – 

R1#show ip ospf neighbor  

 

 

Neighbor ID    Pri         State Dead Time       Address         Interface 

 

192.168.2.1     1        FULL/BDR      00:00:31               1.1.1.2      GigabitEthernet0/0/0 

 

R1#show ip ospf database 

OSPF Router with ID (192.168.1.1) (Process ID 1) 

 

Router Link States (Area 0) 

 

Link ID ADV Router Age Seq# Checksum Link count 

192.168.1.1 192.168.1.1 111    0x80000003       0x007a7e             2 

192.168.2.1 192.168.2.1                88      0x80000003      0x008b69             2 

 

Net Link States (Area 0) 

 

Link ID ADV Router Age Seq# Checksum 

1.1.1.1 192.168.1.1 111      0x80000001      0x00fd37 

R1#show ip route 

 

 

Codes: L – local, C – connected, S – static, R – RIP, M – mobile, B – BGP 

D – EIGRP, EX – EIGRP external, O – OSPF, IA – OSPF inter area 

N1 – OSPF NSSA external type 1, N2 – OSPF NSSA external type 2 

E1 – OSPF external type 1, E2 – OSPF external type 2, E – EGP 

i – IS-IS, L1 – IS-IS level-1, L2 – IS-IS level-2, ia – IS-IS inter area 

* – candidate default, U – per-user static route, o – ODR 

P – periodic downloaded static route 

 

Gateway of last resort is not set 

  

 1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks 

C 1.0.0.0/8 is directly connected, GigabitEthernet0/0/0 

L 1.1.1.1/32 is directly connected, GigabitEthernet0/0/0 

 192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks 

C 192.168.1.0/24 is directly connected, GigabitEthernet0/0/1 

L 192.168.1.1/32 is directly connected, GigabitEthernet0/0/1 

O 192.168.2.0/24 [110/2] via 1.1.1.2, 00:01:38, GigabitEthernet0/0/0 

R1#show ip route ospf 

 

O 192.168.2.0 [110/2] via 1.1.1.2, 00:02:12, GigabitEthernet0/0/0 

Let us verify on Router 2 as well. 

 

Shape

 

R2#show ip ospf neighbor  

 

 

Neighbor ID Pri State          Dead Time   Address        Interface 

192.168.1.1 1 FULL/DR 00:00:32     1.1.1.1    GigabitEthernet0/0/0 

R2#show ip ospf neighbor  

 

 

Neighbor ID Pri State Dead Time     Address Interface 

192.168.1.1 1 FULL/DR    00:00:37      1.1.1.1     GigabitEthernet0/0/0 

R2#show ip route  

Codes: L – local, C – connected, S – static, R – RIP, M – mobile, B – BGP 

D – EIGRP, EX – EIGRP external, O – OSPF, IA – OSPF inter area 

N1 – OSPF NSSA external type 1, N2 – OSPF NSSA external type 2 

E1 – OSPF external type 1, E2 – OSPF external type 2, E – EGP 

i – IS-IS, L1 – IS-IS level-1, L2 – IS-IS level-2, ia – IS-IS inter area 

* – candidate default, U – per-user static route, o – ODR 

P – periodic downloaded static route 

 

Gateway of last resort is not set 

 

 1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks 

C 1.0.0.0/8 is directly connected, GigabitEthernet0/0/0 

L 1.1.1.2/32 is directly connected, GigabitEthernet0/0/0 

O 192.168.1.0/24 [110/2] via 1.1.1.1, 00:06:40, GigabitEthernet0/0/0 

 192.168.2.0/24 is variably subnetted, 2 subnets, 2 masks 

C 192.168.2.0/24 is directly connected, GigabitEthernet0/0/1 

L 192.168.2.1/32 is directly connected, GigabitEthernet0/0/1 

R2#show ip route ospf 

 

O 192.168.1.0 [110/2] via 1.1.1.1, 00:06:45, GigabitEthernet0/0/0 

Multi Area OSPF configuration

In a multi-area OSPF configuration, the network is classified into diverse areas, each with its own set of routers. The areas are associated to a central backbone area, known as Area 0. This hierarchical structure helps to optimize network performance and scalability.

How does Multi Area OSPF get configured?

multi area ospf configuration

R1(config)#router ospf 1 

R1(config-router)#network 1.0.0.0 0.255.255.255 area 1 

 

 

R2(config)#router ospf 1 

R2(config-router)#network 1.0.0.0 0.255.255.255 area 1 

R2(config-router)#network 2.0.0.0 0.255.255.255 area 0 

 

 

R3(config)#router ospf 1 

R3(config-router)#network 2.0.0.0 0.255.255.255 area 0 

 

 

R4(config)#router ospf 1 

R4(config-router)#network 2.0.0.0 0.255.255.255 area 0 

R4(config-router)#network 3.0.0.0 0.255.255.255 area 2 

 

 

R5(config)#router ospf 1 

R5(config-router)#network 3.0.0.0 0.255.255.255 area 2 

Verification: – 

R1#show ip ospf neighbor  

 

  

Neighbor ID Pri State Dead Time Address        Interface 

2.1.1.1 1 FULL/DR 00:00:39 1.1.1.2 GigabitEthernet0/0/0 

R1#show ip route 

Codes: L – local, C – connected, S – static, R – RIP, M – mobile, B – BGP 

D – EIGRP, EX – EIGRP external, O – OSPF, IA – OSPF inter area 

N1 – OSPF NSSA external type 1, N2 – OSPF NSSA external type 2 

E1 – OSPF external type 1, E2 – OSPF external type 2, E – EGP 

i – IS-IS, L1 – IS-IS level-1, L2 – IS-IS level-2, ia – IS-IS inter area 

* – candidate default, U – per-user static route, o – ODR 

P – periodic downloaded static route 

 

Gateway of last resort is not set 

 

 1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks 

C 1.0.0.0/8 is directly connected, GigabitEthernet0/0/0 

L 1.1.1.1/32 is directly connected, GigabitEthernet0/0/0 

O IA 2.0.0.0/8 [110/2] via 1.1.1.2, 00:03:42, GigabitEthernet0/0/0 

O IA 3.0.0.0/8 [110/3] via 1.1.1.2, 00:02:01, GigabitEthernet0/0/0

R1#show ip route ospf 

O IA 2.0.0.0 [110/2] via 1.1.1.2, 00:03:59, GigabitEthernet0/0/0 

O IA 3.0.0.0 [110/3] via 1.1.1.2, 00:02:18, GigabitEthernet0/0/0 

 

R1#show ip ospf database  

 

OSPF Router with ID (1.1.1.1) (Process ID 1) 

 

  Router Link States (Area 1) 

 

Link ID ADV Router Age       Seq               Checksum           Link count 

1.1.1.1                  1.1.1.1 262       0x80000002      0x00fb47                   1 

2.1.1.1       2.1.1.1             262            0x80000003      0x00f449                   1 

 

 

Net Link States (Area 1) 

Link ID ADV Router Age        Seq# Checksum 

1.1.1.2     2.1.1.1 262        0x80000001         0x00e7eb 

 

Summary Net Link States (Area 1) 

Link ID ADV Router Age         Seq#   Checksum 

2.0.0.0       2.1.1.1 257         0x80000001          0x005205 

3.0.0.0       2.1.1.1              152             0x80000002          0x004d07 

R1#show ip ospf interface  

 

GigabitEthernet0/0/0 is up, line protocol is up 

Internet address is 1.1.1.1/8, Area 1 

Process ID 1, Router ID 1.1.1.1, Network Type BROADCAST, Cost: 1 

Transmit Delay is 1 sec, State BDR, Priority 1 

Designated Router (ID) 2.1.1.1, Interface address 1.1.1.2 

Backup Designated Router (ID) 1.1.1.1, Interface address 1.1.1.1 

Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5 

Hello due in 00:00:02 

Index 1/1, flood queue length 0 

Next 0x0(0)/0x0(0) 

Last flood scan length is 1, maximum is 1 

Last flood scan time is 0 msec, maximum is 0 msec 

Neighbor Count is 1, Adjacent neighbor count is 1 

Adjacent with neighbor 2.1.1.1 (Designated Router) 

Suppress hello for 0 neighbor(s) 

R2#show ip route 

Codes: L – local, C – connected, S – static, R – RIP, M – mobile, B – BGP 

D – EIGRP, EX – EIGRP external, O – OSPF, IA – OSPF inter area 

N1 – OSPF NSSA external type 1, N2 – OSPF NSSA external type 2 

E1 – OSPF external type 1, E2 – OSPF external type 2, E – EGP 

i – IS-IS, L1 – IS-IS level-1, L2 – IS-IS level-2, ia – IS-IS inter area 

* – candidate default, U – per-user static route, o – ODR 

P – periodic downloaded static route 

 

Gateway of last resort is not set 

 

1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks 

C 1.0.0.0/8 is directly connected, GigabitEthernet0/0/0 

L 1.1.1.2/32 is directly connected, GigabitEthernet0/0/0 

2.0.0.0/8 is variably subnetted, 2 subnets, 2 masks 

C 2.0.0.0/8 is directly connected, GigabitEthernet0/0/1 

L 2.1.1.1/32 is directly connected, GigabitEthernet0/0/1 

O IA 3.0.0.0/8 [110/2] via 2.1.1.3, 00:06:51, GigabitEthernet0/0/1 

R2#show ip ospf neighbor  

 

 

Neighbor ID       Pri State   Dead Time       Address     Interface 

1.1.1.1                    FULL/BDR           00:00:39         1.1.1.1      GigabitEthernet0/0/0 

2.1.1.2        1             FULL/BDR           00:00:37         2.1.1.2     GigabitEthernet0/0/1 

3.1.1.1                    FULL/DROTHER  00:00:35        2.1.1.3     GigabitEthernet0/0/1

R2#show ip ospf database 

OSPF Router with ID (2.1.1.1) (Process ID 1) 

 

Router Link States (Area 0) 

 

Link ID ADV Router Age Seq# Checksum     Link count 

2.1.1.1 2.1.1.1 524             0x80000002          0x00f04e            1 

2.1.1.2 2.1.1.2 524        0x80000002   0x00eb51           1 

3.1.1.1 3.1.1.1 446        0x80000003   0x00f445      1 

 

Net Link States (Area 0) 

Link ID ADV Router Age Seq#    Checksum 

2.1.1.1 2.1.1.1 464        0x80000002     0x00dc31 

 

Summary Net Link States (Area 0) 

Link ID ADV Router Age Seq#     Checksum 

1.0.0.0 2.1.1.1 536 0x80000001       0x005ff8 

3.0.0.0 3.1.1.1            436 0x80000001       0x003c19 

Text BoxRouter Link States (Area 1) 

 

Link ID ADV Router Age              Seq# Checksum     Link count 

2.1.1.1 2.1.1.1 541         0x80000003   0x00f449     1 

1.1.1.1 1.1.1.1  541         0x80000002   0x00fb47     1 

 

Net Link States (Area 1) 

Link ID ADV Router            Age Seq#               Checksum 

1.1.1.2 2.1.1.1 541 0x80000001      0x00e7eb 

 

Summary Net Link States (Area 1) 

Link ID ADV Router Age Seq# Checksum 

2.0.0.0 2.1.1.1 536        0x80000001   0x005205 

3.0.0.0 2.1.1.1 431             0x80000002   0x004d07 

R2#show ip ospf interface  

 

GigabitEthernet0/0/1 is up, line protocol is up 

Internet address is 2.1.1.1/8, Area 0 

Process ID 1, Router ID 2.1.1.1, Network Type BROADCAST, Cost: 1 

Transmit Delay is 1 sec, State DR, Priority 1 

Designated Router (ID) 2.1.1.1, Interface address 2.1.1.1 

Backup Designated Router (ID) 2.1.1.2, Interface address 2.1.1.2 

Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5 

Hello due in 00:00:08 

Index 1/1, flood queue length 0 

Next 0x0(0)/0x0(0) 

Last flood scan length is 1, maximum is 1 

Last flood scan time is 0 msec, maximum is 0 msec 

Neighbor Count is 2, Adjacent neighbor count is 2 

Adjacent with neighbor 2.1.1.2 (Backup Designated Router) 

Adjacent with neighbor 3.1.1.1 

Suppress hello for 0 neighbor(s) 

 

GigabitEthernet0/0/0 is up, line protocol is up 

Internet address is 1.1.1.2/8, Area 1 

Process ID 1, Router ID 2.1.1.1, Network Type BROADCAST, Cost: 1 

Transmit Delay is 1 sec, State DR, Priority 1 

Designated Router (ID) 2.1.1.1, Interface address 1.1.1.2 

Backup Designated Router (ID) 1.1.1.1, Interface address 1.1.1.1 

Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5 

Hello due in 00:00:05 

Index 2/2, flood queue length 0 

Next 0x0(0)/0x0(0) 

Last flood scan length is 1, maximum is 1 

Last flood scan time is 0 msec, maximum is 0 msec 

Neighbor Count is 1, Adjacent neighbor count is 1 

Adjacent with neighbor 1.1.1.1 (Backup Designated Router) 

Suppress hello for 0 neighbor(s)

What is the Difference Between Router and Switch? Explained

difference between router and switch
difference between router and switch

The difference between router and switch is what every network enthusiast must know. But how do a router and a switch work? Both the router and the switches enhance data communication.

Routing enables the whole network while switching connects a single network with individual computers. The role of routers and switches are similar, but router manages data communication on a larger scale.

This blog will focus on the difference between routing and switching in detail.

What is Routing?

Routing or Network Routing is the process of finding a path between one or more networks. Routing is available for any type of network, like telephones and public transportation. In packet-switching networking, the router chooses the path for IP packets to move to their destination. The routing decisions are in the hands of specialized network hardware called Routers.

What is the purpose of Routing?

The purpose of routing is to enclose data that helps to communicate beyond a network, to choose the paths that control traffic to final networks, to transform a URL name into an IP address, to supply safe Internet file transfer, and to advance traffic based on MAC addresses.

What are the main Routing protocols?

According to the network, a protocol is a method to format data in an easy language so that every computer can understand it. The role of a routing protocol is to identify or announce safe networking paths. 

There are various protocols to find a way through data networks, and they are:

  • Internet Protocol or IP

The Internet Protocol identifies the origin and destination of each data packet. Routers inspect the IP headers of each packet and decide where to send them.

  • Broader Gateway Protocol or BGP

BGP checks which network will control which IP address. BGP comes under dynamic routing protocol. The sizeable networks that make this BGP announcement are called autonomous systems.

  • OSPF or Open Shortest Path First

OSPF selects the shortest path for sending network packets.

  • RIP or Routing Information Protocol

RIP searches for the shortest path using hop count to connect from one network to another. Hop count is the number of packets one must pass through on the way.

How does Routing work?

The router helps to connect internet-based devices like PCs, tablets, smartphones, thermostats, smart TVs, etc.. These devices can form a network where communication occurs through the same network. The router ensures fast and smooth network transfer. Different types of data use distinct bandwidths. 

Here are the steps of working on a routing process:

  1. The router gets the packets and reads the headers of the packets.
  2. With the help of headers, it finds the destination of the packets.
  3. After searching the routing tables, it decides the destination of the packets.
  4. Numerous routers route a packet on their way to the final port of call.
  5. Two types of routers are there- dynamic and static.
  6. Static Router remains constant but the tables of the dynamic Router changes numerous routing protocols.
  7. For better enhancement, dynamic routers are more beneficial than static ones.

What are Switches?

Switches allow networks to connect and exchange data packets to let them communicate. Switches can be in a hardware or software form. The operation of the switches occurs with the help of an OSI model. Switches check the Media access control or MAC address of each message and decide where to send the incoming message.

What is the purpose of Switches?

Switches maintain the transfer of information between distinct endpoints. This is the main purpose of the switches, but there are various other motives, too. 

Here is a list of the aims of the network switches-

  • Switches structure the network devices into modern data networks and transfer large traffic in the networks providing telecommunications.
  • Network Switches offer binary communication, link network segments, enhance network performance, and use bandwidth effectively.
  • Network switches offer wired connections to PCs, wireless APs, printers, industrial machinery, and IoT devices like card entry systems.
  • Network switches work with power over Ethernet technology that supplies 100 watts of power to support network connectivity.
  • Network switches can also collect data from IoT devices. Artificial Intelligence and Machine Learning then utilize these data to improve smarter surroundings.

What are the types of switches?

There are almost seven types of networking switches. Here is a list of all seven:

  • Virtual Switches

They are the software-only switches embodied inside the VM hosting environment.

  • Routing Switches

Routing Switches link LAN. They perform MAC-based Layer 2 switching, functions at OSI Layer 3, and collect traffic based on the IP address in individual packets.

  • Managed Switches

It allows adjustment of each port on the switch that includes monitoring and configuration.

  • Unmanaged Switches

Unmanaged switches allow Ethernet devices to pass data using auto-negotiation that determines data rates. This is a dynamic configuration.

  • Smart Switches

Smart Switches ensure more control over data transmission. They are also called partially managed switches.

  • Stackable Switches

Stackable switches are dynamic switches. They are joined with each other via the backplane cable interface and structure into a single logical switch.

  • Modular Switches

Modular Switches are switch cards that are installed into sizable, and fixed-form factor chassis. Modular Switches ensure more flexibility and upgradeability.

How does a Network Switch work?

The major role of switches is to transform data to enhance data communication. But not every switch needs to use the same layout. Many layouts work with different arrays of hardware and software. 

Here are the steps on how a network switch works:

  1. When a device gets attached to the network switch, it records its MAC or Media Access control address, which is present on the Network Interface Card [NIC] of the device.
  2. The NIC is connected to the Ethernet Cable, and the Cable is further connected to the switch.
  3. The network switch utilizes the MAC address to check which device outgoing packets are sent and decides the location of the incoming packets.
  4. The MAC address recognizes the physical device and keeps it constant, while layer 3 of the IP address can change.
  5. When the packet enters a switch, it examines the header to match it with the destination address.
  6. It sends these packets to their destination. Switches offer full-duplex functionality to avoid packet collision.

What is the difference between Router and Switch?

We have learned the role of routers and switches individually. Now, let us find the difference between routing and switching in detail-

  • The router is a layer 3 device, and the switches are the layer 2 device on the OSI model.
  • The router transfers data between 2+ computers, while the switches ensure resource sharing by connecting various devices on a single LAN.
  • To determine the packet destination, the router surveys the IP address of the packet while the switches check the MAC address.
  • Routers use data packets, and switches use data frames.
  • To direct data across large networks, the routers use routing algorithms, but switches do not.
  • Switches need wired connections to work, but routers can work with both wired and wireless connections.
  • Routers give access to all ports to have their domain, but switches allow only one broadcast domain.
  • Routers use full-duplex mode, and network switch uses both full and half-duplex modes.
  • Routers can perform Network Address Translation or NAT and Port Address Translation or PAT, while Network switches perform neither NAT nor PAT.
  • Routers do not need an internet connection, while network switches need internet connections.
  • There are two forms of routing- adaptive and non-adaptive while network switches are of three forms – circuit, packet, and message.

What are the similarities between Routing and Switching?

We have seen the difference between routing and switching, but they have a few similarities, too. 

Here are the similarities between routing and switching:

  1. Routing and Switching come under computer networking. Both these processes are for connecting devices.
  2. Routing and Switching offer modern solutions network connectivity solutions.
  3. Routing and Switching are possible with home connections, like homes, small offices, etc.
  4. Routers and switches appear similar, and both are light in weight.
  5. The number of ports in routers and switches may vary, but both use ports.

How to get familiar with Routing and Switching Concept?

To get familiar with routing and switching concept, you must learn CCNA Routing and Switching. After learning CCNA Routing and Switching, you should clear the CCNA 200-301 exam to get certified. Let us get into more details about the CCNA routing and switching course. But before that, you should know the benefits of CCNA Routing and switching certification.

The IT industry is ever-growing and finding a job in IT with a networking degree is impossible. This is the first reason for pursuing the CCNA Routing and Switching certification course.

The student can learn deep IT knowledge, like fundamentals of networking, IP connectivity, such as components of the routing table, IPv4 and IPv6 static routing, different IP services (DHCP, DNS, SNMP, FTP, etc.), security fundamentals, and Automation and programmability. 

A CCNA routing and switching certified student has a higher chance of getting a handsome salary than a student with an IT degree.

To pursue CCNA Routing and Switching courses from professionals, you must enroll with Network Kings. But why? Here are the reasons to pursue routing and switching courses with Network Kings-

  1. Network Kings offers CCNA Routing and switching courses from professionals.
  2. Network Kings has both recorded and live sessions to ease the learning process.
  3. Network Kings gives you the best career guidance along with the courses.
  4. The learner gets a completion certificate that adds value to the resume.
  5. With recorded lectures, the learners can enjoy flexible hours of learning time.

What skills will you learn in CCNA Routing and Switching course?

Following are the skills you will learn with the CCNA Routing and Switching course:

What are the Job roles in the CCNA Routing and Switching?

What are the salary aspects of CCNA Routing and Switching job opportunities?

The salary aspects in CCNA Routing and Switching job profiles are:

  • Technical Support Engineers- INR 3,00,000
  • Systems Engineers (Fresher)- INR 2,50,000
  • Systems Engineer- INR 4,40,000
  • Network Administrator- INR 4,50,000
  • Information Technology (IT) Manager- INR 9,00,000
  • Senior Network Engineer- INR 7,00,000
  • Network Security Specialist-INR 10,00,000

Conclusion

There are various advantages of routers and switches. Data communication is possible with routers and switches. An IT field is workable with safe and constant data communication. To enable such communication, one must possess the knowledge of routing and switching. Both routers and switchers enhance data communication but the pathways of both of these are different.

In short, there are differences between routers and switches. IT enthusiasts must know the difference between routers and switches. Both these routers and switches are beneficial in their own way. One must know how and when to use them.

I hope this blog has helped you know the difference between router and switch.

Thanks for reading!

What are the OSPF LSA Types? – Explained

ospf lsa types
ospf lsa types

OSPF, as we already know, is a Link- State routing protocol, and being a Link state routing protocol, each router in a network exchange information about the state of their directly connected links with all the routers in a network.  

It looks fine when we talk about a limited or small number of routers in a network but what happens when we have a significant number of routers? 

A lot of information will be flooded within a network leading to unnecessary network congestion, poor performance, and wastage of bandwidth. For that purpose, we use the OSPF area concept. 

But, by dividing a network into areas we are restricting router information flooding, and hence network would not have access to the necessary information required to find the best path. 

For that purpose, OSPF has a “Brahmastra “which is known as Link State Advertisements. 

In this article, we will discuss Link State Advertisements and various OSPF LSA types. 

ALSO READ: OSPF Interview Questions if you’re preparing to crack a Network Engineer job position.  

What is OSPF LSA?

In the Open Shortest Path First (OSPF) routing protocol, LSA also known as Link-State Advertisements helps to spread the routing information within an OSPF network. Routers configured with OSPF exchange LSAs to build a map of the network topology and find the best path possible to reach from one network prefix to another. All the information collected using LSA is stored in a database known as Link-State Database (LSDB) which is used to calculate the shortest path to different destinations. 

Understanding OSPF LSA Types: A Comprehensive Overview

Link State Advertisements are of different types with different functionality which are listed below:- 

 
 
 
 
 
 

Router LSA 

 
 
 
 
 

LSA Type 1 

 
 
 
 
 

Network LSA 

 
 
 
 

LSA Type 2 

 
 
 
 
 

Summary LSA 

 
 
 
 

LSA Type 3 

 
 
 
 
 

Summary ASBR LSA  

 
 
 
 

LSA Type 4 

 
 
 
 
 

Autonomous System external LSA 

 
 
 
 

LSA Type 5 

 
 
 
 
 

Multicast OSPF LSA 

 
 
 
 

LSA Type 6 

 
 
 
 
 

NSSA External LSA 

 
 
 
 

LSA Type 7 

What is LSA Type 1?

All routers generate their own Router LSA. It describes the state of its own links/interface. Type 1 LSA is flooded within an area and does not cross it. Router LSA includes information like Router ID, the status of links, and interface IP details. 

router lsa

What is LSA Type 2?

It represents the multi-access network segment. Network LSA is flooded by Designated routers only. It contains information about all the routers that are directly connected to multi-access network segments, information about DR and BDR routers, and subnet information. Similar to Router LSA, Network LSA is flooded within the same OSPF area and ensures that all the routers within an area have an accurate understanding of the network topology. 

network lsa

What is LSA Type 3?

Since Router LSA and Network LSA remain within the area, we need something to share information about a particular area with another area. For that purpose, Summary LSA or Inter-Area LSA is used. Type 3 LSA advertises routes between OSPF areas. These LSAs are generated by Area Border Router i.e. ABR. In the OSPF routing table, they are denoted as O IA. 

summery lsa

What is LSA Type 4?

These LSAs are generated by ABR to inform routers in an area about the existence of an Autonomous System Boundary Router (ASBR) in another area. This LSA informs about the path to reach external routes. 

summery asbr LSA

What is LSA Type 5?

These LSAs are generated by an ASBR to advertise external routes into OSPF. They are flooded throughout the OSPF domain.

external LSA

What is LSA Type 6?

Group Membership LSA or Type 6 LSAs are used in OSPFv3 for multicast group memberships within the link. 

What is LSA Type 7?

It is also called NSSA External LSA. In Not-So-Stubby-Area (NSSA) configurations, these LSAs are used to carry external route information. Since in Stub areas, LSA 5 is not allowed hence we use LSA 7 in this case. ABR routers convert LSA 7 into LSA 5 when it is flooded outside the stub area and convert LSA 5 to LSA 7 when LSA 5 enters the stub area. 

NSSA External LSA
OSPF LSA

We can see that LSA is the backbone of OSPF. It helps to understand network topology within OSPF routers. It also helps to calculate the shortest path to reach the destination. Not only it helps to find the shortest path but also finds the redundant path quickly whenever the primary path goes down for any reason. Hence it ensures fast route convergence which helps the network to quickly adapt to changes.

To make sure that you thoroughly understand OSPF, do watch out this video by Atul sir wherein he dives deep into the topic with simple explanations for a better understanding of the topic.

Let us quickly see the difference between each LSA. 

LSA TYPE 

Description 

Originator 

Flooded To 

Purpose 

Type 1 

Router LSA 

Router 

Same Area 

Describes router’s Link 

Type 2 

Network LSA 

DR 

Same Network 

Describes routers on a network segment 

Type 3 

Summary LSA 

ABR 

Other Area 

Advertise routes between areas 

Type 4 

Summary ASBR LSA 

ABR 

 

Informs about an ASBR 

Type 5 

Autonomous System external LSA 

ASBR 

OSPF Domain 

Advertises external routes 

Type 6 

Multicast OSPF LSA 

OSPFv3 router 

Same Area 

Used for multicast group memberships 

Type 7 

NSSA External LSA 

ASBR in NSSA 

NSSA 

Carries external routes in NSSA configuration 

What is a BGP Attributes? – Explained

BGP Attributes
BGP Attributes

BGP router attaches BGP Attributes to various prefixes contained in its BGP update messages to define them. Except for update messages that contain just withdrawn routes, every update message has a different set of BGP properties.  

BGP attributes get classified into different types that define how routes will use and propagate a specific attribute to their neighbors. The types of attributes are discussed in detail in our blog post. 

What are the kinds of BGP Attributes?

Well-known BGP attribute types are as follows- 

  • Well-known Mandatory 

The well-known mandatory attribute must get acknowledged by all BGP implementations that exist in BGP update messages.  

  • Well-known Discretionary 

The well-known discretionary attribute must get acknowledged by all BGP implementations, but it is not crucial to advertise it in BGP updates to all BGP neighbors. 

What are the other lesser-known types of BGP Attributes?

The Optional BGP attribute types are as follows-  

  • Optional Transitive 

Transitive attribute between ASs. A BGP router that is not supporting this attribute can still receive routes with this attribute and advertise them to other peers, i.e., the community.  

  • Optional Non-transitive 

If a BGP router does not support this attribute, It will not advertise a router with this attribute. 

 
 
 
 
 
 

NAME 

 
 
 
 
 

SUPPORTED BY ALL BGP CONFIGURED ROUTER 

 
 
 
 
 

ADVERTISED 

 
 
 
 
 

Well-known Mandatory 

 
 
 
 

YES 

 
 
 
 

YES 

 
 
 
 
 

Well-known Discretionary 

 
 
 
 

YES 

 
 
 
 

NO 

 
 
 
 
 

Optional transitive 

 
 
 
 

NO 

 
 
 
 

YES 

 
 
 
 
 

Optional non-transitive 

 
 
 
 

NO 

 
 
 
 

NO 

What are the types of Well-known Mandatory Attributes?

The kinds of well-known mandatory attributes are as follows- 

  • ORIGIN Attribute 

It is used to recognize the originator of the route. It identifies the originating source of the route. There are three possibilities: –   

  1. I (IGP): – Originated from a gateway protocol on an internal network, such as OSPF. Typically, this means the route was added to BGP using the network command within the BGP procedure.  
  2. e (EGP): – Originated from an external gateway protocol.  
  3. Incomplete: – Unknown origin. This usually indicates the route was redistributed into BGP from either connected, static, or IGP routes. 
  • AS_PATH Attribute 

This attribute identifies the list or path of traversed AS to reach a particular destination. The AS path attribute is applied to outbound routes, dictating the best inbound path. AS-Path attributes comprise- 

  1. Prepend or filter: – To prepend to the existing AS-path results in a longer AS-path, which makes the route less desirable for inbound traffic. 
  • NEXT HOP Attribute 

It is not surprising that a BGP prefix has a Next Hop attribute. After all, a router has to know where to route traffic for that prefix. This need is satisfied by the Next Hop attribute. It identifies the next hop’s IP address to reach a particular destination.  

It involves three types of values:  

  1. When advertising a self-originated route to a BGP peer, a BGP speaker sets the NEXT_HOP for the route to the address of its sending interface. 
  2. When a route is received and sent to an eBGP peer, a BGP speaker sets the NEXT_HOP for the route to the address of the sending interface. 
  3. When a route is received from an eBGP peer and sent to an iBGP peer, a BGP speaker does not modify the NEXT HOP attribute.

What are the types of Well-known Discretionary Attributes?

The types of well-known discretionary attributes are as follows- 

  • Local Preference 

Local preference provides a preference to determine the best path for outbound traffic. This attribute is applied to inbound external routes, which tells the best outbound path. Local preference is shared with iBGP peers when sending updates. It informs iBGP routers how to exit the AS if multiple paths exist. 

What are the types of Optional Transitive Attributes?

The types of optional transitive attributes are as follows- 

  • Aggregator 

This attribute identifies the BGP router that performed an address aggregation.  

  • Community 

This attribute uses the tag routes that share common characteristics in communities. 

What are the types of Optional Non-transitive Attributes?

The types of optional non-transitive attributes are as follows- 

  • Multi-exit-Discriminator (MED) 

This attribute provides a preference for EB peers to a specific inbound router. 

What is BGP's Best Path Determination?

BGP considers the first received path the best path, but as other paths are received for the same prefix, the newer path is taken into consideration and is compared to the older paths. Comparison is done based on the BGP Attributes. Attributes are compared in the order listed below.  

NOTE: If there is a tie, we move to compare the next attribute until the best path is identified. 

How are the attributes compared?

The attributes get compared in the order given below-   

  • Weight 

The path configured with the highest weight is always preferred. Weight is assigned locally to the router and does not travel to the other routers i.e.; it is locally defined. It is used to influence the outbound traffic.  

  • Local Preference 

Local preference is the attribute that travels within an Autonomous System i.e., it is not local to the router and exchanged between IBGP routers. The path with the highest Local Preference is preferred. It is used to influence the outbound traffic. Local Preference has a default value equal to 100.  

  • Locally Originated 

A path originated by the local router is preferred.  

  • AS-Path 

The path with the shortest AS-Path length is preferred i.e. path with less number of different AS in between is preferred.  

  • Origin Code 

Indicates the origin of the route. It can have three possible values: IGP (Interior Gateway Protocol), EGP (Exterior Gateway Protocol), or Incomplete. The lowest origin code is preferred. The origin code value for IGP is lower than EGP while the value for EGP is lower than Incomplete.  

  • MED 

The path with the lowest MED value is preferred. It travels within an Autonomous system i.e., it is exchanged between the same AS  

  • BGP Route Type 

Is this an eBGP or iBGP route? eBGP path over the iBGP path is preferred.  

  • Age 

Which route is the oldest? The oldest received path is preferred.  

  • Router ID 

A path with the lowest neighbor Router ID is preferred.  

  • Peer IP address 

A path with the lowest neighbor IP Address is preferred. 

Types of Memory in Cisco Devices 

types of memory in cisco devices
types of memory in cisco devices
In this comprehensive blog, we will dive into the numerous types of memory observed in Cisco devices. Understanding the different memory types is critical for network administrators and engineers who work with various Cisco devices. We will also discover the in-depth reason and the functionality of each type of memory in Cisco devices, in addition to their precise use cases. By the end of this article, you’ll have a clear knowledge of the different types of memory in Cisco devices and the way they make a contribution to the overall performance of Cisco devices. So, read this blog till the end!
 

4 Types of Memory in Cisco Devices

There are in total four kinds of memories in Cisco devices, namely- 

  • FLASH

Flash memory is a non-volatile memory which means that it can retain the stored information even if there is a sudden power loss. It is the memory where the Cisco operating system i.e., Cisco IOS software images is stored. The IOS image is the operating system that runs on Cisco devices and provides the functionality to manage the network and perform various tasks. It is also called Erasable Programmable Router-only Memory (EPROM). Data stored in flash can be modified by flashing the chip but when the router is running, flash memory is set to read-only mode. 

  • ROM 

It stands for read-only memory and is similar to the BIOS chip on our computers. ROM is the memory using which the device proceeds with the boot process. ROM contains essential firmware and bootstrap code required to initialize the device during the boot process. It is a non-volatile memory and cannot be modified.   

It stores programs like-    

  1. Power-on Self-Test (POST): – Whenever a router is turned on, a Power-On Self-Test is performed which checks the hardware components like CPU, memory, interfaces, etc are running properly.  
  2. Bootstrap program: – It is the program that tells how the Cisco IOS operating system must be loaded i.e., it helps to locate and load the Cisco IOS.  
  3. Mini IOS program: – A mini IOS program is also stored in ROM. Whenever valid IOS images cannot be found in Flash memory, a mini IOS program is loaded which is used to install new IOS images into the Flash memory.  
  4. ROM monitor: – It is used for troubleshooting the errors that occurred while booting the device. 
  • NVRAM 

It is known as Non-Volatile Random Access Memory (NVRAM) and is used to store the startup configuration of the device. It is a permanent memory and does not lose its data even if there is a power loss. Whenever a device is booted up, it looks for the configuration stored in NVRAM. Whenever the changes are made or a new config is done on a device, it should be saved in NVRAM i.e., to startup Configuration. It stores configurations like IP address, router name, ACL, NAT config, etc. 

NVRAM can be seen using the R#show startup-config command. 

A screen shot of a computer screen displaying the boot process in Cisco devices.
  • RAM 

Random Access Memory (RAM) is a volatile memory. It is not a permanent memory, i.e., whenever the router goes down, the data stored in RAM is lost. 

It is divided into two types: – 

  1. Main processor memory: – It is the memory where the routing table, ARP tables, running configuration, and other operational data needed for device functionality are stored.  
  2. Shared I/O memory: – It temporarily stores packets/frames. 

RAM can be seen using the R#show running-config command. 

A screen shot showcasing memory in a Cisco device.

Currently running configuration and startup configuration both look the same because I have not configured anything in the router. 

Now let us change the hostname from nwkings to getthejobwithnwkings and see what happens- 

A screenshot of a web page with the words 'hostname' and 'console terminal' explaining types of memory in Cisco devices.

Let us now check the running configuration: – 

A screen displaying the current configuration of a Cisco server and its memory types.

version 15.2 

A screenshot of a message from a Cisco device indicating low thread availability.

Let’s check our startup configuration-

A screenshot of a computer displaying a black screen, showcasing different memory types in Cisco devices.
A screenshot capturing a message displayed on a Cisco device screen.

version 15.2 

How to create a database in java by leveraging different memory types in cisco devices.
A screen shot of the command prompt displaying memory in cisco devices.

So, the hostname is still in RAM and to save it into NVRAM, we need to use the #write command. 

A screenshot displaying a message on a computer screen, related to memory in Cisco devices.
A screen shot of a computer displaying black screen.

Booting Process of a Device

Whenever we power on the router, it performs POST, Power-ON Self Test, which check all the hardware component. The device checks the ROM and performs the bootstrap program and checks from where it has to load the Cisco IOS images. Images are generally stored in Flash memory but it may also be loaded using TFTP servers. If IOS is not found on both, it loads a mini IOS program from ROM itself and takes the necessary steps to recover the IOS images. 

Once the IOS image is found, it gets loaded from the flash memory/TFTP server to RAM. 

The configuration from NVRAM is loaded into the RAM i.e., startup configurations are initiated.  

Further changes are saved in RAM itself until they are saved to NVRAM. 

The initial boot looks something like this. Further, it depends on the IOS version. 

A screen shot showcasing text on a black screen, pertaining to memory in Cisco devices.
A black screen displaying textual information related to memory in Cisco devices.

Differences Between LAN and WAN – Explained 

differences between lan and wan
differences between lan and wan
The moment we discuss technology, LAN and WAN are the two crucial aspects. The differences between LAN and WAN is what one should know before indulging in the in-depth concepts of tech. Thus, read the blog till the end to know the difference between the two better.
 

What is LAN (Local Area Network)?

LAN, also known as Local Area Network, is a network that connects devices within a limited geographical area, such as a home, office building, school, college etc. The purpose of LAN is to allow communication and resource sharing among connected devices. Computers, printers, servers and other network devices connected and interacting with each other is an example of a Local Area network.

Some points to remember regarding LAN: –   

  • Limited Geographical Area: Local Area network is limited to a small area. It typically covers a single building or a group of nearby buildings.  
  • High Data Transfer Rates: LANs provide fast and high-bandwidth communication between connected devices within the network. Data transfer rates in LANs range from 10 Mbps (Ethernet) to several Gbps (Gigabit Ethernet or faster technologies).  
  • Private Ownership: LANs are privately owned networks.  
  • Low Latency: Since the size of a network is small and data transfer rates are usually high, the latency or delay in transmitting data is very low. Hence LAN has a quick response time.  
  • Ease of Setup and Maintenance: LANs are easy to maintain and set up. It is usually cost-effective.   

For instance: – 

A small company has a single office with 25 employees. They want each employee to communicate with each other and enable them to share resources allowing them to access office resources and files required for daily operations. 

A typical small office LAN requires the following components: –  

  • Computers: Each employee has a desktop computer or a laptop.  
  • Printers: Several printers are connected to the LAN, allowing all employees to print documents. 
  • Router/Switch: The company sets up a switch to interconnect all devices within the LAN. The router is necessary if in case to allow the employee to access the internet and to allow different VLANs in a network (if exist) to talk to each other. 
  • Server: The company may have a local server for storing shared files and resources.  
  • Cables/Wireless: Ethernet cables or Wi-Fi access points are required to connect devices wirelessly or via wired connections. 

When all these devices are connected, properly configured and able to communicate. This network is known as Local Area Network. Employees connected can easily communicate with each other by sharing files or accessing shared resources on the local server. They can also use printers to print documents directly from their computers. Each employee doesn’t need to have a separate printer. Our home network with WIFI access points, computers, and mobile phones connected can also be considered as a small Local Area Network. 

difference between lan and wan

What is WAN (Wide Area Network)?

A Wide Area Network (WAN) is a type of computer network that extends over a large geographical area, typically spanning across cities, states, countries, or even continents. Unlike LANs that cover a limited local area, WANs facilitate communication between devices over long distances. WANs are used to connect multiple LANs, allowing devices in different locations to share data and resources. We can say that a LAN ends when we need an internet service provider to connect our different sites. WAN is created using VPN technology like MPLS. 

Some points to remember regarding WAN: –   

  • Large Geographical Area: WANs cover vast distances, often involving multiple offices situated in different cities i.e., separated by significant physical distances.  
  • Public or Private Ownership: WANs can be owned and operated by public telecommunication companies, internet service providers (ISPs), or private organizations.  
  • Relatively Lower Data Transfer Rates: Compared to LANs, WANs typically have lower data transfer rates due to the longer distances. Also, with an increase in data transfer rate, cost increases significantly.  
  • Higher Latency: Since the data transfer rate is relatively lower latency or delay in a Wide Area network is usually high.  
  • Complex Setup and Maintenance: Maintaining and setting up a Wide Area Network is quite tough. It requires complex configurations and involves working with multiple network providers and technologies. A WAN setup requires a lot of components and it is expensive. 

For instance: –  

The company now has grown from 25 employees to 1000 employees with offices in different cities.  

Do you think that it is feasible and reasonable to establish the fibre lease line connecting each office of a company, as we connect devices in a single building, by itself? Of course not. 

In such cases, ISP can help a company to connect its offices and the network that forms is known as Wide Area Network (WAN). See we are connecting LAN at different locations, and the final network established is called a Wide Area Network.  

To connect the branch offices, the company takes the help of an Internet Service Provider (ISP) or telecommunication to establish WAN links between the offices. These WAN links can be dedicated leased lines, MPLS (Multiprotocol Label Switching) circuits, or VPNs (Virtual Private Networks) over the public internet. All these lines are managed by ISP itself.  

Once the WAN is set up, employees in each branch office can communicate with one another as if they were on the same local network. They can share files, and get access to data saved in the central server which may be located in one of the branch offices or a data centre. In addition to these, offices may also be connected to the internet with the help of the same ISP which is providing them with a WAN link or a different ISP which allows the host in each LAN to get access to internet services. 

lan and wan

What is the differences between LAN and WAN?

Let us concisely whatever we have discussed the differences between LAN and WAN- 

LAN 

WAN 

It stands for Local Area Network 

It stands for Wide Area Network 

Low latency 

High latency 

It is a private network 

It may be private or public 

High transmission speed 

Comparatively low transmission speed 

Easy to maintain 

Difficult to maintain 

Cost effective 

Expensive 

Used to connect devices situated under small geographical area 

Used to connect devices situated under large geographical area 

Requires low infrastructure 

Requires high infrastructure 

If LAN goes down, it is easy to troubleshoot 

If WAN goes down, troubleshooting is difficult. 

Most of the devices used are layer 2 devices. 

It uses Layer 3 devices like Router, Multilayer switch 

 

What is CDP? – Explained 

what is cdp
what is cdp

What is CDP in Networking?

The Cisco Discovery Protocol (CDP) is a network protocol developed by Cisco Systems, which operates at the data link layer (Layer 2) of the OSI model. It is a Cisco proprietary protocol. CDP is used to collect information about nearby Cisco devices within a local network. CDP is used for network management.   

Cisco discovery protocol provides information about the following parameter: – 

  • Topology Discovery 

CDP helps Cisco devices to discover their directly connected neighbours and obtain information about adjacent devices. This helps the network administrator to map out the network topology i.e., to map the network.  

  • Neighbour Information 

CDP advertisements provide details about the neighbouring Cisco devices which include the information of the type of device connected i.e., switch, router, multilayer switch, etc., the software version of the connected device, VLAN information, IP Address, and even the interface it is using for the connectivity.  

  • Network Monitoring 

CDP helps in network monitoring and troubleshooting by providing real-time information about the status of the device.  

  • Automatic Device Detection 

CDP helps to automatically detect and recognize devices even when a new device is connected to the network. 

All this information is helpful to create the network map, document the network, and troubleshoot in case of outages. Cisco Discovery protocol is enabled by default. 

How does the Cisco discovery protocol work?

All Cisco devices transmit CDP Packets periodically. Receiving devices process the packet and make a cache of the information received. If receiving packet has information different from already cached information, the new information is cached and the older cache is removed. CDP uses various timers to control the CDP advertisements and the expiration of outdated information. This timer helps to manage the frequency of CDP packets.  

Timers are as follows: –  

  • Advertisement Timer 

This timer controls how often a Cisco device sends out CDP advertisements to its directly connected neighbours. By default, the advertisement timer is set to 60 seconds on most Cisco devices. This means that every 60 seconds, the device will multicast a CDP advertisement packet to inform its neighbours about its presence and current status.  

  • Hold Time Timer 

The hold time timer is the duration of time that a receiving device considers CDP information valid before discarding it if no new updates are received. The default hold time is 180 seconds (3 times the advertisement timer). When a device receives a CDP advertisement, it sets its hold time to the received hold time value. If no new updates are received from the same neighbour before the hold time expires, the information about that neighbour is removed from the CDP table.  

  • TTL (Time to Live) Timer 

The TTL timer is used to control the maximum time that a CDP advertisement can live in the network before it expires. Each CDP advertisement packet contains a Time to Live (TTL) value, which is set to a default of 180 seconds (3 minutes). This TTL value is decremented by one as the packet is forwarded through each network hop. When the TTL reaches zero, the packet is discarded, preventing old CDP information from circulating indefinitely. 

What are the drawbacks of CDP?

The drawbacks of CDP are as follows-  

  • CDP is a Cisco proprietary protocol, so it cannot be used to discover devices other than Cisco or devices of different vendors.  
  • In large networks, excessive CDP advertisement can create additional traffic and network congestion resulting in an impact on network performance.
  • CDP Spoofing 

CDP is also prone to spoofing. In CDP spoofing, the attacker sends out a packet with a multicast address the same as that of the destination address of CDP i.e., 01:00:0C:CC:CC:CC, and fake MAC Address as source address. When devices receive these large number of frames, it will add CDP information to the table. The device may not be able to handle this large number of frames and eventually crashes. 

  •  Configuration 

CDP

S1#show cdp neighbors  

Capability Codes:

R – Router, T – Trans Bridge, B – Source Route Bridge 

S – Switch, H – Host, I – IGMP, r – Repeater, P – Phone 

Device ID         Local Interface            Holdtime           Capability            Platform           Port ID 

       R1                     Fas 0/2                         162                        R                     ISR4300            Gig 0/0/0 

       S2                     Fas 0/1                         139                        S                         2960               Fas 0/1 

As we can see that there are 2 directly connected devices with S1.  

  • Device ID 

The hostname of the directly connected devices  

  • Local Interface 

The interface of S1 on which CDP messages are received. In our case R1 is sending messages to Fas0/2 and S2 is sending messages to Fas0/1, which also tells about the interface on S1 through which R1 and S2 are connected.  

  • Holdtime 

Amount of time S1 holds the information if no more packets are received.  

  • Capability 

It shows the type of device connected. In our example, R1 is a router, hence capability is denoted as R. Similarly, S2 is a switch hence it is denoted as S.  

  • Platform

It tells about the OS and the device model.  

  • Port ID

It is the interface of the neighbouring device through which the CDP packet is sent. In our example, the Port ID of R1 is Gig 0/0/0, hence S1 is connected to R1 with Gig 0/0/0 interface. 

To get further information on the connected devices we can use the following command- 

S1#show cdp neighbors detail  

Device ID: R1 

Entry address(es):  

IP address : 192.168.12.1 

Platform: cisco ISR4300, Capabilities: Router 

Interface: FastEthernet0/2, Port ID (outgoing port): GigabitEthernet0/0/0 

Holdtime: 140 

Version : 

Cisco IOS Software [Everest], ISR Software (X86_64_LINUX_IOSD-UNIVERSALK9-M), Version 16.6.4,RELEASE SOFTWARE (fc3) 

Technical Support: http://www.cisco.com/techsupport 

Copyright (c) 1986-2018 by Cisco Systems, Inc. 

Compiled Sun 08-Jul-18 04:33 by mcpre 

advertisement version: 2 

Duplex: full 

————————— 

Device ID: S2 

Entry address(es):  

Platform: cisco 2960, Capabilities: Switch 

Interface: FastEthernet0/1, Port ID (outgoing port): FastEthernet0/1 

Holdtime: 176 

Version : 

Cisco IOS Software, C2960 Software (C2960-LANBASEK9-M), Version 15.0(2)SE4, RELEASE SOFTWARE (fc1) 

Technical Support: http://www.cisco.com/techsupport 

Copyright (c) 1986-2013 by Cisco Systems, Inc. 

Compiled Wed 26-Jun-13 02:49 by mnguyen 

advertisement version: 2 

Duplex: full 

What is LLDP?

LLDP (Link Layer Discovery Protocol) is an industry-standard network protocol defined by the IEEE 802.1AB standard. It operates at the data link layer (Layer 2) of the OSI model and is used for discovering information about neighbouring network devices.   

The working mechanism of LLDP is similar to CDP but the major difference is that LLDP is an open-source protocol while CDP is Cisco Proprietary. Since LLDP is a vendor-neutral protocol, it allows devices from different vendors to exchange essential information. When a network device supports LLDP, it periodically sends out LLDP packets, known as LLDP advertisements, on each active network interface. These advertisements contain information about the sending device, such as its device type, capabilities, system name, management address, and port details. The receiving devices process these advertisements and store the information in their respective LLDP tables.   

LLDP packets are sent as multicast frames, which implies that they are received only by devices interested in LLDP information, hence minimizing network overhead.  

LLDP is used in cases where you have a network with devices from different vendors like Cisco, Juniper, HP, Aruba, etc. For example, if a Juniper switch is connected to an HP router, LLDP will allow the Juniper switch to discover the neighbour HP router and exchange essential information. 

Let’s use the same topology as we used in the case of CDP- 

LLDP

To enable LLDP-  

Switch#configure terminal 

S2(config)#lldp run 

S2(config)#exit  

S2#show lldp neighbors  

Capability codes: 

(R) Router, (B) Bridge, (T) Telephone, (C) DOCSIS Cable Device 

(W) WLAN Access Point, (P) Repeater, (S) Station, (O) Other 

Device ID          Local Interface          Hold-time             Capability               Port ID 

Total entries displayed: 0 

Since I have enabled LLDP only on S2, hence no other devices are transmitting LLDP packets, hence total entries are 0.  

Let us enable LLDP on devices one at a time. 

S2#show lldp neighbors  

Capability codes: 

(R) Router, (B) Bridge, (T) Telephone, (C) DOCSIS Cable Device 

(W) WLAN Access Point, (P) Repeater, (S) Station, (O) Other 

Device ID         Local Interface          Hold-time             Capability              Port ID 

        S1                        Fa0/1                      120                              B                     Fa0/1 

Total entries displayed: 1 

Enabled LLDP on S1 and S2, hence S1 started transmitting LLDP packets and S2 can locate details of it. 

S2#show lldp neighbors  

Capability codes: 

(R) Router, (B) Bridge, (T) Telephone, (C) DOCSIS Cable Device 

(W) WLAN Access Point, (P) Repeater, (S) Station, (O) Other 

Device ID          Local Interface           Hold-time             Capability             Port ID 

      S1                          Fa0/1                         120                           B                        Fa0/1 

      R2                          Fa0/3                         120                           R                        Gig0/0/0 

Total entries displayed: 2 

Similarly enabled LLDP on R2 as well. 

To get further details of connected devices use: – 

S2#show lldp neighbors detail 

It is important to note that LLDP needs to be enabled on each Cisco device so that they start transmitting LLDP packets. Enabling LLDP becomes necessary when we have other vendor devices as well in our network. Else if we have only Cisco devices which are quite expensive, there is no need to enable LLDP and CDP can help us get the neighboring devices information. 

What do you mean by the TCP Header? – Explained

TCP Header
TCP Header

The transmission Control protocol is connection-oriented protocol, and it ensures the proper delivery of data. To be a reliable protocol, it uses some extra data fields. This field is known as TCP Header.  

Whenever data is received to the transport layer, a header is attached to the data, which includes some important information that helps TCP work in a way that delivers data end to end without any losses. TCP header ranges from 20 bytes to 60 bytes. 

Let us discuss each TCP Header Field-

TCP Header Fields: Explained

HEADER
  • Source Port 

It is a 16-bit field that indicates the port number of the sending device where the data originates It is a randomly assigned field.  

  • Destination Port 

This field indicates the port number on the receiving device where the data should be delivered. It is 16 bits field 

  • Sequence Number 

TCP converts data into bytes and the collection of bytes is known as segment. Each TCP segment is assigned a sequence number, which helps the receiving end to reassemble the data in the correct order. It is a 32-bit value. 

  • Acknowledgment Number 

In TCP, data transmission is acknowledged to ensure reliability. This field contains the sequence number that the receiving device expects to receive next. Acknowledgment no is always an incremental value i.e., if the sequence number is x, than Acknowledgment no is set to x+1. 

  • Data Offset 

This field determines the size of the TCP header. It is necessary to locate the start of the data payload. It is a 4 bits field. 

  • Reserved 

These bits are reserved and are currently set to zero.  

  • Control Bits (Flags) 

It is also called flags or TCP flags which are used to control and manage aspects of TCP connection and data transmission.  

Some common flags include:  

1. URG (Urgent) 

This bit can be 0 or 1. When this bit is 1, it implies that the data should be treated as a priority. For example, data is always sent in a seq. but we have some urgent data bits that should be sent first. In that case, the Urgent bit is set ON for that particular data, and that data is sent first. 

2. ACK (Acknowledgment) 

Indicates whether the acknowledgment number field is valid or not. If ACK is 1 it implies that the acknowledgment number is valid and if ACK is 0, it means that the segment is missing acknowledgment. 

3. PSH (Push) 

In general, applications collect a certain number of data and then process it. When the Push flag is set ON, it tells the application to transmit the data immediately and not wait for data to stack to fill the entire TCP segment. 

4. RST (Reset) 

Resets the connection.  If it is set to 1, the connection is abruptly reset. 

5. SYN (Synchronize) 

Initiates a connection and synchronizes sequence numbers. It is used in the 3-way handshake process. 

6. FIN (Finish) 

The fin flag is used to terminate the TCP connection. Whenever Host wants to end the connection with the receiving end, it sends data with FIN flag 1. Since TCP works in a full duplex mode, receiving end should also set its FIN flag as 1.  

  • Window Size: This field indicates the size of the receiving device’s receive window, which helps in flow control. It is a 16-bit field. It is used for flow control between the sender and receiver. 
  • Checksum: checksum is a 16-bit field numerical value calculated from the TCP header and data payload to detect errors during transmission.  
  • Urgent Pointer: If the URG flag is set, this field points to the last urgent data byte in the TCP segment i.e., it tells about the sequence number of the last urgent data byte. It is a 16 bit field. 
  • Options: This field is optional and can contain additional parameters or information related to the TCP connection.  

What is EtherChannel? – Explained 

what is ether channel
what is ether channel

We have a network design with one segment of LAN connected to another segment using a switch, as shown in the figure. 

segment of LAN

The links connecting the two switches are of 100mbps bandwidth. Both LAN segments are communicating with each other and transmitting traffic, as given below-  

  • PC A sends 40Mbps traffic to PC D. 
  • PC B sends 80Mbps traffic to PC E. 
  • PC F sends 50Mbps traffic to PC C. 

The link connecting both segments would not be able to transmit traffic since the total bandwidth of a link is 100Mbps, while the segments transmit traffic at 170Mbps. A simple solution to this problem is to add another link between both segments with higher bandwidth.   

But wait, adding another link reminds me of the Spanning Tree Protocol, which will block a port to remove the loop, and adding another link with higher bandwidth is costly. Along with the cost, a single link cannot provide redundancy. 

EtherChannel

EtherChannel helps us deal with this situation. 

What is Ether Channel?

Ether Channel, also called port channel, is a network technology providing a method of combining multiple physical Ethernet links into a single logical link.  

It creates a virtual pipe that can handle more traffic and offers an alternate path in case of failure. Since multiple links get combined virtually as a single link, Spanning Tree Protocol will not block any port. Even if one link fails, other links will continue to exchange traffic, and hence Ether Channel provides redundancy in a network which is impossible if we use a single link with higher bandwidth. 

EtherChannel

A maximum of 16 physical interfaces get assigned to an Ether Channel, but eight remain active at a time. Other links are in standby mode and become active if any active link fails.  

The following conditions should get fulfilled to create an Ether Channel: 

  • All the links should have the same speed.  
  • The same VLAN should get configured.  
  • Duplex mode enabled  
  • Same switch port mode on both sides (Access mode or Trunk mode) 

What are the benefits of using an Ether Channel?

The benefits of using an Ethernet Channel are as follows- 

  • Enhanced Bandwidth 

Ether Channel enables the aggregation of multiple links into one by multiplying the total available bandwidth. This boost in bandwidth is very useful in a network where high data throughput is required, such as data centers or organizations with bandwidth-intensive applications.  

  • Load Balancing 

Ether Channel can help distribute traffic across the bundled links using load-balancing. This distribution prevents bottlenecks and optimizes resource utilization, resulting in improved network performance and reduced congestion.  

  • Redundancy and Resilience 

Ether Channel offers fault tolerance by providing link redundancy. If a link fails, traffic can automatically reroute through the remaining links, ensuring uninterrupted connectivity and minimizing the impact of link failures. This redundancy also extends to network devices, where multiple switches or routers can get interconnected via Ether Channel for increased reliability. 

How to configure an EtherChannel?

Two protocols can help us to configure an EtherChannel.  

  • Port Aggregation Protocol (PAgp) 

It is a Cisco proprietary protocol and only runs on Cisco-licensed switches and cannot be used on other vendor switches. It enables the automatic creation of EtherChannel links by recognizing the link configuration on each side, ensuring that the links are compatible to create an EtherChannel.  

Port Aggregation Protocol has three modes:

    • On: – In this mode, EtherChannel is enabled, but there is no exchange of PAgp packets.  
    • Desirable: – Interface sends Port Aggregation Protocol packets and negotiates with each other to enable EtherChannel.  
    • Auto: – In auto mode, the interface only responds to PAgp packets but cannot negotiate. 

The below table shows the combination of different modes that can enable the EtherChannel link- 

 
 
 
 
 
 

S1 

 
 
 
 
 

S2 

 
 
 
 
 

EtherChannel Formation 

 
 
 
 
 

Auto 

 
 
 
 

Auto 

 
 
 
 

No 

 
 
 
 
 

Auto 

 
 
 
 

Desirable 

 
 
 
 

Yes 

 
 
 
 
 

Desirable 

 
 
 
 

Desirable 

 
 
 
 

Yes 

  • Link Aggregation Control Protocol 

LACP is an open standard protocol. Since it is an open standard protocol, it can be enabled and used in multivendor devices and is not limited to Cisco switches 

It has three modes:  

  • On: – In this mode, EtherChannel is enabled, but there is no exchange of PAgP packets.  
  • Active: – Interface sends Link Aggregation Control packets and negotiates with each other to enable EtherChannel. 
  • Passive: – In auto mode, the interface only responds to LACP packets but cannot negotiate. 

The below table shows the combination of different modes that can enable the EtherChannel link- 

 

 
 
 
 
 
 

S1 

 
 
 
 
 

S2 

 
 
 
 
 

EtherChannel Formation 

 
 
 
 
 

Active 

 
 
 
 

Active 

 
 
 
 

Yes 

 
 
 
 
 

Active 

 
 
 
 

Passive 

 
 
 
 

Yes 

 
 
 
 
 

Passive  

 
 
 
 

Passive 

 
 
 
 

No 

Now let us take a look at this basic network topology and configure an Ether Channel-

A bar with a stripe in green and blue.

Configuration 

S1 

Let us check the initial states of the port on S1 

Switch#show spanning-tree  

VLAN0001 

Spanning tree enabled protocol ieee 

Root ID            Priority              32769 

                          Address            0001.6354.77A9 

This bridge is the root 

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec 

Bridge ID          Priority              32769 (priority 32768 sys-id-ext 1) 

                           Address            0001.6354.77A9 

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec 

Aging Time 20 

Interface                  Role                    Sts                     Cost                 Prio.                  Nbr Type 

Fa0/1                         Desg                    FWD                   19                     128.1                  P2p 

Fa0/2                         Desg                    FWD                   19                     128.2                  P2p 

We can see that it is a root bridge, and hence both ports are in forwarding mode 

Configuring Ether Channel: – 

Switch#config terminal 

Switch(config)#hostname S1 

S1(config)#interface range fa0/1-2 

S1(config-if-range)#switchport mode trunk 

S1(config-if-range)#channel-group 1 mode ? 

active Enable LACP unconditionally 

auto Enable PAgP only if a PAgP device is detected 

desirable Enable PAgP unconditionally 

on Enable EtherChannel only 

passive Enable LACP only if a LACP device is detected 

{Above command shows the types of mode} 

S1(config-if-range)#channel-group 1 mode active                        { Configured Active mode } 

Creating a port-channel interface Port-channel 1 

Let’s verify the Ether Channel 

S1#show etherchannel summary  

Flags:   D – down                  P – in port-channel 

  I – stand-alone                    s – suspended 

  H – Hot-standby (LACP only) 

  R – Layer3                            S – Layer2 

  U – in use                              f – failed to allocate aggregator 

  u – unsuitable for bundling 

  w – waiting to be aggregated 

  d – default port 

Number of channel-groups in use: 1 

Number of aggregators: 1 

Group Port-channel Protocol Ports 

——+————-+———–+———————————————- 

1 Po1(SU) LACP Fa0/1(P) Fa0/2(P) 

Let us now check the status of the Spanning Tree protocol after configuring Ether Channel-

S1#show spanning-tree  

VLAN0001 

Spanning tree enabled protocol ieee 

Root ID                       Priority         32769 

                                    Address       0001.6354.77A9 

This bridge is the root 

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec 

Bridge ID                      Priority                           32769 (priority 32768 sys-id-ext 1) 

                                       Address                          0001.6354.77A9 

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec 

Aging Time 20 

Interface             Role            Sts            Cost            Prio.            Nbr Type 

Po1                      Desg             FWD           9                128.27            Shr 

After configuring Ether Channel, both the ports are looking like single port. 

S2 

Switch#show spanning-tree  

VLAN0001 

Spanning tree enabled protocol ieee 

Root ID              Priority               32769 

                            Address             0001.6354.77A9 

                            Cost                    19 

Port 1(FastEthernet0/1) 

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec 

Bridge ID          Priority                32769 (priority 32768 sys-id-ext 1) 

                           Address               0001.6428.2755 

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec 

Aging Time 20 

Interface             Role            Sts             Cost            Prio.            Nbr Type 

Fa0/1                    Root            FWD           19               128.1                P2p 

Fa0/2                    Altn             BLK             19               128.2                P2p 

As this is a non-root bridge, one port of this switch i.e., Fa0/2 is in a blocked state. 

Switch(config)#hostname S2 

S2(config)#interface range fa0/1-2 

S2(config-if-range)#switchport mode trunk 

S2(config-if-range)#channel-group 1 

S2(config-if-range)#channel-group 1 mode active  

Creating a port-channel interface Port-channel 1 

Let’s verify the Ether Channel 

S2#show etherchannel summary  

Flags: D – down            P – in port-channel 

I – stand-alone              s – suspended 

H – Hot-standby (LACP only) 

R – Layer3                      S – Layer2 

U – in use                        f – failed to allocate aggregator 

u – unsuitable for bundling 

w – waiting to be aggregated 

d – default port 

Number of channel-groups in use: 1 

Number of aggregators: 1 

Group Port-channel Protocol Ports 

——+————-+———–+———————————————- 

1 Po1(SU) LACP Fa0/1(P) Fa0/2(P)  

S2#show spanning-tree  

VLAN0001 

Spanning tree enabled protocol ieee 

Root ID             Priority            32769 

                           Address          0001.6354.77A9 

Cost 9 

Port 27(Port-channel1) 

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec 

Bridge ID           Priority             32769 (priority 32768 sys-id-ext 1) 

                            Address            0001.6428.2755 

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec 

Aging Time 20 

Interface            Role           Sts            Cost           Prio.           Nbr Type 

Po1                      Root            LRN             9              128.27           Shr 

Now, both the ports look like one single port, and hence no port is blocked. 

A green stripe on an ether channel bar.

First Hop Redundancy Protocol: Explained

first hop redundancy protocol
first hop redundancy protocol

In our home network, we have a WIFI router (which acts as a gateway router). What if it incurs hardware failure or some service interruption? We can no longer access the internet. Right? 

Similarly, in an organization with a network design, there is just one gateway router helping every host in a LAN to connect to the outside world, i.e., the internet. Unluckily that gateway router fails for some reason. How can the host communicate with the outside world, remote sites, and the main branch office? Replacing a router or reconfiguring it may require time, and it is not an effective way to deal with such outages. 

Why is redundancy needed in a network?

Redundancy in a network is needed to reduce the problem of outages. The network can eventually face a problem, be it a fault in the router supply, a cable might break, or some error with the configuration may occur. An effective network design has the least or no single point of failure.  

In the case of WAN, routing protocols help find the next best path possible if a router fails.  

In the case of LAN with redundant links and switches, protocols like Spanning Tree Protocol and Rapid Spanning Tree Protocol help to find the alternate path. But how can we get redundancy in the case of gateway routers?   

First Hop Redundancy protocols help to achieve this goal.  

In the given figure, LAN has redundancy, but WAN does not. It has a single point of failure has shown. If this point fails, traffic cannot flow from one side of the network to another. 

A diagram of a network with a router and a switch implementing first hop redundancy protocol.

The figure shows the same network with the reduced point of failure with the redundant router at the main site. In this design also, the risk of an outage is not eliminated.

A network diagram featuring two routers and two switches implementing a first hop redundancy protocol.

The best design of our network would be a design with redundant links at the main site and at the remote sites as shown in the given figure.

A diagram illustrating a router and switch with first hop redundancy protocol.

Why do we need First Hop Redundancy Protocol?

Since we have already discussed the design of a network and got the optimized design with zero point of failure, why do we need a protocol since we already have redundant links?  

To understand this, let us first understand how to use these redundant routers- 

  • All host of a LAN uses R1 as a default gateway, and when R1 goes down, the host is statically configured to use R2 as the default gateway. 
  • All host of a LAN uses R2 as a default gateway, and when R2 goes down, the host is statically configured to use R1 as the default gateway. 
  • Some hosts are configured to use R1 as the default gateway, while some are using R2 as the default gateway, and when either router fails, the remaining hosts are statically configured to the available router. 

These options do not look convenient to use. The user has to take action and reconfigure the default gateway settings and revert the configuration when the primary router comes up. 

First Hop Redundancy Protocol can help with this problem.

When this protocol gets configured, the two routers look like a single gateway router to the hosts, and if any router goes down, the host needs to do nothing to change its default gateway. Virtual IP Address is shared between the routers and the host use that virtual IP Address as their gateway router IP Address.  

Since the virtual IP Address is shared between 2 or more gateway routers (even if one gateway goes down), the host does not need to change the gateway IP address. Gateway configured with this protocol shares messages to stay updated and to choose which gateway takes responsibility when the primary gateway goes down. 

What are the types of First-Hop Redundancy protocols?

There are three types of First-Hop Redundancy protocols, namely-   

  • Hot Standby Router Protocol   
  • Virtual Router Redundancy Protocol  
  • Gateway 

What is Hot Standby Router Protocol?

HSRP is a Cisco proprietary protocol that allows two or more routers to work together, which looks like a single virtual router to the hosts connected in a LAN. The purpose of HSRP is to eliminate the single points of failure and maintain uninterrupted services.   

Common HRSP messages: –  

  • Hello Message 

It is sent by the active router to the standby router every 3 seconds to indicate its operational state. If the standby router does not receive a hello message for 10 seconds, it assumes that the active router is down and the standby router becomes active. 

  • Coup Message 

It is sent by a standby router to take the role of an active router even if the active router is not down. When the standby router wants to become an active router, it sends out coup messages with a higher priority value than the current active router.  

  • Resign Message 

It is sent by the active router when it wants to give up its role. This occurs when the router is going through maintenance or configuration change.  

  • Redirect Message 

It is sent by the active router to inform the host connected to LAN about the virtual IP Address. This message is sent in response to ARP requests. 

What are the HSRP states?

  • Initial: – It Is the state when the router initially comes up and HSRP is configured to it.  
  • Learn: – In this state, the router is trying to learn the virtual IP Address. 
  • Listen State: – Router starts to listen to the hello messages from other routers.  
  • Speak: – In this state, the router sends a hello message and actively participates in an election to become an active router.  
  • Active: – When a router becomes active, it starts to act as the primary gateway and forwards network traffic. 
  • Standby: – Routers other than active router comes to the standby state. When the active router goes down, the standby router takes its place. 

How does HSRP work?

HSRP works on an Active-Standby model where one gateway is in an Active state while others remain in the standby state. Once the Active router goes down, the standby router takes its place. HSRP operates by assigning a Virtual IP Address and a Virtual MAC Address.  

Active router is selected based on priority. The router with higher priority becomes the active router. In case, 2 or more routers have the same priority, Router with a higher interface IP Address becomes active. If needed, priority can also be changed manually.  

An active router periodically sends HSRP hello messages to the standby routers, indicating their availability. If the standby router does not receive a hello packet in a particular time frame (usually 10 seconds), it assumes that the active router is down, and hence standby router starts performing as a standby router.  

NOTE: HSRP Version 1 uses 224.0.0.2 as the broadcast address, while HSRP version 2 uses 224.0.0.102 as the broadcast address. 

A diagram illustrating first hop redundancy protocol within an internet connection.

Since the standby router sits idle until the active router goes down, there is a waste of bandwidth. In this case, the concept of load balancing can be used. Different routers can be configured as active routers for different subnets. For example: – R1 can be configured as an active router for VLAN 1, and R2 can be configured as active for VLAN 2.  

Since both routers are connected to all the VLANs, even if an active router for a particular VLAN goes down, it can shift its traffic to a standby router. 

What is Virtual Router Redundancy Protocol?

Virtual Router redundancy protocol is similar to HSRP. The working mechanism of both protocols is the same. VRRP also works on the Active-Standby model. VRRP can also use real IP Addresses as virtual IPs.  

VRRP is an open-source IEEE standard protocol. VRRP uses 224.0.0.18 as its multicast address.  

Hello timer for VRRP is 1 second while its hold time is 3 seconds. 

What is Gateway Load Balancing Protocol?

Gateway Load Balancing Protocol is a Cisco proprietary protocol. The working mechanism of GLBP is similar to HSRP, but along with providing redundancy, it also provides load balancing for outgoing traffic. In the case of HSRP, each subnet needs to be configured individually to implement load balancing, which requires extra administrative work.  

Gateway Load Balancing Protocol can do the load balancing over multiple gateways by providing a single virtual IP Address and multiple virtual Mac addresses. Each host is configured with the same virtual IP Address, while all the gateways in the virtual group can forward packets.  

GLBP routers communicate with each other using 224.0.0.102 as a broadcast address. Hello timer for GLBP is 3 seconds, while the hold time is 10 seconds. GLBP only supports IPv4.