• 全部
  • 经验案例
  • 典型配置
  • 技术公告
  • FAQ
  • 漏洞说明
  • 全部
  • 全部
  • 大数据引擎
  • 知了引擎
产品线
搜索
取消
案例类型
发布者
是否解决
是否官方
时间
搜索引擎
匹配模式
高级搜索

交换机 交换机端口改VLAN号后获取不了IP

2022-08-14提问
  • 0关注
  • 1收藏,1578浏览
粉丝:0人 关注:1人

问题描述:

交换机interface Vlanif10 ip address 172.16.1.254 255.255.255.0 

 # interface Vlanif20 ip address 172.16.2.254 255.255.255.0 

 # interface Vlanif66 ip address 172.16.100.4 255.255.255.0 

 # interface GigabitEthernet0/0/2

 port link-type access port default vlan 10

2口 原本是VLAN10 的如果改成VLAN20  就获取不了ip了  

中心交换机的配置如下:

# router id 1.1.1.2 # vlan batch 10 to 11 20 to 21 30 40 66 to 67 99 to 100 # authentication-profile name default_authen_profile authentication-profile name dot1x_authen_profile authentication-profile name mac_authen_profile authentication-profile name portal_authen_profile authentication-profile name dot1xmac_authen_profile authentication-profile name multi_authen_profile # dhcp enable # radius-server template default # free-rule-template name default_free_rule # portal-access-profile name portal_access_profile # aaa authentication-scheme default authentication-scheme radius authentication-mode radius authorization-scheme default accounting-scheme default local-aaa-user password policy administrator password history record number 0 password expire 0 domain default authentication-scheme radius radius-server default domain default_admin authentication-scheme default local-user admin password irreversible-cipher $1a$~3se;hMfqK$3Zb-D5~"3#i:LC#F/iK&VEq4#,KAc;ucr!Zap27"$ local-user admin privilege level 15 local-user admin service-type terminal ssh http local-user cassiey password irreversible-cipher $1a$2dXA5b;&'*$T#JPU_QvWA${("<]9`!3@yq$QHStE<"(9.!{k&eR$ local-user cassiey privilege level 15 local-user cassiey service-type terminal ssh local-user zhua111 password irreversible-cipher $1a$d`EQ3{X<N0$nv7YYu/jxTo!|NNUl&SD_it+T@Ik-9sd@kG<`Ku0$ local-user zhua111 privilege level 15 local-user zhua111 service-type http # interface Vlanif1 # interface Vlanif9 # interface Vlanif10 ip address 172.16.1.1 255.255.255.0 dhcp select interface dhcp server ip-range 172.16.1.20 172.16.1.240 dhcp server gateway-list 172.16.1.1 dhcp server dns-list 223.5.5.5 114.114.114.114 # interface Vlanif11 description CCTV-Vlan ip address 192.168.1.1 255.255.255.0 # interface Vlanif20 ip address 172.16.2.1 255.255.255.0 dhcp select interface dhcp server ip-range 172.16.2.20 172.16.2.240 dhcp server gateway-list 172.16.2.1 dhcp server dns-list 223.5.5.5 114.114.114.114 # interface Vlanif21 description TO 3floor-switch ip address 172.16.3.1 255.255.255.0 dhcp select interface dhcp server ip-range 172.16.3.10 172.16.3.240 dhcp server gateway-list 172.16.3.1 dhcp server dns-list 119.29.29.29 223.5.5.5 # interface Vlanif30 ip address 172.16.8.1 255.255.248.0 dhcp select interface dhcp server ip-range 172.16.8.20 172.16.15.240 dhcp server gateway-list 172.16.8.1 dhcp server dns-list 223.5.5.5 114.114.114.114 # interface Vlanif40 ip address 172.16.16.1 255.255.248.0 dhcp select interface dhcp server ip-range 172.16.16.20 172.16.23.240 dhcp server gateway-list 172.16.16.1 dhcp server dns-list 223.5.5.5 114.114.114.114 # interface Vlanif66 description management-vlan ip address 172.16.100.1 255.255.255.0 dhcp select interface dhcp server ip-range 172.16.100.40 172.16.100.240 dhcp server gateway-list 172.16.100.1 dhcp server dns-list 119.29.29.29 223.5.5.5 # interface Vlanif67 description admin_vlan ip address 172.16.101.1 255.255.255.0 dhcp select interface dhcp server ip-range 172.16.101.2 172.16.101.10 dhcp server gateway-list 172.16.101.1 dhcp server dns-list 119.29.29.29 223.5.5.5 # interface Vlanif99 description TO AC ip address 10.0.1.2 255.255.255.0 # interface Vlanif100 ip address 10.0.0.2 255.255.255.0 # interface MEth0/0/1 # interface XGigabitEthernet0/0/1 # interface XGigabitEthernet0/0/2 # interface XGigabitEthernet0/0/3 # interface XGigabitEthernet0/0/4 # interface XGigabitEthernet0/0/5 # interface XGigabitEthernet0/0/6 # interface XGigabitEthernet0/0/7 # interface XGigabitEthernet0/0/8 # interface XGigabitEthernet0/0/9 # interface XGigabitEthernet0/0/10 # interface XGigabitEthernet0/0/11 # interface XGigabitEthernet0/0/12 # interface XGigabitEthernet0/0/13 # interface XGigabitEthernet0/0/14 # interface XGigabitEthernet0/0/15 # interface XGigabitEthernet0/0/16 # interface XGigabitEthernet0/0/17 # interface XGigabitEthernet0/0/18 # interface XGigabitEthernet0/0/19 # interface XGigabitEthernet0/0/20 # interface XGigabitEthernet0/0/21 description TO 3Floor-switch port link-type trunk port trunk allow-pass vlan 21 66 # interface XGigabitEthernet0/0/22 # interface XGigabitEthernet0/0/23 description TO 1.5Floor-switch port link-type trunk port trunk allow-pass vlan 10 to 11 30 66 # interface XGigabitEthernet0/0/24 description to Security-room port link-type trunk port trunk allow-pass vlan 10 to 11 66 # interface XGigabitEthernet0/0/25 description to hostel-data port link-type trunk port trunk allow-pass vlan 66 # interface XGigabitEthernet0/0/26 description to hostel-CCTV port link-type trunk port trunk allow-pass vlan 11 66 # interface XGigabitEthernet0/0/27 port link-type trunk port trunk allow-pass vlan 10 20 66 # interface XGigabitEthernet0/0/28 description TO-Server-CCTV port link-type trunk port trunk allow-pass vlan 11 66 # interface XGigabitEthernet0/0/29 port link-type trunk port trunk allow-pass vlan 10 20 66 # interface XGigabitEthernet0/0/30 description to server-data switch port link-type trunk port trunk allow-pass vlan 20 30 40 66 to 67 # interface XGigabitEthernet0/0/31 port link-type trunk port trunk allow-pass vlan 66 99 # interface XGigabitEthernet0/0/32 port link-type access port default vlan 100 # interface NULL0 # ospf 1 default-route-advertise area 0.0.0.0 authentication-mode simple cipher %^%#2CBH<fh#8M6P/pFyi3CWAO/32HE1a#n#&^EA'P~!%^%# network 10.0.0.0 0.0.0.255 network 10.0.1.0 0.0.0.255 network 172.16.1.0 0.0.0.255 network 172.16.2.0 0.0.0.255 network 172.16.3.0 0.0.0.255 network 172.16.8.0 0.0.7.255 network 172.16.16.0 0.0.7.255 network 172.16.101.0 0.0.0.255 network 192.168.1.0 0.0.0.255 # ip route-static 0.0.0.0 0.0.0.0 10.0.0.1 # stelnet ipv4 server enable stelnet ipv6 server enable # user-interface con 0 authentication-mode aaa user-interface vty 0 4 authentication-mode aaa protocol inbound all user-interface vty 16 20 # dot1x-access-profile name dot1x_access_profile # mac-access-profile name mac_access_profile # return <Core_switch> dis cu !Software Version V200R011C10SPC600 # sysname Core_switch # router id 1.1.1.2 # vlan batch 10 to 11 20 to 21 30 40 66 to 67 99 to 100 # authentication-profile name default_authen_profile authentication-profile name dot1x_authen_profile authentication-profile name mac_authen_profile authentication-profile name portal_authen_profile authentication-profile name dot1xmac_authen_profile authentication-profile name multi_authen_profile # dhcp enable # radius-server template default # free-rule-template name default_free_rule # portal-access-profile name portal_access_profile # aaa authentication-scheme default authentication-scheme radius authentication-mode radius authorization-scheme default accounting-scheme default local-aaa-user password policy administrator password history record number 0 password expire 0 domain default authentication-scheme radius radius-server default domain default_admin authentication-scheme default local-user admin password irreversible-cipher $1a$~3se;hMfqK$3Zb-D5~"3#i:LC#F/iK&VEq4#,KAc;ucr!Zap27"$ local-user admin privilege level 15 local-user admin service-type terminal ssh http local-user cassiey password irreversible-cipher $1a$2dXA5b;&'*$T#JPU_QvWA${("<]9`!3@yq$QHStE<"(9.!{k&eR$ local-user cassiey privilege level 15 local-user cassiey service-type terminal ssh local-user zhua111 password irreversible-cipher $1a$d`EQ3{X<N0$nv7YYu/jxTo!|NNUl&SD_it+T@Ik-9sd@kG<`Ku0$ local-user zhua111 privilege level 15 local-user zhua111 service-type http # interface Vlanif1 # interface Vlanif9 # interface Vlanif10 ip address 172.16.1.1 255.255.255.0 dhcp select interface dhcp server ip-range 172.16.1.20 172.16.1.240 dhcp server gateway-list 172.16.1.1 dhcp server dns-list 223.5.5.5 114.114.114.114 # interface Vlanif11 description CCTV-Vlan ip address 192.168.1.1 255.255.255.0 # interface Vlanif20 ip address 172.16.2.1 255.255.255.0 dhcp select interface dhcp server ip-range 172.16.2.20 172.16.2.240 dhcp server gateway-list 172.16.2.1 dhcp server dns-list 223.5.5.5 114.114.114.114 # interface Vlanif21 description TO 3floor-switch ip address 172.16.3.1 255.255.255.0 dhcp select interface dhcp server ip-range 172.16.3.10 172.16.3.240 dhcp server gateway-list 172.16.3.1 dhcp server dns-list 119.29.29.29 223.5.5.5 # interface Vlanif30 ip address 172.16.8.1 255.255.248.0 dhcp select interface dhcp server ip-range 172.16.8.20 172.16.15.240 dhcp server gateway-list 172.16.8.1 dhcp server dns-list 223.5.5.5 114.114.114.114 # interface Vlanif40 ip address 172.16.16.1 255.255.248.0 dhcp select interface dhcp server ip-range 172.16.16.20 172.16.23.240 dhcp server gateway-list 172.16.16.1 dhcp server dns-list 223.5.5.5 114.114.114.114 # interface Vlanif66 description management-vlan ip address 172.16.100.1 255.255.255.0 dhcp select interface dhcp server ip-range 172.16.100.40 172.16.100.240 dhcp server gateway-list 172.16.100.1 dhcp server dns-list 119.29.29.29 223.5.5.5 # interface Vlanif67 description admin_vlan ip address 172.16.101.1 255.255.255.0 dhcp select interface dhcp server ip-range 172.16.101.2 172.16.101.10 dhcp server gateway-list 172.16.101.1 dhcp server dns-list 119.29.29.29 223.5.5.5 # interface Vlanif99 description TO AC ip address 10.0.1.2 255.255.255.0 # interface Vlanif100 ip address 10.0.0.2 255.255.255.0 # interface MEth0/0/1 # interface XGigabitEthernet0/0/1 # interface XGigabitEthernet0/0/2 # interface XGigabitEthernet0/0/3 # interface XGigabitEthernet0/0/4 # interface XGigabitEthernet0/0/5 # interface XGigabitEthernet0/0/6 # interface XGigabitEthernet0/0/7 # interface XGigabitEthernet0/0/8 # interface XGigabitEthernet0/0/9 # interface XGigabitEthernet0/0/10 # interface XGigabitEthernet0/0/11 # interface XGigabitEthernet0/0/12 # interface XGigabitEthernet0/0/13 # interface XGigabitEthernet0/0/14 # interface XGigabitEthernet0/0/15 # interface XGigabitEthernet0/0/16 # interface XGigabitEthernet0/0/17 # interface XGigabitEthernet0/0/18 # interface XGigabitEthernet0/0/19 # interface XGigabitEthernet0/0/20 # interface XGigabitEthernet0/0/21 description TO 3Floor-switch port link-type trunk port trunk allow-pass vlan 21 66 # interface XGigabitEthernet0/0/22 # interface XGigabitEthernet0/0/23 description TO 1.5Floor-switch port link-type trunk port trunk allow-pass vlan 10 to 11 30 66 # interface XGigabitEthernet0/0/24 description to Security-room port link-type trunk port trunk allow-pass vlan 10 to 11 66 # interface XGigabitEthernet0/0/25 description to hostel-data port link-type trunk port trunk allow-pass vlan 66 # interface XGigabitEthernet0/0/26 description to hostel-CCTV port link-type trunk port trunk allow-pass vlan 11 66 # interface XGigabitEthernet0/0/27 port link-type trunk port trunk allow-pass vlan 10 20 66 # interface XGigabitEthernet0/0/28 description TO-Server-CCTV port link-type trunk port trunk allow-pass vlan 11 66 # interface XGigabitEthernet0/0/29 port link-type trunk port trunk allow-pass vlan 10 20 66 # interface XGigabitEthernet0/0/30 description to server-data switch port link-type trunk port trunk allow-pass vlan 20 30 40 66 to 67 # interface XGigabitEthernet0/0/31 port link-type trunk port trunk allow-pass vlan 66 99 # interface XGigabitEthernet0/0/32 port link-type access port default vlan 100 # interface NULL0 # ospf 1 default-route-advertise area 0.0.0.0 authentication-mode simple cipher %^%#2CBH<fh#8M6P/pFyi3CWAO/32HE1a#n#&^EA'P~!%^%# network 10.0.0.0 0.0.0.255 network 10.0.1.0 0.0.0.255 network 172.16.1.0 0.0.0.255 network 172.16.2.0 0.0.0.255 network 172.16.3.0 0.0.0.255 network 172.16.8.0 0.0.7.255 network 172.16.16.0 0.0.7.255 network 172.16.101.0 0.0.0.255 network 192.168.1.0 0.0.0.255 # ip route-static 0.0.0.0 0.0.0.0 10.0.0.1 # stelnet ipv4 server enable stelnet ipv6 server enable # user-interface con 0 authentication-mode aaa user-interface vty 0 4 authentication-mode aaa protocol inbound all user-interface vty 16 20 # dot1x-access-profile name dot1x_access_profile # mac-access-profile name mac_access_profile #

