ipv6: config dual stack con tunnel hurricane a MP-BGP :D

Tutto ciò che ha a che fare con la configurazione di apparati Cisco (e non rientra nelle altre categorie)

Moderatore: Federico.Lagni

Avatar utente
anubisg1
Cisco pathologically enlightened user
Messaggi: 218
Iscritto il: lun 18 ott , 2010 11:05 am
Località: Brno

si lo so, soprattutto la configurazione di MP-BGP tra il router di casa mia, e quello del mio ufficio è solo una configurazione di stile per fare un pò di pratica.. però dovete ammerlo.. È TROPPO FIGO!! soprattutto perchè funziona! :D


la config mostra un router configurato in dual stack.
c'è un tunnel 6to4 e dal mio lato, il tunnel usa un ip dynamico usando come metodo di aggiornamento un dynamic dns :D

ditemi che ne pensate!!!

p.s. per far funzionare il ddns di hurricane tramite https ho dovuto importarne il certificato nella config perchè "auto-firmato"

---AGGIORNATA LA CONFIG COSì CHE FUNZIONI CON IL NUOVO CERTIFICATO---

Codice: Seleziona tutto

Gateway#sh run
Building configuration...

Current configuration : 8770 bytes
!
! Last configuration change at 18:51:45 ROME Thu Oct 20 2011 by anubisg1
! NVRAM config last updated at 18:54:21 ROME Thu Oct 20 2011 by anubisg1
!
version 12.4
no service pad
service tcp-keepalives-in
service tcp-keepalives-out
service timestamps debug datetime msec localtime show-timezone
service timestamps log datetime msec localtime show-timezone
service password-encryption
service sequence-numbers
!
hostname Gateway
!
boot-start-marker
boot-end-marker
!
logging buffered 51200 debugging
no logging console
enable secret 5 $1$S5p8$K/H7AY8PoP13wp3eDqfSt/
!
no aaa new-model
!
resource policy
!
clock timezone ROME 1
clock summer-time ROME recurring last Sun Mar 2:00 last Sun Oct 2:00
no ip source-route
no ip gratuitous-arps
ip cef
!
!
no ip dhcp use vrf connected
ip dhcp excluded-address 192.168.0.1
!
ip dhcp pool HOUSE
   network 192.168.0.0 255.255.255.0
   default-router 192.168.0.1 
   dns-server 8.8.8.8 8.8.4.4 
!
!
ip tcp synwait-time 10
no ip bootp server
ip domain name linux-network
ip ssh time-out 60
ip ssh version 2
ip ddns update method FQDN
 HTTP
  add http://username:[email protected]/nic/update?system=dyndns&hostname=<h>&myip=<a>
  remove http://username:[email protected]/nic/update?system=dyndns&hostname=<h>&myip=<a>
!
ip ddns update method Hurricane
 HTTP
  add https://username:[email protected]/ipv4_end.php?tid=id-numerico-mio-tunnel
 interval maximum 0 1 0 0
!
login block-for 240 attempts 4 within 120
!         
ipv6 unicast-routing
ipv6 cef
!
crypto pki trustpoint tunnelbroker
 enrollment terminal pem
 revocation-check none
!
!
crypto pki certificate chain tunnelbroker
 certificate ca 01
  308202E7 30820250 02010130 0D06092A 864886F7 0D010105 05003081 BB312430
  22060355 0407131B 56616C69 43657274 2056616C 69646174 696F6E20 4E657477
  6F726B31 17301506 0355040A 130E5661 6C694365 72742C20 496E632E 31353033
  06035504 0B132C56 616C6943 65727420 436C6173 73203220 506F6C69 63792056
  616C6964 6174696F 6E204175 74686F72 69747931 21301F06 03550403 13186874
  74703A2F 2F777777 2E76616C 69636572 742E636F 6D2F3120 301E0609 2A864886
  F70D0109 01161169 6E666F40 76616C69 63657274 2E636F6D 301E170D 39393036
  32363030 31393534 5A170D31 39303632 36303031 3935345A 3081BB31 24302206
  03550407 131B5661 6C694365 72742056 616C6964 6174696F 6E204E65 74776F72
  6B311730 15060355 040A130E 56616C69 43657274 2C20496E 632E3135 30330603
  55040B13 2C56616C 69436572 7420436C 61737320 3220506F 6C696379 2056616C
  69646174 696F6E20 41757468 6F726974 79312130 1F060355 04031318 68747470
  3A2F2F77 77772E76 616C6963 6572742E 636F6D2F 3120301E 06092A86 4886F70D
  01090116 11696E66 6F407661 6C696365 72742E63 6F6D3081 9F300D06 092A8648
  86F70D01 01010500 03818D00 30818902 818100CE 3A71CAE5 ABC85992 55D7ABD8
  740EF9EE D9F65547 5965470E 0555DCEB 98363C5C 535DD330 CF38ECBD 4189ED25
  4209246B 0A5EB37C DD522D4C E6D4D67D 5A59A965 D449132D 244D1C50 6FB5C185
  543BFE71 E4D35C42 F980E091 1A0A5B39 3667F33F 557C1B3F B45F6473 34E3B412
  BF8764F8 DA12FF37 27C1B343 BBEF7B6E 2E69F702 03010001 300D0609 2A864886
  F70D0101 05050003 8181003B 7F506F6F 50949949 6238381F 4BF8A5C8 3EA78281
  F62BC7E8 C5CEE83A 1082CB18 008E4DBD A8587FA1 7900B5BB E98DAF41 D90F34EE
  218119A0 324928F4 C48E56D5 5233FD50 D57E996C 03E4C94C FCCB6CAB 66B34A21
  8CE5B50C 323E10B2 CC6CA1DC 9A984C02 5BF3CEB9 9EA5720E 4AB73F3C E61668F8
  BEED744C BC5BD562 1F43DD
        quit
