MPLSで遊んだ Config等など

MPLSで遊んだときのメモ。
当然GNS3(dynamips)だよ。

ping vrf名称を指定しなきゃならないんだ。

R1#sh ip bgp vpnv4 all
BGP table version is 9, local router ID is 10.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
Route Distinguisher: 100:11 (default for vrf test)
*> 192.168.101.0    0.0.0.0                  0         32768 i
*>i192.168.102.0    10.1.1.2                 0    100      0 i
Route Distinguisher: 200:11 (default for vrf test2)
*> 192.168.201.0    0.0.0.0                  0         32768 i
*>i192.168.202.0    10.1.1.2                 0    100      0 i
R1#
R1#ping vrf test 192.168.102.1 source loopback 100

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.102.1, timeout is 2 seconds:
Packet sent with a source address of 192.168.101.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 324/466/732 ms


●接続構成とIPアドレス&マスク

 R1(Fa1/0)---(Fa0/0)Rv(Fa0/1)---(F1/0)R2
R1#sh ip route connected
     10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
C       10.3.3.0/24 is directly connected, FastEthernet1/0
C       10.1.1.1/32 is directly connected, Loopback0

Rv#sh ip route connected
     10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
C       10.1.1.3/32 is directly connected, Loopback0
C       10.4.4.0/24 is directly connected, FastEthernet0/1
C       10.3.3.0/24 is directly connected, FastEthernet0/0

R2#sh ip route connected
     10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
C       10.1.1.2/32 is directly connected, Loopback0
C       10.4.4.0/24 is directly connected, FastEthernet1/0

●LDPの状態

R1#sh mpls ldp neighbor
    Peer LDP Ident: 10.1.1.3:0; Local LDP Ident 10.1.1.1:0
        TCP connection: 10.1.1.3.16358 - 10.1.1.1.646
        State: Oper; Msgs sent/rcvd: 46/46; Downstream
        Up time: 00:34:27
        LDP discovery sources:
          FastEthernet1/0, Src IP addr: 10.3.3.3
        Addresses bound to peer LDP Ident:
          10.3.3.3        10.1.1.3        10.4.4.3

Rv#sh mpls ldp neighbor
    Peer LDP Ident: 10.1.1.1:0; Local LDP Ident 10.1.1.3:0
        TCP connection: 10.1.1.1.646 - 10.1.1.3.16358
        State: Oper; Msgs sent/rcvd: 46/46; Downstream
        Up time: 00:34:04
        LDP discovery sources:
          FastEthernet0/0, Src IP addr: 10.3.3.1
        Addresses bound to peer LDP Ident:
          10.3.3.1        10.1.1.1
    Peer LDP Ident: 10.1.1.2:0; Local LDP Ident 10.1.1.3:0
        TCP connection: 10.1.1.2.646 - 10.1.1.3.55290
        State: Oper; Msgs sent/rcvd: 46/45; Downstream
        Up time: 00:34:03
        LDP discovery sources:
          FastEthernet0/1, Src IP addr: 10.4.4.2
        Addresses bound to peer LDP Ident:
          10.4.4.2        10.1.1.2

R2#sh mpls ldp neighbor
    Peer LDP Ident: 10.1.1.3:0; Local LDP Ident 10.1.1.2:0
        TCP connection: 10.1.1.3.55290 - 10.1.1.2.646
        State: Oper; Msgs sent/rcvd: 46/47; Downstream
        Up time: 00:34:56
        LDP discovery sources:
          FastEthernet1/0, Src IP addr: 10.4.4.3
        Addresses bound to peer LDP Ident:
          10.3.3.3        10.1.1.3        10.4.4.3

●MP-BGP その1(R1,R2)

R1#sh ip bgp summary
BGP router identifier 10.1.1.1, local AS number 65535
BGP table version is 3, main routing table version 3
2 network entries using 264 bytes of memory
2 path entries using 104 bytes of memory
7/2 BGP path/bestpath attribute entries using 1036 bytes of memory
2 BGP extended community entries using 48 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
Bitfield cache entries: current 1 (at peak 1) using 32 bytes of memory
BGP using 1484 total bytes of memory
BGP activity 6/0 prefixes, 7/1 paths, scan interval 60 secs

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
10.1.1.2        4 65535      43      42        3    0    0 00:36:18        1