组网及组网描述:


4 个回答
粉丝:146人 关注:1人

1、检查有没有配置VLAN20的dhcp 地址池

2、检查地址池有没有满

3、不行抓包

暂无评论

粉丝:4人 关注:0人

检查下是否配置vlan20的dhcp服务器,正常配置才能下发ip

暂无评论

zhiliao_Pvda7V 知了小白
粉丝:0人 关注:1人

nterface Vlanif20
ip address 172.16.2.1 255.255.255.0
dhcp select interface
dhcp server ip-range 172.16.2.20 172.16.2.240
dhcp server gateway-list 172.16.2.1
dhcp server dns-list 223.5.5.5 114.114.114.114

中心交换机地址池

interface XGigabitEthernet0/0/29
port link-type trunk
port trunk allow-pass vlan 10 20 66   中心交换机端口

现在VLAN20 没怎么用 

有一台交换机也是VLAN20的 可以正常获取IP


暂无评论

知了小白
粉丝: 关注:

看了你的配置,2口是接入交换机上么?

先手动配置一个vlan 20 的IP,看是否能通。

其次检查有没有vlan 没放通的地方,以及互联口dhcp trust等配置

暂无评论

编辑答案

你正在编辑答案

如果你要对问题或其他回答进行点评或询问,请使用评论功能。