username anubisg1 privilege 15 secret 5 $1$KPEA$07NxW54D2z9Uh2f0H5SW7/
!
! 
!
!         
!
!
interface Tunnel0
 description IPv6 uplink to Hurricane
 no ip address
 ipv6 address 2001:470:XXXX:XXXX::2/64
 ipv6 enable
 ipv6 mtu 1280
 ipv6 virtual-reassembly
 tunnel source FastEthernet0/0
 tunnel destination 216.66.80.26
 tunnel mode ipv6ip
!
interface FastEthernet0/0
 description Connected to cable modem
 ip ddns update hostname hostname.dyndns.org
 ip ddns update FQDN
 ip ddns update Hurricane
 ip address dhcp client-id FastEthernet0/0
 no ip redirects
 no ip unreachables
 no ip proxy-arp
 ip nat outside
 ip virtual-reassembly
 ip route-cache flow
 duplex auto
 speed auto
 no mop enabled
!
interface FastEthernet0/1
 description Local LAN
 ip address 192.168.0.1 255.255.255.0
 no ip redirects
 no ip unreachables
 no ip proxy-arp
 ip nat inside
 ip virtual-reassembly
 ip route-cache flow
 duplex auto
 speed auto
 ipv6 address 2001:470:XXXX:XXXX::/64 eui-64
 no mop enabled
!
interface Serial0/0/0
 no ip address
 ip route-cache flow
 shutdown
 clock rate 2000000
!
interface Serial0/0/1
 no ip address
 ip route-cache flow
 shutdown
 clock rate 2000000
!
router bgp 1
 bgp router-id 1.1.1.1
 no bgp default ipv4-unicast
 bgp log-neighbor-changes
 neighbor 2001:470:XXX:XXX::2 remote-as 2
 neighbor 2001:470:XXX:XXX::2 description Router in Brindisi
 neighbor 2001:470:XXX:XXX::2 ebgp-multihop 6
 !
 address-family ipv6
 neighbor 2001:470:XXX:XXX::2 activate
 neighbor 2001:470:1F12:57D::2 soft-reconfiguration inbound
 network 2001:470:XXX:XXX::/64
 exit-address-family
!
!
!
ip http server
ip http access-class 1
ip http authentication local
ip nat inside source list 1 interface FastEthernet0/0 overload
!
!
logging trap debugging
access-list 1 permit 192.168.0.0 0.0.0.255
!
!         
ipv6 route ::/0 Tunnel0
!
!
!
!
!
control-plane
!
!
banner motd ^C
                            _
      .::::::::::.        -(_)====u         .::::::::::.
    .::::''''''::::.                      .::::''''''::::.
  .:::'          `::::....          ....::::'          `:::.
 .::'             `:::::::|        |:::::::'             `::.
.::|               |::::::|_ ___ __|::::::|               |::.
`--'               |::::::|_()__()_|::::::|               `--'
 :::               |::-o::|        |::o-::|               :::
 `::.             .|::::::|        |::::::|.             .::'
  `:::.          .::\-----'        `-----/::.          .:::'
    `::::......::::'                      `::::......::::'
      `::::::::::'                          `::::::::::'

       Any access is logged, if Unauthorized it
        will be pursued by law. Leave now if
        you are not Authorized to access this
                     router
^C
!
line con 0
 logging synchronous
 login local
