奇跡の

ccnp失効期限日に、ギリギリ合格。

あと一問落としてたら、ccnaからやりなおしになるところだった....


OSPF over GRE over IPsec





R1#ping 192.168.2.254 repeat 100000

Type escape sequence to abort.
Sending 100000, 100-byte ICMP Echos to 192.168.2.254, timeout is 2 seconds:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!.
Success rate is 99 percent (365/366), round-trip min/avg/max = 68/100/232 ms
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#sho run
R1#sho running-config
Building configuration...

Current configuration : 1662 bytes
!
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
!
!
no aaa new-model
no ip icmp rate-limit unreachable
!
!
ip tcp synwait-time 5
ip cef
no ip domain lookup
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
crypto isakmp policy 1
 authentication pre-share
crypto isakmp key ipsec address 10.0.2.1
!
!
crypto ipsec transform-set IPSEC esp-aes esp-sha-hmac
!
crypto map MAP1 1 ipsec-isakmp
 set peer 10.0.2.1
 set transform-set IPSEC
 match address ACL1
!
!
!
!
interface Tunnel1
 ip address 100.0.0.1 255.255.255.252
 tunnel source GigabitEthernet1/0
 tunnel destination 10.0.2.1
!
interface FastEthernet0/0
 ip address 192.168.1.254 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface GigabitEthernet1/0
 ip address 10.0.1.1 255.255.255.252
 negotiation auto
 crypto map MAP1
!
interface GigabitEthernet2/0
 no ip address
 shutdown
 negotiation auto
!
router ospf 1
 log-adjacency-changes
 network 100.0.0.0 0.0.0.3 area 0
 network 192.168.1.0 0.0.0.255 area 0
!
ip route 0.0.0.0 0.0.0.0 GigabitEthernet1/0
!
no ip http server
no ip http secure-server
!
!
!
ip access-list extended ACL1
 permit gre host 10.0.1.1 host 10.0.2.1
no cdp log mismatch duplex
!
!
!
!
control-plane
!
!
!
!
!
!
gatekeeper
 shutdown
!
!
line con 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
 stopbits 1
line aux 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
 stopbits 1
line vty 0 4
 login
!
!
end

R1#sho cry isa sa
dst             src             state          conn-id slot status
10.0.2.1        10.0.1.1        QM_IDLE              1    0 ACTIVE

R1#sho cry ipsec sa

interface: GigabitEthernet1/0
    Crypto map tag: MAP1, local addr 10.0.1.1

   protected vrf: (none)
   local  ident (addr/mask/prot/port): (10.0.1.1/255.255.255.255/47/0)
   remote ident (addr/mask/prot/port): (10.0.2.1/255.255.255.255/47/0)
   current_peer 10.0.2.1 port 500
     PERMIT, flags={origin_is_acl,}
    #pkts encaps: 454, #pkts encrypt: 454, #pkts digest: 454
    #pkts decaps: 428, #pkts decrypt: 428, #pkts verify: 428
    #pkts compressed: 0, #pkts decompressed: 0
    #pkts not compressed: 0, #pkts compr. failed: 0
    #pkts not decompressed: 0, #pkts decompress failed: 0
    #send errors 16, #recv errors 0

     local crypto endpt.: 10.0.1.1, remote crypto endpt.: 100.0.0.2
     path mtu 1500, ip mtu 1500, ip mtu idb GigabitEthernet1/0
     current outbound spi: 0x0(0)

     inbound esp sas:

     inbound ah sas:

     inbound pcp sas:

     outbound esp sas:

     outbound ah sas:

     outbound pcp sas:

     local crypto endpt.: 10.0.1.1, remote crypto endpt.: 10.0.2.1
     path mtu 1500, ip mtu 1500, ip mtu idb GigabitEthernet1/0
     current outbound spi: 0x4206FCA5(1107754149)

     inbound esp sas:
      spi: 0x283F14B1(675222705)
        transform: esp-aes esp-sha-hmac ,
        in use settings ={Tunnel, }
        conn id: 2001, flow_id: SW:1, crypto map: MAP1
        sa timing: remaining key lifetime (k/sec): (4569184/3013)
        IV size: 16 bytes
        replay detection support: Y
        Status: ACTIVE

     inbound ah sas:

     inbound pcp sas:

     outbound esp sas:
      spi: 0x4206FCA5(1107754149)
        transform: esp-aes esp-sha-hmac ,
        in use settings ={Tunnel, }
        conn id: 2002, flow_id: SW:2, crypto map: MAP1
        sa timing: remaining key lifetime (k/sec): (4569180/3013)
        IV size: 16 bytes
        replay detection support: Y
        Status: ACTIVE

     outbound ah sas:

     outbound pcp sas:
R1#sho ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is 0.0.0.0 to network 0.0.0.0

     100.0.0.0/30 is subnetted, 1 subnets
C       100.0.0.0 is directly connected, Tunnel1
     10.0.0.0/30 is subnetted, 1 subnets
C       10.0.1.0 is directly connected, GigabitEthernet1/0
C    192.168.1.0/24 is directly connected, FastEthernet0/0
O    192.168.2.0/24 [110/11112] via 100.0.0.2, 00:01:19, Tunnel1
S*   0.0.0.0/0 is directly connected, GigabitEthernet1/0
R1#

