Cisco3750_Simple_Config_Guid(good)

本文详细介绍了如何使用Cisco交换机进行连接初始化、配置管理网络接口、设置VLAN、开启IP路由、配置VTP、监控端口、使用FTP复制配置文件以及配置HSRP(Hot Standby Router Protocol)实现冗余路由。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 1      Connection and Initialization

Serial Console (Cisco serial cable) + SecureCRT (9600 / 8 / None / 1 / None)

Enter host name [switch]: C3750_1

Enter enable secret: enable

Enter enable password: enable

Enter virtual terminal password: enable

Enter interface name used to connect to the

management network from the above interface summary: GigabitEthernet1/0/48

2      Port IP Configuration

C3750_1> enable

Password: enable

C3750_1# configure terminal

C3750_1(config)#interface GigabitEthernet 1/0/48

C3750_1(config-if)#no switchport

C3750_1(config-if)#ip address 172.24.178.227 255.255.255.0

C3750_1(config-if)#no shutdown

C3750_1(config-if)#end

C3750_1#write

3      Remote Configuration

C:\> telnet 172.24.178.227

Password: enable

C3750_1> enable

4      VLAN Configuration

C3750_1> enable

Password: enable

C3750_1# configure terminal

C3750_1(config)# vlan 3

C3750_1(config-vlan)# exit

C3750_1(config)# interface vlan 3

C3750_1(config-if)#ip address 11.227.3.100 255.255.255.0

C3750_1(config-if)#exit

C3750_1# show interfaces vlan3

 

C3750_1(config)#interface range GigabitEthernet 1/0/3-4

C3750_1(config-if-range)#switchport mode access

C3750_1(config-if-range)#switchport access vlan 3

C3750_1(config-if-range)#end

C3750_1#write

C3750_1# show vlan

5      Opening IP routing

Only opened IP routing, difference VLANs can communicate each other.

C3750_1(config)#ip routing

6      Configuring a trunk port

C3750_1(config)#interface GigabitEthernet 1/0/1

C3750_1(config-if)#switchport trunk encapsulation dot1q

C3750_1(config-if)#switchport mode trunk

C3750_1#show interfaces GigabitEthernet 1/0/1 switchport

C3750_1#copy running-config startup-config

 

A trunk port configured with 802.1Q tagging can receive both tagged and untagged traffic. By default, the switch forwards untagged traffic in the native VLAN configured for the port. The native VLAN is VLAN 1 by default. If a packet has a VLAN ID that is the same as the outgoing port native VLAN ID, the packet is sent untagged; otherwise, the switch sends the packet with a tag.

    C3750_1(config)#interface GigabitEthernet 1/0/1

    C3750_1(config-if)#switchport trunk native vlan 4

To return to the default native VLAN, VLAN 1, use the no switchport trunk native vlan interface configuration command.

7      VTP(VLAN Trunking Protocol) Configuration

C3750_1(config)#vtp domain C3750_1

C3750_1(config)#vtp mode server

C3750_2(config)#vtp mode client

C3750_1(config)#end

C3750_1#show vtp status

 

Disable VTP

C3750_1(config)#vtp mode transparent

C3750_1(config)#end

C3750_1(config)#copy running-config startup-config

8      Monitoring Port

C3750_1(config)#monitor session 1 source interface GigabitEthernet 1/0/48 both

For session_number, the range is from 1 to 66.

C3750_1(config)#monitor session 1 destination interface GigabitEthernet 1/0/30

 

C3750_1(config)#monitor session 2 source vlan 3

C3750_1(config)#monitor session 2 destination interface GigabitEthernet 1/0/31

 

C3750_1#show monitor

9      Copying Configuration Files By Using FTP

Before you begin downloading or uploading a configuration file by using FTP, do these tasks:

? Ensure that the switch has a route to the FTP server. The switch and the FTP server must be in the same subnetwork if you do not have a router to route traffic between subnets. Check connectivity to the FTP server by using the ping command.

? If you are accessing the switch through the console or a Telnet session and you do not have a valid username, make sure that the current FTP username is the one that you want to use for the FTP download. You can enter the show users privileged EXEC command to view the valid username. If you do not want to use this username, create a new FTP username by using the ip ftp username username global configuration command during all copy operations. The new username is stored in NVRAM. If you are accessing the switch through a Telnet session and you have a valid username, this username is used, and you do not need to set the FTP username. Include the username in the copy command if you want to specify a username for only that copy operation.

