Skip to main content

Posts

When a MAC address itself is unique, why do we still need an IP address to uniquely identify a system on a network?

It is not possible to route a MAC address since it works on a layer above Ethernet. To understand why IP addressing is used in a computer network or over the internet you need to understand how IP routing works. Basic IP Routing When your computer (PC1) wants to send a packet to some IP address (IPv4) like x.x.x.x, then the first check is if the destination address is in the same IP network as the PC1 itself. If x.x.x.x is in the same network, then the destination IP can be reached directly, otherwise the packet needs to be sent to the route configured on PC1 and if a route for the destination network / host is not configured explicitly, the packet is routed to the default gateway configured on PC1. Well that was about how IP routing works at a very high-level. Routers also use dynamic routing protocols and algorithms to find the best possible path. MAC addresses Once the packet has reached the local network of the destination computer, the communication happens over
Recent posts

Horizontal and Vertical Scaling

Horizontal Scaling means that you scale by adding more machines   into your pool of resources whereas  Vertical Scaling means that you scale by adding more power (CPU, RAM) to an existing machine . Alternative term for Horizontal and Vertical Scaling is also known as Scale Out and Scale Up respectively. Scale up : Get more CPU, memory, disk space, and extra features like dedicated virtual machines (VMs), custom domains and certificates, staging slots, autoscaling, and more. You scale up by changing the pricing tier of the App Service plan that your app belongs to. Scale out : Increase the number of VM instances that run your app. You can scale out to as many as 30 instances, depending on your pricing tier.  App Service Environments  in  Isolated  tier further increases your scale-out count to 100 instances. For more information about scaling out, see  Scale instance count manually or automatically . There, you find out how to use autoscaling, which is to scale instance

.NET Core: Session Wrapper Design Pattern For ASP.NET Core

Here, we'll learn about Session Wrapper design pattern to ease the access of Session. We'll make our access of session "Typed". Also, we may apply any validation or constraint in this wrapper class. Step 1 - Create a Session Manager class   In this example, we are going to store two items in Session (i.e. ID & LoginName). We are injecting IHttpContextAccessor so that we can access the Session variable.  We are creating properties which are actually accessing Session variable and returning the data or writing the data to Session. We have added one helping property "IsLoggedIn" which is using other properties to make a decision. We may have more such helping/wrapper properties. using Microsoft.AspNetCore.Http; public class SessionManager       {           private readonly ISession _session;           private const String ID_KEY = "_ID";           private const String LOGIN_KEY = "_LoginName";           publ

.NET Core: All About Sessions In ASP.NET Core

We'll quickly discuss how we used to use Sessions before ASP.NET Core and then we'll see how to access Sessions in ASP.NET Core. Session In Pre-ASP.NET Core era You get Session functionality by default (without adding any package) Previously, you would have accessed Session by - Session variable in your Controllers/Forms System.Web.HttpContext.Current.Session in places where you don't have direct access to the Session variable. Anything you store in session is stored as Object. You store values in Key/Value format. Session["mydata"] = 10;     Or to access on those places where Session is not available (e.g. Non-Controller classes) System.Web.HttpContext.Current.Session["mydata"] = 10;     Quite difficult to mock Session Object for Unit Testing  Session in ASP.NET Core 2.2 Now, Session is not available by default. You need to add the following package. Meta package by default provides you this. <PackageReference Inc

Project Management - Ten Popular Myths About Leadership and How to Overcome Them

Close your eyes for a second and conjure-up a mental image of a leader. What do you see? Do you picture a politician, CEO or military leader? It’s easy to see why these type of images come to someone's mind. Leaders are often viewed as someone who is decisive, smart and outgoing. In some cases, leaders may appear just a little bit intimidating. The problem with an image that suggests an aggressive persona of authority is that it can prevent some potentially strong leaders from pursuing leadership roles or reaching their full potential. It's easy to misconstrue and have a misconception of what a leader is and isn’t. With that in mind, let’s identify 10 of the most popular myths about leadership so that you can discover new opportunities and effectively take charge of your team. 1. Entrepreneurial leadership. There’s an assumption that all entrepreneurs are natural-born leaders. The reality is that just because you had a fantastic and timely idea doesn’t mea

Remember to think about the user (Customer Experience)

How The OSI Works

Diagram of the OSI Model Refer to it as you read the 'Step-by-Step' section below, HOW THE OSI MODEL WORKS - STEP BY STEP Network-capable  Applications  produce  DATA . Each layer in the OSI Model adds its own information to the front of the data it receives from the layer above it. This information in front of the data is called a  header  and contains information specific to the protocol operating at that layer. The process of adding the header is called  encapsulation . Encapsulated data is transmitted in  Protocol Data Units (PDUs). There are  Presentation  PDU's,  Session  PDU's,  Transport  PDU's etc. Thus, PDU's from an upper layer are encapsulated inside the PDU of the layer below it. PDU's are passed down through the stack of layers (called 'the stack' for short) optionally repeating the encapsulation process until they can be transmitted over the  Physical   layer. The physical layer is the wire connecting all the computers on the