Cisco 4503 核心交换配置实例

en

vla dat

vlan 2
name JH

vlan 3
name LL

vlan 4
name A

vlan 5
name HO

vlan 6
name QQ

hostname heixin

conf t

interface Vlan 1
 description to guanli
 ip address 1.1.1.1 255.255.255.0

interface Vlan 2
 description to FW
 ip address 192.168.2.1 255.255.255.0

interface Vlan 3
 description to XC
 ip address 192.168.3.1 255.255.255.0

interface Vlan 4
 description to XV
 ip address 192.168.4.1 255.255.255.0

interface Vlan 6
 description to Xw
 ip address 192.168.6.1 255.255.255.0

ip routing 开启路由模式

ip route 0.0.0.0 0.0.0.0 192.168.6.1
ip route 192.168.2.0 255.255.255.0 192.168.6.2
ip route 192.168.3.0 255.255.255.0 192.168.6.2
ip route 192.168.4.0 255.255.255.0 192.168.6.2

interface range fastEthernet 0/2-5
 switchport trunk encapsulation dot1q
 switchport trunk native vlan 2                  归属vlan
 switchport trunk allowed vlan 2,3,4,5,6         允许2,3,4 vlan之间通信
 switchport mode trunk
 spanning-tree portfast trunk

interface range fastEthernet 0/6-10
 switchport trunk encapsulation dot1q
 switchport trunk native vlan 3                   归属vlan
 switchport trunk allowed vlan 2,3,4,5,6          允许2,3,4 vlan之间通信
 switchport mode trunk
 spanning-tree portfast trunk

interface range fastEthernet 0/11-16
 switchport trunk encapsulation dot1q
 switchport trunk native vlan 4                   归属vlan
 switchport trunk allowed vlan 2,3,4,5,6          允许2,3,4 vlan之间通信
 switchport mode trunk
 spanning-tree portfast trunk


iinterface fastEthernet 0/1
 description FW
switchport mode access
switchport access vlan 6

interface range fastEthernet 0/17-21
 switchport access vlan 2
 switchport mode access

interface range fastEthernet 0/21-22
 switchport access vlan 3
 switchport mode access

interface range fastEthernet 0/23-24
 switchport access vlan 4
 switchport mode access


DHCP 配置

ip dhcp pool vlan2
   network 192.168.2.0 255.255.255.0
   default-router 192.168.2.1
   dns-server 202.99.224.68 202.99.224.8

ip dhcp pool vlan3
   network 192.168.3.0 255.255.255.0
   default-router 192.168.3.1
   dns-server 202.99.224.68 202.99.224.8

ip dhcp pool vlan4
   network 192.168.4.0 255.255.255.0
   default-router 192.168.4.1
   dns-server 202.99.224.68 202.99.224.8

ip dhcp excluded-address 192.168.4.241 192.168.4.244 不分配的地址

show int des 查看接口

ssh 配置

ip domain-name cisco.com

crypto key generate rsa  (1024)

line vty 0 4     
login local      
transport input Telnet ssh

line console 0
no exec-t  
logg syn

enable secret cisco  特权模式密码

aaa new-model 全局配置AAA

aaa authentication login admin

aaa authentication login default local

username admin password cisco

username nousername secret nopassword

ip ssh time-out 180

ip ssh authentication-retries

wr

本文出自 “为梦想奋斗” 博客,谢绝转载!

你可能感兴趣的:(Cisco,核心交换,4503)