R2#sh ip bgp summary
BGP router identifier 10.1.1.2, local AS number 65535
BGP table version is 3, main routing table version 3
2 network entries using 264 bytes of memory
2 path entries using 104 bytes of memory
7/2 BGP path/bestpath attribute entries using 1036 bytes of memory
2 BGP extended community entries using 48 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
Bitfield cache entries: current 1 (at peak 1) using 32 bytes of memory
BGP using 1484 total bytes of memory
BGP activity 6/0 prefixes, 7/1 paths, scan interval 60 secs

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
10.1.1.1        4 65535      43      43        3    0    0 00:37:00        1

●MP-BGP その2(R1,R2)

R1#sh ip bgp all
For address family: VPNv4 Unicast
BGP table version is 9, local router ID is 10.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
Route Distinguisher: 100:11 (default for vrf test)
*> 192.168.101.0    0.0.0.0                  0         32768 i
*>i192.168.102.0    10.1.1.2                 0    100      0 i
Route Distinguisher: 200:11 (default for vrf test2)
*> 192.168.201.0    0.0.0.0                  0         32768 i
*>i192.168.202.0    10.1.1.2                 0    100      0 i

R2#sh ip bgp all
For address family: VPNv4 Unicast
BGP table version is 9, local router ID is 10.1.1.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
Route Distinguisher: 100:11 (default for vrf test)
*>i192.168.101.0    10.1.1.1                 0    100      0 i
*> 192.168.102.0    0.0.0.0                  0         32768 i
Route Distinguisher: 200:11 (default for vrf test2)
*>i192.168.201.0    10.1.1.1                 0    100      0 i
*> 192.168.202.0    0.0.0.0                  0         32768 i

●R1 config

R1#sh run
Building configuration...

Current configuration : 2262 bytes
!
upgrade fpd auto
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R1
!
boot-start-marker
boot-end-marker
!
logging message-counter syslog
!
no aaa new-model
ip source-route
ip cef
!
no ip domain lookup
ip vrf test
 rd 100:11
 route-target export 100:11
 route-target import 100:11
!
ip vrf test2
 rd 200:11
 route-target export 200:11
 route-target import 200:11
!
no ipv6 cef
!
multilink bundle-name authenticated
mpls label protocol ldp
!
archive
 log config
  hidekeys
!
interface Loopback0
 ip address 10.1.1.1 255.255.255.255
!
interface Loopback100
 ip vrf forwarding test
 ip address 192.168.101.1 255.255.255.0
!
interface Loopback200
 ip vrf forwarding test2
 ip address 192.168.201.1 255.255.255.0
!
interface FastEthernet0/0
 ip address 10.2.2.1 255.255.255.0
 shutdown
 duplex full
 mpls label protocol ldp
 mpls ip
!
interface FastEthernet1/0
 ip address 10.3.3.1 255.255.255.0
 duplex full
 speed 100
 mpls label protocol ldp
 mpls ip
!
interface FastEthernet1/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
router bgp 65535
 no synchronization
 bgp log-neighbor-changes
 network 10.2.2.0 mask 255.255.255.0
 network 10.3.3.0 mask 255.255.255.0
 neighbor Internal peer-group
 neighbor Internal remote-as 65535
 neighbor Internal update-source Loopback0
 neighbor Internal next-hop-self
 neighbor Internal soft-reconfiguration inbound
 neighbor 10.1.1.2 peer-group Internal
 no auto-summary
 !
 address-family vpnv4
  neighbor Internal send-community both
  neighbor 10.1.1.2 activate
 exit-address-family
 !
 address-family ipv4 vrf test2
  no synchronization
  network 192.168.201.0
 exit-address-family
 !
 address-family ipv4 vrf test
  no synchronization
  network 192.168.101.0
 exit-address-family
!
ip forward-protocol nd
ip route 10.1.1.2 255.255.255.255 10.3.3.3
ip route 10.1.1.3 255.255.255.255 10.3.3.3
no ip http server
no ip http secure-server
!
logging alarm informational
!
mpls ldp router-id Loopback0 force
!
control-plane
!
gatekeeper
 shutdown
!
!
line con 0
 exec-timeout 0 0
 logging synchronous
 stopbits 1
