Tuesday, August 19, 2014

Filtering routes in Juniper


protocols {
    rip {
        group RIP-PROTOCOL {
            neighbor em0.0;
            neighbor em1.0 {
                import RIP-FILTER;
            }
        }
    }
}

    }
 
    policy-statement RIP-FILTER {
        term FL-ROUTES {
            from {
                protocol rip;
                route-filter 8.8.8.0/24 exact;
            }
            then reject;
        }
    }
}



set policy-options policy-statement RIP-FILTER term FL-ROUTES from protocol rip
set policy-options policy-statement RIP-FILTER term FL-ROUTES from route-filter 8.8.8.0/24 exact
set policy-options policy-statement RIP-FILTER term FL-ROUTES then reject

set protocols rip group RIP-PROTOCOL neighbor em1.0 import RIP-FILTER


Juniper RIP

Configuring Rip in Juniper.


Configuring routing protocol in juniper is a three step process.


1. Create a policy to enable rip on the interfaces

2.Create the policy to advertise directly connected or rip learnt routes

3. Apply the step one policy


Configuration.


1.
set protocols rip group RIP-PROTOCOL neighbor em0.0
set protocols rip group RIP-PROTOCOL neighbor em1.0

2.
set policy-options policy-statement RIP-ADVERTISEMENT-CUSTOM from protocol direct
set policy-options policy-statement RIP-ADVERTISEMENT-CUSTOM from protocol rip
set policy-options policy-statement RIP-ADVERTISEMENT-CUSTOM then accept

3.
set protocols rip group RIP-PROTOCOL export RIP-ADVERTISEMENT-CUSTOM


Xml Output

