Creating a Custom Network Topology

 Today, we will create a topology such that there will be 3 systems 

System A <-----------------> System B <-----------------> System C

But System A and C can't connect.

This can be done by assigning A and C different networks and B will have networks containing both networks of A and C. 

The generation of packets depends upon the rules written in the routing table. 

Lets assign Ip 192.168.1.1 to B with netmask of 255.255.0.0, It will conatain ips from 192.168.0.0 - 192.168.255.255

and System A will get ip 192.168.1.5 with netmask 255.255.255.252 and System C will get ip 192.168.2.5 with netmask 255.255.255.252.

Both will contain only 4ips. 

Ip can be set by commands 

For B

ifconfig enp0s3 192.168.1.1/16

For A

ifconfig enp0s3 192.168.1.5/30

For C

ifconfig enp0s3 192.168.2.5/30


Rules can be added by commands 

For B

route add -net 192.168.0.0/16 enp0s3

For A

route add -net 192.168.1.0/30 enp0s3

For C

route add -net 192.168.1.0/30 enp0s3


Lets See the routing tables of all systems

B

A

C

Now, lets ping 

B to A

B to C

A to B

C to B

Here, C is of different network that's why it is not able to ping as we need router in between them.

A to C

C to A




Our topology is created.

Thank You for reading.

I would like to thanks Vimal Daga Sir.

My Email — ayanchawlae@gmail.com















Comments

Popular posts from this blog

Key Announcements at Microsoft Ignite

Ansible Handlers

Ansible Roles (Httpd + Haproxy)