Vous êtes sur la page 1sur 25

Configurations

SW1 – The Heart of the Router on a Stick Configuration

SW1#sh vlan br

VLAN Name Status Ports


---- -------------------------------- --------- -------------------------------
1 default active Fa0/5, Fa0/6, Fa0/7, Fa0/8
Fa0/9, Fa0/10, Fa0/11, Fa0/12
Fa0/13, Fa0/14, Fa0/15, Fa0/16
Fa0/17, Fa0/18, Gi0/1, Gi0/2
12 VLAN0012 active
13 VLAN0013 active
14 VLAN0014 active
23 VLAN0023 active
34 VLAN0034 active
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup
SW1#sh run
Building configuration...

Current configuration : 2313 bytes


!
version 12.2
no service pad
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname SW1
!
!
no aaa new-model
ip subnet-zero
no ip domain-lookup
!
!
!
!
!
!
no file verify auto
spanning-tree mode pvst
spanning-tree extend system-id
!
vlan internal allocation policy ascending
!
!
interface FastEthernet0/1
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface FastEthernet0/2
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface FastEthernet0/3
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface FastEthernet0/4
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface FastEthernet0/5
switchport mode dynamic desirable
!
interface FastEthernet0/6
switchport mode dynamic desirable
!
interface FastEthernet0/7
switchport mode dynamic desirable
!
interface FastEthernet0/8
switchport mode dynamic desirable
!
interface FastEthernet0/9
switchport mode dynamic desirable
!
interface FastEthernet0/10
switchport mode dynamic desirable
!
interface FastEthernet0/11
switchport mode dynamic desirable
!
interface FastEthernet0/12
switchport mode dynamic desirable
!
interface FastEthernet0/13
switchport mode dynamic desirable
!
interface FastEthernet0/14
switchport mode dynamic desirable
!
interface FastEthernet0/15
switchport mode dynamic desirable
!
interface FastEthernet0/16
switchport mode dynamic desirable
!
interface FastEthernet0/17
switchport mode dynamic desirable
!
interface FastEthernet0/18
switchport mode dynamic desirable
!
interface FastEthernet0/19
switchport mode dynamic desirable
!
interface FastEthernet0/20
switchport mode dynamic desirable
!
interface FastEthernet0/21
switchport mode dynamic desirable
!
interface FastEthernet0/22
switchport mode dynamic desirable
!
interface FastEthernet0/23
switchport mode dynamic desirable
!
interface FastEthernet0/24
switchport mode dynamic desirable
!
interface GigabitEthernet0/1
switchport mode dynamic desirable
!
interface GigabitEthernet0/2
switchport mode dynamic desirable
!
interface Vlan1
no ip address
shutdown
!
ip classless
ip http server
ip http secure-server
!
!
!
control-plane
!
!
line con 0
exec-timeout 0 0
logging synchronous
line vty 0 4
no login
line vty 5 15
no login
!
end

SW1#

R1 – Segments 12 and 14

R1#sh run
Building configuration...

Current configuration : 1786 bytes


!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R1
!
boot-start-marker
boot-end-marker
!
no logging console
!
no aaa new-model
!
resource policy
!
memory-size iomem 10
no network-clock-participate slot 1
ip cef
!
!
!
!
no ip domain lookup
!
voice-card 0
no dspfarm
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback1
ip address 10.100.1.11 255.255.255.255 secondary
ip address 10.100.1.111 255.255.255.255 secondary
ip address 10.100.1.1 255.255.255.255
!
interface Loopback2
ip address 10.100.1.2 255.255.255.255
!
interface GigabitEthernet0/0
no ip address
shutdown
duplex auto
speed auto
media-type rj45
negotiation auto
!
interface GigabitEthernet0/1
no ip address
shutdown
duplex auto
speed auto
media-type rj45
negotiation auto
!
interface Serial0/0/0
no ip address
shutdown
!
interface Serial0/0/1
no ip address
shutdown
clock rate 2000000
!
interface FastEthernet1/0
no ip address
duplex auto
speed auto
!
interface FastEthernet1/0.12
encapsulation dot1Q 12
ip address 10.1.12.1 255.255.255.0
no snmp trap link-status
!
interface FastEthernet1/0.13
encapsulation dot1Q 13
ip address 10.1.13.1 255.255.255.0
no snmp trap link-status
!
interface FastEthernet1/0.14
encapsulation dot1Q 14
ip address 10.1.14.1 255.255.255.0
no snmp trap link-status
!
interface FastEthernet1/1
no ip address
shutdown
duplex auto
speed auto
!
!
!
ip http server
no ip http secure-server
!
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
exec-timeout 0 0
logging synchronous
stopbits 1
line aux 0
stopbits 1
line vty 0 4
login
!
scheduler allocate 20000 1000
!
webvpn context Default_context
ssl authenticate verify all
!
no inservice
!
!
end

R1#

R2 – Segments 12 and 23

R2#sh run
Building configuration...

