nexus7k HSRP – DUP_VADDR_SRC_IP 로그.

HSRP – DUP_VADDR_SRC_IP

멀쩡히 잘 운영되던 nexus7k에서 아래와 같은 로그 메시지가 보였다.

2023 Feb 18 13:58:36 Backbone2 %ARP-3-DUP_VADDR_SRC_IP:  arp [8062]  Source address of packet received from 0000.0c07.ac08 
on Vlan32(Ethernet1/47) is duplicate of local virtual ip, 172.16.201.19

백본스위치에서 구성한 hsrp의 virtual IP가 중복되었다는 메시지로 hsrp 상태를 확인해 보니, hsrp를 실행중인 두 스위치가 모두 Active 상태이며 standby 노드를 인식하지 못하는 상태였다.

Backbone1# sh hsrp brief
*:IPv6 group   #:group belongs to a bundle
                     P indicates configured to preempt.
                     |
 Interface   Grp  Prio P State    Active addr      Standby addr     Group addr
  Vlan32      8    100  P Active   local            unknown          172.16.201.19  (conf)
Backbone2# sh hsrp brief
*:IPv6 group   #:group belongs to a bundle
                     P indicates configured to preempt.
                     |
 Interface   Grp  Prio P State    Active addr      Standby addr     Group addr
  Vlan32      8    90   P Active   local            unknown          172.16.201.19  (conf)
Backbone2# 

Continue reading

시스코 SFP speed nonegotiate

시스코 SFP speed nonegotiate

기존 사용중인 익스트림 스위치(X460G2-24x-10G4)를 시스코 스위치(C9500-16X)로 교체작업 진행중, ISP – L3 스위치간 uplink 포트가 down 상태를 유지하고 up되지 않는 상황이 발생했다.

ISP – L3 스위치는 1Gbps 멀티모드 sfp로 연결되어 있는 상태였고, 익스트림 스위치에서는 아래 처럼 정상적인 연결상태였다.

Slot-1 Router18 # sh ports 2:21 no
Port Summary
Port  Display              VLAN Name          Port  Link  Speed  Duplex
#     String               (or # VLANs)       State State Actual Actual
=======================================================================
2:21  ISP                  ISP                 E     A     1000  FULL 
==================================================================
   Port State: D-Disabled, E-Enabled
   Link State: A-Active, R-Ready, NP-Port not present, L-Loopback,
               D-ELSM enabled but not up
               d-Ethernet OAM enabled but not up
Slot-1 Router.19 # 

ISP측에 문의했더니, ISP측 장비는 1Gbps duplex manual로 설정되어 있으니, 동일하게 설정을 해 보라는 답변을 했다.