protocols {
    rip {
        group RIP-PROTOCOL {
            export RIP-ADVERTISEMENT-CUSTOM;
            neighbor em0.0;
            neighbor em1.0;
        }
    }
}
policy-options {
        policy-statement RIP-ADVERTISEMENT-CUSTOM {
        from protocol [ direct rip ];
        then accept;
}


Saturday, October 8, 2011

REDISTRIBUTION USING OSPF AND EIGRP

Redistribution helps us to inject the routes learnt by one routing protocol in one autonomous system into the another routing protocol having different autonomous system.With the help of redistribution we can join two different network having two different routing protocols communicate.


here in this scenario R1 is running ospf and R3 is running eigrp and R2 will be running both the protocols.

configuration
R1
enable 
configure terminal
int fa 0/0
ip add 10.11.11.1 255.255.255.0
no shut
int lo 0
ip add 1.1.1.1 255.0.0.0
router ospf 1
network 10.11.11.0 0.0.0.255 area 0
network 1.1.1.1 0.0.0.0 area 0
no au
end

R3
enable 
configure terminal
int fa 0/0
ip add 10.22.22.3 255.255.255.0
no shut
int lo 0
ip add 2.2.2.2 255.0.0.0
router eigrp 10
network 10.22.22.0
network 2.0.0.0
no au
end

R3

enable 
configure terminal
int fa 0/0
ip add 10.11.11.2.255.255.255.0
no shut
int fa 0/1
ip add 10.22.22.2 255.255.255.0
no sh
router ospf 1
network 10.11.11.0 0.0.0.255 area 0
no auto-summary
router eigrp 10
network 10.22.22.0
no auto-summary
-----------
REDISTRIBUTION 

R2(config)#  router ospf 1
R2(config-router)#redistribute eigrp 1000

R2(config-router)#exit
R2(config)#router eigrp 10
R2(config-router)#redistribute ospf 1 10000 1000 255 1 1500






 

Tuesday, April 19, 2011

STUB / TOTALLY STUB


STUB

Stub area is created inorder to stop redistributed routes into an ospf area , that means type 5 lsa's are not allowed which are generated due to redistribution.Creating an area stub makes the abr generate default route which is pointing towards itself


The best way of presenting a topology with stub area is shown below


click on the image to view large




In this topology area 0 will have OE2 routes in the routing table. OE2 routes are the redistributed routes from eigrp autonomous system into ospf.

Since area 1 is stub area, so type 5 lsa are not allowed.so abr will inject default route pointing towards itself in R4 ( fig ).so only OIA* route will be seen along with the inter-area routes.

If lsa type 3 are to be blocked then typing the command on the abr will block lsa type 3 also and default route is injected pointed towards abr.



Configuration for creating stub area(based on the figure above)


R4


router4>
router4>en
router4#conf terminal
router4(config)#router ospf 1
router4(config-router)#area 1 stub


R5


router5>
router5>en
router5#conf terminal
router5(config)#router ospf 1
router5(config-router)#area 1 stub


Configuration for creating totally stub area(based on the figure above)


R4
router4>
router4>en
router4#conf terminal
router4(config)#router ospf 1
router4(config-router)#area 1 stub no-summary


R5

router5>
router5>en
router5#conf terminal
router5(config)#router ospf 1
router5(config-router)#area 1 stub no-summary




Wednesday, March 23, 2011

Ipv6

Ipv6
Ipv6 is a 128 bit logical address assigned to layer 3 devices like computers, routers etc.Ipv6 is also called new generation address.Ipv6 can be represented as 2001:1:1:1:2:2:2:2 .Ipv6 does not support broadcast,but it uses multicast, unicast and anycast to forward packets(data).

Configuring rip with ipv6

Inorder to configure rip with ipv6,advanced rip protocol called RIPNG (rip next generation) is used.

Scenario

Two routers connected to each other with their loopbacks (logical interfaces) enabled on each router.


Router A's interface address 2001::1:1:1:1:1
Router A's loopback address 2001::2:1:1:1:1
Router B's interface address 2001::1:1:1:1:2
Router B's interface address 2001::3:1:1:1:1

Configuration

Router1>Enable
Router1#conf terminal
Router1(config)#int s 0
Router1(config)#ipv6 unicast-routing     (to enable ipv6 in routers)
Router1(config-if)ipv6 address 2001::1:1:1:1:1/64
Router1(config-if)#no shutdown
Router1(config-if)exit
Router1(config)#interface loopback 0
Router1(config-if)#ip adress 2001::2:1:1:1:1/64
Router1(config-if)#no shutdown
Router1(config)#exit

Router1>Enable
Router1#conf terminal
Router1(config)#int s 0
Router1(config)#ipv6 unicast-routing     (to enable ipv6 in routers)
Router1(config-if)ipv6 address 2001::1:1:1:1:2/64
Router1(config-if)#no shutdown
Router1(config-if)exit
Router1(config)#interface loopback 0
Router1(config-if)#ip adress 2001::3:1:1:1:1/64
Router1(config-if)#no shutdown
Router1(config)#exit



Configuring ripng

Router1(config)#interface s 0
Router1(config-if)#ipv6 rip 1234 enable
Router1(config-if)#exit
Router1(config)#interface loopback 0
Router1(config-if)#ipv6 rip 1234 enable
Router1(config-if)#exit

Router2(config)#interface s 0
Router2(config-if)#ipv6 rip 1234 enable
Router2(config-if)#exit
Router2(config)#interface loopback 0
Router2(config-if)#ipv6 rip 1234 enable
Router2(config-if)#exit

To check the routing table
use
Show ipv6 route ( under priveledge mode)

ping loopbacks
example


ping 2001::3:1:1:1:1
or ping 2001::2:1:1:1:1

Wednesday, February 2, 2011

FRAME-RELAY

Frame-relay is a layer 2 technology to create vpn based network.It supports the data rate of 1.544 MBPS and to the maximum of 44 MBPS.Frame-relay cloud is a pool of bandwith supporting bursty nature of data. In frame-relay no error correction, error detection are implemented.In this technology the end devices are connected to the switching network called frame-relay cloud.Frame-relay cloud is the collection of frame-relay switches,the purpose of frame-relay switches is to transfer the packets across the virtual circuit implemented in the frame-relay cloud.
The DTE end to which the end devices are attached is connected to the Csu/Dsu device which in turn is connected to the frame-relay switch which is a DCE device.The clock rate is set on the dce device.The path to the destination in the virtual circuit is identified by DLCI(data link connection identifier) which are set at the ISP end.




Implementing Frame-relay on cisco routers

This is the configuration for NBMA rfc standard.
In this configuration neighbours are not discovered dynamically and there is the contest for DR/ BDR.







Scenario

connecting R1 R2 and R3 across the framerelay cloud.

Configuration

framerelay router as a frame-relay switch

r>en
r#conf t
r(config)#hostname fr-sw
fr-sw(config)#frame-relay switching
fr-sw(config)#int s 1/0
fr-sw(config-if)#encapsulation frame-relay
fr-sw(config-if)#frame-relay intf dce
fr-sw(config-if)#frame-relay route 102 interface serial 1/1 201
fr-sw(config-if)#frame-relay route 103 interface serial 1/2 301
fr-sw(config-if)#clock rate 128000
fr-sw(config-if)#no shutdown
fr-sw(config-if)#exit
fr-sw(config)#int s 1/1
fr-sw(config-if)#encapsulation frame-relay
fr-sw(config-if)#frame-relay intf dce
fr-sw(config-if)#frame-relay route 201 interface serial 1/0 102
fr-sw(config-if)#clock rate 128000
fr-sw(config-if)#no shutdown
.
.

fr-sw(config)#int s 1/2
fr-sw(config-if)#encapsulation frame-relay
fr-sw(config-if)#frame-relay intf dce
fr-sw(config-if)#frame-relay route 301 interface serial 1/0 103
fr-sw(config-if)#clock rate 128000
fr-sw(config-if)#no shutdown
fr-sw(config)#exit



commands associated for troubeshooting

show frame-relay route
show frame-relay pvc

router configuration

R1>en
R1#conf terminal
R1(config)#hostname hub
hub(config)#int s 1/0
hub(config-if)#encapsulation frame-relay
hub(config-if)#ip address 10.0.0.1 255.0.0.0
hub(config-if)#no shut
hub(config-if)#int lo 0
hub(config-if)#ip add 1.1.1.1 255.0.0.0
hub(config-if)#exit
hub(config)#int s 1/0
hub(config-if)#frame-relay route map ip 10.0.0.2 102 broadcast
hub(config-if)#frame-relay route map ip 10.0.0.3 103 broadcast
exit
hub(config)#router ospf 10
hub(config)#network 10.0.0.0 0.0.0.255 area 0
hub(config-router)#network 1.1.1.1 0.0.0.0 area 0
hub(config-router)#neighbor 10.0.0.2
hub(config-router)#neighbor 10.0.0.3
exit


R1
R1#conf terminal
R1(config)#hostname spoke1
spoke1(config)#int s 1/0
spoke1(config-if)#ip add 10.0.0.2 255.0.0.0
spoke1(config-if)#no shutdown
spoke1(config-if)#int lo 0
spoke1(config-if)#ip add 2.2.2.2 255.0.0.0
spoke1(config-if)#exit
spoke1(config)#int s 1/0
spoke1(config-if)#encapsulation frame-relay
spoke1(config-if)#frame-relay route map ip 10.0.0.1 201 broadcast
exit
spoke1(config)#router ospf 10
spoke1(config)#network 10.0.0.0 0.0.0.255 area 0
spoke1(config-router)#network 2.2.2.2 0.0.0.0 area 0
spoke1(config-router)#neighbor 10.0.0.1
exit

R3
R3#conf terminal
R3(config)#hostname spoke2
spoke2(config)#int s 1/0
spoke2(config-if)#ip add 10.0.0.2 255.0.0.0
spoke2(config-if)#no sh
spoke2(config-if)#exit
spoke2(config)#int lo 0
spoke2(config-if)#ip add 3.3.3.3 255.0.0.0
spoke2(config-if)#int s 1/0
spoke2(config-if)#encapsulation frame-relay
spoke2(config-if)#frame-relay route map ip 10.0.0.1 301 broadcast
exit
spoke2(config)#router ospf 10
spoke2(config)#network 10.0.0.0 0.0.0.255 area 0
spoke2(config-router)#network 3.3.3.3 0.0.0.0 area 0
spoke1(config-router)#neighbor 10.0.0.1
exit

Tuesday, January 25, 2011

Authentication/Authorization/Accounting

Authentication is the process of identifying who the entity is or what it claims to be. Example To log in into the computer we need user-name and password, this is authentication.
Authorization is which resources a user or an entity can access.
Accounting keeps track of all what resource have been accessed and for what interval.


Rip version2 supports authentication. It authenticates the route updates. Rip authenication can be plain or encrypted using MD5

configuration for plain text authentication

r>enable
r#conf t
r(conf)#key chain ring
r(conf-keychain)#key 1
r(conf-keychain-key)#key-string cisco
r(conf-keychain-key)#exit
r(conf)#int s0/0
r(conf-if)#ip rip authentication key-chain ring



configuration for MD5 authentication

After configuring the key chain and key string use MD5 authentication under an interface

r(conf-if)#ip rip authentication mode MD5


Eigrp supports only Md5 authentication

Configuration

r>enable
r#conf t
r(conf)#key chain ring
r(conf-keychain)#key 1
r(conf-keychain-key)#key-string cisco
r(conf-keychain-key)#exit
r(conf)#int s0/0
r(conf-if)#ip authentication eigrp 10 key-chain ring
r(conf-if)#ip authentication eigrp 10 mode Md5