Wednesday, 28 May 2014


Practical 3: Simulating OSPF with STUB AREA, NSSA, Restricting LSA’s
Advance Computer Network MSc IT Part 1 Practicals

3A: OSPF with STUB area
Topology:-


CODE
Configuring Router R1
R1#en
R1#conf t
R1(config)#interface loopback 1
R1(config-if)#ip address 10.1.2.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#ip ospf 1 area 1
R1(config-if)#interface loopback 2
R1(config-if)#ip address 10.1.3.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#ip ospf 1 area 1
R1(config-if)#interface loopback 3
R1(config-if)#ip address 10.1.4.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#ip ospf 1 area 1
R1(config-if)#exit
R1(config)#interface serial1/0
R1(config-if)#ip address 10.1.1.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#ip ospf 1 area 1
R1(config-if)#exit
R1(config)#router ospf 1
R1(config-router)#router-id 1.1.1.1

OUTPUT:-



Configuring area 1 as stub area
R1#conf t
R1(config)#router ospf 1
R1(config-router)#area 1 stub
R1(config-router)#do wr
Building configuration...
[OK]
R1(config-router)#exit
R1(config)#exit
R1#
*Mar  1 01:03:58.823: %SYS-5-CONFIG_I: Configured from console by console

OUTPUT:-


Configuring Router R2
R2#en
R2#conf t
R2(config)#interface serial1/1
R2(config-if)#ip address 10.1.1.2 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#ip ospf 1 area 1
R2(config-if)#exit
R2(config)#interface serial1/0
R2(config-if)#ip address 20.1.1.1 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#ip ospf 1 area 0
R2(config-if)#exit
R2(config)#router ospf 1
R2(config-router)#router-id 2.2.2.2
Reload or use "clear ip ospf process" command, for this to take effect

OUTPUT:-


Configuring area 1 as stub area
R2#conf t
R2(config)#router ospf 1
R2(config-router)#area 1 stub
R2(config-router)#area 1 range 10.1.0.0 255.255.248.0
R2(config-router)#do wr
Building configuration...
[OK]
R2(config-router)#exit
R2(config)#exit

OUTPUT:-


Configuring Router R3
R3#en
R3#conf t
R3(config)#interface loopback 1
R3(config-if)#ip address 99.9.1.1 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#interface loopback 2
R3(config-if)#ip address 99.9.2.1 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#interface loopback 3
R3(config-if)#ip address 99.9.3.1 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#interface loopback 4
R3(config-if)#ip address 99.9.4.1 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#interface loopback 5
R3(config-if)#ip address 99.9.5.1 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#exit
R3(config)#interface serial1/1
R3(config-if)#ip address 20.1.1.2 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#ip ospf 1 area 0
R3(config-if)#exit
R3(config)#interface serial1/0
R3(config-if)#ip address 30.1.1.1 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#ip ospf 1 area 0
R3(config-if)#exit

OUTPUT:-


Router R3 redistribution
R3(config)#router rip
R3(config-router)#version 2
R3(config-router)#network 99.0.0.0
R3(config-router)#exit
R3(config)#router ospf 1
R3(config-router)#router-id 3.3.3.3
Reload or use "clear ip ospf process" command, for this to take effect
R3(config-router)#summary-address 99.9.0.0 255.255.248.0
R3(config-router)#redistribute rip subnets metric 5
R3(config-router)#exit
R3(config)#exit
R3#wr
Building configuration...
[OK]
R3#

OUTPUT:-



Configuring Router R4
R4#en
R4#conf t
R4(config)#interface serial1/1
R4(config-if)#ip address 30.1.1.2 255.255.255.0
R4(config-if)#no shutdown
R4(config-if)#ip ospf 1 area 0
R4(config-if)#exit
R4(config)#interface serial1/0
R4(config-if)#ip address 40.1.1.1 255.255.255.0
R4(config-if)#no shutdown
R4(config-if)#ip ospf 1 area 2
R4(config-if)#exit
R4(config)#router ospf 1
R4(config-router)#router-id 4.4.4.4
Reload or use "clear ip ospf process" command, for this to take effect
R4(config-router)#exit
R4(config)#exit
R4#

OUTPUT:-


Configuring router R4 as totally stubby
R4#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R4(config)#router ospf 1
R4(config-router)#area 2 stub no-summary
R4(config-router)#do wr
Building configuration...
[OK]
R4(config-router)#exit
R4(config)#exit
R4#

OUTPUT:-


Configuring Router R5
R5#en
R5#conf t
R5(config)#interface serial1/1
R5(config-if)#ip address 40.1.1.2 255.255.255.0
R5(config-if)#no shutdown
R5(config-if)#ip ospf 1 area 2
R5(config-if)#exit
R5(config)#router ospf 1
R5(config-router)#router-id 5.5.5.5
Reload or use "clear ip ospf process" command, for this to take effect
R5(config-router)#exit
R5(config)#exit
R5#

OUTPUT:-



Configuring R5 as totally stubby area
R5#conf t
R5(config)#router ospf 1
R5(config-router)#area 2 stub
R5(config-router)#do wr
Building configuration...
[OK]
R5(config-router)#exit
R5(config)#exit
R5#

OUTPUT:-


3B: Simulating NSSA and restricting LSA
Topology


Code
Configuring Router R1
R1#en
R1#conf t
R1(config)#interface s1/0
R1(config-if)#ip address 10.1.1.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#ip ospf 1 area 1
R1(config-if)#interface loopback 0
R1(config-if)#ip address 10.1.2.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#ip ospf 1 area 1