line aux 0
line vty 0 4
 exec-timeout 15 0
 logging synchronous
 login local
 transport input ssh
!
scheduler allocate 20000 1000
ntp clock-period 17178879
ntp server 93.62.184.77
end

ecco qualche show :)

Codice: Seleziona tutto

Gateway#show ipv6 int brief
FastEthernet0/0            [up/up]
    unassigned
FastEthernet0/1            [up/up]
    FE80::217:5AFF:FE0C:ECE7
    2001:470:XXXX:XXXX:217:5AFF:FE0C:ECE7
Serial0/0/0                [administratively down/down]
    unassigned
Serial0/0/1                [administratively down/down]
    unassigned
NVI0                       [up/up]
Tunnel0                    [up/up]
    FE80::217:5AFF:FE0C:ECE6
    2001:470:XXXX:XXXX::2

Gateway#show ipv6 route 
IPv6 Routing Table - 8 entries
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
       U - Per-user Static route
       I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary
       O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
       ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
       D - EIGRP, EX - EIGRP external
S   ::/0 [1/0]
     via ::, Tunnel0
C   2001:470:XXXX:XXXX::/64 [0/0]
     via ::, Tunnel0
L   2001:470:XXXX:XXXX::2/128 [0/0]
     via ::, Tunnel0
C   2001:470:XXXX:XXXX::/64 [0/0]
     via ::, FastEthernet0/1
L   2001:470:XXXX:XXXX:217:5AFF:FE0C:ECE7/128 [0/0]
     via ::, FastEthernet0/1
B   2001:470:XXXX:XXXX::/64 [20/0]
     via 2001:470:1F12:57D::2
L   FE80::/10 [0/0]
     via ::, Null0
L   FF00::/8 [0/0]
     via ::, Null0

Gateway#show ipv6 protocols 
IPv6 Routing Protocol is "connected"
IPv6 Routing Protocol is "static"
IPv6 Routing Protocol is "bgp 1"
  IGP synchronization is disabled
  Redistribution:
    None
  Neighbor(s):
    Address                    FiltIn FiltOut Weight RoutemapIn RoutemapOut
    2001:470:XXX:XXX::2                                       
IPv6 Routing Protocol is "bgp multicast"
  IGP synchronization is disabled
  Redistribution:
    None
  Neighbor(s):
    Address                    FiltIn FiltOut Weight RoutemapIn RoutemapOut
    2001:470:XXX:XXX::2                                       

Gateway#show bgp ipv6 unicast summary 
BGP router identifier 1.1.1.1, local AS number 1
BGP table version is 3, main routing table version 3
2 network entries using 322 bytes of memory
2 path entries using 152 bytes of memory
3/2 BGP path/bestpath attribute entries using 372 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 870 total bytes of memory
BGP activity 2/0 prefixes, 2/0 paths, scan interval 60 secs

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
2001:470:XXX:XXX::2
                4     2     240     240        3    0    0 03:55:35        1



Gateway#ping ipv6.google.com
Translating "ipv6.google.com"...domain server (213.46.172.36) [OK]

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2A00:1450:4001:C01::68, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 48/55/68 ms

secondo me questa configurazione è semplicemente BELLA :mrgreen:
Ultima modifica di anubisg1 il lun 27 feb , 2012 11:45 am, modificato 1 volta in totale.
Cisco CCIE #46985 Immagine
CCNP R&S, CCNA Wireless and Security
paolomat75
Messianic Network master
Messaggi: 2965
Iscritto il: ven 29 gen , 2010 10:25 am
Località: Prov di GE

Bravo. Bisogna fare un po' di pratica. Qualche test l'avevo fatto anch'io ma senza BGP (e poi su simulatore :-( ).

Sul reale comincerò quando arriveranno gli IP6 ;-).

La tua conf comunque me la segno :-D
Non cade foglia che l'inconscio non voglia (S.B.)
Avatar utente
anubisg1
Cisco pathologically enlightened user
Messaggi: 218
Iscritto il: lun 18 ott , 2010 11:05 am
Località: Brno

se vuoi già provare, guarda qua --> http://tunnelbroker.net/

:D
Cisco CCIE #46985 Immagine
CCNP R&S, CCNA Wireless and Security
paolomat75
Messianic Network master
Messaggi: 2965
Iscritto il: ven 29 gen , 2010 10:25 am
Località: Prov di GE

anubisg1 ha scritto:se vuoi già provare, guarda qua --> http://tunnelbroker.net/

:D
Mille grazie :-)
Non cade foglia che l'inconscio non voglia (S.B.)
paolomat75
Messianic Network master
Messaggi: 2965
Iscritto il: ven 29 gen , 2010 10:25 am
Località: Prov di GE

