memo for configuring c3750e


memo for configuring c3750e

objectives

  • personal memo

references

set management ip address

c3750-1#configure t
Enter configuration commands, one per line.  End with CNTL/Z.
c3750-1(config)#interface vlan 1
c3750-1(config-if)#ip address 192.168.100.203 255.255.255.0
c3750-1(config-if)#no shut
c3750-1(config-if)#end

set default gateway

c3750-1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
c3750-1(config)#ip default-gateway 192.168.100.4
c3750-1(config)#end

create vlan

c3750-1#config t
Enter configuration commands, one per line.  End with CNTL/Z.
c3750-1(config)#vlan 2
c3750-1(config-vlan)#name wan1
c3750-1(config-vlan)#end
c3750-1#

c3750-1#config t
Enter configuration commands, one per line.  End with CNTL/Z.
c3750-1(config)#vlan 4
c3750-1(config-vlan)#name wan2
c3750-1(config-vlan)#end
c3750-1#
c3750-1#show vlan

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Gi1/0/1, Gi1/0/2, Gi1/0/3
                                                Gi1/0/4, Gi1/0/5, Gi1/0/6
                                                Gi1/0/7, Gi1/0/8, Gi1/0/9
                                                Gi1/0/10, Gi1/0/11, Gi1/0/12
                                                Gi1/0/13, Gi1/0/14, Gi1/0/15
                                                Gi1/0/16, Gi1/0/17, Gi1/0/18
                                                Gi1/0/19, Gi1/0/20, Gi1/0/21
                                                Gi1/0/22, Gi1/0/23, Gi1/0/24
2    wan1                             active    
4    wan2                             active
(snip)

create access vlan port

conf t
int Gi1/0/8
switchport access vlan 2001
switchport mode access

create trunk vlan port

c3750-1(config)#interface Gi1/0/24
c3750-1(config-if)#switchport trunk encapsulation dot1q
c3750-1(config-if)#switchport mode trunk
c3750-1(config-if)#switchport trunk native vlan 1
c3750-1(config-if)#switchport trunk allowed vlan add 2,4
c3750-1(config-if)#end
c3750-1#show interfaces Gi1/0/24 switchport 
Name: Gi1/0/24
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
(snip)
c3750-1#show interfaces Gi1/0/24 trunk

Port        Mode             Encapsulation  Status        Native vlan
Gi1/0/24    on               802.1q         trunking      1

Port        Vlans allowed on trunk
Gi1/0/24    1-4094

Port        Vlans allowed and active in management domain
Gi1/0/24    1-2,4

Port        Vlans in spanning tree forwarding state and not pruned
Gi1/0/24    1-2,4

enable snmp traps

c3750-1(config)#snmp-server host 192.168.100.182 version 2c public
c3750-1(config)#snmp-server enable trap

configure ssh connection

c3750-1(config)#ip domain-name <your domain name>
c3750-1(config)#ip ssh version 2
c3750-1(config)#crypto key generate rsa
The name for the keys will be: c3750-1.hirfm.net
Choose the size of the key modulus in the range of 360 to 4096 for your
  General Purpose Keys. Choosing a key modulus greater than 512 may take
  a few minutes.

How many bits in the modulus [512]: 1024
% Generating 1024 bit RSA keys, keys will be non-exportable...
[OK] (elapsed time was 2 seconds)

c3750-1(config)#line vty 0 4
c3750-1(config-line)#transport input ssh
c3750-1(config-line)#login local
c3750-1(config-line)#exit

c3750-1#config t
c3750-1(config)#username <your username> password <your password>
c3750-1(config)#enable secret <your enable password>
c3750-1(config)#service password-encryption

c3750-1#sh ip ssh

SSH Enabled - version 1.99
Authentication timeout: 120 secs; Authentication retries: 3
Minimum expected Diffie Hellman key size : 1024 bits
IOS Keys in SECSH format(ssh-rsa, base64 encoded):
ssh-rsa
...

Configure Extended VLAN Number ex.2001

c3750-1(config)# vtp mode transparent

interface range configuration

c3750-1(config)#interface range GigabitEthernet 1/0/2-4
c3750-1(config-if-range)#switchport access vlan 2001

save config

copy running-config startup-config