R1#sho ip os neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface
192.168.2.254     0   FULL/  -        00:00:36    100.0.0.2       Tunnel1
R1#




R1#show ip os interface
Tunnel1 is up, line protocol is up
  Internet Address 100.0.0.1/30, Area 0
  Process ID 1, Router ID 192.168.1.254, Network Type POINT_TO_POINT, Cost: 11111
  Transmit Delay is 1 sec, State POINT_TO_POINT,
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    oob-resync timeout 40
    Hello due in 00:00:00
  Supports Link-local Signaling (LLS)
  Index 3/3, flood queue length 0
  Next 0x0(0)/0x0(0)
  Last flood scan length is 1, maximum is 1
  Last flood scan time is 0 msec, maximum is 4 msec
  Neighbor Count is 1, Adjacent neighbor count is 1
    Adjacent with neighbor 192.168.2.254
  Suppress hello for 0 neighbor(s)
FastEthernet0/0 is up, line protocol is up
  Internet Address 192.168.1.254/24, Area 0
  Process ID 1, Router ID 192.168.1.254, Network Type BROADCAST, Cost: 1
  Transmit Delay is 1 sec, State DR, Priority 1
  Designated Router (ID) 192.168.1.254, Interface address 192.168.1.254
  No backup designated router on this network
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    oob-resync timeout 40
    Hello due in 00:00:08
  Supports Link-local Signaling (LLS)
  Index 1/1, flood queue length 0
  Next 0x0(0)/0x0(0)
  Last flood scan length is 0, maximum is 0
  Last flood scan time is 0 msec, maximum is 0 msec
  Neighbor Count is 0, Adjacent neighbor count is 0
  Suppress hello for 0 neighbor(s)
R1#



Netwrk Typeは POINT_TO_POINTになる。

DR/BDRは存在しない。

peerは自動で見つかる。


















R3#sho running-config
Building configuration...

Current configuration : 1664 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R3
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
no ip icmp rate-limit unreachable
!
!
ip tcp synwait-time 5
ip cef
no ip domain lookup
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
crypto isakmp policy 1
 authentication pre-share
crypto isakmp key ipsec address 10.0.1.1
!
!
crypto ipsec transform-set IPSEC esp-aes esp-sha-hmac
!
crypto map MAP1 1 ipsec-isakmp
 set peer 10.0.1.1
 set transform-set IPSEC
 match address ACL1
!
!
!
!
interface Tunnel1
 ip address 100.0.0.2 255.255.255.252
 tunnel source GigabitEthernet2/0
 tunnel destination 10.0.1.1
!
interface FastEthernet0/0
 ip address 192.168.2.254 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface GigabitEthernet1/0
 no ip address
 shutdown
 negotiation auto
!
interface GigabitEthernet2/0
 ip address 10.0.2.1 255.255.255.252
 negotiation auto
 crypto map MAP1
!
router ospf 1
 log-adjacency-changes
 network 100.0.0.0 0.0.0.255 area 0
 network 192.168.2.0 0.0.0.255 area 0
!
ip route 0.0.0.0 0.0.0.0 GigabitEthernet2/0
!
no ip http server
no ip http secure-server
!
!
!
ip access-list extended ACL1
 permit gre host 10.0.2.1 host 10.0.1.1
no cdp log mismatch duplex
!
!
!
!
control-plane
!
!
!
!
!
!
gatekeeper
 shutdown
!
!
line con 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
 stopbits 1
line aux 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
 stopbits 1
line vty 0 4
 login
!
!
end

R3#sho cry isa sa
dst             src             state          conn-id slot status
10.0.2.1        10.0.1.1        QM_IDLE              1    0 ACTIVE

R3#sho cry ipsec sa

interface: GigabitEthernet2/0
    Crypto map tag: MAP1, local addr 10.0.2.1

   protected vrf: (none)
   local  ident (addr/mask/prot/port): (10.0.2.1/255.255.255.255/47/0)
   remote ident (addr/mask/prot/port): (10.0.1.1/255.255.255.255/47/0)
   current_peer 10.0.1.1 port 500
     PERMIT, flags={origin_is_acl,}
    #pkts encaps: 428, #pkts encrypt: 428, #pkts digest: 428
    #pkts decaps: 454, #pkts decrypt: 454, #pkts verify: 454
    #pkts compressed: 0, #pkts decompressed: 0
    #pkts not compressed: 0, #pkts compr. failed: 0
    #pkts not decompressed: 0, #pkts decompress failed: 0
    #send errors 0, #recv errors 0

     local crypto endpt.: 10.0.2.1, remote crypto endpt.: 100.0.0.1
     path mtu 1500, ip mtu 1500, ip mtu idb GigabitEthernet2/0
     current outbound spi: 0x0(0)

     inbound esp sas:

     inbound ah sas:

     inbound pcp sas:

     outbound esp sas:

     outbound ah sas:

     outbound pcp sas:

     local crypto endpt.: 10.0.2.1, remote crypto endpt.: 10.0.1.1
     path mtu 1500, ip mtu 1500, ip mtu idb GigabitEthernet2/0
     current outbound spi: 0x283F14B1(675222705)

     inbound esp sas:
      spi: 0x4206FCA5(1107754149)
        transform: esp-aes esp-sha-hmac ,
        in use settings ={Tunnel, }
        conn id: 2001, flow_id: SW:1, crypto map: MAP1
        sa timing: remaining key lifetime (k/sec): (4550791/3020)
        IV size: 16 bytes
        replay detection support: Y
        Status: ACTIVE

     inbound ah sas:

     inbound pcp sas:

     outbound esp sas:
      spi: 0x283F14B1(675222705)
        transform: esp-aes esp-sha-hmac ,
        in use settings ={Tunnel, }
        conn id: 2002, flow_id: SW:2, crypto map: MAP1
        sa timing: remaining key lifetime (k/sec): (4550795/3020)
        IV size: 16 bytes
        replay detection support: Y
        Status: ACTIVE

     outbound ah sas:

     outbound pcp sas:
