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の例

2014年12月16日火曜日

ISG/SSG/netscreenの初期化

初期化して、リブートの手順で実施

FW-> unset all
Erase all system config, are you sure y/[n] ? y
FW-> reset
Configuration modified, save? [y]/n n
System reset, are you sure? y/[n] y
In reset ...

2014年12月15日月曜日

JuniperのEXでちょっと悩むコマンド

●ConfigをSetコマンドで確認かつ、Ciscoでいうter len 0
show configuration |display set |no-more

●逆に階層型Configを流し込む場合
 load override terminal 
Ctrl-Dで終了

●commit前に差分をCheck! これ何気に重要
show | compare

●ge0/0/0のConfigをge0/0/1にコピーする
copy interfaces ge-0/0/0 to ge-0/0/1

●時間の確認
show system uptime

●再起動
request system reboot

●電源OFF
request system halt

●Log確認
show log messages

●初期化
config
load factory-default
set system root-authentication plain-text-password
commit

もしくは、
request system zeroize 
yes

で実施。
上記は起動状態でConfigのみ初期化
下記は再起動し、Log等もClearされる。

●Commit時に下記表示のエラーではじかれる
{master:0}[edit]
root# commit
warning: Could not connect to fpc-1 : Can't assign requested address
warning: Cannot connect to other RE, ignoring it

そんな時は以下コマンドで確認し、
{master:0}[edit]
root# show system commit
synchronize;

Synchronizeになってたら、削除する

{master:0}[edit]
root# delete system commit synchronize