Sunday, August 25, 2013

Connecting a GNS3 router to a real Catalyst switch

So I've got my 8-port Cisco Catalyst 2960 Layer 2 switch, which I purchased for a really great price on Ebay. A cool feature of the WS-C2960PD-8TT-L versus the WS-C2960-8TC-L model is that you can power it up using its PoE uplink port. I've powered up the 2960 using my 3560 PoE multilayer switch.


3560#
00:01:47: %ILPOWER-7-DETECT: Interface Fa0/8: Power Device detected: IEEE PD
3560#show power inline
Available:124.0(w)  Used:15.4(w)  Remaining:108.6(w)

Interface Admin  Oper       Power   Device              Class Max
                            (Watts)
--------- ------ ---------- ------- ------------------- ----- ----
Fa0/1     auto   off        0.0     n/a                 n/a   15.4
Fa0/2     auto   off        0.0     n/a                 n/a   15.4
Fa0/3     auto   off        0.0     n/a                 n/a   15.4
Fa0/4     auto   off        0.0     n/a                 n/a   15.4
Fa0/5     auto   off        0.0     n/a                 n/a   15.4
Fa0/6     auto   off        0.0     n/a                 n/a   15.4
Fa0/7     auto   off        0.0     n/a                 n/a   15.4
Fa0/8     auto   on         15.4    WS-C2960PD-8TT-L    3     15.4


I've also tested this switch with an emulated router in GNS3 using a 802.1Q trunk port. We checked the Ethernet (wired) LAN adapter if its enabled and supports VLAN by going to Network and Sharing Center > Change adapter settings > right-click on the Local Area Connection > double-click Internet Protocol Version 4 (TCP/IPv4) > Properties > Advanced tab > Priority and VLAN.


We connect our PC's Ethernet LAN to a switch port, drag a cloud icon in GNS3 workspace > Right-click > Configure > NIO Ethernet > Select the Local Area Connection adapter and then click OK.

R1#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#interface fastethernet1/1
R1(config-if)#no shutdown
R1(config-if)#switchport ?
  access    Set access mode characteristics of the interface
  mode      Set trunking mode of the interface
  priority  Set 802.1p priorities
  trunk     Set trunking characteristics of the interface
  voice     Voice appliance attributes
  <cr>

R1(config-if)#switchport trunk ?
  allowed        Set allowed VLAN characteristics when interface is in trunking
                 mode
  encapsulation  Set trunking encapsulation when interface is in trunking mode
  native         Set trunking native characteristics when interface is in
                 trunking mode

R1(config-if)#switchport trunk encapsulation ?
  dot1q  Interface uses only 802.1q trunking encapsulation when trunking

R1(config-if)#switchport trunk encapsulation dot1q
R1(config-if)#switchport mode ?
  access  Set trunking mode to ACCESS unconditionally
  trunk   Set trunking mode to TRUNK unconditionally

R1(config-if)#switchport mode trunk
R1(config-if)#
*Mar  1 00:01:09.191: %DTP-5-TRUNKPORTON: Port Fa1/1 has become dot1q trunk
R1(config-if)#end
*Mar  1 00:02:24.203: %SYS-5-CONFIG_I: Configured from console by console
R1#show interface trunk

Port      Mode         Encapsulation  Status        Native vlan
Fa1/1     on           802.1q         trunking      1

Port      Vlans allowed on trunk
Fa1/1     1-4094

Port      Vlans allowed and active in management domain
Fa1/1     1

Port      Vlans in spanning tree forwarding state and not pruned
Fa1/1     1
R1#show cdp neighbors
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
                  S - Switch, H - Host, I - IGMP, r - Repeater

Device ID        Local Intrfce     Holdtme    Capability  Platform  Port ID
SW1              Fas 1/1            136          S I      WS-C2960P Fas 0/8


----


SW1#configure terminal
SW1(config)#interface fastethernet0/8
SW1(config-if)#switchport mode ?
  access   Set trunking mode to ACCESS unconditionally
  dynamic  Set trunking mode to dynamically negotiate access or trunk mode
  trunk    Set trunking mode to TRUNK unconditionally

