GNS3
http://forum.gns3.net/

Junos Indirect next hop issue
http://forum.gns3.net/topic11632.html
Page 1 of 1

Author:  tusharamin [ Sun Aug 17, 2014 4:55 am ]
Post subject:  Junos Indirect next hop issue

I have a lab set on GNS3 using JUNOS 10.4R10.8 on all devices. Please see attached diagram

CEA-1 - PE1 is running eBGP

PE1 - PE2 is running iBGP

PE1-P1-P2-P3-P4 is also running OSPF

CEA-2 - PE2 is running eBGP

Loopback 192.168.12.1 is been advertised from CEA-1

Loopback 192.168.12.2 is been advertised from CEA-2


Using next-hop self, I am able to learn the loopback address on PE routers.

------------------------------------------------------------------------
[email protected]# run show route 192.168.12.2

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

192.168.12.2/32 *[BGP/170] 00:51:37, localpref 100, from 192.168.2.2
AS path: 65202 I
> to 172.20.220.2 via em0.0
to 172.20.221.2 via em1.0

[edit]
[email protected]#
-----------------------------------------------------------------------
[email protected]# run show route 192.168.12.1

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

192.168.12.1/32 *[BGP/170] 00:32:18, localpref 100, from 192.168.2.1
AS path: 65201 I
> to 172.20.222.2 via em0.0
to 172.20.223.2 via em1.0

[edit]
[email protected]#

-------------------------------------------------------------------------

[email protected]# run show route 192.168.12.2 detail

inet.0: 24 destinations, 25 routes (24 active, 0 holddown, 0 hidden)
192.168.12.2/32 (1 entry, 1 announced)
*BGP Preference: 170/-101
Next hop type: Indirect
Address: 0x8fa9520
Next-hop reference count: 6
Source: 192.168.2.2
Next hop type: Router, Next hop index: 131071
Next hop: 172.20.220.2 via em0.0, selected
Next hop: 172.20.221.2 via em1.0
Protocol next hop: 192.168.2.2
Indirect next hop: 8feef00 131070
State: <Active Int Ext>
Local AS: 65512 Peer AS: 65512
Age: 52:53 Metric2: 3
Task: BGP_65512.192.168.2.2+179
Announcement bits (3): 0-KRT 3-BGP RT Background 4-Resolve tree 1
AS path: 65202 I
Accepted
Localpref: 100
Router ID: 192.168.2.2

[edit]
[email protected]#

----------------------------------------------------------------------------

[email protected]# run show route 192.168.12.1 detail

inet.0: 24 destinations, 25 routes (24 active, 0 holddown, 0 hidden)
192.168.12.1/32 (1 entry, 1 announced)
*BGP Preference: 170/-101
Next hop type: Indirect
Address: 0x8fa9958
Next-hop reference count: 6
Source: 192.168.2.1
Next hop type: Router, Next hop index: 131070
Next hop: 172.20.222.2 via em0.0, selected
Next hop: 172.20.223.2 via em1.0
Protocol next hop: 192.168.2.1
Indirect next hop: 8feef00 131071
State: <Active Int Ext>
Local AS: 65512 Peer AS: 65512
Age: 33:23 Metric2: 3
Task: BGP_65512.192.168.2.1+50953
Announcement bits (3): 0-KRT 3-BGP RT Background 4-Resolve tree 1
AS path: 65201 I
Accepted
Localpref: 100
Router ID: 192.168.2.1

[edit]
[email protected]#
-----------------------------------------------------------------------------------------

I am able to ping/traceroute the connector address on the remote PE device, but not the loopback address

[email protected]# run traceroute 10.0.21.2
traceroute to 10.0.21.2 (10.0.21.2), 30 hops max, 40 byte packets
1 172.20.220.2 (172.20.220.2) 2.408 ms 3.699 ms 1.022 ms
2 172.20.201.2 (172.20.201.2) 3.010 ms 7.455 ms 3.302 ms
3 172.20.222.1 (172.20.222.1) 8.733 ms 6.738 ms 3.987 ms
4 10.0.21.2 (10.0.21.2) 7.648 ms 7.208 ms 5.493 ms

[edit]
[email protected]#

[email protected]# run traceroute 192.168.12.2
traceroute to 192.168.12.2 (192.168.12.2), 30 hops max, 40 byte packets
1 172.20.220.2 (172.20.220.2) 3.098 ms 4.845 ms 1.491 ms
2 172.20.220.2 (172.20.220.2) 1.843 ms !H 3.157 ms !H 3.084 ms !H

[edit]
[email protected]#

--------------------------------------------------------------------------

Config on PE1

--------------------------------------------------------------------------

