H3C交换机(路由器)如何配置DHCP? 交换机和路由器一起用怎么配置
H3C\u4ea4\u6362\u673a\u914d\u7f6eDHCP\uff0c\u8bbe\u7f6eVLAN\u63a5\u53e3\u4e3a\u5168\u5c40\u5730\u5740\u6c60\uff1f1\u3001Vlan\u5212\u5206\u3001Vlan\u63a5\u53e3\u7684IP\u5730\u5740\u914d\u7f6e\u53ca\u6bcf\u4e2aVlan\u63a5\u53e3\u5e94\u7528DHCP\u5730\u5740\u6c60\u3002
2\u3001lan\u5212\u5206\u3001Vlan\u63a5\u53e3\u7684IP\u5730\u5740\u914d\u7f6e\u53ca\u6bcf\u4e2aVlan\u63a5\u53e3\u5e94\u7528DHCP\u5730\u5740\u6c60\u3002
3\u3001\u914d\u7f6eDHCP\u5730\u5740\u6c60\uff0c\u5f00\u542fDHCP\u670d\u52a1\u3002
4\u3001\u53bb\u5f80\u8def\u7531\u5668\u8bbe\u5b9aTrunk\u63a5\u53e3\uff0c\u8bbe\u5b9aVlan\u5305\u53bb\u8def\u7531\u5668\u7684\u9ed8\u8ba4\u9759\u6001\u8def\u7531\u3002
5\u3001\u5728\u8def\u7531\u5668\u4e0a\u8bbe\u5b9a\u4e24\u79cd\u914d\u7f6e\uff1a\u914d\u7f6e\u8def\u7531\u5b50\u63a5\u53e3\u7684IP\u5730\u5740\u548c\u6bcf\u4e2a\u5b50\u63a5\u53e3\u7ec8\u7ed3Vlan\u7684VID\u3002\u5f00\u542f\u73af\u56de\u53e3\uff0c\u6a21\u62df\u516c\u7f51IP\u3002
6\u3001\u914d\u7f6e\u8def\u7531\u5b50\u63a5\u53e3\u7684IP\u5730\u5740\u548c\u6bcf\u4e2a\u5b50\u63a5\u53e3\u7ec8\u7ed3Vlan\u7684VID\u3002
1\u3001\u4ece\u5149\u732b\u51fa\u6765\u7f51\u7ebf\u63d2\u5165\u5230\u4e3b\u8def\u7531\u5668\u7684WAN\u7f51\u53e3\uff0c\u5e76\u8fdb\u884c\u7f51\u7edc\u8bbe\u7f6e\uff1b\u4e00\u697c\u3001\u4e8c\u697c\u3001\u4e09\u697c\u76f4\u63a5\u4f7f\u7528\u7f51\u7ebf\u8fde\u63a5\u5230\u5899\u58c1\u7684\u7f51\u7edc\u58c1\u76d2\u4e0a\u3002\u6bcf\u4e00\u5c42\u7684\u8def\u7531\u5668\u5982\u5ba2\u5385\u914d\u7f6e\u4e00\u6837\uff0c\u80fd\u8fde\u63a5\u6709\u7ebf\u5c3d\u91cf\u7528\u6709\u7ebf\uff0c\u5176\u5b83\u7684\u6570\u7801\u7f51\u7edc\u8bbe\u5907\u7528\u65e0\u7ebf\u3002
2\u3001\u7f51\u7edc\u8bbe\u7f6e\uff1a\u5148\u8fdb\u884c\u4e3b\u8def\u7531\u5668\u8bbe\u7f6e\uff0c\u8fde\u63a5\u7535\u6e90\u540e\uff0c\u6309\u4e0a\u9762\u91cd\u7f6e\u6309\u94ae10\u79d2\u949f\u5de6\u53f3\uff0c\u4e0a\u9762\u7684\u6307\u793a\u706f\u5168\u95ea\uff0c\u4ee3\u8868\u91cd\u7f6e\u6210\u529f\u3002\u8fd9\u6b3e\u6709\u7ebf\u5343\u5146\u8def\u7531\u5668\uff0c\u8fd8\u6709\u4e00\u6b3e\u662f\u53ef\u4ee5\u63a5\u5165\u53cc\u8def\u5bbd\u5e26\u3002
3\u3001\u8fdb\u884c\u62d4\u53f7\u6216\u8005\u662f\u56fa\u5b9aIP\u4e0a\u7f51\u8bbe\u7f6e\uff0c\u6253\u5f00\u6d4f\u89c8\u5668\uff1a\u5730\u5740\u680f\u8f93\u5165http://192.168.1.1,\u9996\u5148\u521b\u5efa\u81ea\u5df1\u7684\u7528\u6237\u5bc6\u7801\u3002
4\u3001\u9009\u62e9\u4e0a\u7f51\u7684\u65b9\u5f0f\uff0c\u4e00\u822c\u662fPPPOE\u62d4\u53f7\u4e0a\u7f51\uff0c\u6216\u8005\u662f\u81ea\u52a8\u83b7\u53d6\uff0c\u6216\u8005\u662f\u9759\u6001IP\u3002
PPPOE\u6392\u53f7\u662f\uff0c\u5bbd\u5e26&\u5149\u7ea4\uff0c\u6709\u5e10\u53f7\u548c\u5bc6\u7801\u3002
\u81ea\u52a8\u83b7\u53d6\u662f\uff1aDHCP\uff0c\u4e00\u822c\u662f\u76f4\u63a5\u4ece\u4ea4\u6362\u673a\u4e0b\u6765\u7684\u7f51\u7ebf\u3002
\u9759\u6001IP\u662f\uff1a\u5bbd\u5e26\u5382\u5546\u76f4\u63a5\u7ed9\u7528\u6237\u7684\u56fa\u5b9aIP\u3002
5\u3001\u914d\u7f6e\u5b8c\u6210\u540e\uff0c\u8bb0\u5f97\u786e\u8ba4\u4e00\u4e0b\u8def\u7531\u5668\u662f\u5426\u6709\u6253\u5f00DHCP\u670d\u52a1\uff0c\u4e00\u822c\u662f\u9ed8\u8ba4\u6253\u5f00\u7684\u3002
进入系统视图
[H3C]dhcp server ip-pool h3c
创建DHCP 地址池
[H3C-dhcp-pool-h3c]network 192.168.1.0 mask 255.255.255.0
指定可以分配的地址段
[H3C-dhcp-pool-h3c]gateway-list 192.168.1.1
指定网关,与lan口的地址一致
[H3C-dhcp-pool-h3c]dns-list 202.202.202.202
指定DNS server地址
[H3C-dhcp-pool-h3c]expired day 0 hour 1 minute 10
DHCP租期时间设置
[H3C-dhcp-pool-h3c]domain-name huawei-3com.com
指定域名
[H3C-dhcp-pool-h3c]quit
[H3C]interface Ethernet1/0
进入到lan口
[H3C-Ethernet1/0]ip address 192.168.1.1 255.255.255.0
配置lan口地址
[H3C-Ethernet1/0]quit
[H3C]dhcp server forbidden-ip 192.168.1.1
保留网关的地址
[H3C]quit
<H3C>save
保存配置
如果你network了192.168.1.0网段 那么想dhcp起作用的话你设备上就得有处于192.168.1.0网段的端口,那样的话路由器收到dhcp请求后才会应答
另外你还需要配置默认网关 DNS 这样才能保证客户端能上网
绛旓細浜ゆ崲鏈鏀寔鐨勫懡浠わ細浜ゆ崲鏈哄熀鏈姸鎬侊細 switch: 锛汻OM鐘舵侊紝璺敱鍣鏄痳ommon>hostname> 锛涚敤鎴锋ā寮廻ostname# 锛涚壒鏉冩ā寮廻ostname(config)# 锛涘叏灞閰嶇疆妯″紡hostname(config-if)# 锛涙帴鍙g姸鎬 浜ゆ崲鏈哄彛浠よ缃細 switch>enable 锛涜繘鍏ョ壒鏉冩ā寮 switch#config terminal 锛涜繘鍏ュ叏灞閰嶇疆妯″紡 switch(config)#hostname...
绛旓細1銆佸湪h3c璺敱鍣涓紝鐐瑰嚮涓婄綉璁剧疆閫夐」锛岀偣鍑昏繛鎺ヤ笂缃戯紝鎺ュ叆鍒颁簰鑱旂綉涓2銆佽繑鍥炰笂涓绾э紝鐐瑰嚮鏃犵嚎璁剧疆锛屽湪鍏朵腑璁剧疆wifi鐨勫悕绉板拰瀵嗙爜銆3銆佽繑鍥炰笂涓绾э紝灏唚ifi寮鍏冲彸渚х殑婊戝潡寮鍚紝鍗冲彲瀹屾垚h3c璺敱鍣ㄧ殑璁剧疆銆傝矾鐢卞櫒鐨勪綔鐢ㄤ负锛氳繛閫氫笉鍚岀殑缃戠粶銆備粠杩囨护缃戠粶娴侀噺鐨勮搴︽潵鐪嬶紝璺敱鍣ㄧ殑浣滅敤涓浜ゆ崲鏈鍜岀綉妗ラ潪甯哥浉浼笺
绛旓細25銆佸熀鏈閰嶇疆鍛戒护 26銆乕Quidway]sysname璺敱鍣ㄥ悕绉帮紝鍛藉悕璺敱鍣(鎴浜ゆ崲鏈)27銆併怮uidway銆戝垹闄わ紝鍒犻櫎Flash ROM涓殑閰嶇疆銆28銆乕Quidway]淇濆瓨锛屽皢閰嶇疆鍐欏叆FlashROM 29銆乕Quidway]鎺ュ彛serial 0锛岃繘鍏ユ帴鍙i厤缃ā寮忋30銆乕Quidway]閫鍑猴紝閫鍑虹晫闈㈡ā寮忓埌绯荤粺瑙嗗浘銆31銆乕Quidway]shutdown/undo shutdown鍏抽棴/閲嶅惎...
绛旓細H3C浜ゆ崲鏈洪厤缃闈欐璺敱鐨勬柟娉 绡2 宸ュ叿/鍘熸枡 h3c妯℃嫙鍣 鏂规硶/姝ラ 鏍规嵁瑕佹眰缁勪欢缃戠粶鎷撴墤 鍦ㄤ氦鎹㈡満A涓婂垱寤篤LAN300锛岄厤缃甀P鍦板潃涓1.1.2.3 鍦ㄤ氦鎹㈡満A涓婂垱寤篤LAN500锛岄厤缃甀P鍦板潃涓1.1.4.1 鍦ㄤ氦鎹㈡満B涓婂垱寤篤LAN100锛岄厤缃甀P鍦板潃涓1.1.6.1 鍦ㄤ氦鎹㈡満B涓婂垱寤篤LAN500锛岄厤缃甀P鍦板潃涓1.1.4.2 鍦...
绛旓細鍏充簬H3C浜ゆ崲鏈洪厤缃鍛戒护澶у叏 H3C浜ゆ崲鏈轰粠鏍稿績楠ㄥ共鍒拌竟缂樻帴鍏,10澶氫釜绯诲垪涓婄櫨娆句骇鍝,鍏ㄩ儴閫氳繃涓浗淇℃伅浜т笟閮ㄣ乀olly Group銆丮etroEthernet璁哄潧浠ュ強IPv6 Ready绛夋潈濞侀儴闂ㄧ殑娴媇璇曞拰璁よ瘉,涓嬮潰鎴戜负澶у鏁寸悊浜嗗叧浜嶩3C浜ゆ崲鏈洪厤缃懡浠ゅぇ鍏,甯屾湜瀵逛綘鏈夋墍甯姪銆 涓.鐢ㄦ埛閰嶇疆: system-view [H3C]super password H3C 璁剧疆鐢ㄦ埛鍒嗙骇...
绛旓細浜屻閰嶇疆鐢佃剳锛氳缃鐞嗚绠楁満鐨処P鍦板潃璇存槑锛氶渶瑕佸皢璁$畻鏈虹殑IP鍦板潃涓嶴5028鐨処P鍦板潃锛堢洰鍓嶄负192.168.20.8/255.255.254.0/192.168.21.1锛夌疆浜庡悓涓瀛愮綉涓備笁銆佺劧鍚庤缃畬鎴愬悗鍙互閫氳繃ping鍛戒护妫娴嬭绠楁満涓浜ゆ崲鏈鏄惁鐩歌繛銆傦紙閫氳繃ping192.168.20.8锛夈傚洓銆佺櫥闄嗙鐞嗙晫闈細杩愯Web娴忚鍣紝鍦ㄥ湴鍧鏍忎腑杈撳叆...
绛旓細1銆佷笂绾ц澶囦负鍏夌尗锛堝甫璺敱鍔熻兘锛変负渚嬶紝浣跨敤涓鏍圭綉绾挎彃鍏ヨ鍏夌尗鐨勭綉鍙c2銆佺綉绾跨殑鍙﹀涓澶存彃鍏ュ埌浜ゆ崲鏈鐨勪换鎰忔帴鍙c3銆佹鏃跺彲浠ョ湅鍒拌浜ゆ崲鍣鍏秂799bee5baa6e58685e5aeb931333433633463浠栫┖缃殑鎺ュ彛锛屼娇鐢ㄧ綉绾挎彃鍏ヨ绌虹疆鐨勬帴鍙d笌鐢佃剳杩涜杩炴帴灏卞彲浠ヨ揪鍒板鍙扮數鑴戜笂缃戜娇鐢ㄤ簡銆4銆佸皢璺敱鍣鐨凩AN鍙d笌鐢佃剳杩涜...
绛旓細[H3C_TEST]domainh3c [H3C_TEST-isp-h3c]authenticationradius-scheme radius1 local [H3C_TEST-isp-h3c]schemeradius-scheme radius1 local [H3C_TEST]domaindefault enable h3c # 閰嶇疆鍦ㄨ繙绋嬭璇佸け璐ユ椂,鏈湴璁よ瘉鐨刞key [H3C_TEST]local-servernas-ip 127.0.0.1 key h3c H3C浜ゆ崲鏈鸿矾鐢卞櫒telnet鍜宑onsole鍙g櫥褰曢厤...
绛旓細//閰嶉潤鎬璺敱(鍙敤瀵硅繙绔澶囬厤涓鏉¤矾鐢卞嵆鍙紝鏈湴鑷)iproute 0.0.0.0 0.0.0.0 10.61.242.109//鎸囧畾鎵鏈夌綉娈靛埌鍟嗕笢鎵鐨勮矾鐢 //閰嶇疆涓夊眰浜ゆ崲鏈鍟嗕笢鎵鐨勫弽鍚戣矾鐢 iproute 10.161.134.0 255.255.255.0 10.61.242.114 iproute 10.161.135.0 255.255.255.0 10.61.242.114 //...
绛旓細h3c浜ゆ崲鏈洪厤缃鏁欑▼銆屽浘鏂囥 鍏跺疄涓嶅悓鍘傚鍨嬪彿鐨勪氦鎹㈡満璁剧疆閮芥槸宸笉澶氱殑,鍙槸涓嶅悓鍘傚鐨勪氦鎹㈡満璁剧疆鐨勫懡浠ゆ槸涓嶅悓鐨!浣嗗彧瑕佹垜浠煡閬撲竴绉嶄氦鎹㈡満鐨勮缃苟鎵句竴涓嬬浉鍏崇殑璧勬枡,灏卞緢瀹规槗璁剧疆濂戒笉鍚岀殑浜ゆ崲鏈!涓嬮潰鎴戜负澶у鏁寸悊浜嗗叧浜巋3c浜ゆ崲鏈洪厤缃暀绋嬨愬浘鏂囥,甯屾湜瀵逛綘鏈夋墍甯姪銆 姣旀柟璇,浣犱滑鍏徃鏂板鍔犱簡鍔炲叕瀹,缃戠粶绔彛...