Skip to content

Instantly share code, notes, and snippets.

@masterzen
Created June 18, 2011 11:26
Show Gist options
  • Save masterzen/1033016 to your computer and use it in GitHub Desktop.
Save masterzen/1033016 to your computer and use it in GitHub Desktop.
Puppet Network Device
c2950#sh interfaces FastEthernet 0/1 status
Port Name Status Vlan Duplex Speed Type
Fa0/1 --> to end-user wo connect 1000 auto auto 10/100BaseTX
c2950#sh etherchannel 1 summary
Flags: D - down P - in port-channel
I - stand-alone s - suspended
H - Hot-standby (LACP only)
R - Layer3 S - Layer2
u - unsuitable for bundling
U - in use f - failed to allocate aggregator
d - default port
Number of channel-groups in use: 1
Number of aggregators: 1
Group Port-channel Protocol Ports
------+-------------+-----------+-----------------------------------------------
1 Po1(SD) PAgP Fa0/17(D) Fa0/18(D)
c2950#sh running-config interface GigabitEthernet 0/1
Building configuration...
Current configuration : 188 bytes
!
interface GigabitEthernet0/1
description --> to upstream router
switchport trunk allowed vlan 99,1000
switchport mode trunk
end
[device1 certname]
type cisco
url ssh://puppet:letmein@device.domain.com/
[device2 certname]
type cisco
url telnet://puppet:letmein@router.domain.com/?enable=enablepassword
figureau#sh running-config interface vlan 12
Building configuration...
Current configuration : 118 bytes
!
interface Vlan12
description Vlan12
ip address 192.168.14.14 255.255.255.0
ipv6 address 2001:2674:8C23::1/64
end
node "c877.internal" {
interface {
"Vlan12":
ipaddress => [ "192.168.14.14/24", "2001:2674:8C23::1/64" ]
}
}
info: starting applying configuration to c2950.domain.com
info: Caching catalog for c2950.domain.com
info: Applying configuration version '1308408722'
notice: /Stage[main]//Node[c2950.domain.com]/Interface[GigabitEthernet0/1]/description: defined 'description' as '--> to upstream router'
notice: /Stage[main]//Node[c2950.domain.com]/Interface[GigabitEthernet0/1]/mode: mode changed 'access' to 'trunk'
notice: /Stage[main]//Node[c2950.domain.com]/Interface[GigabitEthernet0/1]/allowed_trunk_vlans: defined 'allowed_trunk_vlans' as '99,1000'
notice: /Stage[main]//Node[c2950.domain.com]/Interface[FastEthernet 0/1]/description: defined 'description' as '--> to end-user workstation'
notice: /Stage[main]//Node[c2950.domain.com]/Interface[FastEthernet 0/1]/native_vlan: defined 'native_vlan' as '1000'
notice: /Stage[main]//Node[c2950.domain.com]/Interface[FastEthernet 0/1]/mode: mode changed 'trunk' to 'access'
notice: /Stage[main]//Node[c2950.domain.com]/Interface[FastEthernet0/18]/description: defined 'description' as '--> to web server (channel 1)'
notice: /Stage[main]//Node[c2950.domain.com]/Interface[FastEthernet0/18]/etherchannel: defined 'etherchannel' as '1'
notice: /Stage[main]//Node[c2950.domain.com]/Interface[Fa0/17]/description: defined 'description' as '--> to web server (channel 1)'
notice: /Stage[main]//Node[c2950.domain.com]/Interface[Fa0/17]/etherchannel: defined 'etherchannel' as '1'
notice: Finished catalog run in 28.24 seconds
node "c2950.domain.com" {
Interface {
duplex => auto,
speed => auto
}
interface {
"FastEthernet 0/1":
description => "--> to end-user workstation",
mode => access,
native_vlan => 1000
}
interface {
"Fa0/17":
description => "--> to web server (channel 1)",
mode => access,
etherchannel => 1
}
interface {
"FastEthernet0/18":
description => "--> to web server (channel 1)",
mode => access,
etherchannel => 1
}
interface {
"GigabitEthernet0/1":
description => "--> to upstream router",
mode => trunk,
allowed_trunk_vlans => "99, 1000"
}
}
c2950#sh vlan
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
...
103 G&A_Dept active
...
info: starting applying configuration to c2950.domain.com
info: Caching catalog for c2950.domain.com
info: Applying configuration version '1308409100'
notice: /Stage[main]//Node[c2950.domain.com]/Vlan[103]/ensure: created
notice: Finished catalog run in 21.04 seconds
node "c2950.domain.com" {
vlan {
"103":
description => "G&A_Dept"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment