Home Article Practice 荣耀-晨晨

荣耀-晨晨

2024-05-23 19:23  views:404  source:bod    

telnet
CS6200-28X-Pro>enable 进入特权模式
CS6200-28X-Pro#config 进入全局配置
CS6200-28X-Pro(config)#vlan 100 创建vlan
CS6200-28X-Pro(config-vlan100)#int e1/0/1 进入e1/0/1端口
CS6200-28X-Pro(config-if-ethernet1/0/1)#switchport access vlan 100 将vlan100划分给端口e1/0/1
CS6200-28X-Pro(config-if-ethernet1/0/1)#int vlan 100 进入vlan100
CS6200-28X-Pro(config-if-vlan100)#ip address配置IP地址
CS6200-28X-Pro(config)#telnet-server enable 开启telnet 服务
CS6200-28X-Pro(config)#username administ privilege 15 password administ 创建用户名和密码
SW3-1(config)#telnet-server max-connection 7 最大连接数7
CS6200-28X-Pro(config)#authentication line vty login local 认证使用本地用户名密码登录交换机
不同vlan间通信
三层
CS6200-28X-Pro>ena
CS6200-28X-Pro#conf
CS6200-28X-Pro(config)#vlan 10;20
CS6200-28X-Pro(config)#int vlan 10
CS6200-28X-Pro(config-if-vlan10)#ip address 192.168.10.1 255.255.255.0
CS6200-28X-Pro(config-if-vlan10)#int vlan 20
CS6200-28X-Pro(config-if-vlan20)#ip address 192.168.20.1 255.255.255.0
CS6200-28X-Pro(config-if-vlan20)#exi
CS6200-28X-Pro(config)#int e1/0/1
CS6200-28X-Pro(config-if-ethernet1/0/1)#switchport mode trunk
二层
S4600-28P-SI(config)#vlan 10;20
S4600-28P-SI(config)#int e1/0/1
S4600-28P-SI(config-if-ethernet1/0/1)#switchport mode trunk
S4600-28P-SI(config)#int ethernet 1/0/2
S4600-28P-SI(config-if-ethernet1/0/2)#switchport access vlan 10
trunk:
设备连接设备时使用trunk
有标签时转发出去
无标签丢弃
access:
连接终端时使用access
无标签时,打上标签
有标签时,丢弃
1-12
属于vlan100
13-20
属于vlan202
链路聚合
链路聚合 增加链路的带宽
active 主动模式 两边可以同时使用active,也可以一边active,一边passive
passive 被动模式
passive 被动模式 两边不能同时使用
on 强制模式(静态模式) 两边必须是一样
CS6200-28X-Pro>enable
CS6200-28X-Pro#conf
CS6200-28X-Pro(config)#port-group 1 创建端口聚合组,编号为1
CS6200-28X-Pro(config)#interface ethernet 1/0/1-2 进入端口
CS6200-28X-Pro(config-if-port-range)#port-group 1 mode active 模式为active
CS6200-28X-Pro(config)#interface port-channel 1 进入创建的端口聚合接口
W3-1(config-if-port-channel1)#load-balance 负载分担方式选择
CS6200-28X-Pro(config-if-port-channel1)#switchport mode trunk 接口物理模式为trunk
!
!
port-group 1
!
Interface Ethernet1/0/1
switchport mode trunk
port-group 1 mode active
!
Interface Ethernet1/0/2
switchport mode trunk
port-group 1 mode active
!
ssh 远程登录协议
ena
conf
vlan 100
switchport interface ethernet 1/0/1-10
interface vlan 100
ip address
ssh-server enable >username administ password administ
authentication line vty login local
vrrp
CS6200-28X-Pro(config)#vlan 10 创建vlan10
CS6200-28X-Pro(config-vlan10)#int v 10 进入vlan10接口模式
CS6200-28X-Pro(config-if-vlan10)#ip address 配置网关
CS6200-28X-Pro(config)#router vrrp 10 进入vrrp进程
CS6200-28X-Pro(config-router)#interface vlan 10 关联vlan10
CS6200-28X-Pro(config-router)#virtual-ip 虚拟网关
CS6200-28X-Pro(config-router)#priority 120 优先级(越大越优先)
(config-router)#circuit-failover vlan 10 30 降低优先级
CS6200-28X-Pro(config-router)#enable 启动vrrp进程
单臂路由
R1_config#interface GigaEthernet0/0.10
R1_config_g0/0.10# ip address
R1_config_g0/0.10# encapsulation dot1Q 10
S4600-28P-SI(config)#hostname SW2-1
SW2-1(config)#int e1/0/3
SW2-1(config-if-ethernet1/0/3)#sw mo trunk
SW2-1(config-if-ethernet1/0/3)#exi
SW2-1(config)#vlan 10
SW2-1(config-vlan10)#sw int e1/0/1
SW2-1(config-vlan10)#vlan 20
SW2-1(config-vlan20)#sw int e1/0/2
生成树
拓扑图
冗余
优先级:越小越优先,0,4096,8192
CS6200-28X-Pro(config)#spanning-tree 开启生成树协议
CS6200-28X-Pro(config)#spanning-tree mst configuration 进入生成树进程
(config-mstp-region)#name 2024DCN 更改名字为2024DCN
(config-mstp-region)#revision-level 1 修改mstp 级别
CS6200-28X-Pro(config-mstp-region)#instance 10 vlan 10;20 实例10关联vlan10和vlan20
CS6200-28X-Pro(config-mstp-region)#instance 30 vlan 30;40 实例30关联vlan30和vlan40
CS6200-28X-Pro(config-mstp-region)#exi 退出进程
CS6200-28X-Pro(config)#spanning-tree mst 10 priority 4096 优先级
CS6200-28X-Pro(config)#spanning-tree mst 30 priority 8192
!
Interface Ethernet1/0/3
switchport mode trunk
!
!
!
spanning-tree mst configuration
instance 0 vlan 1-9;11-19;21-29;31-39;41-4094
instance 10 vlan 10;20
instance 30 vlan 30;40
exit
!
spanning-tree
spanning-tree mst 10 priority 4096
spanning-tree mst 30 priority 8192
CS6200-28X-Pro#
dhcp
自动分配IP地址
二三交换机
SW1(config)#service dhcp
开启dhcp服务
service dhcp
!
!
ip dhcp pool vlan10
network-address
lease 0 0 10
default-router
dns-server
!
ip dhcp excluded-address 禁止 DHCP 分配的地址
Rip
router rip
network 子网上使能路由协议
R1_config#ip dhcpd enable
R1_config#ip dhcpd pool vlan10
R1_config_dhcp#network
R1_config_dhcp#default-router
R1_config_dhcp#range
interface GigaEthernet0/3.10
ip address
encapsulation dot1Q 10
bandwidth 1000000
delay 1
!
show ip dhcpd bin
R1_config#show ip dhcpd binding
R1_config#
ipconfig -release
断开dhcp
ipconfig -renew
获取新的IP地址
ipconfig
查看IP地址
Chap
!
interface GigaEthernet0/3
ip address
interface Serial0/1
ip address
encapsulation ppp
ppp chap hostname R2
ppp chap password 0 admin
physical-layer speed 64000
!
aaa authentication ppp default local
!
username R1 password 0 admin
!
!
interface Serial0/1
no ip address
interface Serial0/2
ip address
encapsulation ppp
ppp chap hostname R2
ppp chap password 0 admin
physical-layer speed 64000
!
aaa authentication ppp default local
username R1 password 0 admin
Ppp
R1
interface Multilink1
ip address
no ip directed-broadcast
ppp multilink
multilink-group 1
!
interface Serial0/1
no ip address
no ip directed-broadcast
encapsulation ppp
ppp multilink
multilink-group 1
physical-layer speed 64000
!
interface Serial0/2
no ip address
no ip directed-broadcast
encapsulation ppp
ppp multilink
multilink-group 1
physical-layer speed 64000
!
R2
interface Multilink1
ip address
no ip directed-broadcast
ppp multilink
multilink-group 1
!
interface Serial0/1
encapsulation ppp
ppp multilink
multilink-group 1
physical-layer speed 64000
!
interface Serial0/2
encapsulation ppp
ppp multilink
multilink-group 1
physical-layer speed 64000
!



Disclaimer: The above articles are added by users themselves and are only for typing and communication purposes. They do not represent the views of this website, and this website does not assume any legal responsibility. This statement is hereby made! If there is any infringement of your rights, please contact us promptly to delete it.

字符:    改为:
去打字就可以设置个性皮肤啦!(O ^ ~ ^ O)