分享扩散:

提出建议

    +

亲~登录后才可以操作哦!

确定

亲~检测到您登陆的账号未在http://hclhub.h3c.com进行注册

注册后可访问此模块

跳转hclhub

你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作

举报

×

侵犯我的权益 >
对根叔社区有害的内容 >
辱骂、歧视、挑衅等(不友善)

侵犯我的权益

×

泄露了我的隐私 >
侵犯了我企业的权益 >
抄袭了我的内容 >
诽谤我 >
辱骂、歧视、挑衅等(不友善)
骚扰我

泄露了我的隐私

×

您好,当您发现根叔知了上有泄漏您隐私的内容时,您可以向根叔知了进行举报。 请您把以下内容通过邮件发送到pub.zhiliao@h3c.com 邮箱,我们会尽快处理。
  • 1. 您认为哪些内容泄露了您的隐私?(请在邮件中列出您举报的内容、链接地址,并给出简短的说明)
  • 2. 您是谁?(身份证明材料,可以是身份证或护照等证件)

侵犯了我企业的权益

×

您好,当您发现根叔知了上有关于您企业的造谣与诽谤、商业侵权等内容时,您可以向根叔知了进行举报。 请您把以下内容通过邮件发送到 pub.zhiliao@h3c.com 邮箱,我们会在审核后尽快给您答复。
  • 1. 您举报的内容是什么?(请在邮件中列出您举报的内容和链接地址)
  • 2. 您是谁?(身份证明材料,可以是身份证或护照等证件)
  • 3. 是哪家企业?(营业执照,单位登记证明等证件)
  • 4. 您与该企业的关系是?(您是企业法人或被授权人,需提供企业委托授权书)
我们认为知名企业应该坦然接受公众讨论,对于答案中不准确的部分,我们欢迎您以正式或非正式身份在根叔知了上进行澄清。

抄袭了我的内容

×

原文链接或出处

诽谤我

×

您好,当您发现根叔知了上有诽谤您的内容时,您可以向根叔知了进行举报。 请您把以下内容通过邮件发送到pub.zhiliao@h3c.com 邮箱,我们会尽快处理。
  • 1. 您举报的内容以及侵犯了您什么权益?(请在邮件中列出您举报的内容、链接地址,并给出简短的说明)
  • 2. 您是谁?(身份证明材料,可以是身份证或护照等证件)
我们认为知名企业应该坦然接受公众讨论,对于答案中不准确的部分,我们欢迎您以正式或非正式身份在根叔知了上进行澄清。

对根叔社区有害的内容

×

垃圾广告信息
色情、暴力、血腥等违反法律法规的内容
政治敏感
不规范转载 >
辱骂、歧视、挑衅等(不友善)
骚扰我
诱导投票

不规范转载

×

举报说明