HOW TO CONFIGURE STATIC NULL ROUTING IN CISCO ROUTERS

In this post i’ll show you how to configure static null routing in cisco routers . First what is static null routing and why we take it in use .Static null routing is also called as black hole routing . It is configured when we don’t want any network to connect to specific network . So static routing  is a route which divert the network in a black hole from where it never come back again . Like in this post i am going to block 8.0.0.0 network devices for 1.0.0.0 network devices . So that 8 network devices won’t be able to connect 1 network devices . 

 

static null routing in cisco switches

ROUTER CONFIGURATION 

ROUTER R1

Router>en
Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int fa0/0
Router(config-if)#ip address 1.0.0.1 255.0.0.0
Router(config-if)#no shut

Router(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up

Router(config-if)#exit
Router(config)#int se0/0/1
Router(config-if)#ip address 2.0.0.1 255.0.0.0
Router(config-if)#clock rate 64000
Router(config-if)#no shut

%LINK-5-CHANGED: Interface Serial0/0/1, changed state to down
Router(config-if)#exit
Router(config)#int se0/0/0
Router(config-if)#ip address 4.0.0.1 255.0.0.0
Router(config-if)#clock rate 64000
Router(config-if)#no shut

%LINK-5-CHANGED: Interface Serial0/0/0, changed state to down
Router(config-if)#exit
Router(config)#
%LINK-5-CHANGED: Interface Serial0/0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0, changed state to up
%LINK-5-CHANGED: Interface Serial0/0/1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/1, changed state to up
Router>en
Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#ip route 3.0.0.0 255.0.0.0 2.0.0.2
Router(config)#ip route 9.0.0.0 255.0.0.0 2.0.0.2

Router(config)#ip route 6.0.0.0 255.0.0.0 4.0.0.2
Router(config)#ip route 7.0.0.0 255.0.0.0 4.0.0.2

Router(config)#ip route 8.0.0.0 255.0.0.0 null0
Router(config)#

( when running ip route command type network you want to discard and then null0)

ROUTER R2

Router>en
Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int fa0/0
Router(config-if)#ip address 3.0.0.1 255.0.0.0
Router(config-if)#no shut

Router(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up

Router(config-if)#exit
Router(config)#int se0/0/1
Router(config-if)#ip address 9.0.0.1 255.0.0.0
Router(config-if)#clock rate 64000
Router(config-if)#no shut

Router(config-if)#
%LINK-5-CHANGED: Interface Serial0/0/1, changed state to up

Router(config-if)#exit
Router(config)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/1, changed state to up

Router(config)#int se0/0/0
Router(config-if)#ip address 2.0.0.2 255.0.0.0
Router(config-if)#no shut

Router(config-if)#
%LINK-5-CHANGED: Interface Serial0/0/0, changed state to up

Router(config-if)#exit
Router(config)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0, changed state to up

Router(config)#ip route 1.0.0.0 255.0.0.0 2.0.0.1
Router(config)#ip route 4.0.0.0 255.0.0.0 2.0.0.1
Router(config)#ip route 6.0.0.0 255.0.0.0 2.0.0.1
Router(config)#ip route 7.0.0.0 255.0.0.0 9.0.0.2
Router(config)#ip route 8.0.0.0 255.0.0.0 9.0.0.2
Router(config)#

 

ROUTER R3

Router>en
Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int fa0/0
Router(config-if)#ip address 8.0.0.1 255.0.0.0
Router(config-if)#no shut

Router(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up

Router(config-if)#exit
Router(config)#int se0/0/1
Router(config-if)#ip address 9.0.0.2 255.0.0.0
Router(config-if)#no shut

%LINK-5-CHANGED: Interface Serial0/0/1, changed state to down
Router(config-if)#exit
Router(config)#int se0/0/0
Router(config-if)#ip address 7.0.0.2 255.0.0.0
Router(config-if)#no shut

Router(config-if)#
%LINK-5-CHANGED: Interface Serial0/0/0, changed state to up

Router(config-if)#exit
Router(config)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0, changed state to up

%LINK-5-CHANGED: Interface Serial0/0/1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/1, changed state to up

Router(config)#ip route 6.0.0.0 255.0.0.0 7.0.0.1
Router(config)#ip route 4.0.0.0 255.0.0.0 7.0.0.1
Router(config)#ip route 1.0.0.0 255.0.0.0 7.0.0.1
Router(config)#ip route 2.0.0.0 255.0.0.0 9.0.0.1
Router(config)#ip route 3.0.0.0 255.0.0.0 9.0.0.1
Router(config)#a

 

ROUTER R4

Router>en
Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int fa0/0
Router(config-if)#ip address 6.0.0.1 255.0.0.0
Router(config-if)#no shut

Router(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up

Router(config-if)#exit
Router(config)#int se0/0/1
Router(config-if)#ip address 7.0.0.1 255.0.0.0
Router(config-if)#clock rate 64000
Router(config-if)#no shut

%LINK-5-CHANGED: Interface Serial0/0/1, changed state to down
Router(config-if)#exit
Router(config)#int se0/0/0
Router(config-if)#ip address 4.0.0.2 255.0.0.0
Router(config-if)#no shut

Router(config-if)#
%LINK-5-CHANGED: Interface Serial0/0/0, changed state to up

Router(config-if)#exit
Router(config)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0, changed state to up

%LINK-5-CHANGED: Interface Serial0/0/1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/1, changed state to up

Router(config)#ip route 1.0.0.0 255.0.0.0 4.0.0.1
Router(config)#ip route 2.0.0.0 255.0.0.0 4.0.0.1
Router(config)#ip route 3.0.0.0 255.0.0.0 4.0.0.1
Router(config)#ip route 9.0.0.0 255.0.0.0 7.0.0.2
Router(config)#ip route 8.0.0.0 255.0.0.0 7.0.0.2
Router(config)#

 

Now go to laptop of 8.0.0.0 network and assign ip address , subnet mask and default gateway .

ip configuration in cisco packet tracer

Then do same with 1.0.0.0 network devices ( assign ip address , subnet mask and default gateway .

ip configuration in cico packet tracer

As you can see , Packet which is been sent from 8.0.0.0 network laptop to 1.0.0.0 network devices , can be reached to router R1 but is destroyed or sent to black hole . Now 8.0.0.2 ( laptop ) won’t be able to connect to 1.0.0.2 ( laptop ) . Even whole 8.0.0.0 network won’t be able to connect to any 1.0.0.0 network devices .

static null routing on cisco routers

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s