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

VTP 同步  捆绑  并且负载均衡 在DHCP地址池获取ip地址<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

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成员

 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值