<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>x83.net &#187; Juniper</title>
	<atom:link href="http://www.x83.net/category/juniper/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.x83.net</link>
	<description></description>
	<lastBuildDate>Sat, 24 Jul 2010 09:50:05 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>AS-path filtering</title>
		<link>http://www.x83.net/as-path-filtering/</link>
		<comments>http://www.x83.net/as-path-filtering/#comments</comments>
		<pubDate>Mon, 22 Jun 2009 00:46:49 +0000</pubDate>
		<dc:creator>Giany</dc:creator>
				<category><![CDATA[Cisco]]></category>
		<category><![CDATA[Juniper]]></category>
		<category><![CDATA[as-path]]></category>
		<category><![CDATA[bgp]]></category>
		<category><![CDATA[deny]]></category>
		<category><![CDATA[ip]]></category>
		<category><![CDATA[neighbor]]></category>
		<category><![CDATA[peer-as]]></category>
		<category><![CDATA[policy-options]]></category>
		<category><![CDATA[protocols]]></category>

		<guid isPermaLink="false">http://www.x83.net/?p=268</guid>
		<description><![CDATA[Cisco way:
ip as-path access-list 1 deny _1234$
ip as-path access-list 1 deny _5678$
ip as-path access-list 1 permit .*
router bgp 100
neighbor 192.168.0.1 remote-as 200
neighbor 192.168.0.1 des ebgp-test
neighbor 192.168.0.1 filter-list 1 in
Juniper way:
protocols {
    bgp {
        group &#8220;ebgp-test&#8221; {
          [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Cisco</strong> way:</p>
<blockquote><p>ip as-path access-list 1 deny _1234$<br />
ip as-path access-list 1 deny _5678$<br />
ip as-path access-list 1 permit .*</p>
<p>router bgp 100<br />
neighbor 192.168.0.1 remote-as 200<br />
neighbor 192.168.0.1 des ebgp-test<br />
neighbor 192.168.0.1 filter-list 1 in</p></blockquote>
<p><strong>Juniper</strong> way:</p>
<blockquote><p>protocols {<br />
    bgp {<br />
        group &#8220;ebgp-test&#8221; {<br />
            type external;<br />
            import test-in;<br />
            peer-as 200;<br />
            neighbor 192.168.0.1 {<br />
            }<br />
        }<br />
policy-options {<br />
    policy-statement test {<br />
            from as-path [test test1];<br />
            then reject;<br />
    }<br />
 set policy-options as-path a &#8220;.*1234&#8243;<br />
 set policy-options as-path b &#8220;.*5678&#8243;<br />
}
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.x83.net/as-path-filtering/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Juniper Interfaces names</title>
		<link>http://www.x83.net/juniper-interfaces-names/</link>
		<comments>http://www.x83.net/juniper-interfaces-names/#comments</comments>
		<pubDate>Thu, 18 Jun 2009 06:32:06 +0000</pubDate>
		<dc:creator>Giany</dc:creator>
				<category><![CDATA[Juniper]]></category>
		<category><![CDATA[ge]]></category>
		<category><![CDATA[interfaces]]></category>
		<category><![CDATA[junos]]></category>
		<category><![CDATA[t1]]></category>
		<category><![CDATA[t3]]></category>
		<category><![CDATA[tap]]></category>
		<category><![CDATA[xe]]></category>

		<guid isPermaLink="false">http://www.x83.net/?p=263</guid>
		<description><![CDATA[Interfaces
ae: Aggregated Ethernet A virtual aggregated link.
as: Aggregated SONET/SDH A virtual aggregated link.
at: ATM1 or ATM2 IQ Asynchronous Transfer Mode
cau4: Channelized AU-4 IQ Configured on the Channelized STM-1 IQ PIC.
coc1: Channelized OC-1 IQ Configured on the Channelized OC-12 IQ PIC.
coc12: Channelized OC-12 IQ Configured on the Channelized OC-12 IQ PIC.
cstm1: Channelized STM-1 IQ Configured on [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Interfaces</strong></p>
<p><strong>ae</strong>: Aggregated Ethernet A virtual aggregated link.<br />
<strong>as</strong>: Aggregated SONET/SDH A virtual aggregated link.<br />
<strong>at</strong>: ATM1 or ATM2 IQ Asynchronous Transfer Mode<br />
<strong>cau4</strong>: Channelized AU-4 IQ Configured on the Channelized STM-1 IQ PIC.<br />
<strong>coc1</strong>: Channelized OC-1 IQ Configured on the Channelized OC-12 IQ PIC.<br />
<strong>coc12</strong>: Channelized OC-12 IQ Configured on the Channelized OC-12 IQ PIC.<br />
<strong>cstm1</strong>: Channelized STM-1 IQ Configured on the Channelized STM-1 IQ PIC.<br />
<strong>ce1</strong>: Channelized E1 IQ Configured on the Channelized E1 IQ PIC or Channelized<br />
STM-1 IQ PIC.<br />
<strong>ct1</strong>: Channelized T1 IQ Configured on the Channelized DS-3 IQ PIC or<br />
Channelized OC-12 IQ PIC.<br />
<strong>ct3</strong>: Channelized T3 IQ Configured on the Channelized DS-3 IQ PIC or<br />
Channelized OC-12 IQ PIC.<br />
<strong>cp</strong>: Collector Configured on the Monitoring Services II PIC.<br />
<strong>ds</strong>: DS-0 Configured on the Channelized DS-3 to DS-0 PIC, Channelized E1 PIC, Channelized OC-12 IQ PIC<br />
<strong>dsc</strong>: Discard Allows you to identify the ingress point of a denial-of-service (DoS) attack.<br />
<strong>e1</strong>: E1 Includes the channelized STM-1 to E1 interfaces.<br />
<strong>e3</strong>: E3 Includes the E3 IQ interfaces.<br />
<strong>es</strong>: Encryption Allows you to configure a security association (SA) name<br />
with a logical interface.<br />
<strong>fe</strong>: Fast Ethernet 100Base-TX (Fast Ethernet, 100 Mbps).<br />
<strong>fxp0</strong>: Management and internal Ethernet The management Ethernet interface is an out-of-bandmanagement interface within the routing platform.<br />
<strong>fxp1</strong>:  Interface that connects the routing engine and packet forwarding engine.<br />
<strong>ge</strong>: Gigabit Ethernet Includes Gigabit Ethernet IQ interfaces.<br />
<strong>gr</strong>: Generic Route Encapsulation tunnel Allows you to configure a unicast tunnel using GRE<br />
encapsulation.<br />
<strong>gre</strong>: Internally generated This interface is internally generated and is not<br />
configurable.<br />
<strong>ip</strong>: IP-over-IP encapsulation tunnel Allows you to configure a unicast tunnel using IP-IP<br />
encapsulation.<br />
<strong>ipip</strong>: Internally generated This interface is internally generated and is not<br />
configurable.<br />
<strong>lo</strong> Loopback This interface is internally generated. The logical<br />
interface lo0.16383 is a non-configurable interface for routing platform control traffic.<br />
<strong>ls</strong>: Link services Supports bundles that contain links.<br />
<strong>lsi</strong>: Internally generated This interface is internally generated and is not<br />
configurable.<br />
<strong>ml</strong>: Multilink Includes Multilink Frame Relay and Multilink PPP.<br />
<strong>mo</strong>: Monitoring services Includes the monitoring services and monitoring services<br />
II interfaces. The logical interface mo-fpc/pic/port.16383 is an internally generated, non-configurable interface for routing platform control traffic.<br />
<strong>mt</strong>: Multicast tunnel Internal routing platform interface for VPNs.<br />
<strong>mtun</strong>: Internally generated This interface is internally generated and is not<br />
configurable.<br />
<strong>me0</strong>: &#8211; out of band management interface on ex switches<br />
<strong>oc3</strong>: OC-3 IQ Configured on the Channelized OC-12 IQ PIC.<br />
<strong>pe</strong>: This interface is present on the first-hop routing platform. Encapsulates packets destined for the rendezvous point (RP) routing platform.<br />
<strong>pd</strong>: This interface is present on the RP De-encapsulates packets at the RP.<br />
<strong>pimd</strong>: Internally generated This interface is internally generated and is not<br />
configurable.<br />
<strong>pime</strong>: Internally generated This interface is internally generated and is not<br />
configurable.<br />
<strong>rlsq</strong>: &#8211; a redundant bundle interface, made of two or more lsq interface. If you have redundant AS Pics.<br />
<strong>se</strong>: Serial Includes the EIA-530, V.35, and X.21 interfaces.<br />
<strong>so</strong>: SONET/SDH Both are widely used methods for very high speed<br />
transmission of voice and data signals across the numerous world-wide fiber-optic networks.<br />
<strong>sp</strong>: Adaptive services The logical interface sp-fpc/pic/port.16383 is an<br />
internally generated, non-configurable interface for routing platform control traffic.<br />
<strong>t1</strong>: T1 Includes the channelized DS-3 to DS-1 interfaces.<br />
<strong>t3</strong>: T3 Includes the channelized OC-12 to DS-3 interfaces.<br />
<strong>tap</strong>: Internally generated This interface is internally generated and is not<br />
configurable.<br />
<strong>vcp</strong>: &#8211; virtual chassis interface (EX4200 only)<br />
<strong>vsp</strong>: Voice services The Adaptive Services (AS) Physical Interface Card (PIC)<br />
supports the compressed real-time transport protocol (RTP) on this interface.<br />
<strong>vt</strong>: Virtual loopback tunnel On routing platforms equipped with a Tunnel PIC,<br />
enables egress filtering.<br />
<strong>xe</strong>: &#8211; 1GE optical interface on ex switches</p>
<p>Juniper reference:<br />
<a href="http://www.juniper.net/techpubs/software/nog/nog-interfaces/download/nog-interfaces.pdf">http://www.juniper.net/techpubs/software/nog/nog-interfaces/download/nog-interfaces.pdf</a></p>
<p><span id="more-263"></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.x83.net/juniper-interfaces-names/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Juniper Tacacs &amp; Rancid</title>
		<link>http://www.x83.net/juniper-tacacs-rancid/</link>
		<comments>http://www.x83.net/juniper-tacacs-rancid/#comments</comments>
		<pubDate>Sun, 14 Jun 2009 06:36:03 +0000</pubDate>
		<dc:creator>Giany</dc:creator>
				<category><![CDATA[Juniper]]></category>
		<category><![CDATA[authentication-order]]></category>
		<category><![CDATA[rancid]]></category>
		<category><![CDATA[tacacs]]></category>
		<category><![CDATA[tacplus]]></category>
		<category><![CDATA[tac_plus]]></category>
		<category><![CDATA[wiki]]></category>

		<guid isPermaLink="false">http://www.x83.net/?p=191</guid>
		<description><![CDATA[Short howto on Configure Tacacs+ and Rancid on Juniper.
Download Tacacs from : ftp://ftp.shrubbery.net/pub/tac_plus/  also you will need tcp_wrappers for tac_plus to work.
Install tcp_wrappers and tacacs
yum install -y tcp_wrappers
yum install -y tcp_wrappers-devel
yum install -y tcp_wrappers-libs
Download  ftp://ftp.shrubbery.net/pub/tac_plus/tacacs+-F4.0.4.15.tar.gz
tar zxvf tacacs+-F4.0.4.15.tar.gz
cd tacacs+-F4.0.4.15
./configure
make
make install
Setup tacacs.conf
key = &#8220;secretkey&#8221;
accounting file = /var/log/tac_plus
acl = HomeNet {
permit = 10.2.2.1
}
user = rancid {
default [...]]]></description>
			<content:encoded><![CDATA[<p>Short howto on Configure Tacacs+ and Rancid on Juniper.</p>
<p>Download Tacacs from : ftp://ftp.shrubbery.net/pub/tac_plus/  also you will need tcp_wrappers for tac_plus to work.</p>
<p><strong>Install tcp_wrappers and tacacs</strong></p>
<blockquote><p>yum install -y tcp_wrappers<br />
yum install -y tcp_wrappers-devel<br />
yum install -y tcp_wrappers-libs<br />
Download  ftp://ftp.shrubbery.net/pub/tac_plus/tacacs+-F4.0.4.15.tar.gz<br />
tar zxvf tacacs+-F4.0.4.15.tar.gz<br />
cd tacacs+-F4.0.4.15<br />
./configure<br />
make<br />
make install</p></blockquote>
<p><strong>Setup tacacs.conf</strong></p>
<blockquote><p>key = &#8220;secretkey&#8221;<br />
accounting file = /var/log/tac_plus<br />
acl = HomeNet {<br />
permit = 10.2.2.1<br />
}<br />
user = rancid {<br />
default service = permit<br />
login = cleartext mypass<br />
enable = cleartext mypass<br />
service = junos-exec {<br />
local-user-name = operations<br />
}<br />
}<br />
user = giany {<br />
default service = permit<br />
login = cleartext mypass<br />
enable = cleartext mypass<br />
service = junos-exec {<br />
local-user-name = operations<br />
}</p>
<p>}</p></blockquote>
<p><strong>Configure Juniper Tacacs</strong></p>
<blockquote><p>set system authentication-order [ tacplus password ]</p>
<p>set system tacplus-server 10.2.2.1 secret secretkey<br />
set system accounting events login<br />
set system accounting events interactive-commands<br />
set system accounting destination tacplus<br />
set system login class network permissions network<br />
set system login class network permissions view<br />
set system login user operations full-name &#8220;Users with Full Access&#8221;<br />
set system login user operations uid 9999<br />
set system login user operations class super-user<br />
set system login user operations authentication encrypted-password &#8220;xxx&#8221;<br />
set system login user restricted full-name &#8220;Restricted&#8221;<br />
set system login user restricted uid 2000<br />
set system login user restricted class read-only<br />
set system login user restricted authentication encrypted-password &#8220;xxx&#8221;</p></blockquote>
<p><strong>RANCID</strong></p>
<blockquote><p># adduser rancid<br />
Download ftp://ftp.shrubbery.net/pub/rancid/rancid-2.3.1.tar.gz<br />
# tar zxvf rancid-2.3.1.tar.gz<br />
# cd rancid-2.3.1<br />
# ./configure &#8211;prefix=/home/rancid<br />
# su &#8211; rancid<br />
# set CVSROOT /home/rancid/var/CVS<br />
# cvs init<br />
# rancid-cvs</p></blockquote>
<p><strong>.cloginrc</strong></p>
<blockquote><p>add method 10.2.2.2 ssh</p>
<p>add method 10.100.100.1 ssh<br />
add user olive rancid<br />
add user cisco rancid<br />
add password olive {mypass} {mypass}<br />
add password cisco {mypass} {mypass}</p></blockquote>
<p><strong>Debug</strong></p>
<blockquote><p>[rancid@box ~]$ clogin cisco<br />
cisco<br />
spawn ssh -c 3des -x -l rancid cisco<br />
rancid@cisco&#8217;s password:<br />
Corp:2&gt;enable<br />
Password:<br />
Corp:2#</p>
<p>[rancid@box ~]$ jlogin olive<br />
olive<br />
spawn ssh -c 3des -x -l rancid olive</p>
<p>WARNING: You are being watched.<br />
rancid@olive&#8217;s password:<br />
&#8212; JUNOS 7.4R2.6 built 2006-01-20 14:27:46 UTC<br />
rancid@olive.x83.net&gt;</p></blockquote>
<blockquote><p># tail -f /var/log/tac_plus</p>
<p>Mon Aug  4 16:20:37 2008        10.2.2.2        rancid  ttyp0   olive.x83.net   stop    task_id=1       service=shell   elapsed_time=263    process*mgd[7038]       cmd=logout<br />
Mon Aug  4 16:26:15 2008        10.100.100.1    rancid  tty2    10.100.100.100  start   task_id=58      timezone=UTC    service=shell<br />
Mon Aug  4 16:26:43 2008        10.100.100.1    rancid  tty2    10.100.100.100  stop    task_id=58      timezone=UTC    service=shell       disc-cause=1    disc-cause-ext=1020     connect-progress=101    elapsed_time=28 nas-rx-speed=0  nas-tx-speed=0<br />
Mon Aug  4 16:26:56 2008        10.2.2.2        rancid  ttyp0   olive.x83.net   start   task_id=1       service=shell   process*mgd[7045]   cmd=login<br />
Mon Aug  4 16:27:03 2008        10.2.2.2        rancid  ttyp0   olive.x83.net   stop    task_id=1       service=shell   elapsed_time=8      process*mgd[7045]       cmd=logout<br />
Mon Aug  4 16:27:15 2008        10.2.2.2        rancid  ttyp0   olive.x83.net   start   task_id=1       service=shell   process*mgd[7049]   cmd=login</p></blockquote>
<p>Set idle-timeout so after a while a user will get disconnect:</p>
<blockquote><p>login<br />
class admin {<br />
idle-timeout 4;<br />
permissions all;<br />
}<br />
user test {<br />
class admin<br />
}</p></blockquote>
<p>On terminal you will get smth like that:</p>
<blockquote><p>test@br0&gt; Warning: session will be closed in 1 minute if there is no activity<br />
Warning: session will be closed in 10 seconds if there is no activity<br />
Idle timeout exceeded: closing session<br />
Connection closed by foreign host.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.x83.net/juniper-tacacs-rancid/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Detect transient routes Juniper</title>
		<link>http://www.x83.net/detect-transient-routes-juniper/</link>
		<comments>http://www.x83.net/detect-transient-routes-juniper/#comments</comments>
		<pubDate>Sat, 13 Jun 2009 19:55:40 +0000</pubDate>
		<dc:creator>Giany</dc:creator>
				<category><![CDATA[Juniper]]></category>
		<category><![CDATA[detect]]></category>
		<category><![CDATA[extensive]]></category>
		<category><![CDATA[pfe]]></category>
		<category><![CDATA[transient]]></category>

		<guid isPermaLink="false">http://www.x83.net/blog/?p=119</guid>
		<description><![CDATA[
oper@re> show route extensive 10.10.195.25

inet.0: 24 destinations, 25 routes (23 active, 0 holddown, 1 hidden)
10.10.195.0/24 (1 entry, 1 announced)
TSI:
KRT in-kernel 10.10.195.0/24/30 -> {10.10.4.3}
         *BGP    Preference: 170/-101
                 Next hop [...]]]></description>
			<content:encoded><![CDATA[<pre>
oper@re> show route extensive 10.10.195.25

inet.0: 24 destinations, 25 routes (23 active, 0 holddown, 1 hidden)
10.10.195.0/24 (1 entry, 1 announced)
TSI:
KRT in-kernel 10.10.195.0/24/30 -> {10.10.4.3}
         *BGP    Preference: 170/-101
                 Next hop type: Router, Next hop index: '''453'''
<<<<<<<<<<<<<<<<<<<<
                 Next-hop reference count: 9
                 Source: 10.10.4.3
                 Next hop: 10.10.4.3 via t2-1/0/1:0.0, selected
                 State: <Active Ext>
                 Local AS: 65101 Peer AS: 65000
                 Age: 4:19:18
                 Task: BGP_65000.10.10.4.3+179
                 Announcement bits (1): 0-KRT
                 AS path: 65000 65001 I
                 Communities: target:65000:1 src-as:65000:0 rt-import:
10.128.128.3:5
                 Accepted
                 Localpref: 100
                 Router ID: 10.10.0.1
</pre>
<pre>
oper@re> start shell pfe network feb

SBR platform (266Mhz PPC 603e processor, 32MB memory, 512KB flash)

SBR(fire vty)# show nhdb id '''453'''
    ID      Type      Interface    Next Hop Addr    Protocol
Encap     MTU
-----  --------  -------------  ---------------  ----------
------------  ----
   453   Unicast  t1-1/0/2:0.0   10.10.4.0           IPv4
PPP  1203
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.x83.net/detect-transient-routes-juniper/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install SX Cards</title>
		<link>http://www.x83.net/install-sx-cards/</link>
		<comments>http://www.x83.net/install-sx-cards/#comments</comments>
		<pubDate>Sat, 13 Jun 2009 19:51:14 +0000</pubDate>
		<dc:creator>Giany</dc:creator>
				<category><![CDATA[Juniper]]></category>
		<category><![CDATA[fpc]]></category>
		<category><![CDATA[request]]></category>
		<category><![CDATA[request chassis]]></category>
		<category><![CDATA[sx cards]]></category>

		<guid isPermaLink="false">http://www.x83.net/blog/?p=116</guid>
		<description><![CDATA[If you install a GigE SX Card into a FPC slot issue :
request chassis pic fpc-slot 1 pic-slot 2 online
]]></description>
			<content:encoded><![CDATA[<p>If you install a GigE SX Card into a FPC slot issue :</p>
<p><strong>request chassis pic fpc-slot 1 pic-slot 2 online</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.x83.net/install-sx-cards/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Eject users Juniper</title>
		<link>http://www.x83.net/eject-users-juniper/</link>
		<comments>http://www.x83.net/eject-users-juniper/#comments</comments>
		<pubDate>Sat, 13 Jun 2009 19:50:10 +0000</pubDate>
		<dc:creator>Giany</dc:creator>
				<category><![CDATA[Juniper]]></category>
		<category><![CDATA[eject]]></category>
		<category><![CDATA[kick]]></category>
		<category><![CDATA[logout]]></category>
		<category><![CDATA[users]]></category>

		<guid isPermaLink="false">http://www.x83.net/blog/?p=114</guid>
		<description><![CDATA[Lets say you want to logout (kick) an user out:

rancid@br0> show system users
11:23PM  up 1 day, 19 mins, 3 users, load averages: 0.07, 0.02, 0.00
USER     TTY      FROM                   [...]]]></description>
			<content:encoded><![CDATA[<p>Lets say you want to logout (kick) an user out:</p>
<pre>
rancid@br0> show system users
11:23PM  up 1 day, 19 mins, 3 users, load averages: 0.07, 0.02, 0.00
USER     TTY      FROM                              LOGIN@  IDLE WHAT
root     d0       -                                3:23PM   4:59 -csh (csh)
rancid   p0       10.0.1.254                       8:55PM      - -cli (cli)
test     p1       10.0.1.254                       11:23PM     - -cli (cli)    

rancid@br0> request system logout user test
</pre>
<p>And test will see:</p>
<pre>
--- JUNOS 8.5R3.4 built 2008-04-24 03:40:14 UTC
test@br0> Connection closed by foreign host.
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.x83.net/eject-users-juniper/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Restrict VTY access Juniper</title>
		<link>http://www.x83.net/restrict-vty-access-juniper/</link>
		<comments>http://www.x83.net/restrict-vty-access-juniper/#comments</comments>
		<pubDate>Sat, 13 Jun 2009 19:49:08 +0000</pubDate>
		<dc:creator>Giany</dc:creator>
				<category><![CDATA[Juniper]]></category>
		<category><![CDATA[restrict]]></category>
		<category><![CDATA[vty]]></category>

		<guid isPermaLink="false">http://www.x83.net/blog/?p=112</guid>
		<description><![CDATA[Restricting remote access to your RE. The ideea is to allow remote logins via ssh or telnet.
I want only one host from a specific ip to do remote SSH, the rest will be rejected.
&#8221;&#8217;!!! Warning!!!&#8221;&#8217;
You need to understand that if you dont configure well you might stop all traffic from being forwarded through your RE.
First [...]]]></description>
			<content:encoded><![CDATA[<p>Restricting remote access to your RE. The ideea is to allow remote logins via ssh or telnet.<br />
I want only one host from a specific ip to do remote SSH, the rest will be rejected.<br />
&#8221;&#8217;!!! Warning!!!&#8221;&#8217;<br />
You need to understand that if you dont configure well you might stop all traffic from being forwarded through your RE.</p>
<p>First  you will use a term to set the host from where you will use ssh and then reject the rest. The second term is to allow all traffic pass through your core.</p>
<pre>
lo0 {
    description "br0 loopback";
    unit 0 {
        family inet {
            filter {
                    input re-filter;
            }
            address 127.0.0.1/32;
            address 172.16.9.1/32 {
                primary;
            }
        }
    }
}
</pre>
<p>And then the policy filter:</p>
<pre>
filter lo-filter {
    term ssh {
        from {
            source-address {
            10.0.1.254/32 except;
             }
            destination-port ssh;
        }
        then {
            discard
        }
    }
    term no-ssh {
         then {
             accept
          }
    }
} 
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.x83.net/restrict-vty-access-juniper/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Redistribute route Juniper</title>
		<link>http://www.x83.net/redistribute-route-juniper/</link>
		<comments>http://www.x83.net/redistribute-route-juniper/#comments</comments>
		<pubDate>Sat, 13 Jun 2009 19:47:54 +0000</pubDate>
		<dc:creator>Giany</dc:creator>
				<category><![CDATA[Juniper]]></category>
		<category><![CDATA[connected]]></category>
		<category><![CDATA[local]]></category>
		<category><![CDATA[redistribute]]></category>
		<category><![CDATA[reject]]></category>
		<category><![CDATA[static]]></category>

		<guid isPermaLink="false">http://www.x83.net/blog/?p=110</guid>
		<description><![CDATA[Lets say you have set some dynamic routing (RIP,OSPF,BGP,IS-IS..) and you want to redistribute routes into them.
redistribute connected

set policy-options policy-statement Connected
    term connected {
        from protocol direct;
        then accept;
}

redistribute static

set policy-options policy-statement Static
    term static [...]]]></description>
			<content:encoded><![CDATA[<p>Lets say you have set some dynamic routing (RIP,OSPF,BGP,IS-IS..) and you want to redistribute routes into them.</p>
<p><strong>redistribute connected</strong></p>
<pre>
set policy-options policy-statement Connected
    term connected {
        from protocol direct;
        then accept;
}
</pre>
<p><strong>redistribute static</strong></p>
<pre>
set policy-options policy-statement Static
    term static {
        from protocol static;
        then accept;
}
</pre>
<p><strong>redistribute local</strong></p>
<pre>
set policy-options policy-statement Local
    term local {
        from protocol local;
        then accept;
}
</pre>
<p><strong>reject anything else</strong></p>
<pre>
term else {
    then reject
}
</pre>
<p>And all the policy will look like:</p>
<pre>

policy-statement distribute-routes
    term connected {
        from protocol direct;
        then accept;
    }
    term static {
        from protocol static;
        then accept;
    }
    term local {
        from protocol local;
        then accept;
    }
    term else {
        then reject
    }
</pre>
<p>It looks easy I guess..but what if you want to redistribute ospf routes?</p>
<p><strong>redistribute ospf routes</strong></p>
<p>If you are using OSPF for IGP and BGP as a EGP and you want to export ospf routes to BGP peers then you have to create a policy for that.<br />
Smth like :</p>
<pre>
policy-statement ospf-routes {
    term 1 {
        from {
            protocol ospf;
            area 0.0.0.0;
        }
        then accept;
    }
    term 2 {
        then reject;
    }
}
</pre>
<p><strong>send default route to bgp peer</strong></p>
<p>Lets assume you want to send to send to a BGP peer 0.0.0.0/0 (default route).</p>
<p>First you need to have a route for 0.0.0.0/0 before you can export it to a peer. I guess this is the difference between the Juniper and Cisco configs, Cisco provides you a shortcut with the &#8216;default-originate&#8217; keyword which does it all in one step. If you don&#8217;t have a route for 0.0.0.0/0 defined somewhere that is at least part of the problem.</p>
<p>First we generate the default route (if you dont have one yet) :</p>
<pre>
routing-options {
    generate {
        route 0.0.0.0/0 discard;
    }
}
</pre>
<p>then we create a policy for 0/0 :</p>
<pre>
policy-options {
    policy-statement default-originate {
        from {
            route-filter 0.0.0.0/0 exact;
        }
        then accept;
    }
}
</pre>
<p>A simple BGP neighbour will have smth like:</p>
<pre>
neighbor aaa.bbb.ccc.ddd {
    export default-originate;
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.x83.net/redistribute-route-juniper/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OSPF Juniper</title>
		<link>http://www.x83.net/108/</link>
		<comments>http://www.x83.net/108/#comments</comments>
		<pubDate>Sat, 13 Jun 2009 19:45:45 +0000</pubDate>
		<dc:creator>Giany</dc:creator>
				<category><![CDATA[Juniper]]></category>
		<category><![CDATA[ospf]]></category>
		<category><![CDATA[redistribute]]></category>

		<guid isPermaLink="false">http://www.x83.net/blog/?p=108</guid>
		<description><![CDATA[Ok..so same topology as for RIP. For interface configurations check : [[ Juniper RIP Howto ]]
Configuration

R1:

set protocols ospf area 0.0.0.0 interface fxp1.0

R2:

set protocols ospf area 0.0.0.0 interface fxp1.0
set protocols ospf area 0.0.0.0 interface fxp2.0

R3:

set protocols ospf area 0.0.0.0 interface fxp2.0
set protocols ospf area 0.0.0.0 interface fxp1.0
set protocols ospf area 0.0.0.0 interface fxp1.2

R4:

set protocols ospf area [...]]]></description>
			<content:encoded><![CDATA[<p>Ok..so same topology as for RIP. For interface configurations check : [[ Juniper RIP Howto ]]</p>
<p><strong>Configuration</strong><br />
<img alt="" src="http://www.x83.net/wiki/images/7/7a/Rip.gif" title="OSPF" class="alignnone" width="504" height="298" /></p>
<p>R1:</p>
<pre>
set protocols ospf area 0.0.0.0 interface fxp1.0
</pre>
<p>R2:</p>
<pre>
set protocols ospf area 0.0.0.0 interface fxp1.0
set protocols ospf area 0.0.0.0 interface fxp2.0
</pre>
<p>R3:</p>
<pre>
set protocols ospf area 0.0.0.0 interface fxp2.0
set protocols ospf area 0.0.0.0 interface fxp1.0
set protocols ospf area 0.0.0.0 interface fxp1.2
</pre>
<p>R4:</p>
<pre>
set protocols ospf area 0.0.0.0 interface fxp1.0
set protocols ospf area 0.0.0.0 interface fxp1.2
</pre>
<p><strong>Debug</strong></p>
<pre>
[root@box ~]# jlogin -c "show route" 10.0.1.1
spawn ssh -c 3des -x -l rancid 10.0.1.1
rancid@10.0.1.1's password:
--- JUNOS 8.5R3.4 built 2008-04-24 03:40:14 UTC
rancid@br0> 

rancid@br0> set cli complete-on-space off
Disabling complete-on-space

rancid@br0> set cli screen-length 0
Screen length set to 0

rancid@br0> show route 

inet.0: 11 destinations, 11 routes (10 active, 0 holddown, 1 hidden)
+ = Active Route, - = Last Active, * = Both

0.0.0.0/0          *[Static/5] 00:26:09
                    > to 10.0.1.254 via fxp0.0
10.0.1.0/24        *[Direct/0] 00:26:10
                    > via fxp0.0
10.0.1.1/32        *[Local/0] 00:26:10
                      Local via fxp0.0
172.16.9.1/32      *[Direct/0] 00:26:10
                    > via lo0.0
192.168.5.0/30     *[Direct/0] 00:26:10
                    > via fxp1.0
192.168.5.1/32     *[Local/0] 00:26:10
                      Local via fxp1.0
192.168.6.0/30     *[OSPF/10] 00:12:51, metric 20               // routes from R3
                    > to 192.168.5.2 via fxp1.0
192.168.7.0/29     *[OSPF/10] 00:12:39, metric 30               // routes from R4
                    > to 192.168.5.2 via fxp1.0
192.168.8.0/29     *[OSPF/10] 00:12:39, metric 30               // routes from R4
                    > to 192.168.5.2 via fxp1.0
224.0.0.5/32       *[OSPF/10] 00:26:12, metric 1
                      MultiRecv

rancid@br0> quit
Connection to 10.0.1.1 closed.
</pre>
<p>As you can see R1 get the routes from R3 and R4. Also ping should work between this 4 routers.</p>
<pre>
[root@box ~]# jlogin -c "ping rapid 192.168.7.2" 10.0.1.1
spawn ssh -c 3des -x -l rancid 10.0.1.1
rancid@10.0.1.1's password:
--- JUNOS 8.5R3.4 built 2008-04-24 03:40:14 UTC
rancid@br0> 

rancid@br0> set cli complete-on-space off
Disabling complete-on-space

rancid@br0> set cli screen-length 0
Screen length set to 0

rancid@br0> ping rapid 192.168.7.2
PING 192.168.7.2 (192.168.7.2): 56 data bytes
!!!!!
--- 192.168.7.2 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max/stddev = 8.507/13.222/21.780/5.199 ms

rancid@br0> quit
Connection to 10.0.1.1 closed.
</pre>
<p>View ospf database:</p>
<pre>
rancid@br0> show ospf database
    OSPF link state database, Area 0.0.0.0
 Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len
Router  *172.16.9.1       172.16.9.1       0x80000004   982  0x22 0xfa8   36
Router   172.16.9.2       172.16.9.2       0x80000008   971  0x22 0x783f  48
Router   172.16.9.3       172.16.9.3       0x80000009   972  0x22 0x872c  60
Router   172.16.9.4       172.16.9.4       0x80000004   976  0x22 0xe2cd  48
Network  192.168.5.2      172.16.9.2       0x80000001   983  0x22 0x175   32
Network  192.168.6.2      172.16.9.3       0x80000001   972  0x22 0x86a   32
Network  192.168.7.1      172.16.9.3       0x80000002   137  0x22 0x96a   32
Network  192.168.8.1      172.16.9.3       0x80000002   437  0x22 0xfd74  32
</pre>
<p><strong>redistribute routes</strong></p>
<p>Lets say we set on R1 a default route:</p>
<p> set routing-options static route 0.0.0.0/0 next-hop 10.0.1.254</p>
<p>And now you want to send a default route to the rest of the routers. First we need to create a policy statement<br />
from protocol static. Of course you can match specific routes. Check [[ Redistribute routes ]] for details.</p>
<p> set policy-options policy-statement default-route term 1 from protocol static<br />
 set policy-options policy-statement default-route term 1 then accept</p>
<p>and then we export that statement into OSPF:</p>
<p> set protocols ospf export default-route</p>
<p>Routing table on R2 will look like:</p>
<pre>
rancid@R2> show route
0.0.0.0/0          *[OSPF/150] 00:25:16, metric 0, tag 0
                    > to 192.168.5.1 via fxp1.0
</pre>
<p>As you can see it recieves 0.0.0.0/0 via OSPF.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x83.net/108/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OSPF intro</title>
		<link>http://www.x83.net/ospf-intro/</link>
		<comments>http://www.x83.net/ospf-intro/#comments</comments>
		<pubDate>Sat, 13 Jun 2009 19:43:25 +0000</pubDate>
		<dc:creator>Giany</dc:creator>
				<category><![CDATA[Juniper]]></category>
		<category><![CDATA[link-state]]></category>
		<category><![CDATA[ospf]]></category>

		<guid isPermaLink="false">http://www.x83.net/blog/?p=106</guid>
		<description><![CDATA[As you probably know OSPF (Open Shortest Path First) is a link-state protocol. When a router begins operating on a network link, information associated with that logical network is added to its local link-state database .
The local router then sends Hello messages on its operational links to determine whether other link-state routers are operating on [...]]]></description>
			<content:encoded><![CDATA[<p>As you probably know OSPF (Open Shortest Path First) is a link-state protocol. When a router begins operating on a network link, information associated with that logical network is added to its local link-state database .</p>
<p>The local router then sends Hello messages on its operational links to determine whether other link-state routers are operating on the interfaces as well. When a remote router is located, the local router attempts to form an adjacency.<br />
This adjacency enables the two routers to advertise summary link-state database information to each other. </p>
<p>This exchange is not the actual detailed database information, but is truly a summary of the data. Each router evaluates the summary data against its local link-state database to verify that it has the most up-to-date information. Should one side of the adjacency realize that it requires an update, that router requests the new information from the adjacent router.<br />
The update includes the actual data contained in the link-state database. This exchange process continues until both routers have identical link-state databases.</p>
<p>Each router uses the Dijkstra Algorithm to process the database information into a path to each destination in the network. Every link-state router uses the same algorithm to process its database, requiring each router to maintain consistent information to get the same results.</p>
<p>Common Packet Header<br />
All OSPF packets share a common 24-octet header. This header allows the receiving router to determine whether the packet is valid and should be processed. The OSPF header fields includes the following:</p>
<p>Version (1 octet) This field details the current version of OSPF used by the local router. It is set to a value of 2, the default value. Type (1 octet) This field specifies the type of OSPF packet. Possible values include:</p>
<p>*1—Hello packet<br />
*2—Database descriptor<br />
*3—Link-state request<br />
*4—Link-state update<br />
*5—Link-state acknowledgment</p>
<p>Packet Length (2 octets)<br />
This field displays the total length, in octets, of the OSPF packet.<br />
Router ID (4 octets)<br />
The router ID of the advertising router appears in this field.<br />
Area ID (4 octets)<br />
This field contains the 32-bit area ID assigned to the interface used to send<br />
the OSPF packet.<br />
Checksum (2 octets)<br />
This field displays a standard IP checksum for the entire OSPF packet,<br />
excluding the 64-bit authentication field.<br />
Authentication Type (2 octets)<br />
The specific type of authentication used by OSPF is encoded in this field. Possible values are:<br />
*0—Null authentication<br />
*1—Simple password<br />
*2—MD5 cryptographic authentication</p>
<p>Authentication (8 octets)<br />
This field displays the authentication data to verify the packet’s integrity.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x83.net/ospf-intro/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
