2016年3月25日金曜日

英語版Windowsに日本語を追加したときのWinrnに注意

Azureの仮想マシン上で、英語版Windows Server 2012R2に日本語を追加した環境で

"winrn quickconfig"したときに、"Error number -2147024894 0x80070002"でエラーになる場合。

Windowsファイアーウォールの操作に失敗します。

言語が日本語設定しているので、ファイアーウォールのルール名も日本語なのですが、 winrm コマンドは英語のルール名で操作しにいきます。

ですので、マニュアルで Windows Remote Management (HTTP-In)  のルール名を追加して、一見落着。

2016年3月16日水曜日

Azure RemoteAppの罠

仕事の事情で、Azure RemoteAppを試してみました。

まずは、30日間の無料期間でOfficeも使ってみたりして、無料期間が終了したので有料プランで使っています。
仕事の事情とはいえ、自腹で試しているので、そこはなるべく安くすましたいところ。あまり説明も読まずに、一番単価のやすいBasicプランを選択。が、ここに罠がありました。Basicプランは最低20ユーザーからの契約。単価が安くても月額にすると×20倍!2万円近くになります。(一応、日割り計算されますので、月内に解約すればいいだけですが。)

改めて料金を調べてみると、少し単価は高くなりますが、Premiumプランは5ユーザーからと月額ではBasicよりお安いではないですか。Premiumなので当然高額だと思い込んでいたのが間違い。早速Premiumプランへ変更しました。


2016年2月5日金曜日

Fortigate 40C DHCP忘備録

FortigateをDHCPサーバーにして、複数セグメントへアドレスを割り当てる。

FGT40CXXXXXXXXXX # sh system dhcp server 
config system dhcp server
    edit 1
        set dns-service default
        set default-gateway 192.168.1.99
        set netmask 255.255.255.0
        set interface "internal"
            config ip-range
                edit 1
                    set start-ip 192.168.1.110
                    set end-ip 192.168.1.210
                next
            end
            config reserved-address
                edit 1
                    set ip 192.168.1.210
                    set mac 28:c6:8e:36:21:7c
                next
            end
    next
    edit 2
        set dns-service default
        set default-gateway 192.168.1.99
        set netmask 255.255.255.0
        set interface "internal"
            config ip-range
                edit 1
                    set start-ip 192.168.10.20
                    set end-ip 192.168.10.29
                next
            end
    next

end

あとは、L3 SwitchでDHCPリレーの設定

tnk3750(config-if)#ip helper-address 192.168.1.99
tnk3750(config-if)#end

tnk3750(config)#no ip forward-protocol udp netbios-ns
tnk3750(config)#no ip forward-protocol udp netbios-dgm
tnk3750(config)#no ip forward-protocol udp nameserver 
tnk3750(config)#no ip forward-protocol udp domain 
tnk3750(config)#end

ついでにDHCPのメッセージフォーマットもお勉強。
GIADDRでセグメントを見分けていたのでした。

2016年2月4日木曜日

Fortigate 40C OSPF設定 忘備録

Catalyst3750対向のOSPFの設定

こちらのページを参考に設定してみる。
以下、設定内容。

FGT40C39XXXXXXXX # get router ospf
abr-type            : cisco 
auto-cost-ref-bandwidth: 1000
distance-external   : 110
distance-inter-area : 110
distance-intra-area : 110
database-overflow   : disable 
database-overflow-max-lsas: 10000
database-overflow-time-to-recover: 300
default-information-originate: disable 
default-information-metric: 10
default-information-metric-type: 2 
default-information-route-map: 
default-metric      : 10
distance            : 110
rfc1583-compatible  : disable 
router-id           : 192.168.1.99
spf-timers          : 5 10
bfd                 : disable 
distribute-list-in  : 
restart-mode        : none 
restart-period      : 120
area:
    == [ 0.0.0.0 ]
    id: 0.0.0.0           
ospf-interface:
network:
    == [ 2 ]
    id: 2           prefix: 192.168.1.0 255.255.255.0           area: 0.0.0.0           
neighbor:
passive-interface:
summary-address:
distribute-list:
redistribute:
    == [ connected ]
    name: connected            status: disable            metric: 10           routemap:            
    == [ static ]
    name: static            status: disable            metric: 10           routemap:            
    == [ rip ]
    name: rip            status: disable            metric: 10           routemap:            
    == [ bgp ]
    name: bgp            status: disable            metric: 10           routemap:            
    == [ isis ]
    name: isis            status: disable            metric: 10           routemap:            

動作確認してみると、

FGT40C39XXXXXXXX # get router info ospf route
C  192.168.1.0/24 [1] is directly connected, internal, Area 0.0.0.0
O  192.168.10.0/24 [2] via 192.168.1.253, internal, Area 0.0.0.0


FGT40C39XXXXXXXX # get router info ospf neighbor 

OSPF process 0:
Neighbor ID     Pri   State           Dead Time   Address         Interface
192.168.100.254   1   Full/Backup     00:00:35    192.168.1.253   internal


FGT40C39XXXXXXXX # get router info ospf interface 
internal is up, line protocol is up
  Internet Address 192.168.1.99/24, Area 0.0.0.0, MTU 1500
  Process ID 0, Router ID 192.168.1.99, Network Type BROADCAST, Cost: 1
  Transmit Delay is 1 sec, State DR, Priority 1
  Designated Router (ID) 192.168.1.99, Interface Address 192.168.1.99
  Backup Designated Router (ID) 192.168.100.254, Interface Address 192.168.1.253
  Timer intervals configured, Hello 10.000, Dead 40, Wait 40, Retransmit 5
    Hello due in 00:00:01
  Neighbor Count is 1, Adjacent neighbor count is 1
  Crypt Sequence Number is 171994
  Hello received 166 sent 167, DD received 4 sent 4
  LS-Req received 1 sent 1, LS-Upd received 4 sent 2
  LS-Ack received 1 sent 3, Discarded 0


FGT40C39XXXXXXXX # get router info ospf status 
 Routing Process "ospf 0" with ID 192.168.1.99
 Process uptime is 28 minutes
 Process bound to VRF default
 Conforms to RFC2328, and RFC1583Compatibility flag is disabled
 Supports only single TOS(TOS0) routes
 Supports opaque LSA
 Do not support Restarting
 SPF schedule delay 5 secs, Hold time between two SPFs 10 secs
 Refresh timer 10 secs
 Number of incomming current DD exchange neighbors 0/5
 Number of outgoing current DD exchange neighbors 0/5
 Number of external LSA 0. Checksum 0x000000
 Number of opaque AS LSA 0. Checksum 0x000000
 Number of non-default external LSA 0
 External LSA database is unlimited.
 Number of LSA originated 3
 Number of LSA received 3
 Number of areas attached to this router: 1
    Area 0.0.0.0 (BACKBONE)
        Number of interfaces in this area is 1(1)
        Number of fully adjacent neighbors in this area is 1
        Area has no authentication
        SPF algorithm last executed 00:09:51.320 ago
        SPF algorithm executed 5 times
        Number of LSA 3. Checksum 0x01c84e

FGT40C39XXXXXXXX # get router info routing-table all
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP
       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, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
       * - candidate default

S*      0.0.0.0/0 [5/0] via 101.143.252.57, ppp1
C       101.143.252.57/32 is directly connected, ppp1
C       192.168.1.0/24 is directly connected, internal
O       192.168.10.0/24 [110/2] via 192.168.1.253, internal, 00:12:45
C       218.228.180.240/32 is directly connected, ppp1

さらっと書いてますが、ここまで約3日間。どうもFortigateのCLIがわかりづらいので、とても時間がかかります。