Stasera ho configurato anch'io l'IPV6 e ho aggiunto il DHCP per gli indirizzi. ;-). Grazie per il sito.
Peccato che non ho indirizzi IPV4 statici a casa :-(
Non cade foglia che l'inconscio non voglia (S.B.)
Avatar utente
anubisg1
Cisco pathologically enlightened user
Messaggi: 218
Iscritto il: lun 18 ott , 2010 11:05 am
Località: Brno

paolomat75 ha scritto: Peccato che non ho indirizzi IPV4 statici a casa :-(
e per cosa ti servono? :)
Cisco CCIE #46985 Immagine
CCNP R&S, CCNA Wireless and Security
paolomat75
Messianic Network master
Messaggi: 2965
Iscritto il: ven 29 gen , 2010 10:25 am
Località: Prov di GE

anubisg1 ha scritto:
paolomat75 ha scritto: Peccato che non ho indirizzi IPV4 statici a casa :-(
e per cosa ti servono? :)
Beh siccome per fare il tunnel mi viene chiesto l'IP pubblico, avendolo dinamico, ogni volta dovrò aggiornare sul sito l'IP(non ho provato).
Sbaglio?

Paolo
Non cade foglia che l'inconscio non voglia (S.B.)
Avatar utente
anubisg1
Cisco pathologically enlightened user
Messaggi: 218
Iscritto il: lun 18 ott , 2010 11:05 am
Località: Brno

uomo di poca fede, rileggi il primo post :)

anzi ti quoto solo la parte + importante :P

l'unico problema e' che il certificato di hurricane e' autofirmato, quindi quando scade, va aggiornato a manina della config, importandolo di nuovo
anubisg1 ha scritto:
p.s. per far funzionare il ddns di hurricane tramite https ho dovuto importarne il certificato nella config perchè "auto-firmato"

Codice: Seleziona tutto

ip ddns update method Hurricane
 HTTP
  add https://username:[email protected]/ipv4_end.php?tid=id-numerico-mio-tunnel
 interval maximum 0 1 0 0
!
!
crypto pki trustpoint HURRICANE
 enrollment terminal pem
 revocation-check none
!
!
crypto pki certificate chain HURRICANE
 certificate ca 00F17A2250E699D461
  308203F0 308202D8 A0030201 02020900 F17A2250 E699D461 300D0609 2A864886 
  F70D0101 05050030 819C310B 30090603 55040613 02555331 13301106 03550408 
  130A4361 6C69666F 726E6961 3110300E 06035504 07130746 72656D6F 6E743120 
  301E0603 55040A13 17487572 72696361 6E652045 6C656374 7269632C 204C4C43 
  310D300B 06035504 0B130449 50763631 19301706 03550403 13107475 6E6E656C 
  62726F6B 65722E6E 6574311A 30180609 2A864886 F70D0109 01160B69 70763640 
  68652E6E 6574301E 170D3131 30343232 31373432 32305A17 0D323130 34313931 
  37343232 305A3081 9C310B30 09060355 04061302 55533113 30110603 55040813 
  0A43616C 69666F72 6E696131 10300E06 03550407 13074672 656D6F6E 74312030 
  1E060355 040A1317 48757272 6963616E 6520456C 65637472 69632C20 4C4C4331 
  0D300B06 0355040B 13044950 76363119 30170603 55040313 1074756E 6E656C62 
  726F6B65 722E6E65 74311A30 1806092A 864886F7 0D010901 160B6970 76364068 
  652E6E65 74308201 22300D06 092A8648 86F70D01 01010500 0382010F 00308201 
  0A028201 0100DEE6 7CDAF334 3F0224FE C9273899 96262CC7 08ADC537 ABA644C0 
  8639BC78 36721CC2 24608F40 8C2D0627 B1499EC2 58BF3F1A 374F5ACE 83A02BAD 
  0D2E9594 619A4612 5DD29A54 381DEE64 B72A9DF6 34FDDE34 5A94459B 8F72015D 
  DF9A1420 EF8E0129 4CF6F95D B7137B4F 9F8517AB 9D3B750D D198D899 A12FD3F8 
  351BB755 115C5643 20999CE2 F8E761F1 90854CE1 6D665B0B B2797CC1 674C548B 
  356368BB 876B5B07 00A66E05 8CF7D5AF EB5D6A78 C612CF1B 30649B5E 8E818ED4 
  AD884CB5 C89DD01B 264BC2E5 1170C32F 0D5D3AFE 173636FF 4C64F51A 20FBD798 
  D712B95B D8DCC262 0F50A209 65667E23 B787B6F9 1262160B E6693BD2 F7324EBF 
  8FF32059 1EA30203 010001A3 33303130 2F060355 1D110428 30268210 74756E6E 
  656C6272 6F6B6572 2E6E6574 82122A2E 74756E6E 656C6272 6F6B6572 2E6E6574 
  300D0609 2A864886 F70D0101 05050003 82010100 5CC1B964 E7B2442C C810F60F 
  B5929BAF 53740A48 811DFFBB 6D5A94A9 F89F12D7 BA4BF79D A5477323 307D5ADB 
  78F380ED F3C7007A 0E011F6C FE2B1D82 944F4FC6 D4D23022 276489E2 BA82E168 
  13F40624 5712EAD3 61DADE16 67A7FD2E 5C0A47DF 56BF9E24 693DDA54 1001D32B 
  932CF690 3D4D0B00 9A129D70 F43625B4 36DF0B6B FC052222 10A56F0F BD955BA1 
  36AFB02F 5BBDECDF E13759C5 9BB7AA55 AAB29F14 7E26287D 0147B9CB CE6E7376 
  EA230AF2 1D1F71A3 7A5C8B77 B954551D CDF03CFA DBAB4ECE 78BF6F31 E96C7DD3 
  74C94122 5DDFEDCE 35C1CA05 1B9CD265 FD66BE0C 8E9D294E 9CD9A5C4 C6E77E7A 
  C8C88C9F 633D4BF1 45AA5991 9BC49607 11770EAC
  quit
