2018年11月13日火曜日

Windows10のSTP停止方法

Windows10でNICをブリッジ接続するとSTPが有効になりBPDUを投げる。。。

Win7は以下レジストリ変更で回避
HKLM\SYSTEM\CurrentControlSet\Services\BridgeMP\DisableSTA

Win10の場合ナレッジが見つからないが以下で大丈夫か?
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MsBridge
にDisableSTAをDWORDで作成し、値を1とする。
作成後再起動実施。

2017年12月13日水曜日

Catalyst9300 IOS16.6.xのバージョンアップ

IOSがいつの間にか16台になってまして。。。
バージョンアップコマンドも変わっております。

さて、今回は16.6.1から16.6.2へのバージョンアップ手順。
機器はCisco Catalyst9300のStack仕様

ちなみに、16.5は
Switch# request platform software package
だそうで、ご注意を。

基本的にはリリースノートに沿ったやり方のメモ。
https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst9300/software/release/16-6/release_notes/ol-16-6-9300.html#pgfId-1450134

C9300#show ver                                                             
Cisco IOS XE Software, Version 16.06.01                                         
~略~

まずはIOSをflashにコピー
今回はUSBメモリから。
copy usbflash0:cat9k_iosxe.16.06.02.SPA.bin flash
Destination filename [cat9k_iosxe.16.06.02.SPA.bin]?                            
Copy in progress...CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
CCCCCCCCCCCCCCCCCCC                                                             
596369748 bytes copied in 67.596 secs (8822560 bytes/sec)                       

Copyが完了したらInstall実施。
C9300#install add file flash:cat9k_iosxe.16.06.02.SPA.bin activate commit            
install_add_activate_commit: START Wed Dec 13 14:00:38 JST 2017

000162: Dec 13 14:00:39.148 JST: %IOSXE-5-PLATFORM: Switch 1 R0/0: Dec 13 14:00: install one-shot flash:cat9k_iosxe.16.06.02.SPA.bininstall_add_activate_commit:

--- Starting initial file syncing ---
[1]: Copying flash:cat9k_iosxe.16.06.02.SPA.bin from switch 1 to switch 2
[2]: Finished copying to switch 2
Info: Finished copying flash:cat9k_iosxe.16.06.02.SPA.bin to the selected switch
Finished initial file syncing

--- Starting Add ---
Performing Add on all members

000163: Dec 13 14:01:41.395 JST: %IOSD_INFRA-6-IFS_DEVICE_OIR: Device usbflash0
  [1] Finished Add on switch 1
  [2] Add package(s) on switch 2
  [2] Finished Add on switch 2
Checking status of Add on [1 2]
Add: Passed on [1 2]
Finished Add

install_add_activate_commit: Activating PACKAGE
~略~

再起動の確認がでるので、問題なければy
This operation requires a reload of the system. Do you want to proceed? [y/n]y
--- Starting Activate ---
Performing Activate on all members
  [1] Activate package(s) on switch 1
~略~
Activate: Passed on [1 2]
Finished Activate

--- Starting Commit ---
Performing Commit on all members
~略~
Commit: Passed on [1 2]
Finished Commit

Install will reload the system now!

自動で再起動。
activate commit   オプション無しでinstall実施すると、
activateとcommitは手動で実施となります。

再起動後に確認。
C9300#show ver                                                             
Cisco IOS XE Software, Version 16.06.02                                         
~略~

C9300#show install summary
[ Switch 1 2 ] Installed Package(s) Information:
State (St): I - Inactive, U - Activated & Uncommitted,
            C - Activated & Committed, D - Deactivated & Uncommitted
--------------------------------------------------------------------------------
Type  St   Filename/Version
--------------------------------------------------------------------------------
IMG   I    16.6.1.0
IMG   C    16.6.2.0

ここでStがCになっていることを確認。
activate commit   オプションを無しで手動再起動した場合にUとなるが、その場合
7200秒で以前のOSにRollbackするので手動にてCommitが必須となる。

古いOSを消すのであれば
C9300#install remove inactive
install_remove: START Wed Dec 13 13:54:55 JST 2017
Cleaning up unnecessary package files
No path specified, will use booted path flash:packages.conf
~略~
消していいか確認されるので
Do you want to remove the above files? [y/n]y
[switch 1]:
~略~
SUCCESS: Files deleted.
~略~
SUCCESS: install_remove  Wed Dec 13 13:58:26 JST 2017

再度確認
C9300#show install summary
[ Switch 1 2 ] Installed Package(s) Information:
State (St): I - Inactive, U - Activated & Uncommitted,
            C - Activated & Committed, D - Deactivated & Uncommitted
--------------------------------------------------------------------------------
Type  St   Filename/Version
--------------------------------------------------------------------------------
IMG   C    16.6.2.0

Cat3850よりは起動が早いですね。

2017年10月10日火曜日

Catalyst2960LのL3機能

2960Lは15.2(5)E2以降でLayer3の機能が使えるようで。。。
シスコサポートコミュニティ

試したのはWS-C2960L-24TS-LLで15.2(6)E
リリースノートによると
  • Routing Information Protocol: (LANLite) - RIP is a commonly used routing protocol in small to medium TCP/IP networks. It is supported in both IPv4 and IPv6 network environments

Open Caveats
Bug ID
Headline
Scale: Failed route reprogramming into tcam hold till the routes expires from CEF RIP


BUGもあるけどRIPも使えるみたい。




まずはスイッチでルーティングする時のお約束

Switch(config)#ip routing



あとは各種設定
Switch#show run | section route
router rip
version 2
network 1.0.0.0
network 10.0.0.0
ip route 192.168.0.0 255.255.0.0 1.1.1.1


で、確認

