Linux – Network – Technology
Posts tagged network
Cisco Tricks
Feb 6th
Wireshark Filters
Oct 13th
he filtering capabilities of Wireshark are very comprehensive. You can filter on just about any field of any protocol, even down to the HEX values in a data stream. Sometimes though, the hardest part about setting a filter in Wireshark is remembering the syntax! So below are the top 10 display filters that I use in Wireshark.
- ip.addr == 10.0.0.1 [Sets a filter for any packet with 10.0.0.1, as either the source or dest]
- ip.addr==10.0.0.1 && ip.addr==10.0.0.2 [sets a conversation filter between the two defined IP addresses]
- http or dns [sets a filter to display all http and dns]
- tcp.port==4000 [sets a filter for any TCP packet with 4000 as a source or dest port]
- tcp.flags.reset==1 [displays all TCP resets]
- http.request [displays all HTTP GET requests]
- tcp contains traffic [displays all TCP packets that contain the word ‘traffic’. Excellent when searching on a specific string or user ID]
- !(arp or icmp or dns) [masks out arp, icmp, dns, or whatever other protocols may be background noise. Allowing you to focus on the traffic of interest]
- udp contains 33:27:58 [sets a filter for the HEX values of 0x33 0x27 0x58 at any offset]
- tcp.analysis.retransmission [displays all retransmissions in the trace. Helps when tracking down slow application performance and packet loss]
Hot adding or removing a Cisco 3750 from a stack
Sep 19th
When using a Cisco 3750 stack connected through stackwise technology you can add or remove a Cisco switch while the stack stays on. If you are adding or removing a switch from the stack, it is very important that the switch is turned OFF. The rest of the stack can keep doing its business.
For adding a switch to the stack follow these steps:
Step 1) On the new switch give the global command: switch stack-member-number provision type
Type is the type of switch you are adding to the stack.
When adding for example a third Cisco switch to the Cisco stack, use the following command:
switch 3 provision ws3750g-24t
Step 2) Power off the new stack member
Step 3) Connect the new member to the Cisco stack using the stacking cables, 1 loop at a time.
Step 4) Power on the new stack member. The switch will come alive and will receive the Cisco IOS version from the master, when that is completed it will be ready to service network requests.
For removing a member switch from the stack use the following steps:
Step 1) Power off the stack member to be removed.
Step 2) Remove the stackwise cable from the switch.
Step 3) Issue the following command on the stack master: no switch stack-member-number provisiontype
Nortel CLI command guide troubleshooting
Jul 28th
Here are the CLI commands for troubleshooting the ERS 8600 switch:
Config timezone
config bootconfig tz dst-name "EDT" config bootconfig tz name "EST" config bootconfig tz offset-from-utc 300 config bootconfig tz dst-end M11.1.0/0200 config bootconfig tz dst-start M3.2.0/0200
Config NTP server
config ntp server create a.b.c.d config ntp server create a.b.c.d config ntp server create a.b.c.d config ntp enable true
Show log file
8600:5# dir size date time name -------- ------ ------ -------- 8697210 MAY-16-2007 02:19:14 /flash/p80a4100.img 1266336 MAY-16-2007 02:19:20 /flash/p80j4100.dld 8796621 MAY-16-2007 02:20:10 /flash/p80m4100.img 701771 MAY-16-2007 02:20:14 /flash/p80p4100.dld 906024 MAY-16-2007 02:20:18 /flash/p80t4100.dld 62954 JUL-08-2011 15:02:54 /flash/config.cfg 1080823 MAY-16-2007 02:20:24 /flash/p80b4100.img 204 OCT-31-2007 01:52:26 /flash/boot.cfg 11 OCT-18-2010 21:04:38 /flash/engboot 2048 OCT-31-2007 01:57:42 /flash/.ssh <DIR> 588 OCT-31-2007 01:57:42 /flash/.ssh/dsa_pub.key 55928 OCT-31-2007 02:01:20 /flash/p80c4100.img 26112 OCT-31-2007 02:01:40 /flash/p80c4100.aes total: 64286720 used: 22280192 free: 42006528 bytes size date time name -------- ------ ------ -------- 1897269 APR-07-2005 22:20:06 /pcmcia/syslog.txt 162 JAN-20-2003 11:07:58 /pcmcia/boot.cfg 27133 APR-20-2006 07:43:12 /pcmcia/config.sav 31193 OCT-30-2007 21:11:36 /pcmcia/config.cfg 99574 MAY-29-2006 11:27:52 /pcmcia/29050006.txt 49996 MAY-29-2007 14:47:02 /pcmcia/p80c3760.img 8 OCT-18-2010 21:04:38 /pcmcia/11e00005.num 21231 APR-07-2005 07:26:56 /pcmcia/configs.cfg 162 APR-07-2005 07:27:10 /pcmcia/boots.cfg 269 JAN-11-2005 14:53:50 /pcmcia/sysHwlog.txt 1082873 OCT-18-2010 21:05:22 /pcmcia/11e00005.000 28669 SEP-23-2007 20:40:44 /pcmcia/conf_20070923.cfg 28733 SEP-24-2007 13:25:00 /pcmcia/conf_20070924.cfg 29446 OCT-30-2007 19:33:54 /pcmcia/config_2007_10_29.cfg 77425 OCT-30-2007 20:19:18 /pcmcia/11e00006.000 8 OCT-30-2007 20:17:02 /pcmcia/11e00006.num 31150 NOV-08-2007 14:53:46 /pcmcia/conf_20071108.cfg total: 8011776 used: 3469312 free: 4542464 bytes
8600:5# show log file tail CPU5 [07/28/11 10:51:47] SW INFO user rcju connected from 10.28.13.194 via telnet CPU5 [07/28/11 10:46:34] SNMP INFO Spanning Tree Topology Change(StgId=1, PortNum=2/25, MacAddr=00:01:81:11:e0:01) CPU5 [07/28/11 10:46:34] SNMP INFO Spanning Tree Topology Change(StgId=1, PortNum=2/24, MacAddr=00:01:81:11:e0:01) CPU5 [07/28/11 10:46:04] SNMP INFO Link Up(2/25) CPU5 [07/28/11 10:46:04] SNMP INFO Link Up(2/24) CPU5 [07/28/11 10:46:03] SNMP INFO Port 2/25 is an access port CPU5 [07/28/11 10:46:03] SNMP INFO Link Down(2/25) CPU5 [07/28/11 10:46:03] SNMP INFO Port 2/24 is an access port CPU5 [07/28/11 10:46:03] SNMP INFO Link Down(2/24) CPU5 [07/28/11 10:45:04] SNMP INFO Spanning Tree Topology Change(StgId=1, PortNum=2/25, MacAddr=00:01:81:11:e0:01) CPU5 [07/28/11 10:45:04] SNMP INFO Spanning Tree Topology Change(StgId=1, PortNum=2/24, MacAddr=00:01:81:11:e0:01) CPU5 [07/28/11 10:44:34] SNMP INFO Link Up(2/25) CPU5 [07/28/11 10:44:34] SNMP INFO Link Up(2/24) CPU5 [07/28/11 10:44:32] SNMP INFO Port 2/25 is an access port CPU5 [07/28/11 10:44:32] SNMP INFO Link Down(2/25) CPU5 [07/28/11 10:44:32] SNMP INFO Port 2/24 is an access port CPU5 [07/28/11 10:44:32] SNMP INFO Link Down(2/24) CPU5 [07/28/11 10:44:15] SNMP INFO Link Up(2/25) CPU5 [07/28/11 10:44:15] SNMP INFO Link Up(2/24) CPU5 [07/28/11 10:44:13] SNMP INFO Port 2/25 is an access port CPU5 [07/28/11 10:44:13] SNMP INFO Link Down(2/25) CPU5 [07/28/11 10:44:13] SNMP INFO Port 2/24 is an access port CPU5 [07/28/11 10:44:13] SNMP INFO Link Down(2/24)
show ports info state show ports info vlans show ports info vlacp show ports info slpp show vlan info ospf show ip ospf neighbors show ip rsmlt info show mlt ist info show smlt show ip route info show vlan interface info 47-48 show vlan interface vids
Cisco IOS – Google power
May 19th
Google power search
By the “Power of Google”, you can do anything and averything you want:-).
Juste copy paste this command to find IOS
intitle:index.of ios parent directory bin
or just click below
http://www.google.com/search?hl=en&q=intitle:index.of+ios+parent%20directory+bin
Vyatta
May 17th
Installation on CF Card
Software installation As everybody knows, the installation process of Vyatta Core is simple and well-documented. However we need to install Vyatta Core on Compact Flash media that will be later used on ALIX.3D2 board. So what’s a problem? Xo-Xo, you can not just install Vyatta directly on ALIX.3D2-based system, it has no VGA, and it can not boot from external media, like USB-CDROM. We need to use another PC system for initial Vyatta installation! I advice you to use VMware Workstation or VMware Player, create a virtual machine with CD-ROM, USB Controller, without hard drive and WITHOUT any network interface. Remember, if there will be any network interface on a virtual machine, your initial config.boot will be messed up a little bit!
Grab latest VC6.0 – Live CD ISO from http://www.vyatta.org/downloads Use it as VMware CDROM, power on Virtual Machine, connect CF card to your PC using card reader,
connect CF card as removable device in VMWare,
log in to Vyatta Live CD and just run
install-system
Your CF installed in card reader will appear as /dev/sda or /dev/sdb or something and it should be autodetected by Vyatta installation script as default destination device for installation. Yes, it’s really that simple.Smile I advise you to NOT use your real (physical) PC for this CF installation trick, cause you may accidentally install Vyatta on your real HDD and destroy your host system. You have been warned!
Optimization
Avant l’installation,
Passer en root
sudo -s
Editer le fichier
/opt/vyatta/sbin/install-system
Changer ext3 en ext2 pour enlever la journalisation Installer vyatta
install-system
Avant de redemarrer Mount la CF
mkdir /mnt/cf mount /dev/sda1 /mnt/cf cd /mnt/cf
Editer le fichier
/etc/fstab none /tmp tmpfs mode=1777 0 0 none /var/tmp tmpfs mode=1777 0 0
Mettre la CF dans le router
Disable syslog
configure delete system syslog set system syslog console facility all commit save
Voir le fichier /etc/syslog.conf
-
.notice @syslog.company.com
Cisco feature set upgrade
May 17th
Error: The image in the archive which would be used to upgrade Error: system number 1 does not support the same feature set.
Cisco it seems included this sanity check,as of 12.2(35), to prevent you from accidentally changing the feature set during a IOS upgrade, not a nice thing to happen on a production switch, when things go belly up.
You will get the above error when upgrading the IOS and changing the feature set. IE if you upgrade the image from IPBASE 12.2(35)SE5 to ADVIPSERVICESK9 12.2(25)SEE4.
So to bypass this, you can add the /allow-feature-upgrade parameter, to the archive download-sw command.
Example :
#archive download-sw /overwrite /allow-feature-upgrade tftp:10.1.1.1/c3560-advipservicesk9-tar.122-25.SEE4.tar
If you need more info on how to upgrade the IOS on a Cisco 3560, visit http://www.cisco.com/en/US/products/hw/switches/ps5023/products_configuration_example09186a00804799d7.shtml#cfbin1.
Cisco – Spanning Tree
May 10th
Identifying a Bridging Loop
Suspect a loop if you see the following:
-
You capture traffic on a link and see the same frames multiple times.
-
All users in a bridging domain have connectivity problems at the same time.
-
There is abnormally high port utilization.
To remedy a loop quickly, shut redundant ports and then enable them one at a time. Some switches enable debugging of STP to help in diagnosing problems. The following commands are useful for isolating a bridging loop
show interfaces show spanning tree show bridge show process cpu debug spanning tree show mac address-table aging-time vlan# show spanning-tree vlan vlan# detail
Spanning-Tree Best Practices
To optimize data flow in the network, design and configure Spanning Tree in the following ways:
-
Statically configure switches to be the primary and secondary root bridges by setting priority values.
-
Consider which interfaces will become designated and root ports (possibly set port priorities/path cost).
-
Tune STP using the tools detailed in this section.
-
Enable UDLD aggressive mode on all fiber interfaces.
-
Design STP domains that are as simple and contained as possible by using multilayer switches and routed links.
-
Use PVRST+ or MST for the fastest convergence times.



