1 : 1号 端口接路由器 192.168.1.100/24(路由器内网关地址:192.168.1.1)
2 : 2号端口接一个普通24口交换机(172.118.1.0/24) vlan 100
3 : 3号端口接无线AC(172.118.2.0/24) vlan 200
4 : 4号端口接录像机(172.118.3.0/24) vlan 300
需求:各设备通过1号端口联通外网
#
version 7.1.070, Release 6318P01
#
sysname SW
#
irf mac-address persistent timer
irf auto-update enable
undo irf link-delay
irf member 1 priority 1
#
dhcp enable
#
lldp global enable
#
password-recovery enable
#
vlan 1
#
vlan 100
description OFFice Computer
#
vlan 200
description WIFI
#
vlan 300
#
vlan 400
description 22F WIFI
#
vlan 1000
#
stp global enable
#
dhcp server ip-pool ip10
gateway-list 10.0.0.1
network 10.0.0.0 mask 255.255.255.0
address range 10.0.0.2 10.0.0.100
dns-list 10.0.0.1
forbidden-ip 10.0.0.19
#
dhcp server ip-pool ip172-1
gateway-list 172.118.1.1
network 172.118.1.0 mask 255.255.255.0
address range 172.118.1.2 172.118.1.100
dns-list 172.118.1.1
#
dhcp server ip-pool ip172-2
gateway-list 172.118.2.1
network 172.118.2.0 mask 255.255.255.0
address range 172.118.2.2 172.118.2.30
dns-list 172.118.2.1
forbidden-ip 172.118.2.18
#
dhcp server ip-pool ip172-3
gateway-list 172.118.3.1
network 172.118.3.0 mask 255.255.255.0
address range 172.118.3.2 172.118.3.100
dns-list 172.118.3.1
#
interface NULL0
#
interface Vlan-interface1
undo dhcp select server
dhcp client identifier ascii 3cd2e55a1b5c-VLAN0001
#
interface Vlan-interface100
ip address 10.0.0.1 255.255.255.0
dhcp server apply ip-pool ip10
#
interface Vlan-interface200
ip address 172.118.1.1 255.255.255.0
dhcp server apply ip-pool ip172-1
#
interface Vlan-interface300
ip address 172.118.2.1 255.255.255.0
dhcp server apply ip-pool ip172-2
#
interface Vlan-interface400
ip address 172.118.3.1 255.255.255.0
dhcp server apply ip-pool ip172-3
#
interface Vlan-interface1000
ip address 192.168.1.200 255.255.255.0
#
interface GigabitEthernet1/0/1
#
interface GigabitEthernet1/0/2
port access vlan 100
#
interface GigabitEthernet1/0/3
port link-type hybrid
port hybrid vlan 1 1000 untagged
#
interface GigabitEthernet1/0/4
port access vlan 200
#
interface GigabitEthernet1/0/5
#
interface GigabitEthernet1/0/6
port access vlan 300
#
interface GigabitEthernet1/0/7
#
interface GigabitEthernet1/0/8
port access vlan 400
#
interface GigabitEthernet1/0/9
#
interface GigabitEthernet1/0/10
#
scheduler logfile size 16
#
line class aux
user-role network-admin
#
line class vty
user-role network-operator
#
line aux 0
user-role network-admin
#
line vty 0 63
user-role network-operator
#
ip route-static 10.0.0.0 24 Vlan-interface1000
ip route-static 172.0.0.0 24 Vlan-interface1000
#
radius scheme system
user-name-format without-domain
#
domain system
#
domain default enable system
#
role name level-0
description Predefined level-0 role
#
role name level-1
description Predefined level-1 role
#
role name level-2
description Predefined level-2 role
#
role name level-3
description Predefined level-3 role
#
role name level-4
description Predefined level-4 role
#
role name level-5
description Predefined level-5 role
#
role name level-6
description Predefined level-6 role
#
role name level-7
description Predefined level-7 role
#
role name level-8
description Predefined level-8 role
#
role name level-9
description Predefined level-9 role
#
role name level-10
description Predefined level-10 role
#
role name level-11
description Predefined level-11 role
#
role name level-12
description Predefined level-12 role
#
role name level-13
description Predefined level-13 role
#
role name level-14
description Predefined level-14 role
#
user-group system
#
local-user admin class manage
password hash $h$6$BoERaMhSrWVFr6AO$7iKBKkyIyX4rl6Q1P0BB3E1o/uRB36hx49QzTIE1ADGndsUoMJJCCw0Cjc63ZFHQhNuG/3xhAQa+pZSFVtp13g==
service-type http
authorization-attribute user-role level-3
authorization-attribute user-role network-admin
authorization-attribute user-role network-operator
#
ip http enable
#
cloud-management server domain oasis.h3c.com
#
return
这样配置不能上网,请大侠们帮帮忙,谢谢
(0)
最佳答案
端口对不上,直接这样配置就行:
interface GigabitEthernet1/0/1
port access vlan 1
#
interface GigabitEthernet1/0/2
port access vlan 100
#
interface GigabitEthernet1/0/3
port access vlan 200
#
interface GigabitEthernet1/0/4
port access vlan 300
然后分别配置IP地址,比如vlan1
interface vlan 1
ip address 192.168.1.100 24
quit
然后路由指向路由器:
ip route-static 0.0.0.0 0 192.168.1.1
路由器记得回执路由:
ip route-static 172.118.1.0 24 192.168.1.100
目的地址是其他网段,下一跳是交换机跟路由器互联的IP地址
(0)
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
谢谢,如果是一台普通的路由器就无法实现上网了?