Posts

Showing posts with the label networking

OSPF Using Dijkstra's Algorithm

Image
Open Shortest Path First (OSPF) It's a routing protocol used in routers to find the shortest path between routers. It's based on Dijkstra's Algorothm . OSPF supports variable length subnet masks ( VLSM ) and route summarization. It uses link state routing (LSR) . OSPF routers maintain a map of internetwork called Link State Database. Here each router maintains the information of all other domains, routers, subnets within the entire network and based on this information, they determine the shortest path using dijkstra's algo. The routers gets this information through LSA. LSA - Link State Advertisements . They contains information about routers.  An LSA is a router's way of communicating information in OSPF. There are different types of LSAs. We'll learn about them later in this blog Once this LSA have been flooded, OSPF stores information in Link State Database called LSDB . A large OSPF domain is broken into seperate areas to restrict the propagation of routes...

Chat Server using UDP

Image
  Create Chat Server  Specifications : Use Socket Programming Use UDP Data Transfer protocol Create server and receiver both Use multi-threading to get and receive data parallely Now creating Chat Server with above given specifications. This is the code for Chat Server using UDP protocol and using Socket programming. Here same program can send receive messege both at the same time. I've used multi-threading concept to send and receive data parallely from multiple Server sides. These are the two servers that I used for my chat server - chatApp : And using multi-threading , i sent data parallely from two servers. one from Linux and another one from windows : Hope you liked it :)

NETWORK TOPOLOGY

Image
In this blog I'm going to create a  network Topology Setup in such a way that System A can  ping to two Systems System B and System C but both these systems should not be pinging each other without using any security rule e.g firewall etc . Every body thinks that in a network topology, if System A can ping to B and System B can ping to C, then it's obvious that system C can ping system A. But NO, Not Always... So in this blog, I'm going to show you how to create such topology. And believe me, doing this is so simple. It's just a game of netmask and routing table. Let's jump to the practical : System A : 1. Change the ip and netmask of system A to 192.168.1.20/16 2. Then add network range in the routing table .      Here I've selected the range such that it can ping to both of my other system. 3. By using route -n command, you can check the routing table  of System. 4. Using ifconfig enp0s3 command, you can check the ip of the system . System B : 1. C...

NETWORKING : Create a setup so that you can ping GOOGLE but not able to ping FACEBOOK from same system

Image
In this blog I'm going to show you how to create a setup that can ping some specific websites. Here I'm creating a setup that can ping GOOGLE but not able to ping FACEBOOK from same system. Believe me it's so simple, it's just a game of networking and routing table. What is routing table? A table is maintained by the internal router called as  Routing table . It helps the internal router to decide on which interface the data packet should be forwarded.   Routing table consists of the following three fields - IP Address of the destination subnet Subnet mask of the subnet Interface Let's see how to create such setup: 1. Check the ip address and netmask of the system. 2. Here you can see I'm able to ping Google and Facebook . 3. Check the ip of google.     Here i've used nslookup command to check the ip. 4. Delete the Internet Gatewaty for all Ip. 5. Then add rule in routing table according to google's ip so that google's ip will come in that range...