1#
2# Example virtual equipment : sw2
3#
4# This file is an example of a virtual equipment modelling a switch
5# with two independant broadcast domains
6#
7# Note: informations marked as "(*)" are encoded in hex, with the
8# empty string represented as "-".
9# To encode a string, use tclsh:
10#	% binary scan "Hello, world" H* var
11#	1
12#	% puts $var
13#	48656c6c6f2c20776f726c64
14# To decode an encoded string, use tclsh with:
15#	% binary format H* 48656c6c6f2c20776f726c64
16#	Hello, world
17#
18# History:
19#   2012/04/13 : pda      : provide this example
20#   2012/04/26 : pda      : bring in sync with default database example
21#
22
23###############################################################################
24# Equipment definition
25###############################################################################
26
27#
28# Equipment characteristics:
29# - name: name of your equipment (don't use a FQDN)
30# - type and model: you can use any string you want. They are
31#	used in equipment display, and are searched as type/model
32#	when a network graph is displayed (see the WWW menu
33#	admin->modify equipment types)
34# - snmp: read community name (no space/tab inside), used by
35#	the metro module
36# - location(*): used only in equipment display at this time. Use "-"
37#	to indicate no location.
38# - manual: 1 (this is manually configured equipment, don't try
39#	to change VLAN on ports)
40#
41
42eq sw2 type cisco model WS-C3750 snmp public location - manual 1
43
44###############################################################################
45# Nodes provided by this equipment
46###############################################################################
47
48#
49# Bridging instance: there is one bridging instance for each broadcast
50# domain on this equipment. In this simple example, we transport two
51# distinct vlans (456 and 789) to this switch by the uplink port (23).
52# The vlan 456 is distributed:
53# - on port 0 (together with vlan 789)
54# - on port 1 (as a native vlan)
55# The vlan 789 is distributed:
56# - on port 0 (together with vlan 456)
57# - on port 2 (as a native vlan)
58#
59# Bridge node characteristics:
60# - node name (must be unique in the whole network graph, thus we
61#	prepend the equipment name)
62# - type : bridge
63# - eq : equipment name this node belongs to
64#
65
66node sw2:br456 type bridge eq sw2
67node sw2:br789 type bridge eq sw2
68
69#
70# Physical interfaces: describe all used interfaces (you do not need
71# to describe unused interfaces)
72#
73# Physical interface characteristics
74# - node name (must be unique in the whole network graph, thus we
75#	prepend the equipment name)
76# - type: L1
77# - eq: equipment name this node belongs to
78# - name: interface name
79# - link: link name (used to identify remote equipment) or X for terminal port
80# - encap: ether (native Ethernet) or trunk (IEEE 802.1Q encapsulation)
81# - stat: metrology sensor name, or "-" for no sensor
82# - desc(*): interface description (used in equipment display)
83#
84
85node sw2:g0  type L1 eq sw2 name Gi0/0  link X encap trunk stat - desc -
86node sw2:g1  type L1 eq sw2 name Gi0/1  link X encap ether stat - desc -
87node sw2:g2  type L1 eq sw2 name Gi0/2  link X encap ether stat - desc -
88node sw2:g23 type L1 eq sw2 name Gi0/23 link L102 encap trunk stat Msw2 desc 75706c696e6b20706f7274
89
90#
91# Vlan interfaces: each physical interface (L1) must be connected to
92# some Vlan (L2) interfaces.
93# - L1 with "encap ether" must be connected to exactly one L2 interface
94# - L1 with "encap trunk" may be connected to more than one L2 interface
95# Each L2 interface should be connected to a bridge node.
96#
97# Vlan interface characteristics
98# - node name (must be unique in the whole network graph, thus we
99#	prepend the equipment name)
100# - type: L1
101# - eq: equipment name this node belongs to
102# - stat: metrology sensor name, or "-" for no sensor
103# - desc(*): interface description (used in equipment display)
104# - ifname: interface name
105# - native: 1 (native vlan) or 0 (encapsulated vlan). In an ideal world,
106#	there would be no utility for this parameter, as L1 encapsulation
107#	mode tells if vlans are encapsulated or not. However, IP telephony
108#	often needs dual mode (e.g. ether Vlan for data and trunk Vlan
109#	for voice).
110#
111
112node sw2:p0-456 type L2 eq sw2 vlan 456 stat - desc - ifname - native 0
113node sw2:p0-789 type L2 eq sw2 vlan 789 stat - desc - ifname - native 0
114node sw2:p1     type L2 eq sw2 vlan 0   stat - desc - ifname - native 1
115node sw2:p2     type L2 eq sw2 vlan 0   stat - desc - ifname - native 1
116node sw2:up-456 type L2 eq sw2 vlan 456 stat - desc - ifname - native 0
117node sw2:up-789 type L2 eq sw2 vlan 789 stat - desc - ifname - native 0
118
119###############################################################################
120# Connexions between nodes on this equipment
121###############################################################################
122
123# Connexions between L1 and L2 nodes
124link sw2:g0 sw2:p0-456
125link sw2:g0 sw2:p0-789
126link sw2:g1 sw2:p1
127link sw2:g2 sw2:p2
128link sw2:g23 sw2:up-456
129link sw2:g23 sw2:up-789
130
131# Connexions between L2 nodes and bridge 456
132link sw2:br456 sw2:p0-456
133link sw2:br456 sw2:p1
134link sw2:br456 sw2:up-456
135
136# Connexions between L2 nodes and bridge 789
137link sw2:br789 sw2:p0-789
138link sw2:br789 sw2:p2
139link sw2:br789 sw2:up-789
140