R3#sho ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is 0.0.0.0 to network 0.0.0.0

     100.0.0.0/30 is subnetted, 1 subnets
C       100.0.0.0 is directly connected, Tunnel1
     10.0.0.0/30 is subnetted, 1 subnets
C       10.0.2.0 is directly connected, GigabitEthernet2/0
O    192.168.1.0/24 [110/11112] via 100.0.0.1, 00:01:26, Tunnel1
C    192.168.2.0/24 is directly connected, FastEthernet0/0
S*   0.0.0.0/0 is directly connected, GigabitEthernet2/0
R3#

R3#sho ip os neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface
192.168.1.254     0   FULL/  -        00:00:36    100.0.0.1       Tunnel1
R3#



IPv6アドレス

interface GigabitEthernet2/0
 ip address 100.0.2.1 255.255.255.252
 negotiation auto
 ipv6 address autoconfig
!






R2#sho ipv6 interface
GigabitEthernet2/0 is up, line protocol is up
  IPv6 is enabled, link-local address is FE80::C802:10FF:FEDC:38
  No global unicast address is configured
  Joined group address(es):
    FF02::1
    FF02::2
    FF02::1:FFDC:38
  MTU is 1500 bytes
  ICMP error messages limited to one every 100 milliseconds
  ICMP redirects are enabled
  ND DAD is enabled, number of DAD attempts: 1
  ND reachable time is 30000 milliseconds
  ND advertised reachable time is 0 milliseconds
  ND advertised retransmit interval is 0 milliseconds
  ND router advertisements are sent every 200 seconds
  ND router advertisements live for 1800 seconds
  Hosts use stateless autoconfig for addresses.



FE80で始まっているのが、自動的に設定されたIPv6アドレスか。



R2#sho interfaces gigabitEthernet 2/0
GigabitEthernet2/0 is up, line protocol is up
  Hardware is 82543, address is ca02.10dc.0038 (bia ca02.10dc.0038)
  Internet address is 100.0.2.1/30
  MTU 1500 bytes, BW 1000000 Kbit, DLY 10 usec,
     reliability 255/255, txload 1/255, rxload 1/255
  Encapsulation ARPA, loopback not set
  Keepalive set (10 sec)
  Full-duplex, 1000Mb/s, link type is autonegotiation, media type is SX
  output flow-control is unsupported, input flow-control is unsupported
  ARP type: ARPA, ARP Timeout 04:00:00
  Last input 00:00:01, output 00:00:01, output hang never
  Last clearing of "show interface" counters never
  Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
  Queueing strategy: fifo
  Output queue: 0/40 (size/max)
  5 minute input rate 0 bits/sec, 0 packets/sec
  5 minute output rate 0 bits/sec, 0 packets/sec
     2265 packets input, 221225 bytes, 0 no buffer
     Received 1254 broadcasts, 0 runts, 0 giants, 0 throttles
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
     0 watchdog, 0 multicast, 0 pause input
     0 input packets with dribble condition detected
     2292 packets output, 224989 bytes, 0 underruns
     0 output errors, 0 collisions, 1 interface resets
     0 babbles, 0 late collision, 0 deferred
     0 lost carrier, 0 no carrier, 0 pause output
     0 output buffer failures, 0 output buffers swapped out
R2#


show interfaceでみると、 mac address は ca02.10dc.0038

EUI-64方式のアドレス決定方式に当てはめてみる。

二つにわけて、間にFFFEをはさむ

ca0210 fffe dc0038

先頭から7ビット目を反転する

c → 00001100 → 00001110 → e

ea0210fffedc0038

あれ、違う

ca → 11001010 → 11001000 → c8

c802... あってる。






R2#ping ipv6 fe80::c803:aff:fedc:38
Output Interface: gigabitethernet2/0
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to FE80::C803:AFF:FEDC:38, timeout is 2 seconds:
Packet sent with a source address of FE80::C802:10FF:FEDC:38
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 32/246/1104 ms
R2#



なんでpingのときにインターフェイスを指定させられるんだろう?


今のはlink local addressだった。


prefixを指定して、global unicastアドレスを自動設定することもできる。



R2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R2(config)#interface gigabitEthernet 1/0
R2(config-if)#ipv6 address ?
  WORD                General prefix name
  X:X:X:X::X          IPv6 link-local address
  X:X:X:X::X/<0-128>  IPv6 prefix
  autoconfig          Obtain address using autoconfiguration