Switch#show ip route
Codes: L - local, 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, H - NHRP, l - LISP
a - application route
+ - replicated route, % - next hop override, p - overrides from PfR

Gateway of last resort is not set

1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 1.1.1.0/24 is directly connected, Vlan1
L 1.1.1.254/32 is directly connected, Vlan1
R 2.0.0.0/8 [120/1] via 10.10.11.2, 00:00:01, Vlan11
~略~
S 192.168.0.0/16 [1/0] via 1.1.1.1

Switch#show ip rip database
1.0.0.0/8 auto-summary
1.1.1.0/24 directly connected, Vlan1
2.0.0.0/8 auto-summary
2.0.0.0/8
[1] via 10.10.11.2, 00:00:20, Vlan11
~略~


Switch#show ip protocols
*** IP Routing is NSF aware ***

Routing Protocol is "rip"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Sending updates every 30 seconds, next due in 21 seconds
Invalid after 180 seconds, hold down 180, flushed after 240
Redistributing: rip
Default version control: send version 2, receive version 2
Interface Send Recv Triggered RIP Key-chain
Vlan1 2 2 No none

~略~
Automatic network summarization is in effect
Maximum path: 4
Routing for Networks:
1.0.0.0
10.0.0.0
Routing Information Sources:
Gateway Distance Last Update
10.10.11.2 120 00:00:23
Distance: (default is 120)



StaticRouteとRIPv2が使える。
安価なL2スイッチなんだけどね。
ちなみに、

Switch(config)#router ?
bgp Border Gateway Protocol (BGP)
isis ISO IS-IS
iso-igrp IGRP for OSI networks
mobile Mobile routes
odr On Demand stub Routes
ospf Open Shortest Path First (OSPF)
ospfv3 OSPFv3
rip Routing Information Protocol (RIP)


となるので、一瞬期待するのだが、
rip以外はダメな模様。


Switch(config)#router ospf 1
Protocol not in this image
Switch(config)#router bgp 1
Protocol not in this image
Switch(config)#router isis
Protocol not in this image
Switch(config)#


将来実装されたりするのかな?
さすがにしないよね。

ちなみに、StaticRouteは16個まで

だけど、16個超えても投入できる。
とりあえず254ルート(10.1.1.1~254)投入できたが、TCAMが溢れたよってLogが。
%SYS-5-CONFIG_I: Configured from console by consoleHW-L3V4-TCAM: Hardware IPv4 Route TCAM is full, packets might be forwarded in software

Switch#show platform ip route all | inc Prefix
Prefix: 10.1.1.1/32
~略~
Prefix: 10.1.1.235/32
Prefix: 10.10.11.0/24
Prefix: 10.10.11.0/32
Prefix: 10.10.11.1/32
Prefix: 10.10.11.2/32
Prefix: 10.10.11.255/32
Prefix: 127.0.0.0/8
Prefix: 255.0.0.0/4
Prefix: 255.255.255.255/32

235ルート+Connectとその他ルートしかTCAMに載ってない。
変更できないSDMテンプレート見ると256ルートまでなんとなく行けそうな雰囲気もあるのですが。

Switch#show sdm prefer
The current template is default template

 The selected template optimizes the resources in
 the switch to support this level of features for
 64 SVIs and 64 VLANs.
number of Multicast groups                      :1024
number of Unicast MAC addresses                 :8192
number of MAC/IPv4 Access Control Entries       :384
number of IPv6 Access Control Entries           :256
number of IPv4 Direct Route Entries             :542
number of IPv4 Indirect Route Entries           :256
number of IPv6 Direct Route Entries             :414
number of IPv6 Indirect Route Entries           :128


過度な期待はダメだけど、2960L-8なんてamazonで1万円台で買えるし、ちょっとした誤家庭にはいいかもね。

2015年7月6日月曜日

Cisco機器のコマンド内でクエスチョンマークを使う

パスワードとかでクエスチョンマーク「?」を使いたいときには
Ctrl-V を押してからクエスチョン マークを入力する。

http://www.cisco.com/cisco/web/support/JP/docs/CIAM/ServsModules/ServsModules/MCG/006/8123_01_appendixc.html?bid=0900e4b182528bfe#23040


Cat(config)#line vty 0 4
Cat(config-line)#pas
Cat(config-line)#password test[Ctrl-V]?123!
Cat(config-line)#^Z
Cat#sh run | be line vty 0 4
line vty 0 4
 password test?123!
 login
line vty 5 15
 login
!

2015年6月29日月曜日

RDPでLoginできなくなった時のリカバリ

qwinsta
でセッションを確認し

tsdiscon [ID]
でターミナルのセッション切断し

それでもだめなら
logoff [ID]
で強制LogOffしてみる

やっぱり無理なら再起動
shutdown /r /t 0

2015年3月17日火曜日

Cisco機器での検証用PPPoEサーバ構築(端末払い出し)

普通のBフレ等でアドレスが降ってくるパターンのPPPoE検証サーバのConfig
試したのは1812Jの12.4(6)T1

以下コマンドは必要なところのみ抜粋


ip name-server 192.168.101.1
ip name-server 192.168.101.2

username test password 0 test

bba-group pppoe test
 virtual-template 1

interface Loopback0
 ip address 1.1.1.1 255.255.255.255


interface FastEthernet2
 switchport mode access
 spanning-tree portfast

interface Virtual-Template1
 ip unnumbered Loopback0
 peer default ip address pool user1-pool
 ppp authentication chap

interface Vlan1
 no ip address
 pppoe enable group test

ip local pool user1-pool 192.168.100.1


192.168.100.1がユーザに払い出されるアドレス
DNSサーバもip name-serverコマンドで指定すれば払い出されます

ちなみに以前「Cisco機器での検証用PPPoEサーバ構築」で書いたのは固定IPの例