Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

OSPF Simulation in Packet Tracer 6.

2 (Step-by-Step Guide)

Final scenario on workspace

1. Take two host systems in two different networks 192.168.1.0 and 192.168.2.0
respectively with IP addresses 192.168.1.2 (for Machine 1) and 192.168.2.2 (for
Machine 2). [Do IP configuration in desktop of respective systems]

Figure: Machine 1 Configuration


Figure: Machine 2 Configuration
2. Then take two switches namely Switch 1 and Switch 2 then connect Machine 1 to Switch 1 and
Machine 2 to Switch 2.
3. Then take three routers namely Router 1, Router 2 and Router 3 then connect Switch 1 to
Router 1 and Switch 2 to Router 2. Then connect Router 1 to Router 2. Then connect Router 3
to Router 1 and Router 2
4. Then go to configuration of Router 1
1) Configure Router 1 to IP address 192.168.1.1 for Interface connected to Switch 1
Commands:
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface FastEthernet0/0
Router(config­if)#ip address 192.168.1.1 255.255.255.0
Router(config­if)#no shutdown
2) Configure Router 1 to IP address 10.10.0.2 for Interface connected to Router 2
Commands:
Router>enable
Router#configure terminal
Router(config)#interface Serial2/0
Router(config­if)#ip address 10.10.0.2 255.0.0.0
Router(config­if)#no shutdown
Router(config­if)#clock rate 64000
Router(config­if)#
3) Configure Router 1 to IP address 11.10.0.3 for Interface connected to Router 3
Commands:
Router>enable
Router#configure terminal
Router(config)#interface Serial3/0
Router(config­if)#ip address 11.10.0.3 255.0.0.0
Router(config­if)#no shutdown
Router(config­if)#clock rate 64000
4) OSPF Configuration at Router 1
Commands:
Router>enable
Router#configure terminal
Then Typein command router ospf <process ID> i.e.
Router(config)#router ospf 1
As RIP works with classful addressing therefore there is no need to specify 
subnet mask in after <network address>, but OSPF works with classless 
addressing therefore we need to specify mask (but here we specify wildcard 
bits, and wildcard bits are inverse/compliments of mask bits) after <network
address>.
Then Typein command to specify network network <network address> <wildcard 
bits> area <area ID> i.e.
Router(config­router)#network 192.168.1.0 0.0.0.255 area 1
Router(config­router)#network 10.0.0.0 0.255.255.255 area 1
Router(config­router)#exit
Router(config)#
5) Save Configuration at Router 1
Commands:
Router(config­router)#end
5. Then go to configuration of Router 2
1) Configure Router 2 to IP address 192.168.2.1 for Interface connected to Switch 1
Commands:
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface FastEthernet0/0
Router(config­if)#ip address 192.168.2.1 255.255.255.0
Router(config­if)#no shutdown
2) Configure Router 2 to IP address 10.10.0.3 for Interface connected to Router 2
Commands:
Router>enable
Router#configure terminal
Router(config)#interface Serial2/0
Router(config­if)#ip address 10.10.0.3 255.0.0.0
Router(config­if)#no clock rate
Router(config­if)#no shutdown
3) Configure Router 2 to IP address 12.10.0.2 for Interface connected to Router 3
Commands:
Router>enable
Router#configure terminal
Router(config)#interface Serial3/0
Router(config­if)#ip address 12.10.0.2 255.0.0.0
Router(config­if)#clock rate 64000
Router(config­if)#no shutdown
4) OSPF Configuration at Router 2
Commands:
Router>enable
Router#configure terminal
Then Typein command router ospf <process ID> i.e.
Router(config)#router ospf 1
As RIP works with classful addressing therefore there is no need to specify 
subnet mask in after <network address>, but OSPF works with classless 
addressing therefore we need to specify mask (but here we specify wildcard 
bits, and wildcard bits are inverse/compliments of mask bits) after <network
address>.
Then Typein command to specify network network <network address> <wildcard 
bits> area <area ID> i.e.
Router(config­router)#network 192.168.2.0 0.0.0.255 area 1
Router(config­router)#network 10.0.0.0 0.255.255.255 area 1
Router(config­router)#exit
Router(config)#
5) Save Configuration at Router 2
Commands:
Router(config­router)#end
6. Then go to configuration of Router 3
1) Configure Router 3 to IP address 11.10.0.3 for Interface connected to Router 1
Commands:
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface Serial2/0
Router(config­if)#ip address 11.10.0.3 255.0.0.0
Router(config­if)#no clock rate
Router(config­if)#no shutdown
2) Configure Router 3 to IP address 12.10.0.3 for Interface connected to Router 1
Commands:
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface Serial3/0
Router(config­if)#ip address 12.10.0.3 255.0.0.0
Router(config­if)#no clock rate
Router(config­if)#no shutdown
3) OSPF Configuration at Router 2
Commands:
Router>enable
Router#configure terminal
Then Typein command router ospf <process ID> i.e.
Router(config)#router ospf 1
As RIP works with classful addressing therefore there is no need to specify 
subnet mask in after <network address>, but OSPF works with classless 
addressing therefore we need to specify mask (but here we specify wildcard 
bits, and wildcard bits are inverse/compliments of mask bits) after <network
address>.
Then Typein command to specify network network <network address> <wildcard 
bits> area <area ID> i.e.
Router(config­router)#network 12.0.0.0 0.255.255.255 area 1
Router(config­router)#network 12.0.0.0 0.255.255.255 area 1
Router(config­router)#exit
Router(config)#
4) Save Configuration at Router 3
Commands:
Router(config­router)#end
7. Then send Simple PDU to Machine 2 from Machine 1 (If Successfuly Sent then check in
Simulation Tab)
8. To check dynamic routing disable link between Router 1 and Router 2
Commands:
Router>enable
Router#configure terminal
Router(config)#interface Serial2/0
Router(config­if)#shutdown
The PDU should take alternate route via Router 3
Additional Commands:
I. To see routing table of specific router:
Router>show ip route
For Example
O 10.0.0.0/8 [110/128] via 12.10.0.2, 00:47:18, Serial3/0
C 11.0.0.0/8 is directly connected, Serial2/0
C 12.0.0.0/8 is directly connected, Serial3/0
O 192.168.1.0/24 [110/65] via 11.10.0.3, 00:52:21, Serial2/0
O 192.168.2.0/24 [110/65] via 12.10.0.2, 00:47:18, Serial3/0
Where,
i. First column shows the routing protocol, in our case C represents connected and O represents
OSPF
ii. Next column is destination network.
iii. After this comes administrative distance (AD)—the first number inside the square brackets;
this specifies which routing protocol takes priority. The second number in the square brackets,
after the slash, is the metric of this route.
iv. The IP address after via is the gateway's IP, also know as the next hop IP through which this
route is reached.
v. The time clock after that is called the Holddown timer. In any dynamic routing protocol,
messages are sent at a certain interval. Each time a hello message is received, this timer is reset.
If no response is received within 180 seconds this route is removed or an alternate route is found.
vi. The final column is the outgoing interface to reach the gateway.

You might also like