R2(config-if)#ipv6 address 1234::/48 ?
  anycast  Configure as an anycast
  eui-64   Use eui-64 interface identifier
  <cr>

R2(config-if)#ipv6 address 1234::/48 eui-64
R2(config-if)#end


R2#sho ipv6 interface
GigabitEthernet1/0 is up, line protocol is up
  IPv6 is enabled, link-local address is FE80::C802:10FF:FEDC:1C
  Global unicast address(es):
    2002::, subnet is 2002::/64
    2002::C802:10FF:FEDC:1C, subnet is 2002::/64 [EUI]
  Joined group address(es):
    FF02::1
    FF02::2
    FF02::1:FF00:0
    FF02::1:FFDC:1C
  MTU is 1500 bytes
  ICMP error messages limited to one every 100 milliseconds
  ICMP redirects are enabled
  ND DAD is enabled, number of DAD attempts: 1
  ND reachable time is 30000 milliseconds
  ND advertised reachable time is 0 milliseconds
  ND advertised retransmit interval is 0 milliseconds
  ND router advertisements are sent every 200 seconds
  ND router advertisements live for 1800 seconds
  Hosts use stateless autoconfig for addresses.




経路集約について

10.0.0.0/24
10.0.1.0/24
10.0.2.0/24
10.0.3.0/24

このような経路があったときは、10.0.0.0/22 で集約できる。

集約前と集約後のIPアドレスの範囲は一致する。



では、次のような場合はどうしたらよいか?

10.0.1.0/24
10.0.2.0/24
10.0.3.0/24
10.0.4.0/24
10.0.5.0/24
10.0.6.0/24
10.0.7.0/24
10.0.8.0/24
10.0.9.0/24


一番簡単なのは、上記のサブネットを含む集約アドレスにすることである。

この場合なら、10.0.0.0/20 となる。

しかし、そうすると、10.0.0.0~10.0.0.255、10.0.10.0~10.0.15.255 という
かなり広いムダな領域を含んでしまうことになる。


では逆に、まったく無駄な領域を含まないように、
複数の集約アドレスを設定してみよう。

10.0.1.0/24
10.0.2.0/23
10.0.4.0/22
10.0.8.0/23


でも、今度は集約の効果があまりなく、
集約されている範囲がどこなのかもパっとはわからない。

そこで間をとって、


10.0.0.0/21
10.0.8.0/23


とするのがいいんじゃないだろうか。

10.0.0.0/24が、余計な領域とはなるが。



EIGRPの集約

前回OSPFのsummary addressコマンドで集約をおこなったが、
そもそもその経路はEIGRPルータから広報されている経路であった。

前回は自社ではOSPFルータしか設定できないという前提であったが、
EIGRPルータで集約する場合を考えてみよう。



R4

R4#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R4(config)#interface gigabitEthernet 2/0
R4(config-if)#ip summary-address eigrp 1 ?
  A.B.C.D  IP address

R4(config-if)#ip summary-address eigrp 1 10.0.0.0 ?
  A.B.C.D  IP network mask

R4(config-if)#ip summary-address eigrp 1 10.0.0.0 255.255.248.0
R4(config-if)#end
R4#
*Feb 11 14:33:39.611: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 20.0.1.254 (GigabitEthernet2/0) is resync: summary configured
*Feb 11 14:33:40.263: %SYS-5-CONFIG_I: Configured from console by console
R4#
R4#sho ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     4.0.0.0/32 is subnetted, 1 subnets
C       4.4.4.4 is directly connected, Loopback0
     20.0.0.0/24 is subnetted, 1 subnets
C       20.0.1.0 is directly connected, GigabitEthernet2/0
     10.0.0.0/8 is variably subnetted, 6 subnets, 2 masks
S       10.0.2.0/24 is directly connected, Loopback0
S       10.0.3.0/24 is directly connected, Loopback0
D       10.0.0.0/21 is a summary, 00:00:07, Null0
S       10.0.1.0/24 is directly connected, Loopback0
S       10.0.4.0/24 is directly connected, Loopback0
S       10.0.5.0/24 is directly connected, Loopback0




R1

R1#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     1.0.0.0/32 is subnetted, 1 subnets
C       1.1.1.1 is directly connected, Loopback0
     100.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C       100.0.1.0/30 is directly connected, GigabitEthernet1/0
O IA    100.0.2.0/26 [110/2] via 100.0.1.2, 00:34:54, GigabitEthernet1/0
     20.0.0.0/24 is subnetted, 1 subnets
C       20.0.1.0 is directly connected, GigabitEthernet2/0
     10.0.0.0/21 is subnetted, 1 subnets
D       10.0.0.0 [90/51456] via 20.0.1.1, 00:00:16, GigabitEthernet2/0
R1#


ちなみに、R1もR4も、auto-summaryの設定はデフォルトのまま、つまり有効であったのだが、
10.0.x.0/24 は 10.0.0.0/8 に集約されていなかった。

どうも、再配送された経路は集約されないみたいだ・・・。

なんでかな・・・。



OSPFの集約


R1のルーティングテーブル

R1#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     1.0.0.0/32 is subnetted, 1 subnets
C       1.1.1.1 is directly connected, Loopback0
     100.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