!
interface Tunnel0
 tunnel source FastEthernet0/0

!
interface FastEthernet0/0
 ip ddns update Hurricane
!
Cisco CCIE #46985 Immagine
CCNP R&S, CCNA Wireless and Security
paolomat75
Messianic Network master
Messaggi: 2965
Iscritto il: ven 29 gen , 2010 10:25 am
Località: Prov di GE

Ops.... Grazie :-)
Allora implementerò anche quella parte ;-). Immagino che il certificato viene generato sul sito.
Stasera cercherò.

Grazie ancora.

Paolo
Non cade foglia che l'inconscio non voglia (S.B.)
Avatar utente
anubisg1
Cisco pathologically enlightened user
Messaggi: 218
Iscritto il: lun 18 ott , 2010 11:05 am
Località: Brno

Cisco CCIE #46985 Immagine
CCNP R&S, CCNA Wireless and Security
paolomat75
Messianic Network master
Messaggi: 2965
Iscritto il: ven 29 gen , 2010 10:25 am
Località: Prov di GE

Ho provato ma non mi va :-(.
Dove hai preso il certificato? Magari uso un'altro server che ha un'altro certificato.

Grazie
Non cade foglia che l'inconscio non voglia (S.B.)
Avatar utente
anubisg1
Cisco pathologically enlightened user
Messaggi: 218
Iscritto il: lun 18 ott , 2010 11:05 am
Località: Brno

paolomat75 ha scritto:Ho provato ma non mi va :-(.
Dove hai preso il certificato? Magari uso un'altro server che ha un'altro certificato.

Grazie
ho seguito questa guida...

http://www.homeunix7.org/en/unix/dyndns

probabilmente il certificato è cambiato.. non sta andando nemmeno a me.. urgh..

--- edit ---

confermo, l'output del comando openssl è cambiato... molto più lungo....

maledetti certificati autofirmati!!
Cisco CCIE #46985 Immagine
CCNP R&S, CCNA Wireless and Security
paolomat75
Messianic Network master
Messaggi: 2965
Iscritto il: ven 29 gen , 2010 10:25 am
Località: Prov di GE

Ok stasera ci guardo.

Grazie ;-)
Non cade foglia che l'inconscio non voglia (S.B.)
paolomat75
Messianic Network master
Messaggi: 2965
Iscritto il: ven 29 gen , 2010 10:25 am
Località: Prov di GE

Ciao.
Sei riuscito a far funzionare il DDNS? Io ci ho provato, ma in tutti i modi non mi va :-(.
Uff.

Buona giornata
Paolo
Non cade foglia che l'inconscio non voglia (S.B.)
paolomat75
Messianic Network master
Messaggi: 2965
Iscritto il: ven 29 gen , 2010 10:25 am
Località: Prov di GE

Facendo un po' di debug penso di aver capito che non va per questione di timeout della richiesta. Infatti se mando la stringa da browser impiega molto la risposta.

Può essere? Se si come si può aumentare il tempo?

Grazie
Paolo
Non cade foglia che l'inconscio non voglia (S.B.)
Rispondi