#进入命令行,创建VLAN 2 、VLAN3,并配置网关
<H3C>system-view
System View: return to User View with Ctrl+Z.
[H3C]vlan 2
[H3C-vlan2]quit
[H3C]vlan 3
[H3C-vlan2] quit
[H3C] interface Vlan-interface 1
[H3C-Vlan-interface1]ip address 192.168.1.2 24
[H3C] interface Vlan-interface 2
[H3C-Vlan-interface2]ip address 192.168.2.1 24
[H3C-Vlan-interface2]quit
[H3C] interface Vlan-interface 3
[H3C-Vlan-interface3]ip address 192.168.3.1 24
[H3C-Vlan-interface3]quit
[H3C]dhcp enable
#创建vlan2的地址池
[H3C]dhcp server ip-pool vlan2
#发布网段为192.168.2.0网段
[H3C-dhcp-pool-vlan2]network 192.168.2.0
#指定网关地址
[H3C-dhcp-pool-vlan2]gateway-list 192.168.2.1
#指定dns
[H3C-dhcp-pool-vlan2]dns-list 114.114.114.114
[H3C-dhcp-pool-vlan2]quit
#创建vlan2的地址池
[H3C]dhcp server ip-pool vlan3
#发布网段为192.168.2.0网段
[H3C-dhcp-pool-vlan3]network 192.168.3.0
#指定网关地址
[H3C-dhcp-pool-vlan3]gateway-list 192.168.3.1
#指定dns
[H3C-dhcp-pool-vlan3]dns-list 114.114.114.114
[H3C-dhcp-pool-vlan3]quit
#将交换机与PC互联接口分别加入VLAN 中
[H3C] interface GigabitEthernet 1/0/2
[H3C-GigabitEthernet1/0/2]port access vlan 2
[H3C-GigabitEthernet1/0/2]quit
[H3C] interface GigabitEthernet 1/0/3
[H3C-GigabitEthernet1/0/3]port access vlan 3
[H3C-GigabitEthernet1/0/3]quit
#配置出口默认静态路由
[H3C]ip route-static 0.0.0.0 0.0.0.0 192.168.1.1
#保存配置
[H3C]save force
Validating file. Please wait...
Saved the current configuration to mainboard device successfully.
全文配置,问题是和路由器相连G1/0/1怎么配置????
(0)
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
按这个G1/0/1不配置现在上不去网
检查路由器设置,特别是回程路由。如果笔记本或者台式机直连路由器看看出口是否正常或者路由器配置是否配置正确。