目次

CiscoとVMwareとFreeBSD CARP

某所で少し変な挙動を見かけたので、ちょっと手元の環境で再現試験。 結果を先に書くと、再現しなかったんだけど、環境構築から試験まで色々やったので、ここにまとめておく。

試験環境

ESXiおよびFreeBSD設定

ESXi

name MTU NIC 無差別 偽装 MAC
Test-sw1 1500 vmnic3
Test-sw2 1500 vmnic4
name vLAN vSW 無差別 偽装 MAC
test-pg1 601 Test-sw1
test-pg2 601 Test-sw2

言葉の定義 (VMware ESXi 6.7 のマニュアルより抜粋し編集)

FreeBSD

FreeBSDは普通にInstall。

Cisco Configuration

version 15.2
no service pad
service tcp-keepalives-in
service tcp-keepalives-out
service timestamps debug datetime msec localtime
service timestamps log datetime msec localtime
service password-encryption
service sequence-numbers
service unsupported-transceiver
no service dhcp
!
hostname swc1
!
boot-start-marker
boot-end-marker
!
!
username seirios privilege 15 password 7 ******************
aaa new-model
!
aaa authentication login CONSOLE local-case
!
aaa session-id common
clock timezone JST 9 0
switch 1 provision ws-c2960x-48td-l
no ip source-route
ip routing
!
ip domain-name mgmt.example.com
ip name-server 8.8.8.8
ip name-server 8.8.4.4
vtp mode off
!
spanning-tree mode pvst
spanning-tree extend system-id
no spanning-tree vlan 1-4094
no errdisable detect cause gbic-invalid
!
vlan internal allocation policy ascending
!
vlan 601
 name "Test1"
!
no cdp run
!
interface FastEthernet0
 ip address XXX.XXX.XXX.XXX mmm.mmm.mmm.mmm
 no ip route-cache
!
interface GigabitEthernet1/0/1
!
(snip)
!
interface GigabitEthernet1/0/45
!
interface GigabitEthernet1/0/46
 switchport access vlan 601
 switchport trunk allowed vlan 601
 switchport mode trunk
!
interface GigabitEthernet1/0/47
!
interface GigabitEthernet1/0/48
 switchport access vlan 602
 switchport trunk allowed vlan 601
 switchport mode trunk
!
interface GigabitEthernet1/0/49
!
interface GigabitEthernet1/0/50
!
interface TenGigabitEthernet1/0/1
!
interface TenGigabitEthernet1/0/2
!
interface Vlan1
 no ip address
 shutdown
!
interface Vlan601
 ip address 192.168.1.254 255.255.255.0
 ip information-reply
 no ip route-cache
!
no ip http server
no ip http secure-server
!
ip route 0.0.0.0 0.0.0.0 xxx.xxx.xxx.xxx
ip ssh version 2
!
ip access-list extended MGMT
 permit ip xxx.xxx.xxx.xxx mm.mm.mm.mm any
!
no vstack
configuration mode exclusive
!
line con 0
 logging synchronous
line vty 0 4
 access-class MGMT in
 exec-timeout 0 0
 privilege level 15
 login authentication CONSOLE
 exec prompt timestamp
 transport preferred none
 transport input telnet ssh
line vty 5 15
 access-class MGMT in
 exec-timeout 0 0
 privilege level 15
 login authentication CONSOLE
 exec prompt timestamp
 transport preferred none
 transport input telnet ssh
!
ntp server ntp.nict.jp
end

なお、HSRP Configurationは

interface Vlan601
 ip address 192.168.1.254 255.255.255.0
 ip broadcast-address 192.168.1.255
 ip information-reply
 standby version 2
 standby 1 ip 192.168.1.252
 standby 1 priority 80
 standby 1 authentication 12345678
 no ip route-cache

テスト内容

Test手順と結果

同一PG内でのCARP 動作試験

無差別 偽装転送 MAC変更 結果 備考
CARPは正しく動作しなかった。外からのICMPに返答もしない。
CARPは正しく動作した
CARPのStateは正しく動作した(Master/Backupが正しく決定される)が、外部からのpingに対して返答しない
CARPは正しく動作しなかった。外からのICMPに返答もしない。
CARPは正しく動作した

結論

異なるPG間でのCiscoを経由したCARP動作試験

HSRP Group auth 結果 備考
10
10
1
1

結論