O IA    100.0.2.33/32 [110/3] via 100.0.1.2, 00:09:07, GigabitEthernet1/0
C       100.0.1.0/30 is directly connected, GigabitEthernet1/0
O IA    100.0.2.0/30 [110/2] via 100.0.1.2, 00:32:16, GigabitEthernet1/0
O IA    100.0.2.22/32 [110/2] via 100.0.1.2, 00:01:59, GigabitEthernet1/0
     20.0.0.0/24 is subnetted, 1 subnets
C       20.0.1.0 is directly connected, GigabitEthernet2/0
     10.0.0.0/24 is subnetted, 5 subnets
D EX    10.0.2.0 [170/51456] via 20.0.1.1, 00:17:56, GigabitEthernet2/0
D EX    10.0.3.0 [170/51456] via 20.0.1.1, 00:17:56, GigabitEthernet2/0
D EX    10.0.1.0 [170/51456] via 20.0.1.1, 00:17:56, GigabitEthernet2/0
D EX    10.0.4.0 [170/51456] via 20.0.1.1, 00:17:29, GigabitEthernet2/0
D EX    10.0.5.0 [170/51456] via 20.0.1.1, 00:17:25, GigabitEthernet2/0
R1#


R1はEIGRP/OSPF間のASBRで、OSPFエリア1に所属しているので、
OSPFのエリア外経路とEIGRPの経路を学習している。

R2#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     100.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
O       100.0.2.33/32 [110/2] via 100.0.2.2, 00:05:41, GigabitEthernet2/0
C       100.0.1.0/30 is directly connected, GigabitEthernet1/0
C       100.0.2.0/30 is directly connected, GigabitEthernet2/0
C       100.0.2.22/32 is directly connected, Loopback0
     20.0.0.0/24 is subnetted, 1 subnets
O E2    20.0.1.0 [110/20] via 100.0.1.1, 00:05:41, GigabitEthernet1/0
     10.0.0.0/24 is subnetted, 5 subnets
O E2    10.0.2.0 [110/20] via 100.0.1.1, 00:05:41, GigabitEthernet1/0
O E2    10.0.3.0 [110/20] via 100.0.1.1, 00:05:41, GigabitEthernet1/0
O E2    10.0.1.0 [110/20] via 100.0.1.1, 00:05:41, GigabitEthernet1/0
O E2    10.0.4.0 [110/20] via 100.0.1.1, 00:05:41, GigabitEthernet1/0
O E2    10.0.5.0 [110/20] via 100.0.1.1, 00:05:41, GigabitEthernet1/0
R2#

R2は、OSPFのABR(area 0 と area 1)
R1がeigrpからredistributeしたOSPF外部経路を学習している。



R3#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     100.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
C       100.0.2.33/32 is directly connected, Loopback0
O IA    100.0.1.0/30 [110/2] via 100.0.2.1, 00:05:19, GigabitEthernet2/0
C       100.0.2.0/30 is directly connected, GigabitEthernet2/0
O       100.0.2.22/32 [110/2] via 100.0.2.1, 00:05:19, GigabitEthernet2/0
     20.0.0.0/24 is subnetted, 1 subnets
O E2    20.0.1.0 [110/20] via 100.0.2.1, 00:05:19, GigabitEthernet2/0
     10.0.0.0/24 is subnetted, 5 subnets
O E2    10.0.2.0 [110/20] via 100.0.2.1, 00:05:19, GigabitEthernet2/0
O E2    10.0.3.0 [110/20] via 100.0.2.1, 00:05:19, GigabitEthernet2/0
O E2    10.0.1.0 [110/20] via 100.0.2.1, 00:05:19, GigabitEthernet2/0
O E2    10.0.4.0 [110/20] via 100.0.2.1, 00:05:19, GigabitEthernet2/0
O E2    10.0.5.0 [110/20] via 100.0.2.1, 00:05:19, GigabitEthernet2/0
R3#


R3は、OSPFのarea 0にのみ所属している。
area 1から、100.0.1.0/30 を学習している。
R1のredistributeした経路も、E2として学習している。


R4#
R4#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     4.0.0.0/32 is subnetted, 1 subnets
C       4.4.4.4 is directly connected, Loopback0
     20.0.0.0/24 is subnetted, 1 subnets
C       20.0.1.0 is directly connected, GigabitEthernet2/0
     10.0.0.0/24 is subnetted, 5 subnets
S       10.0.2.0 is directly connected, Loopback0
S       10.0.3.0 is directly connected, Loopback0
S       10.0.1.0 is directly connected, Loopback0
S       10.0.4.0 is directly connected, Loopback0
S       10.0.5.0 is directly connected, Loopback0
R4#



R4はEIGRPのルータ。

router eigrp 1
 redistribute static metric 100000 100 255 1 1500
 network 20.0.1.0 0.0.0.255
 auto-summary
!
ip route 10.0.1.0 255.255.255.0 Loopback0
ip route 10.0.2.0 255.255.255.0 Loopback0
ip route 10.0.3.0 255.255.255.0 Loopback0
ip route 10.0.4.0 255.255.255.0 Loopback0
ip route 10.0.5.0 255.255.255.0 Loopback0


