Difference between revisions of "EBGP JUNOS Projekt"

From Teknologisk videncenter
Jump to: navigation, search
m (Konfiguration)
m (Konfiguration)
Line 99: Line 99:
 
     }
 
     }
 
}
 
}
 +
</source>
 +
===Verificering===
 +
Kontroller BGP naboer kommer op i Established state og der bliver udvækslet routes
 +
<source lang=cli>
 +
root@SRX240> <input>show bgp summary instance PE1</input>
 +
Groups: 1 Peers: 2 Down peers: 0
 +
Table          Tot Paths  Act Paths Suppressed    History Damp State    Pending
 +
PE1.inet.0            54        43          0          0          0          0
 +
PE1.mdt.0              0          0          0          0          0          0
 +
Peer                    AS      InPkt    OutPkt    OutQ  Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped...
 +
10.255.0.5            65002        127        128      0      0      54:27 <notice>Establ</notice>
 +
  <notice>PE1.inet.0: 25/36/36/0</notice>
 +
10.255.0.10          65004        124        126      0      0      54:19 <notice>Establ</notice>
 +
  <notice>PE1.inet.0: 18/18/18/0</notice>
 
</source>
 
</source>
  
 
=Links=
 
=Links=
 
{{Source cli}}
 
{{Source cli}}

Revision as of 13:10, 5 November 2014

Prøv at konfigurer følgende setup på en Juniper SRX: BGP Demo Setup

Opgave

Grundlæggende forbindelser

  • Konfigurer IP Adresser på alle Logical Tunnel interfaces
    • De skal ligge i 10.255.0.X/30 netværkene
    • LT interfacet skal have samme unit nummer som .4 oktet i op adressen(10.255.0.2 = lt-0/0/0.2)
  • Configurer lo så de passer med <routernummer>x10. og en management adresse(PE1 = Lo0.10:10.255.255.1/32)

Konfiguration

Konfigurer de logiske interfaces og forbind dem

root@SRX240> <input>show configuration interfaces lt-0/0/0.2</input>
<notice>encapsulation ethernet;
peer-unit 1;</notice>
family inet {
    address 10.255.0.2/30;
}

root@SRX240> <input>show configuration interfaces lt-0/0/0.1</input>
<notice>encapsulation ethernet;
peer-unit 2;</notice>
family inet {
    address 10.255.0.1/30;
}
root@SRX240> <input>show configuration interfaces lo0.10</input>
family inet {
    address 10.255.255.1/32;
}

Opret en virtual router instance og forbind lt interfaces til instancen.

root@SRX240> <input>show configuration routing-instances PE2</input>
instance-type virtual-router;
<notice>interface lt-0/0/0.2;
interface lt-0/0/0.5;
interface lt-0/0/0.22;
interface lo0.20;</notice>

Verificering

Kontroller at routerne har sat alle interfaces og IP adresser

root@SRX240> <input>show interfaces routing-instance PE2 terse</input>
Interface               Admin Link Proto    Local                 Remote
<notice>lt-0/0/0.2              up    up   inet     10.255.0.2/30
lt-0/0/0.5              up    up   inet     10.255.0.5/30
lt-0/0/0.22             up    up   inet     10.255.0.22/30
lo0.20                  up    up   inet     10.255.255.2        --> 0/0</notice>

Kontroller at de virtuelle routere kan pinge hinanden.

root@SRX240> <input>ping 10.255.0.2 routing-instance PE5</input>
PING 10.255.0.2 (10.255.0.2): 56 data bytes
<notice>64 bytes from 10.255.0.2: icmp_seq=0 ttl=64 time=1.132 ms
64 bytes from 10.255.0.2: icmp_seq=1 ttl=64 time=1.068 ms
64 bytes from 10.255.0.2: icmp_seq=2 ttl=64 time=1.012 ms</notice>
^C
--- 10.255.0.2 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max/stddev = 1.012/1.071/1.132/0.049 ms

BGP opsætning

  • Lav en export regl til bgp
  • Konfigurer lo0 interfacets ip adresse som router-id
  • konfigurer eBGP imellem alle routerne.

Konfiguration

Lav en export regl i global routing instance

root@SRX240> <input>show configuration policy-options policy-statement VR-EBGP-EXPORT</input>
term 1 {
    from {
        protocol direct;
    }
    then accept;
}

Konfigurer router-id og ASN under den virtuelle router.

[edit routing-instances]
root@SRX240# <input>show</input>
PE1 {
    routing-options {
        <notice>router-id 10.255.255.1;
        autonomous-system 65001;</notice>
    }
}

Lav eBGP under den virtuelle router

[edit]
root@SRX240# <input>show routing-instances PE1 protocols bgp</input>
group EXT-PEERS {
    type external;
    export VR-EBGP-EXPORT;
    neighbor 10.255.0.5 {
        peer-as 65002;
    }
    neighbor 10.255.0.10 {
        peer-as 65004;
    }
}

Verificering

Kontroller BGP naboer kommer op i Established state og der bliver udvækslet routes

root@SRX240> <input>show bgp summary instance PE1</input>
Groups: 1 Peers: 2 Down peers: 0
Table          Tot Paths  Act Paths Suppressed    History Damp State    Pending
PE1.inet.0            54         43          0          0          0          0
PE1.mdt.0              0          0          0          0          0          0
Peer                     AS      InPkt     OutPkt    OutQ   Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped...
10.255.0.5            65002        127        128       0       0       54:27 <notice>Establ</notice>
  <notice>PE1.inet.0: 25/36/36/0</notice>
10.255.0.10           65004        124        126       0       0       54:19 <notice>Establ</notice>
  <notice>PE1.inet.0: 18/18/18/0</notice>

Links