H3C S5500 SI三层交换机如何配置DHCP服务器 三层交换机如何配置DHCP服务
H3C\u4e09\u5c42\u4ea4\u6362\u673a\u5982\u4f55\u914d\u7f6e\u5728\u4e09\u5c42\u4ea4\u6362\u673a\u4e0a\u542f\u7528\u8def\u7531\u529f\u80fd\uff0c\u60f3\u505a\u51fa\u4f60\u8bf4\u7684\u8bbf\u95ee\u529f\u80fd\u5c31\u7528\u901a\u8fc7\u7b56\u7565\u6765\u5b9e\u73b0\u4e86\u3002\u5199\u4e00\u6761\u7b56\u7565\u5e94\u7528\u5230VLAN1\u4e0b\u9762\u3002\u7981\u6b62VLAN2\u8bbf\u95eeVLAN1\uff0crule 1 deny source 2.2.2.0 0.0.0.255 \u67b6\u8bbe\u8fd9\u4e2a\u5730\u5740\u6bb5\u662fVLAN2\u7684\uff0c\u7136\u540e\u5728vlan1\u4e0b\u9762\u5e94\u7528\u4e3ain\u7684\u6d41\u91cf\u547d\u4ee4\u4e3a packet-filter vlan 1 inbound ip-group 1\u81f3\u4e8e\u4e0a\u7f51\u6d41\u91cf\u9650\u5236\u53ef\u4ee5[Sysname] interface vlan2 \u8fdb\u5165\u63a5\u53e3[Sysname-vlan2] line-rate outbound 2000\u8bbe\u7f6e\u4e0a\u4f20[Sysname-vlan2] line-rate inbound 4000 \u8bbe\u7f6e\u4e0b\u8f7d\u5927\u5c0f\u4f60\u770b\u7740\u529e\u4e86\uff0c\u5355\u4f4d\u662fK\u6709\u95ee\u9898\u518d\u627e\u6211\uff0c\u5982\u679c\u53ef\u4ee5\u7684\u8bdd\u8bb0\u5f97\u91c7\u7eb3\u6211\u54e6\uff0c\u6b22\u8fce\u5230\u6211\u7684\u56e2\u961f\u6765\u63d0\u95ee
\u4e00,\u5982\u679c\u4e0d\u7528\u4ea4\u6362\u673a\u7684DHCP\u529f\u80fd\u800c\u662f\u5229\u7528PC\u7684DHCP\u529f\u80fd!
1.\u5728\u4ea4\u6362\u673a\u4e0a\u914d\u7f6eDHCP\u670d\u52a1\u5668:
\u3000\u3000ip dhcp-server 192.168.0.69
\u3000\u30002.\u5728\u4ea4\u6362\u673a\u4e2d\u4e3a\u6bcf\u4e2aVLAN\u8bbe\u7f6e\u540c\u6837\u7684DHCP\u670d\u52a1\u5668\u7684IP\u5730\u5740:
\u3000\u3000interface Vlan11
\u3000\u3000ip address 192.168.1.254 255.255.255.0
\u3000\u3000ip helper-address 192.168.0.69 DHCP Server IP
\u3000\u3000interface Vlan12
\u3000\u3000ip address 192.168.2.254 255.255.255.0
\u3000\u3000ip helper-address 192.168.0.69 DHCP Server IP
\u3000\u30003.\u5728DHCP\u670d\u52a1\u5668\u4e0a\u8bbe\u7f6e\u7f51\u7edc\u5730\u5740\u5206\u522b\u4e3a192.168.1.0\u3001192.168.2.0\u7684\u4f5c\u7528\u57df\uff0c\u5e76\u5c06\u8fd9\u4e9b\u4f5c\u7528\u57df\u7684\u201c\u8def
\u7531\u5668\u201d\u9009\u9879\u8bbe\u7f6e\u4e3a\u5bf9\u5e94VLAN\u7684\u63a5\u53e3IP\u5730\u5740\u3002
\u4e8c \u5229\u7528\u4e09\u5c42\u4ea4\u6362\u673a\u81ea\u5e26\u7684DHCP\u529f\u80fd\u5b9e\u73b0\u591aVLAN\u7684IP\u5730\u5740\u81ea\u52a8\u5206\u914d
(\u4e00) \u914d\u7f6e\u65b9\u6cd5\u4e00
1.\u540c\u65f6\u4e3a\u591a\u4e2aVLAN\u7684\u5ba2\u6237\u673a\u5206\u914d\u5730\u5740
2.VLAN\u5185\u6709\u90e8\u5206\u5730\u5740\u91c7\u7528\u624b\u5de5\u5206\u914d\u7684\u65b9\u5f0f
3.\u4e3a\u5ba2\u6237\u6307\u5b9a\u7f51\u5173\u3001Wins\u670d\u52a1\u5668\u7b49
4.VLAN 2\u7684\u5730\u5740\u79df\u7528\u6709\u6548\u671f\u9650\u4e3a1\u5929,\u5176\u5b83\u4e3a3\u5929
5.\u6309MAC\u5730\u5740\u4e3a\u7279\u5b9a\u7528\u6237\u5206\u914d\u6307\u5b9a\u7684IP\u5730\u5740
\u6700\u7ec8\u914d\u7f6e\u5982\u4e0b\uff1a
ip dhcp excluded-address 10.1.1.1 10.1.1.19 //\u4e0d\u7528\u4e8e\u52a8\u6001\u5730\u5740\u5206\u914d\u7684\u5730\u5740
ip dhcp excluded-address 10.1.1.240 10.1.1.254
ip dhcp excluded-address 10.1.2.1 10.1.2.19
!
ip dhcp pool global //global\u662fpool name\uff0c \u7531\u7528\u6237\u6307\u5b9a
network 10.1.0.0 255.255.0.0 //\u52a8\u6001\u5206\u914d\u7684\u5730\u5740\u6bb5
domain-name client.com //\u4e3a\u5ba2\u6237\u673a\u914d\u7f6e\u57df\u540e\u7f00
dns-server 10.1.1.1 10.1.1.2 //\u4e3a\u5ba2\u6237\u673a\u914d\u7f6edns\u670d\u52a1\u5668
netbios-name-server 10.1.1.5 10.1.1.6 //\u4e3a\u5ba2\u6237\u673a\u914d\u7f6ewins\u670d\u52a1\u5668
netbios-node-type h-node //\u4e3a\u5ba2\u6237\u673a\u914d\u7f6e\u8282\u70b9\u6a21\u5f0f\uff08\u5f71\u54cd\u540d\u79f0\u89e3\u91ca\u7684\u987a\u5229,\u5982h-node=\u5148\u901a\u8fc7wins\u670d\u52a1
\u5668\u89e3\u91ca...\uff09
lease 3 //\u5730\u5740\u79df\u7528\u671f\u9650: 3\u5929
ip dhcp pool vlan1
network 10.1.1.0 255.255.255.0 //\u672cpool\u662fglobal\u7684\u5b50pool, \u5c06\u4eceglobal pool\u7ee7\u627fdomain-name\u7b49
option
default-router 10.1.1.100 10.1.1.101 //\u4e3a\u5ba2\u6237\u673a\u914d\u7f6e\u9ed8\u8ba4\u7f51\u5173
!
ip dhcp pool vlan2 //\u4e3a\u53e6\u4e00VLAN\u914d\u7f6e\u7684pool
network 10.1.2.0 255.255.255.0
default-router 10.1.2.100 10.1.2.101
lease 1
!
ip dhcp pool vlan1_john //\u603b\u662f\u4e3aMAC\u5730\u5740\u4e3a...\u7684\u673a\u5668\u5206\u914d...\u5730\u5740
host 10.1.1.21 255.255.255.0
client-identifier 010050.bade.6384 //client-identifier=01\u52a0\u4e0a\u5ba2\u6237\u673a\u7f51\u5361\u5730\u5740
!
ip dhcp pool vlan1_tom
host 10.1.1.50 255.255.255.0
client-identifier 010010.3ab1.eac8
\u76f8\u5173\u7684DHCP\u8c03\u8bd5\u547d\u4ee4\uff1a
no service dhcp //\u505c\u6b62DHCP\u670d\u52a1[\u9ed8\u8ba4\u4e3a\u542f\u7528DHCP\u670d\u52a1]
sh ip dhcp binding //\u663e\u793a\u5730\u5740\u5206\u914d\u60c5\u51b5
show ip dhcp conflict //\u663e\u793a\u5730\u5740\u51b2\u7a81\u60c5\u51b5
debug ip dhcp server {events | packets | linkage} //\u89c2\u5bdfDHCP\u670d\u52a1\u5668\u5de5\u4f5c\u60c5\u51b5
\u5982\u679cDHCP\u5ba2\u6237\u673a\u5206\u914d\u4e0d\u5230IP\u5730\u5740\uff0c\u5e38\u89c1\u7684\u539f\u56e0\u6709\u4e24\u4e2a\u3002\u7b2c\u4e00\u79cd\u60c5\u51b5\u662f\u6ca1\u6709\u628a\u8fde\u63a5\u5ba2\u6237\u673a\u7684\u7aef\u53e3\u8bbe\u7f6e\u4e3a
Portfast\u65b9\u5f0f\u3002MS\u5ba2\u6237\u673a\u5f00\u673a\u540e\u68c0\u67e5\u7f51\u5361\u8fde\u63a5\u6b63\u5e38\uff0cLink\u662fUP\u7684\uff0c\u5c31\u5f00\u59cb\u53d1\u9001DHCPDISCOVER\u8bf7\u6c42\uff0c\u800c\u6b64\u65f6
\u4ea4\u6362\u673a\u7aef\u53e3\u6b63\u5728\u7ecf\u5386\u751f\u6210\u6811\u8ba1\u7b97\uff0c\u4e00\u822c\u9700\u898130-50\u79d2\u624d\u80fd\u8fdb\u5165\u8f6c\u53d1\u72b6\u6001\u3002MS\u5ba2\u6237\u673a\u6ca1\u6709\u6536\u5230DHCP SERVER\u7684
\u54cd\u5e94\u5c31\u4f1a\u7ed9\u7f51\u5361\u8bbe\u7f6e\u4e00\u4e2a169.169.X.X\u7684IP\u5730\u5740\u3002\u89e3\u51b3\u7684\u65b9\u6cd5\u662f\u628a\u4ea4\u6362\u673a\u7aef\u53e3\u8bbe\u7f6e\u4e3aPortfast\u65b9\u5f0f\uff1a
CatOS(4000/5000/6000): set spantree portfast mod_num/port_num enable; IOS(2900/3500):
interface ... ; spanning-tree portfast
(\u4e8c) \u914d\u7f6e\u65b9\u6cd5\u4e8c
\u4e00\u53f03550EMI\u4ea4\u6362\u673a\uff0c\u5212\u5206\u4e09\u4e2avlan
vlan2 \u4e3a\u670d\u52a1\u5668\u6240\u5728\u7f51\u7edc\uff0c\u547d\u540d\u4e3aserver,IP\u5730\u5740\u6bb5\u4e3a192.168.2.0,\u5b50\u7f51\u63a9\u7801:255.255.255.0,\u7f51
\u5173:192.168.2.1,\u57df\u670d\u52a1\u5668\u4e3awindows 2000 advance server,\u540c\u65f6\u517c\u4f5cDNS\u670d\u52a1\u5668\uff0cIP\u5730\u5740\u4e3a192.168.2.10
vlan3\u4e3a\u5ba2\u6237\u673a1\u6240\u5728\u7f51\u7edc\uff0cIP\u5730\u5740\u6bb5\u4e3a192.168.3.0,\u5b50\u7f51\u63a9\u7801:255.255.255.0,\u7f51\u5173:192.168.3.1\u547d\u540d\u4e3a
work01
vlan4\u4e3a\u5ba2\u6237\u673a2\u6240\u5728\u7f51\u7edc,\u547d\u540d\u4e3awork02,IP\u5730\u5740\u6bb5\u4e3a192.168.4.0,\u5b50\u7f51\u63a9\u7801:255.255.255.0,\u7f51
\u5173:192.168.4.1,
3550\u4f5cDHCP\u670d\u52a1\u5668,\u7aef\u53e31-8\u5212\u5230VLAN 2\uff0c\u7aef\u53e39-16\u5212\u5206\u5230VLAN 3,\u7aef\u53e317-24\u5212\u5206\u5230VLAN 4.
DHCP\u670d\u52a1\u5668\u5b9e\u73b0\u529f\u80fd:
\u5404VLAN\u4fdd\u75592-10\u7684IP\u5730\u5740\u4e0d\u5206\u914d\u7f6e,\u4f8b\u5982:192.168.2.0\u7684\u7f51\u6bb5,\u4fdd\u7559192.168.2.2\u81f3192.168.2.10\u7684IP\u5730\u5740
\u6bb5\u4e0d\u5206\u914d.
\u5b89\u5168\u8981\u6c42:
VLAN 3\u548cVLAN 4 \u4e0d\u5141\u8bb8\u4e92\u76f8\u8bbf\u95ee,\u4f46\u90fd\u53ef\u4ee5\u8bbf\u95ee\u670d\u52a1\u5668\u6240\u5728\u7684VLAN 2,
\u9ed8\u8ba4\u8bbf\u95ee\u63a7\u5236\u5217\u8868\u7684\u89c4\u5219\u662f\u62d2\u7edd\u6240\u6709\u5305.
\u914d\u7f6e\u547d\u4ee4\u53ca\u6b65\u9aa4\u5982\u4e0b\uff1a
\u7b2c\u4e00\u6b65\uff1a\u521b\u5efaVLAN\uff1a
Switch>en
Switch#Vlan Database
Switch(Vlan)>Vlan 2 Name server
Switch(Vlan)>Vlan 3 Name work01
Switch(vlan)>Vlan 4 Name work02
\u7b2c\u4e8c\u6b65\uff1a\u8bbe\u7f6eVLAN IP\u5730\u5740\uff1a
Switch#Config T
Switch(Config)>Int Vlan 2
服务器需要自己来搞定了。
S55上的配置就简单了。
#
dhcp-server 0 ip 192.168.100.1
dhcp relay information enable
#
#
dhcp-server 0 ip 192.168.100.1
dhcp relay information enable
#
案例如上。
按照你的描述,是ip地址和端口绑定了,既然涉及到端口,那么一定要在接入交换机上去做
S5500 2208以后版本的固件貌似支持dhcp server了,周末我升级试试看
sysname Router
#
dhcp server ip-pool 0
network 10.1.1.0 mask 255.255.255.0
dns-list 10.1.1.2
domain-name huawei.com
#
dhcp server ip-pool 1
network 10.1.1.0 mask 255.255.255.128
gateway-list 10.1.1.126
expired day 10 hour 12
#
dhcp server ip-pool 2
network 10.1.1.128 mask 255.255.255.128
gateway-list 10.1.1.254
nbns-list 10.1.1.4
expired day 5
#
interface GigabitEthernet1/0/0
ip address 10.1.1.1 255.255.255.128
#
interface GigabitEthernet1/0/1
ip address 10.1.1.129 255.255.255.128
#
dhcp server forbidden-ip 10.1.1.2
dhcp server forbidden-ip 10.1.1.4
dhcp server forbidden-ip 10.1.1.126
dhcp server forbidden-ip 10.1.1.254
#
return
一般是不需要升级的,只是不同版本的交换机固件导致某些命令不太一样,其实华为和H3C的命令都是一样的
我这里有本配置手册,你可以参考一下
http://www.gzhxnet.com/viewthread.php?tid=70&extra=page%3D1
扩展阅读:h3c s6520 series ... 如何登录h3cs5500交换机 ... h3c s3100 series ... h3c s5500 28c si ... h3c s5500v3 series ... s5500v2 series ... h3c s5500 恢复出厂 ... h3c msr3610 ... h3cap进入web界面 ...