понедельник, 15 сентября 2014 г.

HEX to DEC

Example:

DEC     HEX
0              0
1              1
2              2
3              3
4              4
5              5
6              6
7              7
8              8
9              9
10            A
11            B
12            C
13            D
14            E
15            F


38-EA-A7-89-32-A5

38= (3*16) + 8=56 
EA=(E[14]*16)+A[10]=234 
A7=(10*16) + 7 = 167 
89= (8*16) + 9=137
32=(3*16)+2=50
A5=(10*16)+5=165

пятница, 12 сентября 2014 г.

GNS3 iourc.txt

[license]
gns3-iouvm = cd11acbc599f2364;

IOU:
1 – Install VirtualBox.
IMPORTANT: the VM contains the latest GNS3 server version. NEW: you can update the server directly from the VM using the following command (username: root password: cisco). Make sure the VM has Internet access by switching the network adapter to NAT or Bridged adapter.
$ pip3 install gns3-server==1.0beta2
3 – Import the appliance in VirtualBox.
4 – Make sure the first VM adapter is set “VirtualBox Host-Only Ethernet Adapter”. You may have to add one in VirtualBox preferences -> Network -> Host-only Networks.
5 – Start the VM.
6 – Once started you should see the VM IP address. If not log on with username root and password cisco and use the ifconfig command. Let’s say the IP is 192.168.56.101 for the rest of the instructions
7 – Open a web browser and go to http://192.168.56.101:8000/upload and upload your IOU image. Remember the file path, e.g. /home/gns3/Documents/GNS3/images/i86bi_linux-ipbase-ms-12.4.bin
8 – Create a text file named iourc containing the IOU license number. Unfortunately you will have to find that number by yourself (hint: the hostname is gns3-iouvm and hostid is 00000000).
[license]
gns3-iouvm = xxxxxxxxxxxxxxxx;
9 – Start GNS3, go to Preferences -> Server -> Remote servers and add the VM IP address, 192.168.56.101 in this example, click on Apply.
10 – Go to IOS on UNIX preferences, set the path to IOURC to the file created in step 8.
11 – Go to IOU devices and add the path from step 7 to IOU path, optionally configure the other settings, click on Save.
12 – Start using the IOU device from the device list.

среда, 2 июля 2014 г.

Cisco Vlan Access Lists (VACL) - на примере блокирования SIP портов

IOS-XE Software, Catalyst 4500 L3 Switch Software (cat4500es8-     NIVERSALK9-M), Version 03.03.01.XO RELEASE SOFTWARE (fc1)      
                                                                 
Задача запретить SIP порты внутри VLAN-а.                                                                                                      
                                                                 
1. Создаем лист доступа: 
                                           
                                                                
ip access-list extended sip                                      
 deny   tcp any any eq 5060                                      
 deny   udp any any eq 5060                                      
 permit ip any any                                               
                                                                
                                                          
2. Создаем VACL и привязываем к нему нащ ACL:  
    
        
vlan access-map sip 10                         
 match ip address sip                          
 action forward     

                                               
3. Привязываем наш VACL к вилану например 901:              
                                              
vlan filter sip vlan-list 901                  
                                              
                                               
4. Смотрим что получилось:   
                  
switch#sh access-lists sip                     
Extended IP access list sip                    
    10 deny tcp any any eq 5060                
    20 deny udp any any eq 5060 (16 matches)   
    30 permit ip any any (32 matches)          
switch#