static routeをredistributeして、R1が学習している。



この、EIGRPから来ている5本の経路が、まず集約できそうだ。


今回考えるケースでは、EIGRPルータの管理は他社が実施していて、
自分で設定変更できるのはOSPFルータだけだとする。

まず、EIGRPから来ている経路を集約する。


R1で

router ospf 1
 log-adjacency-changes
 summary-address 10.0.0.0 255.255.248.0
 redistribute eigrp 1 subnets
 network 100.0.1.0 0.0.0.3 area 1
!
!

10.0.0.0 ~ 10.0.7.255 までを集約した。
(この集約方法でよいかは改めて考える)


集約後の各ルータのルーティングテーブル


R1#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     1.0.0.0/32 is subnetted, 1 subnets
C       1.1.1.1 is directly connected, Loopback0
     100.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
O IA    100.0.2.33/32 [110/3] via 100.0.1.2, 00:27:58, GigabitEthernet1/0
C       100.0.1.0/30 is directly connected, GigabitEthernet1/0
O IA    100.0.2.0/30 [110/2] via 100.0.1.2, 00:51:07, GigabitEthernet1/0
O IA    100.0.2.22/32 [110/2] via 100.0.1.2, 00:20:50, GigabitEthernet1/0
     20.0.0.0/24 is subnetted, 1 subnets
C       20.0.1.0 is directly connected, GigabitEthernet2/0
     10.0.0.0/8 is variably subnetted, 6 subnets, 2 masks
D EX    10.0.2.0/24 [170/51456] via 20.0.1.1, 00:36:47, GigabitEthernet2/0
D EX    10.0.3.0/24 [170/51456] via 20.0.1.1, 00:36:47, GigabitEthernet2/0
O       10.0.0.0/21 is a summary, 00:02:01, Null0
D EX    10.0.1.0/24 [170/51456] via 20.0.1.1, 00:36:47, GigabitEthernet2/0
D EX    10.0.4.0/24 [170/51456] via 20.0.1.1, 00:36:20, GigabitEthernet2/0
D EX    10.0.5.0/24 [170/51456] via 20.0.1.1, 00:36:16, GigabitEthernet2/0
R1#


R2#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     100.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
O       100.0.2.33/32 [110/2] via 100.0.2.2, 00:21:03, GigabitEthernet2/0
C       100.0.1.0/30 is directly connected, GigabitEthernet1/0
C       100.0.2.0/30 is directly connected, GigabitEthernet2/0
C       100.0.2.22/32 is directly connected, Loopback0
     20.0.0.0/24 is subnetted, 1 subnets
O E2    20.0.1.0 [110/20] via 100.0.1.1, 00:21:03, GigabitEthernet1/0
     10.0.0.0/21 is subnetted, 1 subnets
O E2    10.0.0.0 [110/20] via 100.0.1.1, 00:02:14, GigabitEthernet1/0
R2#



R3#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     100.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
C       100.0.2.33/32 is directly connected, Loopback0
O IA    100.0.1.0/30 [110/2] via 100.0.2.1, 00:21:11, GigabitEthernet2/0
C       100.0.2.0/30 is directly connected, GigabitEthernet2/0
O       100.0.2.22/32 [110/2] via 100.0.2.1, 00:21:11, GigabitEthernet2/0
     20.0.0.0/24 is subnetted, 1 subnets
O E2    20.0.1.0 [110/20] via 100.0.2.1, 00:21:11, GigabitEthernet2/0
     10.0.0.0/21 is subnetted, 1 subnets
O E2    10.0.0.0 [110/20] via 100.0.2.1, 00:02:25, GigabitEthernet2/0
R3#



R4は変化がないので省略




次に、area 0からarea 1に来ている3つの経路を集約する。

O IA    100.0.2.33/32 [110/3] via 100.0.1.2, 00:09:07, GigabitEthernet1/0
O IA    100.0.2.0/30 [110/2] via 100.0.1.2, 00:32:16, GigabitEthernet1/0
O IA    100.0.2.22/32 [110/2] via 100.0.1.2, 00:01:59, GigabitEthernet1/0

この集約はR2でおこなう。


router ospf 1
 log-adjacency-changes
 area 0 range 100.0.2.0 255.255.255.192
 network 100.0.1.0 0.0.0.3 area 1
 network 100.0.2.0 0.0.0.3 area 0
 network 100.0.2.22 0.0.0.0 area 0




R1#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     1.0.0.0/32 is subnetted, 1 subnets
C       1.1.1.1 is directly connected, Loopback0
     100.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C       100.0.1.0/30 is directly connected, GigabitEthernet1/0
O IA    100.0.2.0/26 [110/2] via 100.0.1.2, 00:00:33, GigabitEthernet1/0
     20.0.0.0/24 is subnetted, 1 subnets
C       20.0.1.0 is directly connected, GigabitEthernet2/0
     10.0.0.0/8 is variably subnetted, 6 subnets, 2 masks
