交换机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 #
(0)
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
(0)
暂无评论
看了你的配置,2口是接入交换机上么?
先手动配置一个vlan 20 的IP,看是否能通。
其次检查有没有vlan 没放通的地方,以及互联口dhcp trust等配置
(0)
暂无评论
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
暂无评论