VTP 同步 捆绑 并且负载均衡 在DHCP地址池获取ip地址

简介:



VTP 同步  捆绑  并且负载均衡 在DHCP地址池获取ip地址

R1上配置
R1>en
R1#conf t
R1(config)#vlan 10    添加vlan
R1(config-vlan)#vlan 20
R1(config)#interface range f1/0 -1    2个端口做成中继
R1(config-if-range)#switchport mode trunk
R1(config-if-range)#switchport trunk encapsulation dot1q
R1(config-if-range)#inter vlan 10     vlan
R1(config-if)#ip address 192.168.10.1 255.255.255.0  在三层交换添加vlan接口网关
R1(config-if)#no shut
R1(config-if)#inter vlan 20
R1(config-if)#ip address 192.168.20.1 255.255.255.0
R1(config)#ip dhcp pool v10   添加地址池
R1(dhcp-config)#network 192.168.10.0 255.255.255.0   地址
R1(dhcp-config)#default-router 192.168.10.1   默认网关
R1(dhcp-config)#ip dhcp pool v20
R1(dhcp-config)#default-router 192.168.20.1
R1(dhcp-config)#network 192.168.20.0 255.255.255.0
 
R2上配置
R2>en
R2#conf t
R2(config)#vlan 10    添加vlan
R2(config-vlan)#vlan 20  
R2(config-vlan)#inter fa1/0     划分端口进vlan
R2(config-if)#switchport access vlan 10
R2(config)#no ip routing    路由功能关了
R2(config)#vtp domain hao.com   增加vtp域名
Changing VTP domain name from NULL to hao.com
R2(config)#vtp mode server    vtp模式改成服务器
Setting device to VTP SERVER mode
R2(config)#vtp version 2    版本为2
Cannot modify version in VTP client mode
R2(config)#vtp password 123   密码为123
Setting device VLAN database password to 123
R2(config)#interface range fastEthernet 1/3 -5   把几个端口捆绑在一起
R2(config-if-range)#channel-group 1 mode on
Creating a port-channel interface Port-channel1
R2(config-if-range)#inter f1/2   做成中继口
R2(config-if)#switchport mode trunk
R2(config-if)#switchport trunk encapsulation dot1q
R2(config-if)#end
R2#
R2#show
*Mar  1 00:13:51.563: %SYS-5-CONFIG_I: Configured from console by console
R2#show eth
R2#show etherchannel 1 s
R2#show etherchannel 1 summary
Flags:  D - down        P - in port-channel
        I - stand-alone s - suspended
        R - Layer3      S - Layer2
        U - in use
Group Port-channel  Ports
-----+------------+-----------------------------------------------------------
1     Po1(SU)     Fa1/3(P)   Fa1/4(P)   Fa1/5(D)     发现1 /5  接口 down 的,然后找出问题
 
R2#show ip int b
Interface                  IP-Address      OK? Method Status                Prot                                             ocol
FastEthernet0/0            unassigned      YES unset  administratively down down                                             
FastEthernet0/1            unassigned      YES unset  administratively down down                                            
FastEthernet1/0            unassigned      YES unset  up                    up                                               
FastEthernet1/1            unassigned      YES unset  up                    up                                              
FastEthernet1/2            unassigned      YES unset  up                    up                                               
FastEthernet1/3            unassigned      YES unset  up                    up                                              
FastEthernet1/4            unassigned      YES unset  up                    up                                               
FastEthernet1/5            unassigned      YES unset  up                    down                                            
FastEthernet1/6            unassigned      YES unset  up                    down                                             
FastEthernet1/7            unassigned      YES unset  up                    down                                            
FastEthernet1/8            unassigned      YES unset  up                    down                                             
FastEthernet1/9            unassigned      YES unset  up                    down                                            
FastEthernet1/10           unassigned      YES unset  up                    down                                             
FastEthernet1/11           unassigned      YES unset  up                    down                                            
FastEthernet1/12           unassigned      YES unset  up                    down                                             
FastEthernet1/13           unassigned      YES unset  up                    down                                            
FastEthernet1/14           unassigned      YES unset  up                    down                                             
FastEthernet1/15           unassigned      YES unset  up                    down                                            
Port-channel1              unassigned      YES unset  up                    up                                               
Vlan1                      unassigned      YES unset  up                    up          
 
R2#conf t
R2(config)#inter f1/5
R2(config-if)#shut
R2(config-if)#no shut   重新关闭然后再开启!
R2(config-if)#
*Mar  1 00:14:52.515: %EC-5-BUNDLE: Interface Fa1/5 joined port-channel Po1
R2(config-if)#
*Mar  1 00:14:53.883: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthern                                             et1/5, changed state to up
R2(config-if)#end
R2#
R2#shw
*Mar  1 00:14:58.555: %SYS-5-CONFIG_I: Configured from console by console
R2#show et
R2#show etherchannel 1 sun
R2#show etherchannel 1 su
R2#show etherchannel 1 summary
Flags:  D - down        P - in port-channel
        I - stand-alone s - suspended
        R - Layer3      S - Layer2
        U - in use