D EX    10.0.2.0/24 [170/51456] via 20.0.1.1, 00:42:54, GigabitEthernet2/0
D EX    10.0.3.0/24 [170/51456] via 20.0.1.1, 00:42:54, GigabitEthernet2/0
O       10.0.0.0/21 is a summary, 00:08:09, Null0
D EX    10.0.1.0/24 [170/51456] via 20.0.1.1, 00:42:54, GigabitEthernet2/0
D EX    10.0.4.0/24 [170/51456] via 20.0.1.1, 00:42:27, GigabitEthernet2/0
D EX    10.0.5.0/24 [170/51456] via 20.0.1.1, 00:42:23, GigabitEthernet2/0
R1#



R1#ping 100.0.2.22

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 100.0.2.22, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/29/48 ms
R1#ping 100.0.2.33

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 100.0.2.33, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 60/80/140 ms
R1#
R1#
R1#ping 100.0.2.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 100.0.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 60/87/124 ms
R1#ping 100.0.2.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 100.0.2.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 32/52/124 ms
R1#



R2のルーティングテーブルに、Null0あての集約経路が登録される。

R2#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     100.0.0.0/8 is variably subnetted, 5 subnets, 3 masks
O       100.0.2.33/32 [110/2] via 100.0.2.2, 00:01:04, GigabitEthernet2/0
C       100.0.1.0/30 is directly connected, GigabitEthernet1/0
C       100.0.2.0/30 is directly connected, GigabitEthernet2/0
O       100.0.2.0/26 is a summary, 00:01:04, Null0
C       100.0.2.22/32 is directly connected, Loopback0
     20.0.0.0/24 is subnetted, 1 subnets
O E2    20.0.1.0 [110/20] via 100.0.1.1, 00:01:04, GigabitEthernet1/0
     10.0.0.0/21 is subnetted, 1 subnets
O E2    10.0.0.0 [110/20] via 100.0.1.1, 00:01:04, GigabitEthernet1/0
R2#


R3, R4は変化なし









distance eigrp

R1から、R5のloopback 200.0.0.1へアクセスしたい。

R2とR3で、ospfとeigrpの相互redistributeをすればよい。


<R2>
router eigrp 1
 redistribute ospf 1 metric 1544 2000 255 1 1500
 network 10.1.0.0 0.0.0.255
 network 100.0.0.0 0.0.0.255
 auto-summary
!
router ospf 1
 log-adjacency-changes
 redistribute eigrp 1 subnets

<R3>
router eigrp 1
 redistribute ospf 1 metric 1000000 1 255 1 1500
 network 10.1.0.0 0.0.0.255
 auto-summary
!
router ospf 1
 log-adjacency-changes
 redistribute eigrp 1 subnets
 network 30.0.0.0 0.0.0.255 area 0
!
!

R1#ping 200.0.0.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 200.0.0.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 60/78/92 ms
R1#

pingは通るようになった。しかし、tracerouteしてみると、
低速なシリアルI/Fを経由してしまっている。

R1#traceroute 200.0.0.1

Type escape sequence to abort.
Tracing the route to 200.0.0.1

  1 100.0.0.254 36 msec 60 msec 64 msec
  2 20.0.0.2 60 msec 64 msec 64 msec
  3 40.0.0.2 120 msec 92 msec 92 msec
R1#

R2のルーティングテーブルを見てみる。

R2#sho ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     100.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C       100.0.0.0/24 is directly connected, FastEthernet0/0
D       100.0.0.0/8 is a summary, 00:00:10, Null0
     200.0.0.0/32 is subnetted, 1 subnets
O       200.0.0.1 [110/66] via 20.0.0.2, 00:00:12, Serial3/0
     20.0.0.0/24 is subnetted, 1 subnets
C       20.0.0.0 is directly connected, Serial3/0
     40.0.0.0/24 is subnetted, 1 subnets
O       40.0.0.0 [110/65] via 20.0.0.2, 00:00:12, Serial3/0
     10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
D       10.0.0.0/8 is a summary, 00:00:10, Null0
C       10.1.0.0/24 is directly connected, GigabitEthernet1/0
     30.0.0.0/24 is subnetted, 1 subnets
O       30.0.0.0 [110/65] via 20.0.0.2, 00:00:13, Serial3/0


R2はOSPFとEIGRPを両方動作させているいわゆるASBRであり、二つのプロトコルから
経路を学習している。
そして、200.0.0.1への経路はOSPFで学習した、next hopが20.0.0.2の経路である。

EIGRPで学習した経路情報を見てみる。

R2#show ip eigrp topology
IP-EIGRP Topology Table for AS(1)/ID(100.0.0.254)

Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
       r - reply Status, s - sia Status

P 10.0.0.0/8, 1 successors, FD is 2816
        via Summary (2816/0), Null0
P 10.1.0.0/24, 1 successors, FD is 2816
        via Connected, GigabitEthernet1/0
P 20.0.0.0/24, 1 successors, FD is 2169856
        via Redistributed (2169856/0)
        via 10.1.0.2 (3072/2816), GigabitEthernet1/0
P 30.0.0.0/24, 1 successors, FD is 2169856
        via Redistributed (2169856/0)
        via 10.1.0.2 (3072/2816), GigabitEthernet1/0
P 40.0.0.0/24, 1 successors, FD is 2169856
        via Redistributed (2169856/0)
        via 10.1.0.2 (3072/2816), GigabitEthernet1/0
P 100.0.0.0/8, 1 successors, FD is 28160
        via Summary (28160/0), Null0