line aux 0
 stopbits 1
line vty 0 4
 login
!
end

●R2 config

R2#sh run
Building configuration...

Current configuration : 2262 bytes
!
upgrade fpd auto
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R2
!
boot-start-marker
boot-end-marker
!
logging message-counter syslog
!
no aaa new-model
ip source-route
ip cef
!
no ip domain lookup
ip vrf test
 rd 100:11
 route-target export 100:11
 route-target import 100:11
!
ip vrf test2
 rd 200:11
 route-target export 200:11
 route-target import 200:11
!
no ipv6 cef
!
multilink bundle-name authenticated
mpls label protocol ldp
!
archive
 log config
  hidekeys
!
interface Loopback0
 ip address 10.1.1.2 255.255.255.255
!
interface Loopback100
 ip vrf forwarding test
 ip address 192.168.102.1 255.255.255.0
!
interface Loopback200
 ip vrf forwarding test2
 ip address 192.168.202.1 255.255.255.0
!
interface FastEthernet0/0
 ip address 10.2.2.2 255.255.255.0
 shutdown
 duplex half
 mpls label protocol ldp
 mpls ip
!
interface FastEthernet1/0
 ip address 10.4.4.2 255.255.255.0
 duplex full
 speed 100
 mpls label protocol ldp
 mpls ip
!
interface FastEthernet1/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
router bgp 65535
 no synchronization
 bgp log-neighbor-changes
 network 10.2.2.0 mask 255.255.255.0
 network 10.4.4.0 mask 255.255.255.0
 neighbor Internal peer-group
 neighbor Internal remote-as 65535
 neighbor Internal update-source Loopback0
 neighbor Internal next-hop-self
 neighbor Internal soft-reconfiguration inbound
 neighbor 10.1.1.1 peer-group Internal
 no auto-summary
 !
 address-family vpnv4
  neighbor Internal send-community both
  neighbor 10.1.1.1 activate
 exit-address-family
 !
 address-family ipv4 vrf test2
  no synchronization
  network 192.168.202.0
 exit-address-family
 !
 address-family ipv4 vrf test
  no synchronization
  network 192.168.102.0
 exit-address-family
!
ip forward-protocol nd
ip route 10.1.1.1 255.255.255.255 10.4.4.3
ip route 10.1.1.3 255.255.255.255 10.4.4.3
no ip http server
no ip http secure-server
!
logging alarm informational
!
mpls ldp router-id Loopback0 force
!
control-plane
!
gatekeeper
 shutdown
!
!
line con 0
 exec-timeout 0 0
 logging synchronous
 stopbits 1
line aux 0
 stopbits 1
line vty 0 4
 login
!
end

●Rv config

Rv#sh run
Building configuration...

Current configuration : 878 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Rv
!
boot-start-marker
boot-end-marker
!
no aaa new-model
ip subnet-zero
ip cef
!
no ip domain lookup
ip audit po max-events 100
!
interface Loopback0
 ip address 10.1.1.3 255.255.255.255
!
interface FastEthernet0/0
 ip address 10.3.3.3 255.255.255.0
 speed 100
 full-duplex
 mpls label protocol ldp
 tag-switching ip
!
interface FastEthernet0/1
 ip address 10.4.4.3 255.255.255.0
 speed 100
 full-duplex
 mpls label protocol ldp
 tag-switching ip
!
ip classless
ip route 10.1.1.1 255.255.255.255 10.3.3.1
ip route 10.1.1.2 255.255.255.255 10.4.4.2
!
no ip http server
no ip http secure-server
!
line con 0
 exec-timeout 0 0
 logging synchronous
line aux 0
line vty 0 4
 login
!
end

●機種情報&IOS R1,R2

R1#sh ver
Cisco IOS Software, 7200 Software (C7200-ADVENTERPRISEK9-M), Version 12.4(20)T, RELEASE SOFTWARE (fc3)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2008 by Cisco Systems, Inc.
Compiled Fri 11-Jul-08 04:22 by prod_rel_team

ROM: ROMMON Emulation Microcode
BOOTLDR: 7200 Software (C7200-ADVENTERPRISEK9-M), Version 12.4(20)T, RELEASE SOFTWARE (fc3)

