huawei routerlarda interface üzerinde alarm sayısını sıfırlama
huawei routerlarda display komutu ile interface detaylarına baktığımızda interface üzerinde meydana gelen hatalarıda görebiliyoruz. bu hatalar sürekli artımlı şekilde devam etmektedir.
[fcicek_test_router-GigabitEthernet1/0/0]display interface GigabitEthernet 1/0/0 GigabitEthernet1/0/0 current state : UP Line protocol current state : DOWN Link quality grade : GOOD Description:sube_a Route Port,The Maximum Transmit Unit is 1500 Internet protocol processing : disabled IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is aaaa-aaaa-aaaa The Vendor PN is RTXM191-400 The Vendor Name is WTD Port BW: 1G, Transceiver max BW: 1G, Transceiver Mode: SingleMode WaveLength: 1310nm, Transmission Distance: 10km Rx Power: -6.51dBm, Warning range: [-20.00, -3.00]dBm Tx Power: -5.53dBm, Warning range: [-9.00, -3.00]dBm Loopback:none, full-duplex mode, negotiation: enable, Pause Flowcontrol:Receive Enable and Send Enable Last physical up time : 2016-07-19 09:41:00 UTC+02:00 DST Last physical down time : 2016-07-19 09:39:46 UTC+02:00 DST Current system time: 2016-08-13 06:11:06+02:00 Statistics last cleared:never Last 10 seconds input rate: 6816 bits/sec, 7 packets/sec Last 10 seconds output rate: 5632 bits/sec, 5 packets/sec Input: 144440952031 bytes, 928751872 packets Output: 335843205389 bytes, 872370561 packets Input: Unicast: 855698710 packets, Multicast: 53900340 packets Broadcast: 19152822 packets, JumboOctets: 12274608 packets CRC: 100 packets, Symbol: 0 packets Overrun: 0 packets, InRangeLength: 0 packets LongPacket: 0 packets, Jabber: 0 packets, Alignment: 0 packets Fragment: 0 packets, Undersized Frame: 0 packets RxPause: 0 packets Output: Unicast: 872368829 packets, Multicast: 0 packets Broadcast: 1732 packets, JumboOctets: 137186914 packets Lost: 0 packets, Overflow: 0 packets, Underrun: 0 packets System: 0 packets, Overrun: 0 packets TxPause: 0 packets Input bandwidth utilization : 0% Output bandwidth utilization : 0%
eğer bir interfacede hatayı gidermeye yönelik bir işlem yaptıysanız interface üzerindeki hataları sıfırlamak her zaman işimizi kolaylaştıracaktır.
yukarıda örnekte 1/0/0 interfaceinde 100 adet CRC hatası geldiği görülmektedir. bunu sıfırlamak için interface içine konfigürasyon modda girerek port-alarm komutunu kullanıyoruz.
[fcicek_test_router-GigabitEthernet1/0/0]port-alarm clear ? crc-error CRC error alarm input-error Input error alarm output-error Output error alarm pause-frame Pause Frame alarm symbol-error Symbol error alarm
yukarıda görüldüğü gibi bu interface üzerinde 5 adet hatanın değerlerini sıfırlayabiliyoruz.
bizim hatalarımız crc hataları olduğu için crc hatalarının sayısını sıfırlamak için aşagıdaki komutu tamamlamamız gerekecektir
[fcicek_test_router-GigabitEthernet1/0/0]port-alarm clear crc-error
huawei switchler için yönetimsel erişim ayarları – 1
huawei switchlerde yönetimsel olarak ayrı bir subnet altında toplanması ve diğer kullanıcı erişimlerinide soyutlayabilmek için kullanılacak en temel yöntemlerden bir tanesi :
erişim için bir vlan belirleyerek bu vlan altına ip bilgisinin girilmesi ve globalde bu ipye ilişkin statik route yazmak şeklinde olacaktır.
yapacağımız işlem kısaca
[fcicek_test] vlan batch 10
[fcicek_test] interface Vlanif10
[fcicek_test-vlanif10] ip address 10.10.10.10 255.255.255.254
[fcicek_test] ip route-static 0.0.0.0 0.0.0.0 10.10.10.9
şeklindedir. cihaz üzerinde erişim için gerekli olarak protokolleri 10 vlanına göre yapılandırmayı unutmamak gerekiyor.
hava durumu : linux komut satırı
linuxde komut satırından hava durumu bilgisine nasıl ulaşacağımızı ve bunu nasıl kullanacağımıza bakalım.
ücretli ve ücretsiz olarak hava durumu bilgisini sunan bir çok servis mevcut. yük doğruluk lu veri istiyorsanız bir miktar ücreti gözden çıkarmanız da fayda var. bu örnekte “National Weather Service” tarafından herkese açık olan kaynaklardan faydalanacağız. akıllı telefonlar ile hava durumu uygulamaları oldukça popüler hale geldi. her cihazda arka planda çalışan bir hava durumu uygulaması mevcut. bu şekilde bir uygulama yapmak geçiyorsa aklınızdan yapılacak temel işlemler aynı.
http://weather.noaa.gov/weather/TR_cc.html adresinden ülkemizde bilgi alınabilecek yerlerin listesini bulabilirsiniz. ben örneğimde Kayseri – Erkilet havaalanı için verileri kullanacağım. http://weather.noaa.gov/weather/current/LTAU.html adresinden gün sayfalara ulaşabilirsiniz. burada LTAU kodu istasyona ait verilmiş özel bir kod.
buradaki kullanılan dosya formatları konusunda http://www.ofcm.gov/fmh-1/fmh1.htm adresinden detaylı bilgi alabilirsiniz.
biz tabiki bu html dosyasını kullanmayacağız. yukarıda belirtilen standart çerçevesinde http://weather.noaa.gov/pub/data/observations/metar/stations/LTAU.txt adresinde dosya her 5 dakika bir güncellenmektedir.
2015/07/05 14:20 LTAU 051420Z 27007KT 240V300 9999 FEW040 28/08 Q1016 NOSIG
dosyanın içeriği yukarı şekilde. 28/08 yazan kısımdaki 28 bizim sıcaklık değerimiz. bu verinin doğruluğunu kontrol etmek için akıllı telefondan alınan ekran görüntüsünüde aşağıda paylaşalım
şimdi sıra LTAU.TXT dosyasından veriyi almak gerekli scripti yazmaya geldi.
curl -s http://weather.noaa.gov/pub/data/observations/metar/stations/LTAU.TXT | \
grep -Po ' M?\d{2}/M?\d{2} ' | \
sed -r -e 's/([-0-9]*)\/[-0-9]*/\1/'
ben yukarıdaki gibi bir script yazdım. sizde farklı yöntemlerle istediğiniz veriyi ( nem, rüzgar gibi ) tabiki alabilirsiniz..
pi@raspberrypi ~ $ curl -s http://weather.noaa.gov/pub/data/observations/metar/stations/LTAU.TXT | \
> grep -Po ' M?\d{2}/M?\d{2} ' | \
> sed -r -e 's/([-0-9]*)\/[-0-9]*/\1/'
28
pi@raspberrypi ~ $
bu veriyi raspberry ile yapacağımız diğer uygulamalarda kullanacağımız için not etmekte fayda var.
alcatel omniswitch dhcp aktif edilmesi
alcatel omni 6800 serisi switchlerde dhcp konfigürasyonunu yapmanın en kolay ve kullanışlı yöntemi
/flash/switch/
dizini altında dhcpd.conf ve dhcpd.pcy dosyalarının ayarlarını bir text editörü ile yapıp yerleştirmek ve switch üzerinden dhcp özellikliği aktif etmek ve yeniden başlatmaktan geçiyor.
konfigürasyon dosyaları aşağıdaki formata uygun olmalıdır.
dhcpd.conf dosyası içeriği :
server-identifier alcatel-lucent.com; subnet 107.115.0.0 netmask 255.255.0.0 { dynamic-dhcp range 107.115.1.0 107.115.20.255 { option subnet-mask 255.255.0.0; option routers 107.115.0.254; option domain-name-servers 1.1.1.1; option dhcp-lease-time 900; } } subnet 107.116.0.0 netmask 255.255.0.0 { dynamic-dhcp range 107.116.1.0 107.116.20.255 { option subnet-mask 255.255.0.0; option routers 107.116.0.254; option domain-name-servers 1.1.1.1; option dhcp-lease-time 900; } }
dhcpd.pcy dosyası içeriği :
; ; QIP DHCP Policy File ; PingDelay=500
konfigürasyon dosyalarını belirtilen dizin altında koyduktan sonra dhcp sunucu aktif edilir ve/veya yeniden başlatırlı
> dhcp-server enable > dhcp-server restart
alcatel sros – absolute path
alcatel sros kullanan cihazlarda konfigürasyon hiyerarşisinde bir noktadan farklı bir noktaya geçmek istediğinizde iki yöntem mevcut. birincisi mevcut hiyerarşi konumundan “exit all” ile kök dizine gelerek ilgili konuma geçmek. diğeriyse mevcut konumda iken “/” ile başlayan gerekli işlemi yapmak
SROS>config>router>if# /configure system
SROS>configure>system#
alcatel service router üzerinde sdp mtu testi
sdps ( service distribution points ) nin ne olduğu ayrı bir yazı konusu ancak alcatel sr mimarinde oldukça önemli bir yerdedir.
kurmuş olduğumuz sdpnin mtu değeri üzerinden taşıyacağımız servisler için oldukça önemlidir. kurduğunuz sdp nin mtu değerini “show service sdp…..” vb görüntüle komutları ile görebilirsiniz. ancak linkiniz bir transmisyon sisteminden geçiyorsa taşınan paketlerde bu noktada kısıtlamalar olabilir.
kurulan bir sdp nin mtunun testi için “oam sdp-mtu” komutunu kullanabiliriz. komut yapısı ise
oam sdp-mtu servis-id size-inc testin-başlayacağı-mtu testin-biteceği-mtu step mtu-artım-değeri
şeklindedir. aşağıdaki örnekte 1201 id li sdp için 512 den başlayıp 256 arttırarak 3072 ya kadar test yapmaktadır ve sonuç olarak en büyük 2560 değerinde başarı olmuştur.
A# oam sdp-mtu 1201 size-inc 512 3072 step 256 Size Sent Response ---------------------------- 512 . Success 768 . Success 1024 . Success 1280 . Success 1536 . Success 1792 . Success 2048 . Success 2304 . Success 2560 . Success 2816 . Request Timeout 3072 . Request Timeout Maximum Response Size: 2560
burada dikkat edilmesi gereken nokta sonucu 2560 olmadığıdır. gerçek mtu değeri 2450 – 2816 arasındadır. doğru mtu değeri bulmak adına test aralığına küçülterek bir kaç test yapmanız en hızlı ve doğru sonucu verecektir. mtu değerinin 2801 olduğunu varsayarak doğru mtu değerini olduğunu öğrenmek için aşağıdaki şekilde iki komut daha çalıştırmamız en doğrusu olacaktır.
A# oam sdp-mtu 1201 size-inc 2560 2816 step 16 A# oam sdp-mtu 1201 size-inc 2800 2816 step 1
tüm bunlar yerine
A# oam sdp-mtu 1201 size-inc 512 3072 step 1
denenebilirdi ancak daha çok bekleyecektik.
huawei router ve switch geliştirici ve teşhiş modu – gizli komutlar
huawei router ve switchlerde geliştirici ve teşhiş için iki ayrı mode bulunmakta. cli dan “_h” komutu ile geliştirici modu aktif edilebilirlen “_d” ile teşhiş modu aktif edilebilmekte. bu mode aktif olduktan sonra promtta “-hidecmd” ve “-diagnose” ilave olarak gelmektedir.
[huawei]_h Now you enter a hidden command view for developer's testing, some commands may affect operation by wrong use, please carefully use it with HUAWEI engineer's direction. [huawei-hidecmd] [huaweiy]_d Now you enter diagnose command view. [huawei-diagnose]
örnek olarak ne40e bir routerde geliştirici modunu aktif edelim bu modda gelen komutlara kısaca bir göz atalım. çıktı aşağıdaki gibidir
[huawei-ne40]_h Now you enter a hidden command view for developer's testing, some commands may affect operation by wrong use, please carefully use it with HUAWEI engineer's direction. [huawei-ne40-hidecmd]? hidecmd view commands: _bgp_display_debuginfo_detail display the detail information of debug _debugging Enable system debugging functions _display Display current system information _display-db-info The db info _display-db-info6 The IPv6 db info _display-ip-routing-table-verbose Display route's all information _display-rm-detailed-info Display RM detailed information _display-rm-mi-info Display RM multiple instance information _display-rm-nqa-routes Display NQA state tracked routes info _display-rm-routefib-statistics Display the route fib information _display-rm-rpa-gr-state Display RM GR status _display-rm-slice-statistic display runtime of function related with route calculation and download _display-rm-tasks Display RM task information _display-rm-timer-records Timer information _display-rm-timers Display RM timer information _display-urt-table-info The urt table info _display-urt-table-info6 The URT6 table info _fib FIB refresh command _fib6 FIB refresh command _generate-ipv4-static-routes Generate a lot of ipv4 static routes _generate-ipv6-static-routes Generate a lot of ipv6 static routes _generate-rm-ipv4-static-routes Generate a lot of ipv4 static flapping routes _ha High available command _igmp-group-report Sending IGMP or MLD report _igmp-static-group Generate many group membership protocol specific static group routes _mld-group-report Sending IGMP or MLD report _mld-static-group Generate many group membership protocol specific static group routes _mpls Configure LSP trigger policy _terminal Setting of terminal _test IP module _user-interface Configure the user terminal interface acl-offset-set Set mpls acl offset parameters acm Display current system information active active 10ge-port ada-nqa ADA-NQA Module debugging add add adjust-voltage adjust voltage alarm Fault Manage allocate Allocate aps-send Send k1k2 bytes to remote device for test arp-ping ARP-ping atm attrib Change file attributes auto-recover over load auto recover backup Backup information bfd Specify BFD(Bidirectional Forwarding Detection) configuration information bgp Border Gateway Protocol(BGP) block-priority Priority of interface btrc Delete traced objects capture-packet enable capturing packet ce-ping Ce-ping tool chain chain information change Change something channel Channel check check cib Customer Information Base clear Reset operation clocklock Switch close close config-change-trap the trap of config changed configuration Configuration interlock cpu-packet Packets reported to the CPU create FIB6 create a bgpkeyswitch information packet datasync data synchronization debug Debug debug-cpos CPOS card info debug-fr-cpos CPOS card info debug-switch SPU Debug Into Switch debugging Enable system debugging functions delete delete one table dhcp-server set dhcp server. dip-startup Ignore DIP4 error for force startup display Display current system information download Download information dustproof Air filter cleaner information eagfy-debug Eagfy information efm EFM module efu Efu command group enable Reset current rrpp statistic information equip Set equip test mode fan Fan information fastfeeling Fastfeeling enable fault-management Fault Manage fe Forward Engine Commands fib6 FIB6 command fibm FIBM status and configuration information fpga-set fpga set geqd get Display current system information ha Enable/Disable HA Version check of Master and Slave ha-test Test tool for HA performance hdlc Information of HDLC igmp Specify parameters for IGMP info-center Specify information center configuration information ip Specify IP configuration information ip-pool Pool ipc IPC information ipc-pgp IPC information ipc-send Ipc Send ipoe-que-protect IPoE message queue protect ipv4 config ipv4 forward mode ipv6 ipv6-nsr-test ipv6-nsr-test isis Intermediate System to Intermediate System (ISIS) routes l2-multicast Specify parameters for Layer 2 multicast l2-multicast-ipv6 Specify parameters for Layer 2 multicast l2if Layer Two Interface Management lcm-checksum LCM checksum lcm-debug Lcm debug command license Active license file lldp Link Layer Discovery Protocol load Download information load-balance Specify load balance mode loop-detect Configure loop detect loopback Loop back mode looptest LoopTest lpu-startup Set lpu board startup mode mac-address Set mac-address mac-limit MAC limit mac-ping Mac ping mac-populate Populate an OAM MAC to FDB entry mac-purge Purge an OAM MAC from FDB entry mc multicast diagnose command mcast_nsrbk_control NSR backup encapsulation control mcast_rtbk_hogtime Realtime backup schedule control memory-leak Memory-leak command memset Specify value of memory mld Specify parameters for MLD modify modify table monitorbus MonitorBUS more Display the contents of a file mos-debugging MOS debugging information mpls Specify MPLS(Multiprotocol Label Switching) configuration information mpu mpu board msdp Specify MSDP(Multicast Source Discovery Protocol) configuration information msend Send multicast data mtrace Trace route to multicast source mts Modem to shell multicast Specify multicast configuration information natpt Specify NATPT(Network Address Translation-Protocol Translation) configuration information np Set NP offline mode nps Nps module operating commands nse-dbg The collection of some useful tools nse-key Add, delete or search a key nse-prob open data prob and catch data nse-read Read operation nse-show Display information nse-write Write operation ntp-service Specify NTP(Network Time Protocol) configuration information open set ospf Open Shortest Path First (OSPF) ospfv3 OSPF version 3 for IPv6 packet data packet paf Update PAF file patch Patch subcommands pe-modify Modify PE Entry pe-set Set value of... pe-test Test pea-add add one table pea-del delete table pea-delete delete one table pea-set config pea-simulate simulate pea-test performance-meter Performance meter command pic PIC pim PIM status and configuration information pim_hogtime Configure PIM HOG TIME ping Send echo messages pnp DHCP client plug and play policeman Task schedule Policeman port Configure port shaping max-value pppuser-offline-convert Configure PPP user Offline Reason print Hot enable quit Exit from current command view rbs-test Test the RBS reread reread reset Reset operation restart Reset chasis or whole system or slot with soft-boot mode command resume Resume system task return Exit to user view rip The rip protocol configuration ripng The RIPng Configurations risi-module module name rpc-pgp IPC information rpr Specify RPR configuration information rs485 RS485 save Save file send send sensor-alarm enable/disable sensor alarm sensor-config Sensor config set set next-bootmode infomation set-ospf-param Configure OSPF performance parameters shapping587 587 Debugging switch control simulate Simulate operation simulate-fast-down-interrupt Fastfeeling simulate interrupt slave Specify HA command smooth-upgrade smooth upgrade snmp-agent Specify SNMP(Simple Network Management Protocol) configuration information socket-monitor Switch of sock-monitor srvcfg SRVCFG start start for inspect function stop stop for inspect function suspend Suspend system task switch Switch SFU or LPU synchronization clock command switch-chip Switch-chip switch-port Operate to the SERDES interface channels synchronize synchronize synclock Mpu Syn Lock tcam-check TCAM detecting cofiguration commands terminal Set the terminal line characteristics test test test-aaa Accounts test test-command Test command switch for external test test-log test-log total-run-time clear total run time trace Set Trace Option tracert Trace route to host transmission-alarm Transmission alarm from SDH or SONET trigger Trigger various conditions for testing recording function ucm UCM(User Connection Management) module undo Cancel current setting update Update Trunk Infomation vp VP information vp-pgp IPC information vp-send Ipc Send vpn-force-del Delete the Stale VPN Instance forcefully vrbd Display version information