Cisco DTP negociator

From IPFlow Netflow Collector

This tool permits a user with a Linux box to negociate a trunk (802.1Q or ISL) with a Cisco switch running DTP (Cisco Dynamic Trunk Protocol).

In order to be useful, it also downloads the VLAN database using the Cisco VTP protocol (note: only working with 802.1Q trunks now).


Example

vortex:~/dtp# ./ipflow dtp eth1 000d.1234.5678 dot1q
serv_mgr: unable to open file './protocols.txt' (No such file or directory)
serv_mgr: unable to open file './services.txt' (No such file or directory)
IPFlow Collector - Release 0.49.7-X3-24 23-Mar-05 (BETA)
Compiled at Mar 31 2005 02:18:58 by Christophe Fillot (cf@utc.fr)

IPFlow Dynamic Trunk Protocol negociator started.
DTP: VTP domain name is 'TEST'.
VTP: Starting timer to get VLAN list...
VTP: Sending Advert-Request frame to obtain VLAN list...
Link is detected as 802.1Q.
VTP: Sending Advert-Request frame to obtain VLAN list...
VTP VLAN List (configuration revision 112) :
   1    default                          active
   2    ENGINEERING                      active
   3    MARKETING                        active
   4    DMZ1                             active
   5    DMZ2                             active
   1002 fddi-default                     active
   1003 trcrf-default                    active
   1004 fddinet-default                  active
   1005 trbrf-default                    active

The program needs to run continously to maintain the trunk.


Command Line Syntax

  • The first parameter (here "eth1") is the ethernet interface connected to the switch.
  • The second parameter ("000d.1234.5678") is the ethernet address to use to communicate with the switch.
  • The third parameter is the trunk type and can be : "dot1q", "isl" or "none". If you specify "none", the switch port will become an access port.


Remark: you need root access since this tool uses raw ethernet sockets.


How to use it ?

The Linux kernel supports 802.1Q encapsulation in software, even if your network card doesn't support it in hardware. You can easily create sub-interfaces with the "vconfig" utility.