Difference between revisions of "BGP JUNOS"

From Teknologisk videncenter
Jump to: navigation, search
m (Fejlfinding)
m (BGP Neighbours)
Line 172: Line 172:
 
   Output Queue[0]: 0
 
   Output Queue[0]: 0
 
   Output Queue[5]: 0
 
   Output Queue[5]: 0
 +
</source>
 +
==BGP Networks==
 +
<source lang=cli>
 +
[edit]
 +
root@SRX240# <input>run show route protocol bgp detail</input>
 +
 +
inet.0: 26 destinations, 26 routes (26 active, 0 holddown, 0 hidden)
 +
<notice>10.10.0.0/16</notice> (1 entry, 1 announced)
 +
        *BGP    Preference: 170/-101
 +
                Next hop type: Router, Next hop index: 4292
 +
                Address: 0x15b418c
 +
                Next-hop reference count: 3
 +
                Source: 192.168.146.110
 +
                Next hop: 192.168.146.110 via ge-0/0/15.0, selected
 +
                State: <Active Ext>
 +
                Local AS: 65099 Peer AS: 65010
 +
                Age: 24:37      Metric: 10
 +
                Task: BGP_65010.192.168.146.110+35006
 +
                Announcement bits (3): 0-KRT 1-Resolve tree 1 2-BGP_RT_Background
 +
                AS path: 65010 I (Atomic) Aggregator: 65010 192.168.146.110
 +
                Accepted
 +
                Localpref: 100
 +
                Router ID: 192.168.146.110
 +
 +
inet6.0: 3 destinations, 3 routes (3 active, 0 holddown, 0 hidden)
 
</source>
 
</source>
 
{{Source cli}}
 
{{Source cli}}

Revision as of 14:07, 4 November 2014

Konfiguration

interfaces {
    ge-0/0/15 {
        unit 0 {
            family inet {
                dhcp;
            }
        }
    }
    lo0 {
        unit 5 {
            family inet {
                address 10.99.99.1/32;
                address 10.99.99.2/32;
                address 10.99.212.1/24;
                address 10.99.199.1/24;
                address 10.99.62.1/24;
                address 10.99.114.1/24;
                address 10.99.152.1/24;
                address 10.99.31.1/24;
                address 10.99.6.1/24;
                address 10.99.20.1/24;
                address 10.99.207.1/24;
                address 10.50.0.1/16;
            }
            family inet6 {
                address 2001:db8:ded0:2000::1/64;
            }
        }
    }
}
routing-options {
    autonomous-system 65099;
}
protocols {
    bgp {
        group as_65010 {
            type external;
            family inet {
                unicast;
            }
            family inet6 {
                unicast;
            }
            authentication-key "$9$LZCNdwoJDmPQVwoGUH5TCtu1hrKMXbs4"; ## SECRET-DATA
            export EBGP-EXPORT;
            peer-as 65010;
            neighbor 192.168.146.110;
            neighbor 192.168.146.109;
        }
        group as_65020 {
            type external;
            export EBGP-EXPORT;
            peer-as 65020;
            neighbor 192.168.146.4;
            neighbor 192.168.146.5;
        }
    }
}
policy-options {
    policy-statement EBGP-EXPORT {
        term 1 {
            from {
                protocol direct;
                route-filter 10.0.0.0/8 orlonger;
            }
            then accept;
        }
    }
    policy-statement OSPF-EXPORT {
        term 1 {
            from protocol direct;
            then accept;
        }
    }
    policy-statement RIP-EXPORT {
        term 1 {
            from protocol [ direct rip ];
            then accept;
        }
    }
}
security {
    forwarding-options {
        family {
            inet6 {
                mode packet-based;
            }
            mpls {
                mode packet-based;
            }
        }
    }
}

Fejlfinding

BGP Neighbours

Cisco command
show ip bgp summary
Juniper command
show bgp summary
root@SRX240# <input>run show bgp summary</input>
Groups: 6 Peers: 11 Down peers: 8
Table          Tot Paths  Act Paths Suppressed    History Damp State    Pending
inet.0                 1          1          0          0          0          0
inet6.0                0          0          0          0          0          0
Peer                     AS      InPkt     OutPkt    OutQ   Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped...
<notice>192.168.146.4         65020        127        325       0       0     1:02:41 Establ
  inet.0: 0/0/0/0</notice>
