os:ios:vlan.dat
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
os:ios:vlan.dat [2016-11-18 21:20] – root | os:ios:vlan.dat [2023-01-04 17:45] (current) – Manuel Frei | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== | + | ====== vlan.dat |
- | FIXME under construction... | + | I wrote a Python module/ |
+ | |||
+ | This page shows some information about the reverse engineering. | ||
+ | |||
+ | ===== About the File ===== | ||
+ | On Cisco IOS the VLAN and VTP information is stored in the VLAN database. This database is represented as the file vlan.dat. | ||
+ | |||
+ | < | ||
+ | Switch#dir flash:/ | ||
+ | Directory of flash:/ | ||
+ | |||
+ | 2 -rwx 1164 Nov 19 2016 23:15:21 +02: | ||
+ | |||
+ | 27998208 bytes total (14103040 bytes free) | ||
+ | </ | ||
+ | |||
+ | Some facts about the file: | ||
+ | * It stores between 4 (1, 1002-1005) and 1005 VLANs. If there are more, the configuration goes to the config file. | ||
+ | * If VTP mode is defined as transparent in the database and the config file and if the domain name matches, the VLAN information in the vlan.dat is ignored. | ||
+ | * vlan.dat is the default name. It can be changed with //vtp file < | ||
+ | |||
+ | |||
+ | Links: | ||
+ | * [[http:// | ||
+ | |||
+ | |||
+ | ===== Influence of VTP Configuration ===== | ||
+ | |||
+ | >In VTP Server Mode, switch "saves VLAN configuration information in a file named vlan.dat in flash memory." | ||
+ | |||
+ | >In VTP Client Mode, switch saves "VLAN information in RAM only, not stored in NVRAM or FLash memory; must be repopulated from a VTP server if switch is power-cycled." | ||
+ | |||
+ | >In VTP Transparent Mode, switch saves VLAN configuration in NVRAM. | ||
+ | |||
+ | //-- SWITCH (642-813) Student Guide Volume I// | ||
===== Structure ===== | ===== Structure ===== | ||
+ | |||
+ | There is no guarantee that the information in the following table is correct. It's based on some information I found on the internet and was extended by my own research and experiments. | ||
+ | |||
^ Offset ^ Bytes ^ Type ^ IOS Name ^ Values ^ Notes ^ | ^ Offset ^ Bytes ^ Type ^ IOS Name ^ Values ^ Notes ^ | ||
Line 12: | Line 49: | ||
| 00a | 32 | string | | 00a | 32 | string | ||
| 02a | 2 | :?: | :?: | ? | | | | 02a | 2 | :?: | :?: | ? | | | ||
- | | 02c | 4 | int | Configuration Revision | + | | 02c | 4 | int | Configuration Revision |
| 030 | 4 | int | Local updater ID | | 030 | 4 | int | Local updater ID | ||
| 034 | 4 | int | Last update on | | 034 | 4 | int | Last update on | ||
Line 43: | Line 80: | ||
| 0d9 | 1 | char | Backup CRF Mode | 0 (disabled), 1 (enabled) | type must be trcrf | | | 0d9 | 1 | char | Backup CRF Mode | 0 (disabled), 1 (enabled) | type must be trcrf | | ||
| 0da | 1 | char | Remote SPAN | 0 (disabled), 1 (enabled) | | | | 0da | 1 | char | Remote SPAN | 0 (disabled), 1 (enabled) | | | ||
- | | 0db | 1 | char | :?: | :?: | :?: I have no idea. I changed the value to 1 and 2 but I didn't notice | + | | 0db | 1 | char | :?: | :?: | :?: I have no idea. I changed the value to 1 and 2 but I didn't notice |
^ Following Stuff is yet unknown ^^^^^^ | ^ Following Stuff is yet unknown ^^^^^^ | ||
| ... | :?: | :?: | :?: | :?: | :?: Looks like garbage, will be harder to figure that out. | | | ... | :?: | :?: | :?: | :?: | :?: Looks like garbage, will be harder to figure that out. | | ||
- | //The initial data for this table is from a blog post of Chris Welsh ([[https:// | + | //The initial data for this table is from a blog post of Chris Welsh ([[https:// |
+ | |||
+ | |||
+ | ===== Information in IOS ===== | ||
+ | |||
+ | Here will be shown, how the information in the VLAN database can be displayed with IOS commands. | ||
+ | |||
+ | ==== VLAN Information ==== | ||
+ | |||
+ | < | ||
+ | affe#sh vl | ||
+ | |||
+ | VLAN Name | ||
+ | ---- -------------------------------- --------- ------------------------------- | ||
+ | 1 default | ||
+ | Gi1/0/22, Gi1/0/23, Gi1/0/25, Gi1/0/26 | ||
+ | 3 VLAN0003 | ||
+ | 5 VLAN0005 | ||
+ | 50 | ||
+ | 52 | ||
+ | 915 Entensuppe | ||
+ | 1002 fddi-default | ||
+ | 1003 token-ring-default | ||
+ | 1004 fddinet-default | ||
+ | 1005 trnet-default | ||
+ | |||
+ | VLAN Type SAID | ||
+ | ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------ | ||
+ | 1 enet 100001 | ||
+ | |||
+ | VLAN Type SAID | ||
+ | ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------ | ||
+ | 3 enet 100003 | ||
+ | 5 enet 100005 | ||
+ | 50 | ||
+ | 52 | ||
+ | 915 enet 100915 | ||
+ | 1002 fddi 101002 | ||
+ | 1003 tr 101003 | ||
+ | 1004 fdnet 101004 | ||
+ | 1005 trnet 101005 | ||
+ | |||
+ | |||
+ | Remote SPAN VLANs | ||
+ | ------------------------------------------------------------------------------ | ||
+ | |||
+ | |||
+ | Primary Secondary Type Ports | ||
+ | ------- --------- ----------------- ------------------------------------------ | ||
+ | |||
+ | |||
+ | </ | ||
+ | |||
+ | ==== VTP Configuration / Status ==== | ||
+ | |||
+ | < | ||
+ | affe#sh vtp status | ||
+ | VTP Version capable | ||
+ | VTP version running | ||
+ | VTP Domain Name : ENTENSUPPE | ||
+ | VTP Pruning Mode : Disabled | ||
+ | VTP Traps Generation | ||
+ | Device ID : a2a3.2b63.ef21 | ||
+ | Configuration last modified by 192.168.2.230 at 10-21-16 16:41:50 | ||
+ | Local updater ID is 192.168.1.200 on interface Vl1 (lowest numbered VLAN interface found) | ||
+ | |||
+ | Feature VLAN: | ||
+ | -------------- | ||
+ | VTP Operating Mode : Server | ||
+ | Maximum VLANs supported locally | ||
+ | Number of existing VLANs : 42 | ||
+ | Configuration Revision | ||
+ | MD5 digest | ||
+ | 0x77 0x88 0x99 0xAA 0xBB 0xCC 0xDD 0xEE | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | ---- | ||
+ | ---- | ||
+ | ---- | ||
==== Notes About Missing Parts ==== | ==== Notes About Missing Parts ==== | ||
Line 54: | Line 170: | ||
=== Garbage === | === Garbage === | ||
- | There is some garbage at the end of the file. Marco Rizzi ([[http:// | + | There is some garbage at the end of the file. Marco Rizzi ([[http:// |
I deleted the vlan.dat and reloaded the switch to get this clean config: | I deleted the vlan.dat and reloaded the switch to get this clean config: | ||
Line 226: | Line 342: | ||
- | ===== Information in IOS ===== | ||
- | |||
- | ==== VLAN Information ==== | ||
- | |||
- | < | ||
- | affe#sh vl | ||
- | |||
- | VLAN Name | ||
- | ---- -------------------------------- --------- ------------------------------- | ||
- | 1 default | ||
- | Gi1/0/22, Gi1/0/23, Gi1/0/25, Gi1/0/26 | ||
- | 3 VLAN0003 | ||
- | 5 VLAN0005 | ||
- | 50 | ||
- | 52 | ||
- | 915 Entensuppe | ||
- | 1002 fddi-default | ||
- | 1003 token-ring-default | ||
- | 1004 fddinet-default | ||
- | 1005 trnet-default | ||
- | |||
- | VLAN Type SAID | ||
- | ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------ | ||
- | 1 enet 100001 | ||
- | |||
- | VLAN Type SAID | ||
- | ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------ | ||
- | 3 enet 100003 | ||
- | 5 enet 100005 | ||
- | 50 | ||
- | 52 | ||
- | 915 enet 100915 | ||
- | 1002 fddi 101002 | ||
- | 1003 tr 101003 | ||
- | 1004 fdnet 101004 | ||
- | 1005 trnet 101005 | ||
- | |||
- | |||
- | Remote SPAN VLANs | ||
- | ------------------------------------------------------------------------------ | ||
- | |||
- | |||
- | Primary Secondary Type Ports | ||
- | ------- --------- ----------------- ------------------------------------------ | ||
- | |||
- | |||
- | </ | ||
- | |||
- | ==== VTP Configuration / Status ==== | ||
- | |||
- | < | ||
- | affe#sh vtp status | ||
- | VTP Version capable | ||
- | VTP version running | ||
- | VTP Domain Name : ENTENSUPPE | ||
- | VTP Pruning Mode : Disabled | ||
- | VTP Traps Generation | ||
- | Device ID : a2a3.2b63.ef21 | ||
- | Configuration last modified by 192.168.2.230 at 10-21-16 16:41:50 | ||
- | Local updater ID is 192.168.1.200 on interface Vl1 (lowest numbered VLAN interface found) | ||
- | |||
- | Feature VLAN: | ||
- | -------------- | ||
- | VTP Operating Mode : Server | ||
- | Maximum VLANs supported locally | ||
- | Number of existing VLANs : 42 | ||
- | Configuration Revision | ||
- | MD5 digest | ||
- | 0x77 0x88 0x99 0xAA 0xBB 0xCC 0xDD 0xEE | ||
- | </ | ||
os/ios/vlan.dat.1479500447.txt.gz · Last modified: 2016-11-18 21:20 by root