시스코 스위치는 UTP 케이블로 연결되는 이더넷 포트 속도는 조정 가능하나 광케이블로 연결되는 sfp는 속도 조정이 안된다.
(이더넷 포트 속도 조정은 https://blog.boxcorea.com/wp/archives/2056를 참고)

Continue reading

Aruba AP 515 ‘rIf’ 플래그.

Aruba AP 515 ‘rIf’ 플래그.

*사용환경
WLC: Aruba 7220
PoE switch: extreme x440-24p

AP515를 추가하였으나 WLC에서 아래 처럼 rIf 플래그가 보임.
r(r = Power Restricted), I (I = Inactive), f (f = No Spectrum FFT support)

HQ-3F-02  HQ  515      172.26.2.112  Up 21m:24s          rIf    172.16.100.131  172.16.100.132
HQ-3F-03  HQ  105      172.26.2.113  Up 205d:16h:52m:1s         172.16.100.131  172.16.100.132
HQ-3F-04  HQ  105      172.26.2.114  Up 207d:2h:53m:38s         172.16.100.131  172.16.100.132
HQ-3F-05  HQ  105      172.26.2.115  Up 207d:2h:52m:48s         172.16.100.131  172.16.100.132
HQ-3F-06  HQ  305      172.26.3.11   Up 207d:3h:7m:16s   r      172.16.100.131  172.16.100.132
HQ-3F-07  HQ  515      172.26.3.105  Up 5m:13s           rIf    172.16.100.131  172.16.100.132

r 플래그가 제한된 전원을 의미하는것에서 AP-515 사양을 살펴보니, 아래와 같았다.

DC 전원: 16W
PoE 전원((802.3af, IPM enabled): 13.5W
PoE 전원 (802.3at/bt): 20.8W

일단 802.3at/bt 사양이 있어서 PoE 스위치에서 PoE+ 로 전원 공급하도록 설정을 변경했다.
익스트림 스위치 PoE+ 설정은 https://blog.boxcorea.com/wp/archives/2134 글을 참고하면 된다.

이후, r(r = Power Restricted), I (I = Inactive) 플래그는 사라졌으나, f (f = No Spectrum FFT support)플래그는 남아 있음.

HQ-3F-02  HQ  515      172.26.2.112  Up 28m:27s          f      172.16.100.131  172.16.100.132
HQ-3F-03  HQ  105      172.26.2.113  Up 205d:16h:59m:4s         172.16.100.131  172.16.100.132
HQ-3F-04  HQ  105      172.26.2.114  Up 207d:3h:0m:41s          172.16.100.131  172.16.100.132
HQ-3F-05  HQ  105      172.26.2.115  Up 207d:2h:59m:51s         172.16.100.131  172.16.100.132
HQ-3F-06  HQ  305      172.26.3.11   Up 207d:3h:14m:19s  r      172.16.100.131  172.16.100.132
HQ-3F-07  HQ  515      172.26.3.105  Up 12m:16s          f      172.16.100.131  172.16.100.132

f 플래그는 AP-515가 spectrum FFT(Fast Fourier Transform) 를 지원하지 않기 때문에 나오는 플래그로 오류사항은 아니므로 그냥 사용하면 된다.

https를 통해서 ssh 접속하기 – sslh.

Ubuntu 리눅스에서 sslh 사용하기.

sslh의 개념과 CentOS에서의 사용은 이전 글 https://blog.boxcorea.com/wp/archives/1689을 참고하면 된다.

작업환경: ubuntu 22.04, nginx(https, 443port) 사용중.

1. sslh 설치
우분투리눅스에서 sslh 설치는 apt 명령어로 간단하게 설치할 수 있다.
설치 중간에 sslh를 inetd가 제어하도록 할지 단독으로 실행할지를 묻는데, 여기서는 단독실행(standalone)하도록 했다.

admin@wolf:~$ sudo apt install sslh
[sudo] password for admin:
Reading package lists... Done
...
Setting up sslh (1.20-1) ...
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 78.)
debconf: falling back to frontend: Readline
sslh configuration
------------------

sslh can be run either as a service from inetd, or as a standalone server. Each choice has its own benefits. With only a few
connection per day, it is probably better to run sslh from inetd in order to save resources.

On the other hand, with many connections, sslh should run as a standalone server to avoid spawning a new process for each
incoming connection.

  1. from inetd  2. standalone

Run sslh: 2

Adding system-user for sslh daemon
Created symlink /etc/systemd/system/multi-user.target.wants/sslh.service → /lib/systemd/system/sslh.service.
...
No VM guests are running outdated hypervisor (qemu) binaries on this host.

Continue reading

macOS ssh server 활성화 하기.

macOS Monterey에서 ssh 접속 허용하기.

macOS 터미널에서 localhost로 ssh 접속을 했을때, 아래와 같은 메시지가 보이면 ssh 서버가 실행되지 않고 있는 상태라고 생각할 수 있다.

snowfox@snowfoxui-MacBookPro ~ % ssh localhost
ssh: connect to host localhost port 22: Connection refused
snowfox@snowfoxui-MacBookPro ~ % 

다른 컴퓨터에서 접속해 보면, 역시 접속되지 않는다.

snowfox@wolf:~$ ssh snowfox@192.168.100.14
ssh: connect to host 192.168.100.14 port 22: Connection refused

ssh 서버가 실행중인지를 확인하려면 systemsetup 명령을 사용한다.

snowfox@snowfoxui-MacBookPro ~ % sudo systemsetup -getremotelogin
Password:
Remote Login: Off

Continue reading

리눅스 ip 명령어 사용 예

리눅스 ip 명령어 사용 예

ip 명령어는 기존의 ifconfig, route, arp 등의 명령을 대체하며, 사용법은 아래와 같다.

Usage: ip [ OPTIONS ] OBJECT { COMMAND | help }
       ip [ -force ] -batch filename
where  OBJECT := { link | address | addrlabel | route | rule | neigh | ntable |
                   tunnel | tuntap | maddress | mroute | mrule | monitor | xfrm |
                   netns | l2tp | fou | macsec | tcp_metrics | token | netconf | ila |
                   vrf }
       OPTIONS := { -V[ersion] | -s[tatistics] | -d[etails] | -r[esolve] |
                    -h[uman-readable] | -iec |
                    -f[amily] { inet | inet6 | ipx | dnet | mpls | bridge | link } |
                    -4 | -6 | -I | -D | -B | -0 |
                    -l[oops] { maximum-addr-flush-attempts } | -br[ief] |
                    -o[neline] | -t[imestamp] | -ts[hort] | -b[atch] [filename] |
                    -rc[vbuf] [size] | -n[etns] name | -a[ll] | -c[olor]}

ip 명령어 뒤의 OBJECT는 전체 단어 대신 줄여서 사용할 수도 있다.

1. NIC(Network Interface Card, 랜카드) 및 연결 상태 확인.

기본적으로 ip link show 명령을 사용한다. 여기서 show는 생략가능하며 link는 줄여여 ‘l’ 만 사용해도 된다.

[root@localhost ~]# ip li show
1: lo:  mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: ens32:  mtu 1500 qdisc pfifo_fast master bond0 state UP mode DEFAULT group default qlen 1000
    link/ether 00:50:56:9d:da:8e brd ff:ff:ff:ff:ff:ff
3: ens33:  mtu 1500 qdisc pfifo_fast master bond0 state UP mode DEFAULT group default qlen 1000
    link/ether 00:50:56:9d:da:8e brd ff:ff:ff:ff:ff:ff
4: bond0:  mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether 00:50:56:9d:da:8e brd ff:ff:ff:ff:ff:ff

위에서 loopback 을 제외한 ens32, ens33 두개의 NIC을 볼 수 있으며 모두 UP 상태임 을 확인 할 수 있다.

Continue reading

CentOS7, network bonding 설정, 확인, Active 인터페이스 변경.

CentOS 7, Bonding 설정, 확인, Active 인터페이스 변경하기.

본딩 종류는 https://blog.boxcorea.com/wp/archives/788 아래 부분을 참고하면 된다.

여기에서는 active-standby 구성을 했다.

1. bonding 커널 모듈
커널 모듈이 사용중인지 확인한다.

[root@localhost ~]# lsmod | grep -i bond
[root@localhost ~]#

사용하지 않고 있으므로 사용하도록 해 둔다.

[root@localhost ~]# modprobe bonding
[root@localhost ~]# lsmod | grep -i bond
bonding               152656  0
[root@localhost ~]#

Continue reading

Aruba WLC show 명령어

Aruba WLC MM 구성에서 show 명령어 사용 예

1. OS 버전확인
show version 이나 show switch software 명령을 사용한다. 결과는 동일하다.

(WLC_1) [mynode] #show version

Aruba Operating System Software.
ArubaOS (MODEL: Aruba7220), Version 8.6.0.6
Website: http://www.arubanetworks.com
(c) Copyright 2020 Hewlett Packard Enterprise Development LP.
Compiled on 2020-09-15 at 11:49:15 UTC (build 77124) by p4build

ROM: System Bootstrap, Version CPBoot 1.2.9.0 (build 65676)
Built: 2018-07-06 04:22:09
Built by: p4build@re_client_65676


Switch uptime is 21 hours 3 minutes 7 seconds
Reboot Cause: User reboot (Intent:cause:register 78:86:50:2)
Supervisor Card
Processor (XLP432 Rev B2 (Secure Boot) , 1000 MHz) with 7382M bytes of memory.
32K bytes of non-volatile configuration memory.
7928M bytes of Supervisor Card system flash.

Continue reading

pywinrm 사용을 위한 winrm 설정과 테스트 코드.

winrm 설정과 pywinrm을 이용한 테스트 코드 실행.

* 작업 환경.

winrm은 windows10에 설정.
pywinrm은 ubuntu 18.04, python 3.6.9에서 실행.

1. 윈도우 네트워크 프로필 설정.

네트워크프로필을 개인네트워크로 설정한다. 공용네트워크로 설정되어 있으면 quick config가 진행되지 않는다.

시작 -> 네트워크 상태 -> 이더넷 -> 네트워크(연결됨) -> 네트워크 프로필 -> 개인

네트워크 상태

Continue reading

시스코 스위치(ios-xe) 스택 관련 명령어.

시스코 스위치(ios-xe) 스택 관련 명령어.

* 작업 환경
스위치: C9200L-48T-4X
OS: Cisco IOS XE Software, Version 17.03.05

1. 스택 케이블 연결 전, 후

스택 케이블 연결전 switch 확인하면 아래처럼 Active 상태가 보인다.

Switch#show switch
Switch/Stack Mac Address : f8e9.4f66.e000 - Local Mac Address
Mac persistency wait time: Indefinite
                                             H/W   Current
Switch#   Role    Mac Address     Priority Version  State
-------------------------------------------------------------------------------------
*1       Active   f8e9.4f66.e000     1      V03     Ready

Continue reading