© 2012 Firstsoft Technologies (P) Limited. login
Hi 'Guest'
Home SiteMap Contact Us Disclaimer
enggedu
Quick Links
Easy Studies
« NS2  Projects »

Home Lab Exercise Network Lab Exercise Programs Simulation of BGP/OSPF Routing Protocol▼


Simulation of BGP/OSPF Routing Protocol

Algorithm Steps:

1 .Start.

2. Read the no. of nodes.

3. Read the distance between one node to the other for every node.

4. Assign the distance from a node to itself as zero.

5. Find the shortest path from the given node to other node and assign the same as distance.

6. Print the distance from one node to every other node in form of a matrix.

7. Stop.

C Program To Simulate ARP/RARP

#include int main() { int n,i,j,k,a[10][10]; printf(“\nEnter the number of nodes: “); scanf(“%d”,&n); for(i=0; ia[i][k]+a[k][j]) a[i][j]=a[i][k]+a[k][j]; } } } for(i=0; i

SAMPLE INPUT OUTPUT:

cc bgp.c
./a.out

Enter the number of nodes: 3

Enter the distance between the host 1 1:2

Enter the distance between the host 1 2:4

Enter the distance between the host 1 3:6

Enter the distance between the host 2 1:8

Enter the distance between the host 2 2:10

Enter the distance between the host 2 3:3

Enter the distance between the host 3 1:5

Enter the distance between the host 3 2:7

Enter the distance between the host 3 3:9
2     4     6
8     10     3
5     7     9

 

The output matrix is:
0     4     6
8     0     3
5     7     0

 
SLogix Student Projects

⇓ Student Projects ⇓
⇑ Student Projects ⇑
bottom