h3c开启trunk口与思科设备相互连接

H3C的24端口与思科设备1号端口相互trunk连接

H3C配置如下:


system-view                                                          //进入系统配置模式
[h3c]interface GigabitEthernet1/0/24                                      //进入24号端口
[h3c-GigabitEthernet1/0/24]port link-type trunk                           //trunk是端口汇聚的意思
[h3c-GigabitEthernet1/0/24]port trunk permit vlan all                     //配置允许通过所有的VLAN
[h3c-GigabitEthernet1/0/24]dhcp snooping trust                            //设置信任DHCP配置
[h3c-GigabitEthernet1/0/24]quit                                           //退出端口配置
[h3c]interface vlan-interface102                                          //进入管理ip地址
[h3c-vlan-interface102]ip  address 192.168.102.240 255.255.255.0          //配置一个管理ip地址
[h3c-vlan-interface102]quit                                               //退出端口配置
[h3c] ip route-static 0.0.0.0 0.0.0.0 192.168.102.240                     //配置交换机到网关的静态路由
[H3C] local-user admin                                                    //设置本地用户名为admin)
[H3C-luser-admin] service-type telnet level 3                             //用户级别设为3,即:管理级用户)
[H3C-luser-admin] password simple admin                                   //设置登录密码位admin)
[H3C-luser-admin]quit                                                     //退出端口配置
[H3C] ip http enable                                                      //开启网页版模式
[H3C]user vty 0 4                                                         //进入用户界面视图
[H3C-v-0-4] auth s                                                        //表示需要进行本地或者远端用户名和口令认证
[H3C-v-0-4]quit                                                           //退出端口配置
[h3c]vlan 102                                                             //创建vlan102
[h3c-vlan102]port g1/0/1 to g1/0/23                                       //把1到23号端口划分到vlan 102 里面去
[h3c-vlan102]quit                                                         //退出端口配置
[h3c]save                                                                 //保存配置
[h3c]display  current-configuration                                       //显示现在交换机正在运行的配置明细

主要信息如下图
interface GigabitEthernet1/0/1
port link-mode bridge
port access vlan 102
interface GigabitEthernet1/0/24
port link-mode bridge
port link-type trunk 
port trunk permit vlan all 
dhcp-snooping trust






思科交换机设备配置

sw#conf t                                                //进入特权模式
sw(config)#interface GigabitEthernet1/0/1                //进入1号端口
sw(config-if)#switchport mode trunk                      //设置trunk模式
sw(config-if)#ip dhcp snooping trust                     //设置信任dhcp配置