? When you upload a configuration file to the FTP server, it must be properly configured to accept the write request from the user on the switch.

 

Copy running-config to ftp server:

C3750_1(config)#ip ftp username bscftp

C3750_1(config)#ip ftp password bscftp

C3750_1#copy running-config ftp

Address or name of remote host []? 172.24.178.48

Destination filename [c3750_1-confg]?

Writing c3750_1-confg !

4580 bytes copied in 2.005 secs (2284 bytes/sec)

 

Copy backup configuration file to running-config:

C3750_1#copy ftp://bscftp:bscftp@172.24.178.48/c3750_1-confg system:running-config

C3750_1#write

10  HSRP configuration

HSRP should be configured on one of these Layer 3 interfaces:

   1) Routed port: a physical port configured as a Layer 3 port by entering the no switchport

interface configuration command.

2) SVI: a VLAN interface created by using the interface vlan vlan_id global configuration command and by default a Layer 3 interface.

3) Etherchannel port channel in Layer 3 mode: a port-channel logical interface created by using the interface port-channel port-channel-number global configuration command and binding the Ethernet interface into the channel group.

 

The first two kinds of interfaces often were used by us.

For Routed ports in two routers, we must connect them by the third switch/hub, otherwise the “Hello” message can’t be exchanged.

For SVI ports in two routers, we have two kinds of methods to exchange the “Hello” message:

i)              It’s same as the method for Routed ports, introducing the third switch/hub.

ii)             Configure trunk port in both routers, and connect these two trunk ports together.

But for BSC, we normally directly connect two SSWs with respective Router. Between them there is not the third switch/hub. So the corresponding ports on Routers must be the SVI port.

For covering complex fault cause, all HSRP had better configure on SVI ports, for example in this case:

Cisco3750_Simple_Config_Guid - ahleung - 天文南园的IT技术博客
 

If R1.P2 and R2.P2 are Routed ports, BSC couldn’t ping BTS, and would receive the ICMP response for Host Unreachable, due to R2 has not the routing information for BTS subnet.

But if R1.P2 and R2.P2 are SVI ports, because the IP was configured on VLAN not on port, the corresponding routing item still exists due to P3 still is up. So BSC can ping BTS successfully. However for avoided the loop, R1 and R2 ports must start up the STP(spanning tree protocol). Fortunately, by default STP is launched for all ports.

 

So following I just give the method for how to configure HSRP on SVI ports:

C3750_1# configure terminal

C3750_1(config)# vlan 100

C3750_1(config-vlan)# exit

C3750_1(config)# interface vlan 100

C3750_1(config-if)#ip address 192.168.200.1 255.255.255.0

C3750_1(config-if)#standby 2 ip 192.168.200.3

C3750_1(config-if)# standby 2 priority 110

C3750_1(config-if)# standby 2 track GigabitEthernet 1/0/1

C3750_1(config-if)# standby 2 preempt

C3750_1(config-if)#exit

C3750_1(config)#interface range GigabitEthernet 1/0/1

C3750_1(config-if-range)#switchport mode access

C3750_1(config-if-range)#switchport access vlan 100

C3750_1(config-if-range)#end

C3750_1#write

C3750_1#show standby

 

C3750_2# configure terminal

C3750_2(config)# vlan 100

C3750_2(config-vlan)# exit

C3750_2(config)# interface vlan 100

C3750_2(config-if)#ip address 192.168.200.2 255.255.255.0

C3750_2(config-if)#standby 2 ip 192.168.200.3

C3750_2(config-if)# standby 2 priority 110

C3750_1(config-if)# standby 2 track GigabitEthernet 1/0/1

C3750_2(config-if)# standby 2 preempt

C3750_2(config-if)#exit

C3750_2(config)#interface range GigabitEthernet 1/0/1

C3750_2(config-if-range)#switchport mode access

C3750_2(config-if-range)#switchport access vlan 100

C3750_2(config-if-range)#end

C3750_2#write

C3750_2#show standby

11  Reboot

C3750_1# reload

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值