SW1(config-if)#switchport mode trunk
SW1(config-if)#
*Mar  1 00:51:39.850: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/8, changed state to down
*Mar  1 00:51:39.850: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to down
SW1(config-if)#
*Mar  1 00:51:42.870: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/8, changed state to up

SW1#show cdp neighbors
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
                  S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone

Device ID        Local Intrfce     Holdtme    Capability  Platform  Port ID
R1.lab.local     Fas 0/8           138          R S I     3725      Fas 1/1

SW1(config)#vlan 10
SW1(config-vlan)#name SALES
SW1(config-vlan)#exit
SW1(config)#vlan 20
SW1(config-vlan)#name IT
SW1(config-vlan)#exit
SW1(config)#vtp domain CISCO
Changing VTP domain name from NULL to CISCO
SW1(config)#
*Mar  1 01:07:20.775: %SW_VLAN-6-VTP_DOMAIN_NAME_CHG: VTP domain name changed to CISCO.
SW1(config)#vtp password CISCO
Setting device VLAN database password to CISCO
 SW1(config)#end
*Mar  1 01:03:39.073: %SYS-5-CONFIG_I: Configured from console by console
SW1#show vlan brief

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Fa0/1, Fa0/2, Fa0/3, Fa0/4
                                                Fa0/5, Fa0/6, Fa0/7, Gi0/1
10   SALES                            active
20   IT                               active
1002 fddi-default                     act/unsup
1003 token-ring-default               act/unsup
1004 fddinet-default                  act/unsup
1005 trnet-default                    act/unsup

SW1#show vtp status
VTP Version                     : running VTP1 (VTP2 capable)
Configuration Revision          : 4
Maximum VLANs supported locally : 255
Number of existing VLANs        : 7
VTP Operating Mode              : Server
VTP Domain Name                 :
VTP Pruning Mode                : Disabled
VTP V2 Mode                     : Disabled
VTP Traps Generation            : Disabled
MD5 digest                      : 0x58 0x1E 0x86 0x6A 0xAF 0x01 0xEE 0x54
Configuration last modified by 0.0.0.0 at 3-1-93 01:03:30
Local updater ID is 0.0.0.0 (no valid interface found)


R1(config)#vtp mode ?
  client       Set the device to client mode.
  server       Set the device to server mode.
  transparent  Set the device to transparent mode.

R1(config)#vtp mode client
Setting device to VTP CLIENT mode.
R1(config)#exit
R1#show vlan-switch

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Fa1/0, Fa1/2, Fa1/3, Fa1/4
                                                Fa1/5, Fa1/6, Fa1/7, Fa1/8
                                                Fa1/9, Fa1/10, Fa1/11, Fa1/12
                                                Fa1/13, Fa1/14, Fa1/15
10   SALES                            active
20   IT                               active
1002 fddi-default                     act/unsup
1003 token-ring-default               act/unsup
1004 fddinet-default                  act/unsup
1005 trnet-default                    act/unsup

VLAN Type  SAID       MTU   Parent RingNo BridgeNo Stp  BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1    enet  100001     1500  -      -      -        -    -        0      0
10   enet  100010     1500  -      -      -        -    -        0      0
20   enet  100020     1500  -      -      -        -    -        0      0
1002 fddi  101002     1500  -      0      -        -    -        0      0
1003 tr    101003     1500  -      0      -        -    srb      0      0
1004 fdnet 101004     1500  -      -      -        ieee -        0      0
1005 trnet 101005     1500  -      -      -        ibm  -        0      0

R1#show vtp status
VTP Version                     : 2
Configuration Revision          : 4
Maximum VLANs supported locally : 36
Number of existing VLANs        : 7
VTP Operating Mode              : Client
VTP Domain Name                 : CISCO
VTP Pruning Mode                : Disabled
VTP V2 Mode                     : Disabled
VTP Traps Generation            : Disabled
MD5 digest                      : 0x71 0x09 0x94 0x78 0x7F 0xDF 0xB1 0x27
Configuration last modified by 0.0.0.0 at 3-1-93 01:03:30

No comments:

Post a Comment