[email protected]# show | display set
set version 10.4R10.8
set system host-name PE1
set system root-authentication encrypted-password "$1$yrtMPia2$SxrEYdmpjBJPLiPaRqCgk/"
set system syslog user * any emergency
set system syslog file messages any notice
set system syslog file messages authorization info
set system syslog file interactive-commands interactive-commands any
set interfaces em0 unit 0 family inet address 172.20.220.1/24
set interfaces em1 unit 0 family inet address 172.20.221.1/24
set interfaces em5 unit 0 family inet address 10.0.20.1/24
set interfaces lo0 unit 0 family inet address 192.168.2.1/32
set routing-options autonomous-system 65512
set protocols bgp group my-int-group type internal
set protocols bgp group my-int-group local-address 192.168.2.1
set protocols bgp group my-int-group export nhs
set protocols bgp group my-int-group neighbor 192.168.2.2
set protocols bgp group my-ext-group type external
set protocols bgp group my-ext-group export export-routes
set protocols bgp group my-ext-group peer-as 65201
set protocols bgp group my-ext-group neighbor 10.0.20.2
set protocols ospf export export-ospf
set protocols ospf area 0.0.0.0 interface lo0.0 passive
set protocols ospf area 0.0.0.0 interface em0.0
set protocols ospf area 0.0.0.0 interface em1.0
set policy-options policy-statement export-ospf term 0 from protocol ospf
set policy-options policy-statement export-ospf term 0 from protocol direct
set policy-options policy-statement export-ospf term 0 then accept
set policy-options policy-statement export-routes term 0 from protocol bgp
set policy-options policy-statement export-routes term 0 from protocol ospf
set policy-options policy-statement export-routes term 0 from protocol direct
set policy-options policy-statement export-routes term 0 then accept
set policy-options policy-statement nhs term 0 from protocol bgp
set policy-options policy-statement nhs term 0 then next-hop self
set policy-options policy-statement nhs term 0 then accept

[edit]
[email protected]#

------------------------------------------------------------------------------------

Config on PE2

-------------------------------------------------------------------------------------

[email protected]# show | display set
set version 10.4R10.8
set system host-name PE2
set system root-authentication encrypted-password "$1$RFy0rYYd$bI202tf3LBwCyMpZhRGm61"
set system syslog user * any emergency
set system syslog file messages any notice
set system syslog file messages authorization info
set system syslog file interactive-commands interactive-commands any
set interfaces em0 unit 0 family inet address 172.20.222.1/24
set interfaces em1 unit 0 family inet address 172.20.223.1/24
set interfaces em5 unit 0 family inet address 10.0.21.1/24
set interfaces lo0 unit 0 family inet address 192.168.2.2/32
set routing-options autonomous-system 65512
set protocols bgp group my-ext-group type external
set protocols bgp group my-ext-group export export-routes
set protocols bgp group my-ext-group peer-as 65202
set protocols bgp group my-ext-group neighbor 10.0.21.2
set protocols bgp group my-int-group type internal
set protocols bgp group my-int-group local-address 192.168.2.2
set protocols bgp group my-int-group export nhs
set protocols bgp group my-int-group neighbor 192.168.2.1
set protocols ospf export export-ospf
set protocols ospf area 0.0.0.0 interface lo0.0 passive
set protocols ospf area 0.0.0.0 interface em0.0
set protocols ospf area 0.0.0.0 interface em1.0
set policy-options policy-statement export-ospf term 0 from protocol ospf
set policy-options policy-statement export-ospf term 0 from protocol direct
set policy-options policy-statement export-ospf term 0 then accept
set policy-options policy-statement export-routes term 0 from protocol bgp
set policy-options policy-statement export-routes term 0 from protocol ospf
set policy-options policy-statement export-routes term 0 from protocol direct
set policy-options policy-statement export-routes term 0 then accept
set policy-options policy-statement nhs term 0 from protocol bgp
set policy-options policy-statement nhs term 0 then next-hop self
set policy-options policy-statement nhs term 0 then accept

[edit]
[email protected]#
---------------------------------------------------------------------------------------

I have ospf policy ( export-ospf) defined , but still not able to ping the loopback address. If I alter the export-ospf policy to allow bgp routes, I can ping the loopback
which I don't want. I want to learn this loopback only from bgp, not from OSPF

--------------------------------------------------------------------------
[email protected]# run show route 192.168.12.1

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

192.168.12.1/32 *[OSPF/150] 00:02:44, metric 0, tag 0
> to 172.20.222.2 via em0.0
to 172.20.223.2 via em1.0
[BGP/170] 00:02:44, localpref 100, from 192.168.2.1
AS path: 65201 I
> to 172.20.222.2 via em0.0
to 172.20.223.2 via em1.0

[edit]
[email protected]#

----------------------------------------------------------------------------------

Can someone please advice me where I am going wrong here...

Help greatly appreciated

Thanksm

Attachments:
LAB.jpeg.jpeg
LAB.jpeg.jpeg [ 102.54 KiB | Viewed 2270 times ]

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/