Group Port-channel  Ports
-----+------------+-----------------------------------------------------------
1     Po1(SU)     Fa1/3(P)   Fa1/4(P)   Fa1/5(P)   发现都是p立了 开启端口了
 
R3配置
R3>en
R3#conf t
R3(config)#vtp domain hao.com   域名 一样的
Changing VTP domain name from NULL to hao.com
R3(config)#vtp password 123    密码一样的123
Setting device VLAN database password to 123
R3(config)#vtp version 2   版本 2
R3(config)#vtp mode client   模式改成客户端
Device mode already VTP CLIENT.
R3(config)#end
R3#show vlan-s    发现都同步过来了
 
VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Fa1/0, Fa1/1, Fa1/2, Fa1/3
                                                Fa1/4, Fa1/5, Fa1/6, Fa1/7
                                                Fa1/8, Fa1/9, Fa1/10, Fa1/11
                                                Fa1/12, Fa1/13, Fa1/14, Fa1/15
10   VLAN0010                         active
20   VLAN0020                         active
1002 fddi-default                     act/unsup
1003 token-ring-default               act/unsup
1004 fddinet-default                  act/unsup
1005 trnet-default                    act/unsup
 
VLAN Type  SAID       MTU   Parent RingNo BridgeNo Stp  BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1    enet  100001     1500  -      -      -        -    -        1002   1003
10   enet  100010     1500  -      -      -        -    -        0      0
20   enet  100020     1500  -      -      -        -    -        0      0
1002 fddi  101002     1500  -      -      -        -    -        1      1003
1003 tr    101003     1500  1005   0      -        -    srb      1      1002
1004 fdnet 101004     1500  -      -      1        ibm  -        0      0
1005 trnet 101005     1500  -      -      1        ibm  -        0      0
R3#conf t
R3(config)#inter f1/0      划分端口进vlan
R3(config-if)#switchport access vlan 20
R3(config-if)#inter f1/2   设置成中继口
R3(config-if)#switchport mode trunk
R3(config-if)#switchport trunk encapsulation dot1q
R3(config)#no ip routing
R3(config)#interface range fastEthernet 1/3 -5   捆绑接口
R3(config-if-range)#channel-group 1 mode on
Creating a port-channel interface Port-channel1
R3(config-if-range)#
R3(config-if-range)#
R3(config-if-range)#end
测试结果,dhcp获取地址,并且能ping通别的vlan成员

本文转自 cs312779641 51CTO博客,原文链接:http://blog.51cto.com/chenhao6/1163705
相关实践学习
部署高可用架构
本场景主要介绍如何使用云服务器ECS、负载均衡SLB、云数据库RDS和数据传输服务产品来部署多可用区高可用架构。
负载均衡入门与产品使用指南
负载均衡(Server Load Balancer)是对多台云服务器进行流量分发的负载均衡服务,可以通过流量分发扩展应用系统对外的服务能力,通过消除单点故障提升应用系统的可用性。 本课程主要介绍负载均衡的相关技术以及阿里云负载均衡产品的使用方法。
相关文章
|
3天前
|
域名解析 网络协议 Linux
TCP/IP协议及配置、IP地址、子网掩码、网关地址、DNS与DHCP介绍
TCP/IP协议及配置、IP地址、子网掩码、网关地址、DNS与DHCP介绍
|
6月前
|
网络协议 网络架构
什么是 Wi-Fi IP Assignment 的 Automatic(DHCP) 方式
什么是 Wi-Fi IP Assignment 的 Automatic(DHCP) 方式
45 0
|
8月前
|
Shell Perl
获取slb日志里ip地址的shell脚本
获取slb日志里ip地址的shell脚本
46 1
|
11月前
|
网络协议 网络虚拟化
【DHCP实验】使用三层交换机配置DHCP Server服务器(基于全局地址池配置)
【DHCP实验】使用三层交换机配置DHCP Server服务器(基于全局地址池配置)
179 0
|
11月前
|
网络架构 Windows
使用Windows Server 2012 R2创建DHCP作用域(DHCP地址池),并测试使用
使用Windows Server 2012 R2创建DHCP作用域(DHCP地址池),并测试使用
233 0
|
11月前
|
Linux
DHCP服务的安装以及配置,使主机IP地址自动获取
DHCP服务的安装以及配置,使主机IP地址自动获取
168 0
|
11月前
|
存储 SQL 缓存
达梦实现高可用性的实现(failover功能/负载均衡/虚拟ip透明切换)
达梦实现高可用性的实现(failover功能/负载均衡/虚拟ip透明切换)
451 0
|
数据建模 开发工具 网络虚拟化
|
网络协议 安全 Linux
|
负载均衡 Cloud Native 微服务
《负载均衡 ALB的云上可观测能力最佳实践》电子版地址
随着云原生应用微服务化深入,用户需要面对复杂路由规则配置、支持多种应用层协议、服务访问的安全性以及流量的可观测性等诉求。ALB作为阿里云官方云原生Ingress网关,提供强大的应用层流量处理能力和丰富的高级路由功能,多级分发承载海量请求。
84 0
《负载均衡 ALB的云上可观测能力最佳实践》电子版地址