R1 uptime is 48 minutes
System returned to ROM by unknown reload cause - suspect boot_data[BOOT_COUNT] 0x0, BOOT_COUNT 0, BOOTDATA 19
System image file is "tftp://255.255.255.255/unknown"


This product contains cryptographic features and is subject to United
States and local country laws governing import, export, transfer and
use. Delivery of Cisco cryptographic products does not imply
third-party authority to import, export, distribute or use encryption.
Importers, exporters, distributors and users are responsible for
compliance with U.S. and local country laws. By using this product you
agree to comply with applicable laws and regulations. If you are unable
to comply with U.S. and local laws, return this product immediately.

A summary of U.S. laws governing Cisco cryptographic products may be found at:
http://www.cisco.com/wwl/export/crypto/tool/stqrg.html

If you require further assistance please contact us by sending email to
export@cisco.com.

Cisco 7206VXR (NPE400) processor (revision A) with 245760K/16384K bytes of memory.
Processor board ID 4294967295
R7000 CPU at 150MHz, Implementation 39, Rev 2.1, 256KB L2 Cache
6 slot VXR midplane, Version 2.1

Last reset from power-on

PCI bus mb0_mb1 (Slots 0, 1, 3 and 5) has a capacity of 600 bandwidth points.
Current configuration on bus mb0_mb1 has a total of 600 bandwidth points.
This configuration is within the PCI bus capacity and is supported.

PCI bus mb2 (Slots 2, 4, 6) has a capacity of 600 bandwidth points.
Current configuration on bus mb2 has a total of 0 bandwidth points
This configuration is within the PCI bus capacity and is supported.

Please refer to the following document "Cisco 7200 Series Port Adaptor
Hardware Configuration Guidelines" on Cisco.com <http://www.cisco.com>
for c7200 bandwidth points oversubscription and usage guidelines.


3 FastEthernet interfaces
125K bytes of NVRAM.

65536K bytes of ATA PCMCIA card at slot 0 (Sector size 512 bytes).
8192K bytes of Flash internal SIMM (Sector size 256K).
Configuration register is 0x2102

●機種情報&IOS Rv

Rv#sh ver
Cisco Internetwork Operating System Software
IOS (tm) 2600 Software (C2691-ADVENTERPRISEK9-M), Version 12.3(17a), RELEASE SOFTWARE (fc2)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2005 by cisco Systems, Inc.
Compiled Mon 12-Dec-05 19:56 by evmiller
Image text-base: 0x60008AF4, data-base: 0x62174000

ROM: ROMMON Emulation Microcode
ROM: 2600 Software (C2691-ADVENTERPRISEK9-M), Version 12.3(17a), RELEASE SOFTWARE (fc2)

Rv uptime is 48 minutes
System returned to ROM by unknown reload cause - suspect boot_data[BOOT_COUNT] 0x0, BOOT_COUNT 0, BOOTDATA 19
System image file is "tftp://255.255.255.255/unknown"


This product contains cryptographic features and is subject to United
States and local country laws governing import, export, transfer and
use. Delivery of Cisco cryptographic products does not imply
third-party authority to import, export, distribute or use encryption.
Importers, exporters, distributors and users are responsible for
compliance with U.S. and local country laws. By using this product you
agree to comply with applicable laws and regulations. If you are unable
to comply with U.S. and local laws, return this product immediately.

A summary of U.S. laws governing Cisco cryptographic products may be found at:
http://www.cisco.com/wwl/export/crypto/tool/stqrg.html

If you require further assistance please contact us by sending email to
export@cisco.com.

cisco 2691 (R7000) processor (revision 0.1) with 121856K/9216K bytes of memory.
Processor board ID XXXXXXXXXXX
R7000 CPU at 80MHz, Implementation 39, Rev 2.1, 256KB L2, 512KB L3 Cache
Bridging software.
X.25 software, Version 3.0.0.
SuperLAT software (copyright 1990 by Meridian Technology Corp).
TN3270 Emulation software.
2 FastEthernet/IEEE 802.3 interface(s)
DRAM configuration is 64 bits wide with parity enabled.
55K bytes of non-volatile configuration memory.
16384K bytes of ATA System CompactFlash (Read/Write)

Configuration register is 0x2102