P 100.0.0.0/24, 1 successors, FD is 28160
        via Connected, FastEthernet0/0
        via 10.1.0.2 (3072/2816), GigabitEthernet1/0

Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
       r - reply Status, s - sia Status

P 200.0.0.1/32, 1 successors, FD is 2169856
        via Redistributed (2169856/0)
        via 10.1.0.2 (3072/2816), GigabitEthernet1/0

R2#

EIGRPでも200.0.0.1/32への経路は学習されているが、
ルーティングテーブルに載らない。

これは、ルーティングテーブルに載せる経路を選択するときに最初に比較されるAdministrative Distanceが、
OSPFの経路は110、EIGRPの外部経路は170で、
OSPFの経路が採用されるからである。

そこで、EIGRPの外部経路のdistance値を、110より小さい値に変更する。

R2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R2(config)#router eigrp 1
R2(config-router)#distance ?
  <1-255>  Administrative distance
  eigrp    IP-EIGRP distance

R2(config-router)#distance eigrp ?
  <1-255>  Distance for internal routes

R2(config-router)#distance eigrp 90 ?
  <1-255>  Distance for external routes

R2(config-router)#distance eigrp 90 105
R2(config-router)#end
R2#
*Feb 11 11:25:52.463: %SYS-5-CONFIG_I: Configured from console by console
R2#
R2#
*Feb 11 11:26:01.431: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 10.1.0.2 (GigabitEthernet1/0) is down: route configuration changed
*Feb 11 11:26:01.443: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 100.0.0.1 (FastEthernet0/0) is down: route configuration changed
R2#
*Feb 11 11:26:04.091: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 100.0.0.1 (FastEthernet0/0) is up: new adjacency
*Feb 11 11:26:04.747: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 10.1.0.2 (GigabitEthernet1/0) is up: new adjacency
R2#


すると、EIGRPの二つのneighborが一度ダウンして再度UPする。

変更後のR2のルーティングテーブルを見てみる。

R2#
R2#sho ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     100.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C       100.0.0.0/24 is directly connected, FastEthernet0/0
D       100.0.0.0/8 is a summary, 00:14:28, Null0
     200.0.0.0/32 is subnetted, 1 subnets
D EX    200.0.0.1 [105/3072] via 10.1.0.2, 00:00:13, GigabitEthernet1/0
     20.0.0.0/24 is subnetted, 1 subnets
C       20.0.0.0 is directly connected, Serial3/0
     40.0.0.0/24 is subnetted, 1 subnets
D EX    40.0.0.0 [105/3072] via 10.1.0.2, 00:00:13, GigabitEthernet1/0
     10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
D       10.0.0.0/8 is a summary, 00:00:13, Null0
C       10.1.0.0/24 is directly connected, GigabitEthernet1/0
     30.0.0.0/24 is subnetted, 1 subnets
D EX    30.0.0.0 [105/3072] via 10.1.0.2, 00:00:13, GigabitEthernet1/0
R2#

R2#


200.0.0.1への経路として、D EXつまりEIGRPで学習した外部経路が採用されており、
そのnext hopは 10.1.0.2である。

R1からのtracerouteの結果も変わった。

R1#traceroute 200.0.0.1

Type escape sequence to abort.
Tracing the route to 200.0.0.1

  1 100.0.0.254 44 msec 64 msec 64 msec
  2 10.1.0.2 92 msec 92 msec 64 msec
  3 30.0.0.2 64 msec 124 msec 16 msec
  4 40.0.0.2 116 msec 44 msec 40 msec

R1#



では、EIGRPのdistanceを変更せずに、OSPFのdistanceを大きくしても、
同じことができるのではないか?


R2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R2(config)#router ospf 1
R2(config-router)#distance ?
  <1-255>  Administrative distance
  ospf     OSPF distance

R2(config-router)#distance ospf ?
  external    External type 5 and type 7 routes
  inter-area  Inter-area routes
  intra-area  Intra-area routes

R2(config-router)#distance ospf intra-area 200
R2(config-router)#end
R2#
*Feb 11 11:39:58.407: %SYS-5-CONFIG_I: Configured from console by console
R2#
R2#
R2#
R2#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     100.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C       100.0.0.0/24 is directly connected, FastEthernet0/0
D       100.0.0.0/8 is a summary, 00:28:18, Null0
     200.0.0.0/32 is subnetted, 1 subnets
D EX    200.0.0.1 [170/3072] via 10.1.0.2, 00:00:11, GigabitEthernet1/0
     20.0.0.0/24 is subnetted, 1 subnets
C       20.0.0.0 is directly connected, Serial3/0
     40.0.0.0/24 is subnetted, 1 subnets
D EX    40.0.0.0 [170/3072] via 10.1.0.2, 00:00:11, GigabitEthernet1/0
     10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
D       10.0.0.0/8 is a summary, 00:01:01, Null0
C       10.1.0.0/24 is directly connected, GigabitEthernet1/0
     30.0.0.0/24 is subnetted, 1 subnets


できる・・・。

OSPFのデフォルトのAD値は110で、外部も内部も同じであるが、
変更は external, inter-area, intra-area それぞれでおこなえる・・・というのは
今初めて知った・・・・。