Re: POP Quiz - Answers

From: Carlos G Mendioroz (tron@xxxxxxxxxxx)
Date: Fri May 17 2002 - 16:43:16 GMT-3


   
All,
I've been digging this, and found some interesting stuff:

-I don't know which protocols are ok for doing this, but OSPF seems to
be
one for sure. There is an RFC (1745) that explains how the AS PATH,
remote
AS and origin is coded in the tag and how it is supposed to work.
Nice reading, especially section4.2 & 4.3 (tag coding)

-For the record, the route-map with "set automatic-tag" (in router bgp,
table-map XXX)
does the BGP -> OSPF tag coding, and the route-map with "set as-path
tag"
(in router bgp, redistribute ospf ... route-map XXX) does the OSPF ->
BGP
tag decoding.

-This seems to be IOS version dependant.
In (some?) IOS 11.3, OSPF does not import local BGP networks. (i.e.
loopback with bgp network command).
In (some?) IOS 12.1, OSPF imports the local BGP networks but the tag set
does not follow automatic
tag semantics (it's set to 0) and then the remote router sees it as BGP
incomplete.
In (some?) IOS 12.1, the thing works for received (neighbour) BGP
routes. Those have to be
peering (i.e. BGP path length 1) for the routes to be re-exported from
OSPF to BGP (see rfc1745
truncated AS path, as there is place for only one AS in the tag)

I have modified the POP setup to inject some BGP external routes at
rtrC, and here is what
I have (with 12.1 everywhere), net numbers differ in local links:

rtrC: sh ip bgp
BGP table version is 13, local router ID is 2.2.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, i -
internal
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network Next Hop Metric LocPrf Weight Path
*> 1.1.1.1/32 200.3.116.254 1 32768 ?
*> 2.2.2.2/32 0.0.0.0 0 32768 i
*> 3.3.3.3/32 192.168.1.2 0 0 300 i
*> 4.4.4.4/32 192.168.1.2 0 0 300 400 i
*> 192.168.0.0 200.3.116.254 20 32768 ?
*> 200.3.116.0 0.0.0.0 0 32768 ?

rtrA: sh ip bgp
BGP table version is 6, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i -
internal
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network Next Hop Metric LocPrf Weight Path
*> 1.1.1.1/32 0.0.0.0 0 32768 i
*> 2.2.2.2/32 200.3.116.253 100 32768 ?
*> 3.3.3.3/32 200.3.116.253 100 32768 300 i
*> 200.3.116.0 0.0.0.0 0 32768 ?

rtrA: sh ip ospf data ext

       OSPF Router with ID (1.1.1.1) (Process ID 1)

                Type-5 AS External Link States

  LS age: 204
  Options: (No TOS-capability, DC)
  LS Type: AS External Link
  Link State ID: 1.1.1.1 (External Network Number )
  Advertising Router: 1.1.1.1
  LS Seq Number: 80000002
  Checksum: 0xDACF
  Length: 36
  Network Mask: /32
        Metric Type: 2 (Larger than any link state path)
        TOS: 0
        Metric: 1
        Forward Address: 0.0.0.0
        External Route Tag: 0

  Routing Bit Set on this LSA
  LS age: 1119
  Options: (No TOS-capability, DC)
  LS Type: AS External Link
  Link State ID: 2.2.2.2 (External Network Number )
  Advertising Router: 2.2.2.2
  LS Seq Number: 80000006
  Checksum: 0x68D2
  Length: 36
  Network Mask: /32
        Metric Type: 2 (Larger than any link state path)
        TOS: 0
        Metric: 100
        Forward Address: 0.0.0.0
        External Route Tag: 0

  Routing Bit Set on this LSA
  LS age: 882
  Options: (No TOS-capability, DC)
  LS Type: AS External Link
  Link State ID: 3.3.3.3 (External Network Number )
  Advertising Router: 2.2.2.2
  LS Seq Number: 80000003
  Checksum: 0xA893
  Length: 36
  Network Mask: /32
        Metric Type: 2 (Larger than any link state path)
        TOS: 0
        Metric: 100
        Forward Address: 0.0.0.0
        External Route Tag: 3489661228

  Routing Bit Set on this LSA
  LS age: 1128
  Options: (No TOS-capability, DC)
  LS Type: AS External Link
  Link State ID: 4.4.4.4 (External Network Number )
  Advertising Router: 2.2.2.2
  LS Seq Number: 80000004
  Checksum: 0xA5C1
  Length: 36
  Network Mask: /32
        Metric Type: 2 (Larger than any link state path)
        TOS: 0
        Metric: 100
        Forward Address: 0.0.0.0
        External Route Tag: 2684354860

Note that 1.1.1.1 should have tag 0xc0000064 (auto, complete, local from
AS 100) and not 0,
as 2.2.2.2 (generated by rtrC).
3.3.3.3 has 0xd000012c which is auto, complete, remote from AS 300
4.4.4.4 has 0xa000012c which is auto, incomplete, path truncated from AS
300

--
Carlos G Mendioroz  <tron@huapi.ba.ar>  LW7 EQI  Argentina


This archive was generated by hypermail 2.1.4 : Thu Jun 13 2002 - 10:59:00 GMT-3