Current configuration : 1446 bytes


!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R2
!
boot-start-marker
boot-end-marker
!
no logging console
!
no aaa new-model
!
resource policy
!
memory-size iomem 10
no network-clock-participate slot 1
ip cef
!
!
!
!
no ip domain lookup
!
voice-card 0
no dspfarm
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface GigabitEthernet0/0
no ip address
shutdown
duplex auto
speed auto
media-type rj45
negotiation auto
!
interface GigabitEthernet0/1
no ip address
shutdown
duplex auto
speed auto
media-type rj45
negotiation auto
!
interface Serial0/0/0
no ip address
shutdown
!
interface Serial0/0/1
no ip address
shutdown
clock rate 2000000
!
interface FastEthernet1/0
no ip address
duplex auto
speed auto
!
interface FastEthernet1/0.12
encapsulation dot1Q 12
ip address 10.1.12.2 255.255.255.0
no snmp trap link-status
!
interface FastEthernet1/0.23
encapsulation dot1Q 23
ip address 10.1.23.2 255.255.255.0
no snmp trap link-status
!
interface FastEthernet1/1
no ip address
shutdown
duplex auto
speed auto
!
!
!
ip http server
no ip http secure-server
!
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
exec-timeout 0 0
logging synchronous
stopbits 1
line aux 0
stopbits 1
line vty 0 4
login
!
scheduler allocate 20000 1000
!
webvpn context Default_context
ssl authenticate verify all
!
no inservice
!
!
end

R2#

R3 – Segments 23 and 34

R3#sh run
Building configuration...

Current configuration : 1563 bytes


!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R3
!
boot-start-marker
boot-end-marker
!
no logging console
!
no aaa new-model
!
resource policy
!
memory-size iomem 10
no network-clock-participate slot 1
ip cef
!
!
!
!
no ip domain lookup
!
voice-card 0
no dspfarm
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface GigabitEthernet0/0
no ip address
shutdown
duplex auto
speed auto
media-type rj45
negotiation auto
!
interface GigabitEthernet0/1
no ip address
shutdown
duplex auto
speed auto
media-type rj45
negotiation auto
!
interface Serial0/0/0
no ip address
shutdown
!
interface Serial0/0/1
no ip address
shutdown
clock rate 2000000
!
interface FastEthernet1/0
no ip address
duplex auto
speed auto
!
interface FastEthernet1/0.13
encapsulation dot1Q 13
ip address 10.1.13.3 255.255.255.0
no snmp trap link-status
!
interface FastEthernet1/0.23
encapsulation dot1Q 23
ip address 10.1.23.3 255.255.255.0
no snmp trap link-status
!
interface FastEthernet1/0.34
encapsulation dot1Q 34
ip address 10.1.34.3 255.255.255.0
no snmp trap link-status
!
interface FastEthernet1/1
no ip address
shutdown
duplex auto
speed auto
!
!
!
ip http server
no ip http secure-server
!
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
exec-timeout 0 0
logging synchronous
stopbits 1
line aux 0
stopbits 1
line vty 0 4
login
!
scheduler allocate 20000 1000
!
webvpn context Default_context
ssl authenticate verify all
!
no inservice
!
!
end

R3#

R4 – Segments 14 and 34

R4#sh run
Building configuration...

Current configuration : 1584 bytes


!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R4
!
boot-start-marker
boot-end-marker
!
no logging console
!
no aaa new-model
!
resource policy
!
memory-size iomem 10
no network-clock-participate slot 1
ip cef
!
!
!
!
no ip domain lookup
!
voice-card 0
no dspfarm
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface GigabitEthernet0/0
no ip address
shutdown
duplex auto
speed auto
media-type rj45
negotiation auto
!
interface GigabitEthernet0/1
no ip address
shutdown
duplex auto
speed auto
media-type rj45
negotiation auto
!
interface Serial0/0/0
no ip address
shutdown
!
interface Serial0/0/1
no ip address
shutdown
clock rate 2000000
!
interface Serial0/1/0
no ip address
shutdown
clock rate 2000000
!
interface Serial0/1/1
no ip address
shutdown
clock rate 2000000
!
interface FastEthernet1/0
no ip address
duplex auto
speed auto
!
interface FastEthernet1/0.14
encapsulation dot1Q 14
ip address 10.1.14.4 255.255.255.0
no snmp trap link-status
!
interface FastEthernet1/0.34
encapsulation dot1Q 34
ip address 10.1.34.4 255.255.255.0
no snmp trap link-status
!
interface FastEthernet1/1
no ip address
shutdown
duplex auto
speed auto
!
!
!
ip http server
no ip http secure-server
!
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
exec-timeout 0 0
logging synchronous
stopbits 1
line aux 0
stopbits 1
line vty 0 4
login
!
scheduler allocate 20000 1000
!
webvpn context Default_context
ssl authenticate verify all
!
no inservice
!
!
end

R4#

Useful Commands for Improved CLI Experience


R1(config)#no ip domain-lookup

