<?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/tag/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>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>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>
		<item>
		<title>Juniper RIP howto</title>
		<link>http://www.x83.net/juniper-rip-howto/</link>
		<comments>http://www.x83.net/juniper-rip-howto/#comments</comments>
		<pubDate>Sat, 13 Jun 2009 19:39:56 +0000</pubDate>
		<dc:creator>Giany</dc:creator>
				<category><![CDATA[Juniper]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[rip]]></category>

		<guid isPermaLink="false">http://www.x83.net/blog/?p=101</guid>
		<description><![CDATA[Background
I`m running 4 olive instances, each one having 3 interfaces (fxp0,fxp1,fxp2). I interconnect them using &#8221;&#8217;tap&#8221;&#8217; interfaces and put each interface in separate vlans:
So : fxp0 from each olive in BR0
       fxp1 from R1 and R2 in BR1
       fxp2 from R2 and R3 [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Background</strong></p>
<p>I`m running 4 olive instances, each one having 3 interfaces (fxp0,fxp1,fxp2). I interconnect them using &#8221;&#8217;tap&#8221;&#8217; interfaces and put each interface in separate vlans:</p>
<p>So : fxp0 from each olive in BR0<br />
       fxp1 from R1 and R2 in BR1<br />
       fxp2 from R2 and R3 in BR2<br />
       fxp1 from R3 and R4 in BR3</p>
<p><img alt="" src="http://www.x83.net/wiki/images/7/7a/Rip.gif" title="RIP" class="alignnone" width="504" height="298" /></p>
<p><strong>Set interfaces</strong></p>
<p>For R1:</p>
<pre>
[rancid@box ~]$ jlogin -c "show configuration interfaces|display set" 10.0.1.1
rancid@R1>
rancid@R1> show configuration interfaces|display set
set interfaces fxp0 unit 0 family inet address 10.0.1.1/24
set interfaces fxp1 vlan-tagging
set interfaces fxp1 unit 0 vlan-id 2
set interfaces fxp1 unit 0 family inet address 192.168.5.1/24
</pre>
<p>For R2:</p>
<pre>
[rancid@box ~]$ jlogin -c "show configuration interfaces|display set" 10.0.1.2
rancid@R2> show configuration interfaces|display set
set interfaces fxp0 unit 0 family inet address 10.0.1.2/24
set interfaces fxp1 vlan-tagging
set interfaces fxp1 unit 0 vlan-id 2
set interfaces fxp1 unit 0 family inet address 192.168.5.2/24
set interfaces fxp2 vlan-tagging
set interfaces fxp2 unit 0 vlan-id 3
set interfaces fxp2 unit 0 family inet address 192.168.6.1/24
</pre>
<p>For R3:</p>
<pre>
[rancid@box ~]$ jlogin -c "show configuration interfaces|display set" 10.0.1.3
rancid@R3> show configuration interfaces|display set
set interfaces fxp0 unit 0 family inet address 10.0.1.3/24
set interfaces fxp1 vlan-tagging
set interfaces fxp1 unit 0 vlan-id 4
set interfaces fxp1 unit 0 family inet address 192.168.7.1/24
set interfaces fxp2 vlan-tagging
set interfaces fxp2 unit 0 vlan-id 3
set interfaces fxp2 unit 0 family inet address 192.168.6.2/24
</pre>
<p>For R4:</p>
<pre>
[rancid@box ~]$ jlogin -c "show configuration interfaces|display set" 10.0.1.4
rancid@R4> show configuration interfaces|display set
set interfaces fxp0 unit 0 family inet address 10.0.1.4/24
set interfaces fxp1 vlan-tagging
set interfaces fxp1 unit 0 vlan-id 4
set interfaces fxp1 unit 0 family inet address 192.168.7.2/24
</pre>
<p>After all this there is no conectivity between R1 and R4. </p>
<p><strong>Configure rip</strong></p>
<p>To configure RIP you must first set a group that contains the interfaces interfaces on which RIP will be enabled.</p>
<p>R1:<br />
<strong>set protocols rip group BR neighbor fxp1.0</strong></p>
<p>R2:</p>
<p><strong>set protocols rip group BR neighbor fxp1.0<br />
set protocols rip group BR neighbor fxp2.0</strong></p>
<p>R3:</p>
<p><strong> set protocols rip group BR neighbor fxp1.0<br />
 set protocols rip group BR neighbor fxp2.0<br />
</strong><br />
R4:</p>
<p><strong>set protocols rip group BR neighbor fxp1.0</strong></p>
<p>When you simply enable RIP, the default JUNOS behavior is to only receive RIP traffic but not learn any of the routes or send any RIP routes. To have RIP send routing information to its neighbors, you need to configure a routing policy that has RIP export routes to its neighbors.</p>
<p>Add this to all 4 olives:</p>
<p><strong>rip_routes</strong></p>
<p> set protocols rip group BR export advertise-routes-via-rip<br />
 set policy-options policy-statement advertise-routes-via-rip term 1 from protocol direct<br />
 set policy-options policy-statement advertise-routes-via-rip term 1 from protocol rip<br />
 set policy-options policy-statement advertise-routes-via-rip term 1 then accept</p>
<p>To do it faster I use jlogin from the rancid suite smth like:</p>
<p>jlogin -x rip_routes 10.0.1.1</p>
<p><strong>Debug</strong></p>
<pre>
rancid@R4> show route protocol rip 

10.0.1.0/24         [RIP/100] 06:09:41, metric 2, tag 0
                    > to 192.168.7.1 via fxp1.0
'''192.168.5.0/24     *[RIP/100] 06:09:41, metric 3, tag 0
                    > to 192.168.7.1 via fxp1.0
192.168.6.0/24     *[RIP/100] 06:09:41, metric 2, tag 0
                    > to 192.168.7.1 via fxp1.0'''
224.0.0.9/32       *[RIP/100] 05:12:52, metric 1
</pre>
<pre>
rancid@R4> show rip statistics
RIPv2 info: port 520; holddown 120s.
    rts learned  rts held down  rqsts dropped  resps dropped
              3              0              0              0

fxp1.0:  3 routes learned; 1 routes advertised; timeout 180s; update interval 30s
Counter                         Total   Last 5 min  Last minute
-------                   -----------  -----------  -----------
Updates Sent                      780           10            2
Triggered Updates Sent              1            0            0
Responses Sent                      0            0            0
Bad Messages                        0            0            0
RIPv1 Updates Received              0            0            0
RIPv1 Bad Route Entries             0            0            0
RIPv1 Updates Ignored               0            0            0
RIPv2 Updates Received            773           10            2
RIPv2 Bad Route Entries             0            0            0
RIPv2 Updates Ignored               0            0            0
Authentication Failures             0            0            0
RIP Requests Received               0            0            0
RIP Requests Ignored                0            0            0
</pre>
<p>Tracing RIP traffic:</p>
<pre>
set protocols rip traceoptions file rip
set protocols rip traceoptions flag update
<pre>
and to view the file:
<pre>
rancid@R1> show log rip
Jan 29 13:24:44 trace_on: Tracing to "/var/log/rip" started
Jan 29 13:25:04.547811 received response: sender 192.168.5.2, command 2, version 2, mbz: 0; 3 routes.
Jan 29 13:25:05.504315 Preparing to send RIPv2 updates on nbr fxp1.0, group: BR.
Jan 29 13:25:05.508892 Update job: sending 20 msgs; nbr: fxp1.0; group: BR; msgp: 0x8995a00.
Jan 29 13:25:05.509008  nbr fxp1.0; msgp 0x8995a00.
Jan 29 13:25:05.509089          sending msg 0x8995a04, 1 rtes
Jan 29 13:25:05.524983 Update job done for nbr fxp1.0 group: BR
Jan 29 13:25:34.416932 received response: sender 192.168.5.2, command 2, version 2, mbz: 0; 3 routes.
</pre>
<p>To clear the file :<br />
<strong>rancid@R1> clear log rip</strong></p>
<p>To deactivate:</p>
<p> deactivate protocols rip traceoptions</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x83.net/juniper-rip-howto/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install upgrade a different Juniper release</title>
		<link>http://www.x83.net/install-upgrade-a-different-juniper-release/</link>
		<comments>http://www.x83.net/install-upgrade-a-different-juniper-release/#comments</comments>
		<pubDate>Sat, 13 Jun 2009 19:35:05 +0000</pubDate>
		<dc:creator>Giany</dc:creator>
				<category><![CDATA[Juniper]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[release]]></category>
		<category><![CDATA[upgrade]]></category>

		<guid isPermaLink="false">http://www.x83.net/blog/?p=99</guid>
		<description><![CDATA[ file copy http://10.1.1.254/jinstalls/jinstall-8.3R2.8-domestic-signed.tgz /var/tmp/
 request system software add validate unlink /var/tmp/jinstall-8.3R2.8-domestic-signed.tgz

root@R1> request system software add validate unlink /var/tmp/jinstall-8.3R2.8-domestic-signed.tgz
Checking compatibility with configuration
Initializing...
Using jbase-8.2R4.5
Verified manifest signed by PackageProduction_8_2_0
Using /var/tmp/jinstall-8.3R2.8-domestic-signed.tgz
Verified jinstall-8.3R2.8-domestic.tgz signed by PackageProduction_8_3_0
Using /mfs/validate/tmp/jinstall-signed/jinstall-8.3R2.8-domestic.tgz
Using /mfs/validate/tmp/jinstall/jbundle-8.3R2.8-domestic.tgz
Checking jbundle requirements on /
Using /mfs/validate/tmp/jbundle/jbase-8.3R2.8.tgz
Verified manifest signed by PackageProduction_8_3_0
Using /mfs/validate/tmp/jbundle/jkernel-8.3R2.8.tgz
Verified manifest signed by PackageProduction_8_3_0
Using /mfs/validate/tmp/jbundle/jcrypto-8.3R2.8.tgz
Verified manifest signed by PackageProduction_8_3_0
Using /mfs/validate/tmp/jbundle/jpfe-8.3R2.8.tgz
Verified SHA1 [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p> file copy http://10.1.1.254/jinstalls/jinstall-8.3R2.8-domestic-signed.tgz /var/tmp/<br />
 request system software add validate unlink /var/tmp/jinstall-8.3R2.8-domestic-signed.tgz</p></blockquote>
<pre>
root@R1> request system software add validate unlink /var/tmp/jinstall-8.3R2.8-domestic-signed.tgz
Checking compatibility with configuration
Initializing...
Using jbase-8.2R4.5
Verified manifest signed by PackageProduction_8_2_0
Using /var/tmp/jinstall-8.3R2.8-domestic-signed.tgz
Verified jinstall-8.3R2.8-domestic.tgz signed by PackageProduction_8_3_0
Using /mfs/validate/tmp/jinstall-signed/jinstall-8.3R2.8-domestic.tgz
Using /mfs/validate/tmp/jinstall/jbundle-8.3R2.8-domestic.tgz
Checking jbundle requirements on /
Using /mfs/validate/tmp/jbundle/jbase-8.3R2.8.tgz
Verified manifest signed by PackageProduction_8_3_0
Using /mfs/validate/tmp/jbundle/jkernel-8.3R2.8.tgz
Verified manifest signed by PackageProduction_8_3_0
Using /mfs/validate/tmp/jbundle/jcrypto-8.3R2.8.tgz
Verified manifest signed by PackageProduction_8_3_0
Using /mfs/validate/tmp/jbundle/jpfe-8.3R2.8.tgz
Verified SHA1 checksum of jpfe-M10-8.3R2.8.tgz
Verified SHA1 checksum of jpfe-M120-8.3R2.8.tgz
Verified SHA1 checksum of jpfe-M160-8.3R2.8.tgz
Verified SHA1 checksum of jpfe-M320-8.3R2.8.tgz
Verified SHA1 checksum of jpfe-M40-8.3R2.8.tgz
Verified SHA1 checksum of jpfe-M7i-8.3R2.8.tgz
Verified SHA1 checksum of jpfe-T-8.3R2.8.tgz
Verified SHA1 checksum of jpfe-X960-8.3R2.8.tgz
Verified SHA1 checksum of jpfe-common-8.3R2.8.tgz
WARNING: hw.product.model='unknown' using jpfe-M40
Using /mfs/validate/tmp/jbundle/jdocs-8.3R2.8.tgz
Verified manifest signed by PackageProduction_8_3_0
Using /mfs/validate/tmp/jbundle/jroute-8.3R2.8.tgz
Verified manifest signed by PackageProduction_8_3_0
Hardware Database regeneration succeeded
Validating against /config/juniper.conf.gz
mgd: commit complete
Validation succeeded
Installing package '/var/tmp/jinstall-8.3R2.8-domestic-signed.tgz' ...
Verified jinstall-8.3R2.8-domestic.tgz signed by PackageProduction_8_3_0
Adding jinstall...
Verified manifest signed by PackageProduction_8_3_0

WARNING:     This package will load JUNOS 8.3R2.8 software.
WARNING:     It will save JUNOS configuration files, and SSH keys
WARNING:     (if configured), but erase all other files and information
WARNING:     stored on this machine.  It will attempt to preserve dumps
WARNING:     and log files, but this can not be guaranteed.  This is the
WARNING:     pre-installation stage and all the software is loaded when
WARNING:     you reboot the system.

Saving the config files ...
NOTICE: uncommitted changes have been saved in /var/db/config/juniper.conf.pre-install
Installing the bootstrap installer ...

WARNING:     A REBOOT IS REQUIRED TO LOAD THIS SOFTWARE CORRECTLY. Use the
WARNING:     'request system reboot' command when software installation is
WARNING:     complete. To abort the installation, do not reboot your system,
WARNING:     instead use the 'request system software delete jinstall'
WARNING:     command as soon as this operation completes.

Saving package file in /var/sw/pkg/jinstall-8.3R2.8-domestic-signed.tgz ...
Saving state for rollback ...
Removing /var/tmp/jinstall-8.3R2.8-domestic-signed.tgz
</pre>
<p>The &#8221;&#8217;validate&#8221;&#8217; option checks that the new software is compatible with your current router configuration file. When you are updating to a different release of the JUNOS software, the validation check is performed automatically. The &#8221;&#8217;unlink&#8221;&#8217; option removes the software package from the router as soon as possible to make more room on the hard disk for the installation to complete.</p>
<p>One error that came up was :</p>
<pre>
Setting isupgrade=jboot-8.3R2.8.tgz

All together now...Somebody please give me some more memory!
List of Memory hogs ....
        cp size 49
        newfs size 20407
</pre>
<p>Junos requires a minimum of 198MB RAM to run&#8230;after an upgrade. After that 48-64 Ram is enough.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x83.net/install-upgrade-a-different-juniper-release/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Juniper MPLS howto</title>
		<link>http://www.x83.net/juniper-mpls-howto/</link>
		<comments>http://www.x83.net/juniper-mpls-howto/#comments</comments>
		<pubDate>Fri, 12 Jun 2009 03:59:02 +0000</pubDate>
		<dc:creator>Giany</dc:creator>
				<category><![CDATA[Juniper]]></category>
		<category><![CDATA[inet]]></category>
		<category><![CDATA[mpls]]></category>
		<category><![CDATA[mpls family]]></category>
		<category><![CDATA[mpls label]]></category>
		<category><![CDATA[route]]></category>
		<category><![CDATA[show]]></category>
		<category><![CDATA[show route]]></category>

		<guid isPermaLink="false">http://www.x83.net/blog/?p=78</guid>
		<description><![CDATA[Interface activation
The MPLS family requires to be activated on all the interfaces using MPLS traffic. Enter the [edit interfaces] mode to start configuring MPLS.
user@juniper&#62; edit
user@juniper# edit interfaces

[edit interfaces]
user@juniper# set ge-0/0/0 unit 0 family mpls

[edit interfaces]
user@juniper# set fe-0/0/1 unit 0 family mpls

[edit interfaces]
user@juniper# show
fe-0/0/1 {
unit 0 {
family inet {
address 192.168.0.1/24;
}
family mpls;
}
}
ge-0/0/0 {
unit 0 {
family inet {
address [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Interface activation</strong></p>
<p>The MPLS family requires to be activated on all the interfaces using MPLS traffic. Enter the [edit interfaces] mode to start configuring MPLS.</p>
<pre>user@juniper&gt; edit
user@juniper# edit interfaces

[edit interfaces]
user@juniper# set ge-0/0/0 unit 0 family mpls

[edit interfaces]
user@juniper# set fe-0/0/1 unit 0 family mpls

[edit interfaces]
user@juniper# show
fe-0/0/1 {
unit 0 {
family inet {
address 192.168.0.1/24;
}
family mpls;
}
}
ge-0/0/0 {
unit 0 {
family inet {
address 192.168.1.1/24;
}
family mpls;
}
}

[edit interfaces]
user@juniper# top

[edit]</pre>
<p><strong>Protocol activation</strong></p>
<p>Before MPLS can be implented in your network it must be explicitly be enabled under the [edit protocols] section.</p>
<pre>[edit]
user@juniper# edit protocols

[edit protocols]
user@juniper# set mpls interface all

[edit protocols]
user@juniper# show
mpls {
interfaces all;
}

[edit protocols]
user@juniper# commit

[edit]</pre>
<p><strong>Default labels</strong></p>
<p>The example shows the default MPLS routing table. There are two labels, 0 and 1, created by JunOS. Label 0 is the IPv4 explicit NULL, and 1 is the router altert label.</p>
<pre>[edit]
user@juniper# run show route table mpls.0

mpls.0: 2 destinations, 2 routers )2 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

0 *[MPLS/0] 00:05:12, metric 1
Receive
1 *[MPLS/1] 00:05:12, metric 1
Receive

[edit]</pre>
<p><strong>Static LSP (Labeled Switched Path) configuration</strong></p>
<p>Unverified configuration example.<br />
I have not verified this example. The extracts are generated by changing IP&#8217;s from a working setup. If somebody has a spare Juniper router; please verify the setup! If you plan to use this example on a production network read and study the [[MPLS]] protocol before attempting to configure the routers.</p>
<p>The folowing example will show a minimum configuration for a static LSP. We will create an [[MPLS]] connection between InterXion Paris and InterXion Brussels. Normall, an IGP (Interior Gateway Protocol) like OSPF (Open Shortest Path First) or IS-IS (Intermediate System-to-Intermediate System) would determine the path between Brussels and Paris. There is an label-switching router in Luxembourg to swap labels.</p>
<p>The first output shows Paris&#8217; routing table prior to the configuration of a static LSP. Notice that the prefered path is the IGP (OSPF)</p>
<pre>user@paris&gt; show route 192.168.0.1

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

192.168.0.1/32 *[OSPF/10] 00:00:15, metric 20
&gt; to 192.168.1.1 via fxp1.0</pre>
<p>We will configure the static LSP from Paris through Luxembourg and reach the destination in Brussels. The example show the configuration used for Parix. In addition to adding the family mpls to all the required interfaces it&#8217;s needed to add the static-path attribute to the configuration. This inserts a static route into the routing table for the address 192.168.0.1/32. Label 50 will be pushed on the packed destinated for 192.168.0.1/32. when they leave the LSR (Label Switching Router) for the next-hop 192.168.1.1</p>
<pre>[edit protocols mpls]
user@paris# set static-path inet 192.168.0.1 next-hop 192.168.1.1 push 50

[edit protocols mpls]
user@paris# show
static-path inet {
192.168.0.1/32 {
next-hop 192.168.1.1;
push 50;
}
interface all;
}</pre>
<p>Since Luxembourg is a transit router, the only function it will serve is to swap the label. Label 50 is received from Parix and swapped with label 0, which will be sent to Brussels. When Brussels received the label 0 it will know to pop the label and route the packed like normal Ipv4 traffic.</p>
<pre>[edit protocols mpls]
user@luxembourg# set interface ge-0/0/0 label-map 50 next-hop 192.168.3.1 swap 0

[edit protocols mpls]
user@luxembourg# show
interface all;
interface ge-0/0/0.0 {
label-map 50 {
next-hop 192.168.3.1;
swap 0;
}
}</pre>
<p>We now have a fully working static LSP path. When we look at the route again, we shall see the new labeled path.</p>
<pre>user@paris&gt; show route 192.168.0.1

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

192.168.0.1/32 *[Static/5] 19:52:42
&gt; to 192.168.1.1 via fxp1.0, Push 50
*[OSPF/10] 19:52:43, metric 20
&gt; to 192.168.1.1 via fxp1.0</pre>
<p>References:</p>
<p>Wikipedia: <a href="http://en.wikipedia.org/wiki/Multiprotocol_Label_Switching">http://en.wikipedia.org/wiki/Multiprotocol_Label_Switching</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.x83.net/juniper-mpls-howto/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
