【課題】
iosv-0,1間でネイバーを形成し、互いのLoopbackIFのアドレスのみをLSA Type 5を使って広告しなさい。
なお、エリア番号等の課題で指定されていない値は任意とする。
【初期設定】
iosv-0
iosv-0#sh run
Load for five secs: 6%/0%; one minute: 5%; five minutes: 7%
Time source is hardware calendar, *00:57:43.550 UTC Fri Dec 22 2023
Building configuration…
Current configuration : 3144 bytes
!
! Last configuration change at 00:55:37 UTC Fri Dec 22 2023
!
version 15.9
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname iosv-0
!
boot-start-marker
boot-end-marker
!
!
!
no aaa new-model
!
!
!
mmi polling-interval 60
no mmi auto-configure
no mmi pvc
mmi snmp-timeout 180
!
!
!
!
!
!
!
!
!
!
!
ip cef
no ipv6 cef
!
multilink bundle-name authenticated
!
!
!
!
!
redundancy
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
ip address 10.10.10.10 255.255.255.255
!
interface GigabitEthernet0/0
no ip address
duplex auto
speed auto
media-type rj45
!
interface GigabitEthernet0/0.10
encapsulation dot1Q 10
ip address 192.168.100.10 255.255.255.0
!
interface GigabitEthernet0/1
no ip address
shutdown
duplex auto
speed auto
media-type rj45
!
interface GigabitEthernet0/2
no ip address
shutdown
duplex auto
speed auto
media-type rj45
!
interface GigabitEthernet0/3
no ip address
shutdown
duplex auto
speed auto
media-type rj45
!
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
!
ipv6 ioam timestamp
!
!
!
control-plane
!
banner exec ^C
- IOSv is strictly limited to use for evaluation, demonstration and IOS *
- education. IOSv is provided as-is and is not supported by Cisco’s *
- Technical Advisory Center. Any use or disclosure, in whole or in part, *
- of the IOSv Software or Documentation to any third party for any *
- purposes is expressly prohibited except as otherwise authorized by *
- Cisco in writing. *
****^C
banner incoming ^C
- IOSv is strictly limited to use for evaluation, demonstration and IOS *
- education. IOSv is provided as-is and is not supported by Cisco’s *
- Technical Advisory Center. Any use or disclosure, in whole or in part, *
- of the IOSv Software or Documentation to any third party for any *
- purposes is expressly prohibited except as otherwise authorized by *
- Cisco in writing. *
****^C
banner login ^C
- IOSv is strictly limited to use for evaluation, demonstration and IOS *
- education. IOSv is provided as-is and is not supported by Cisco’s *
- Technical Advisory Center. Any use or disclosure, in whole or in part, *
- of the IOSv Software or Documentation to any third party for any *
- purposes is expressly prohibited except as otherwise authorized by *
- Cisco in writing. *
****^C
!
line con 0
privilege level 15
logging synchronous
exec prompt timestamp
line aux 0
line vty 0 4
login
transport input none
!
no scheduler allocate
!
end
iosv-1
iosv-1#sh run
Load for five secs: 7%/0%; one minute: 7%; five minutes: 8%
Time source is hardware calendar, *00:57:49.682 UTC Fri Dec 22 2023
Building configuration…
Current configuration : 3338 bytes
!
! Last configuration change at 00:57:05 UTC Fri Dec 22 2023
!
version 15.9
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname iosv-1
!
boot-start-marker
boot-end-marker
!
!
!
no aaa new-model
!
!
!
mmi polling-interval 60
no mmi auto-configure
no mmi pvc
mmi snmp-timeout 180
!
!
!
!
!
!
!
!
!
!
!
ip cef
no ipv6 cef
!
multilink bundle-name authenticated
!
!
!
!
!
redundancy
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
ip address 1.1.1.1 255.255.255.255
!
interface GigabitEthernet0/0
no ip address
duplex auto
speed auto
media-type rj45
!
interface GigabitEthernet0/0.10
encapsulation dot1Q 10
ip address 192.168.100.1 255.255.255.0
!
interface GigabitEthernet0/0.123
encapsulation dot1Q 123
ip address 192.168.200.1 255.255.255.0
!
interface GigabitEthernet0/0.145
encapsulation dot1Q 145
ip address 172.16.100.1 255.255.255.0
!
interface GigabitEthernet0/1
no ip address
shutdown
duplex auto
speed auto
media-type rj45
!
interface GigabitEthernet0/2
no ip address
shutdown
duplex auto
speed auto
media-type rj45
!
interface GigabitEthernet0/3
no ip address
shutdown
duplex auto
speed auto
media-type rj45
!
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
!
ipv6 ioam timestamp
!
!
!
control-plane
!
banner exec ^C
- IOSv is strictly limited to use for evaluation, demonstration and IOS *
- education. IOSv is provided as-is and is not supported by Cisco’s *
- Technical Advisory Center. Any use or disclosure, in whole or in part, *
- of the IOSv Software or Documentation to any third party for any *
- purposes is expressly prohibited except as otherwise authorized by *
- Cisco in writing. *
****^C
banner incoming ^C
- IOSv is strictly limited to use for evaluation, demonstration and IOS *
- education. IOSv is provided as-is and is not supported by Cisco’s *
- Technical Advisory Center. Any use or disclosure, in whole or in part, *
- of the IOSv Software or Documentation to any third party for any *
- purposes is expressly prohibited except as otherwise authorized by *
- Cisco in writing. *
****^C
banner login ^C
- IOSv is strictly limited to use for evaluation, demonstration and IOS *
- education. IOSv is provided as-is and is not supported by Cisco’s *
- Technical Advisory Center. Any use or disclosure, in whole or in part, *
- of the IOSv Software or Documentation to any third party for any *
- purposes is expressly prohibited except as otherwise authorized by *
- Cisco in writing. *
****^C
!
line con 0
privilege level 15
logging synchronous
exec prompt timestamp
line aux 0
line vty 0 4
login
transport input none
!
no scheduler allocate
!
end
【回答】
iosv-0
conf t
!
route-map Only-Lo0 permit 10
match interface Loopback0
exit
!
router ospf 10
network 192.168.100.10 0.0.0.0 area 0
redistribute connected route-map Only-Lo0
end
iosv-1
conf t
!
route-map Only-Lo0 permit 10
match interface Loopback0
exit
!
router ospf 10
network 192.168.100.1 0.0.0.0 area 0
redistribute connected route-map Only-Lo0
end
【解説】
route-mapがポイント。
もしroute-mapがないとどうなるか。
iosv-1#sh run | s router ospf
router ospf 10
redistribute connected subnets
network 192.168.100.1 0.0.0.0 area 0
iosv-0#sh ip ro | b Gate
Gateway of last resort is not set
1.0.0.0/32 is subnetted, 1 subnets
O E2 1.1.1.1 [110/20] via 192.168.100.1, 00:02:57, GigabitEthernet0/0.10
10.0.0.0/32 is subnetted, 1 subnets
C 10.10.10.10 is directly connected, Loopback0
172.16.0.0/24 is subnetted, 1 subnets
O E2 172.16.100.0
[110/20] via 192.168.100.1, 00:00:16, GigabitEthernet0/0.10
192.168.100.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.100.0/24 is directly connected, GigabitEthernet0/0.10
L 192.168.100.10/32 is directly connected, GigabitEthernet0/0.10
O E2 192.168.200.0/24
[110/20] via 192.168.100.1, 00:00:16, GigabitEthernet0/0.10
iosv-1がroute-mapを付けずに再配送した場合、iosv-1全てのConnected Interface(= 直接接続しているインターフェース)をiosv-0に伝えてしまう。
今回の課題では「LoopbackIFのアドレス『のみ』を」とある。
そのため、LoopbackIFのみ許可するroute-mapを作成し、再配送の際に設定してあげる必要があった。
Connectedの再配送は様々な構成で頻出するのに、すべてのConnectedIFアドレスが再配送されることは忘れがちなので注意しよう。
↓正しいルーティングテーブル
iosv-0#sh ip ro | b Gate
Gateway of last resort is not set
1.0.0.0/32 is subnetted, 1 subnets
O E2 1.1.1.1 [110/20] via 192.168.100.1, 00:20:47, GigabitEthernet0/0.10
10.0.0.0/32 is subnetted, 1 subnets
C 10.10.10.10 is directly connected, Loopback0
192.168.100.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.100.0/24 is directly connected, GigabitEthernet0/0.10
L 192.168.100.10/32 is directly connected, GigabitEthernet0/0.10
【参考】
IP Routing Configuration Guide, Cisco IOS XE Cupertino 17.9.x (Catalyst 9300 Switches)