192.168.146.5         65020          0          0       0       0     1:03:01 Connect
<notice>192.168.146.50        65050        127        324       0       0     1:02:41 Establ
  inet.0: 0/0/0/0</notice>
192.168.146.51        65050          0          0       0       0     1:03:01 Active
192.168.146.60        65060          0          0       0       0     1:03:01 Active
192.168.146.106       65030          0          0       0       0     1:03:01 Connect
192.168.146.109       65010          0          0       0       0     1:03:01 Connect
<notice>192.168.146.110       65010         17        196       0       1        6:14 Establ
  inet.0: 1/1/1/0
  inet6.0: 0/0/0/0</notice>
192.168.146.112       65040          0          0       0       0     1:03:01 Connect
192.168.146.113       65030          0          0       0       0     1:03:01 Connect
192.168.146.128       65040          0          0       0       0     1:03:01 Connect
[edit]
root@SRX240# <input>run show bgp neighbor 192.168.146.110</input>
Peer: <notice>192.168.146.110+35006 AS 65010</notice> Local: <notice>192.168.146.101+179 AS 65099</notice>
  Type: External    State: Established    Flags: <Sync>
  Last State: OpenConfirm   Last Event: RecvKeepAlive
  Last Error: None
  <notice>Export: [ EBGP-EXPORT ]</notice>
  Options: <Preference AuthKey AddressFamily PeerAS Refresh>
  Authentication key is configured
  Address families configured: inet-unicast inet6-unicast
  Holdtime: 90 Preference: 170
  Number of flaps: 1
  Last flap event: Closed
  Peer ID: 192.168.146.110 Local ID: 10.50.0.1         Active Holdtime: 90
  Keepalive Interval: 30         Peer index: 0
  BFD: disabled, down
  Local Interface: ge-0/0/15.0
  NLRI for restart configured on peer: inet-unicast inet6-unicast
  NLRI advertised by peer: inet-unicast inet6-unicast
  NLRI for this session: inet-unicast inet6-unicast
  Peer supports Refresh capability (2)
  Stale routes from peer are kept for: 300
  Peer does not support Restarter functionality
  Peer does not support Receiver functionality
  Peer does not support 4 byte AS extension
  Peer does not support Addpath
  Table inet.0 Bit: 10000
    RIB State: BGP restart is complete
    Send state: in sync
    Active prefixes:              1
    Received prefixes:            1
    Accepted prefixes:            1
    Suppressed due to damping:    0
    <notice>Advertised prefixes:          12</notice>
  Table inet6.0 Bit: 60000
    RIB State: BGP restart is complete
    Send state: in sync
    Active prefixes:              0
    Received prefixes:            0
    Accepted prefixes:            0
    Suppressed due to damping:    0
    Advertised prefixes:          0
  Last traffic (seconds): Received 29   Sent 22   Checked 59
  Input messages:  Total 36     Updates 2       Refreshes 0     Octets 843
  Output messages: Total 217    Updates 180     Refreshes 0     Octets 24442
  Output Queue[0]: 0
  Output Queue[5]: 0

BGP Networks

[edit]
root@SRX240# <input>run show route protocol bgp detail</input>

inet.0: 26 destinations, 26 routes (26 active, 0 holddown, 0 hidden)
<notice>10.10.0.0/16</notice> (1 entry, 1 announced)
        *BGP    Preference: 170/-101
                Next hop type: Router, Next hop index: 4292
                Address: 0x15b418c
                Next-hop reference count: 3
                Source: 192.168.146.110
                Next hop: 192.168.146.110 via ge-0/0/15.0, selected
                State: <Active Ext>
                Local AS: 65099 Peer AS: 65010
                Age: 24:37      Metric: 10
                Task: BGP_65010.192.168.146.110+35006
                Announcement bits (3): 0-KRT 1-Resolve tree 1 2-BGP_RT_Background
                AS path: 65010 I (Atomic) Aggregator: 65010 192.168.146.110
                Accepted
                Localpref: 100
                Router ID: 192.168.146.110

inet6.0: 3 destinations, 3 routes (3 active, 0 holddown, 0 hidden)