R1(config-if)#interface loopback 1
R1(config-if)#ip address 10.1.3.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#ip ospf 1 area 1

R1(config-if)#interface loopback 2
R1(config-if)#ip address 10.1.4.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#ip ospf 1 area 1
R1(config-if)#exit

R1(config)#router ospf 1
R1(config-router)#router-id 1.1.1.1
Reload or use "clear ip ospf process" command, for this to take effect
R1(config-router)#

Output:



Configuring Router R2
R2#en
R2#conf t
R2(config)#interface s1/1
R2(config-if)#ip address 10.1.1.2 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#ip ospf 1 area 1
R2(config-if)#interface s1/0
R2(config-if)#ip address 20.1.1.1 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#ip ospf 1 area 0

R2(config-if)#router ospf 1
R2(config-router)#router-id 2.2.2.2
Reload or use "clear ip ospf process" command, for this to take effect
R2(config-router)#

Output:



Configuring Router R3
R3#en
R3#conf t
R3(config)#interface s1/1
R3(config-if)#ip address 20.1.1.2 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#ip ospf 1 area 0

R3(config-if)#interface s1/0
R3(config-if)#ip address 30.1.1.1 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#ip ospf 1 area 0

R3(config-if)#do sh ip int brief
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            unassigned      YES unset  administratively down down
FastEthernet0/1            unassigned      YES unset  administratively down down
Serial1/0                  30.1.1.1        YES manual up                    up
Serial1/1                  20.1.1.2        YES manual up                    up
Serial1/2                  unassigned      YES unset  administratively down down
Serial1/3                  unassigned      YES unset  administratively down down
R3(config-if)#exit

R3(config)#router ospf 1
R3(config-router)#router-id 3.3.3.3
Reload or use "clear ip ospf process" command, for this to take effect
R3(config-router)#

Output:


Configuring Router R4
R4#en
R4#conf t
R4(config)#interface s1/1
R4(config-if)#ip address 30.1.1.2 255.255.255.0
R4(config-if)#no shutdown
R4(config-if)#ip ospf 1 area 0

R4(config-if)#interface s1/0
R4(config-if)#ip address 40.1.1.1 255.255.255.0
R4(config-if)#no shutdown
R4(config-if)#ip ospf 1 area 2

R4(config-if)#do sh ip int brief
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            unassigned      YES unset  administratively down down
FastEthernet0/1            unassigned      YES unset  administratively down down
Serial1/0                  40.1.1.1        YES manual up                    up
Serial1/1                  30.1.1.2        YES manual up                    up
Serial1/2                  unassigned      YES unset  administratively down down
Serial1/3                  unassigned      YES unset  administratively down down

R4(config-if)#router ospf 1
R4(config-router)#router-id 4.4.4.4
Reload or use "clear ip ospf process" command, for this to take effect
R4(config-router)#exit

Configuring R4 as NSSA
R4(config)#router ospf 1
R4(config-router)#area 2 nssa no-summary
Output:



Configuring Router R5
R5#en
R5#conf t
R5(config)#interface s1/1
R5(config-if)#ip address 40.1.1.2 255.255.255.0
R5(config-if)#no shutdown
R5(config-if)#ip ospf 1 area 2

R5(config-if)#interface loopback 1
R5(config-if)#ip address 99.9.1.1 255.255.255.0
R5(config-if)#no shutdown

R5(config-if)#interface loopback 2
R5(config-if)#ip address 99.9.2.1 255.255.255.0
R5(config-if)#no shutdown

R5(config-if)#interface loopback 3
R5(config-if)#ip address 99.9.3.1 255.255.255.0
R5(config-if)#no shutdown

R5(config-if)#interface loopback 4
R5(config-if)#ip address 99.9.4.1 255.255.255.0
R5(config-if)#no shutdown

R5(config-if)#interface loopback 5
R5(config-if)#ip address 99.9.5.1 255.255.255.0
R5(config-if)#no shutdown

R5(config-if)#do sh ip int brief
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            unassigned      YES unset  administratively down down
FastEthernet0/1            unassigned      YES unset  administratively down down
Serial1/0                  unassigned      YES unset  administratively down down
Serial1/1                  40.1.1.2        YES manual up                    up
Serial1/2                  unassigned      YES unset  administratively down down
Serial1/3                  unassigned      YES unset  administratively down down
Loopback1                  99.9.1.1        YES manual up                    up
Loopback2                  99.9.2.1        YES manual up                    up
Loopback3                  99.9.3.1        YES manual up                    up
Loopback4                  99.9.4.1        YES manual up                    up
Loopback5                  99.9.5.1        YES manual up                    up
R5(config-if)#exit

Router R5 redistribution command
R5(config)#router rip
R5(config-router)#version 2
R5(config-router)#network 99.0.0.0
R5(config-router)#exit
R5(config)#router ospf 1
R5(config-router)#router-id 5.5.5.5
Reload or use "clear ip ospf process" command, for this to take effect
R5(config-router)#summary-address 99.9.0.0 255.255.248.0
R5(config-router)#redistribute rip subnets metric 5
R5(config-router)#exit
Configuring R5 as NSSA
R5(config)#router ospf 1
R5(config-router)#area 2 nssa
R5(config-router)#
R5(config-router)#
Output:



Related Posts :



0 comments:

Confused? Feel free to ask

Post a Comment