R1(config)#line console 0
R1(config-line)#logging synchronous

Sample Verification Commands Used

R1#sh ip int br
Interface IP-Address OK? Method Status Protocol
GigabitEthernet0/0 unassigned YES manual administratively down down
GigabitEthernet0/1 unassigned YES manual administratively down down
Serial0/0/0 unassigned YES manual administratively down down
Serial0/0/1 unassigned YES manual administratively down down
FastEthernet1/0 unassigned YES manual up up
FastEthernet1/0.12 10.1.12.1 YES manual up up
FastEthernet1/0.13 10.1.13.1 YES manual up up
FastEthernet1/0.14 10.1.14.1 YES manual up up
FastEthernet1/1 unassigned YES manual administratively down down
Loopback1 10.100.1.1 YES manual up up
Loopback2 10.100.1.2 YES manual up up
R1#sh ip int br | ex una
Interface IP-Address OK? Method Status Protocol
FastEthernet1/0.12 10.1.12.1 YES manual up up
FastEthernet1/0.13 10.1.13.1 YES manual up up
FastEthernet1/0.14 10.1.14.1 YES manual up up
Loopback1 10.100.1.1 YES manual up up
Loopback2 10.100.1.2 YES manual up up
R1#sh run int f1/0.12
Building configuration...

Current configuration : 122 bytes


!
interface FastEthernet1/0.12
encapsulation dot1Q 12
ip address 10.1.12.1 255.255.255.0
no snmp trap link-status
end

R1#sh run interface FastEthernet1/0.13


Building configuration...

Current configuration : 122 bytes


!
interface FastEthernet1/0.13
encapsulation dot1Q 13
ip address 10.1.13.1 255.255.255.0
no snmp trap link-status
end

R1#sh run interface f1/0.14


Building configuration...

Current configuration : 122 bytes


!
interface FastEthernet1/0.14
encapsulation dot1Q 14
ip address 10.1.14.1 255.255.255.0
no snmp trap link-status
end

R1#ping 10.1.12.2

Type escape sequence to abort.


Sending 5, 100-byte ICMP Echos to 10.1.12.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/4 ms

SW1#sh int trunk

Port Mode Encapsulation Status Native vlan


Fa0/1 on 802.1q trunking 1
Fa0/2 on 802.1q trunking 1
Fa0/3 on 802.1q trunking 1
Fa0/4 on 802.1q trunking 1
Fa0/19 desirable n-isl trunking 1
Fa0/20 desirable n-isl trunking 1
Fa0/21 desirable n-isl trunking 1
Fa0/22 desirable n-isl trunking 1
Fa0/23 desirable n-802.1q trunking 1
Fa0/24 desirable n-802.1q trunking 1

Port Vlans allowed on trunk


Fa0/1 1-4094
Fa0/2 1-4094
Fa0/3 1-4094
Fa0/4 1-4094
Fa0/19 1-4094
Fa0/20 1-4094
Fa0/21 1-4094
Fa0/22 1-4094
Fa0/23 1-4094
Fa0/24 1-4094

Port Vlans allowed and active in management domain


Fa0/1 1,12-14,23,34
Fa0/2 1,12-14,23,34
Fa0/3 1,12-14,23,34
Fa0/4 1,12-14,23,34
Fa0/19 1,12-14,23,34
Fa0/20 1,12-14,23,34
Fa0/21 1,12-14,23,34
Fa0/22 1,12-14,23,34
Fa0/23 1,12-14,23,34
Fa0/24 1,12-14,23,34

Port Vlans in spanning tree forwarding state and not pruned


Fa0/1 1,12-14,23,34
Fa0/2 1,12-14,23,34
Fa0/3 1,12-14,23,34
Fa0/4 1,12-14,23,34
Fa0/19 1,12-14,23,34
Fa0/20 1,12-14,23,34
Fa0/21 1,12-14,23,34
Fa0/22 1,12-14,23,34
Fa0/23 1,12-14,23,34
Fa0/24 1,12-14,23,34

SW1#sh int f0/1 switchport


Name: Fa0/1
Switchport: Enabled
Administrative Mode: trunk
Operational Mode: trunk
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: dot1q
Negotiation of Trunking: On
Access Mode VLAN: 1 (default)
Trunking Native Mode VLAN: 1 (default)
Administrative Native VLAN tagging: enabled
Voice VLAN: none
Administrative private-vlan host-association: none
Administrative private-vlan mapping: none
Administrative private-vlan trunk native VLAN: none
Administrative private-vlan trunk Native VLAN tagging: enabled
Administrative private-vlan trunk encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk private VLANs: none
Operational private-vlan: none
Trunking VLANs Enabled: ALL
Pruning VLANs Enabled: 2-1001
Capture Mode Disabled
Capture VLANs Allowed: ALL

Protected: false
Unknown unicast blocked: disabled
Unknown multicast blocked: disabled
Appliance trust: none

Vous aimerez peut-être aussi