大家好,之前没接触过H3C的交换机,没有知识底子。想请教下大家,H3C的交换机如何和路由器连接上网,
交换机的路由器怎么写呢,路由器上是不是也要静态路由呢,谢谢大家啦
信息如下:
路由器地址:192.168.0.1
VLAN地址:
设备: H3C S5560交换机
H3C ER200G2 路由器
功能实现:交换机24口为连接路由器的接口,所有Vlan 从这个接口上网。VLAN之间互通。
#
version 7.1.045, Release 1122
#
sysname H3C
#
telnet server enable
#
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 10
#
vlan 20
#
vlan 30
#
vlan 40
#
stp global enable
#
dhcp server ip-pool vlan10
gateway-list 192.168.10.254
network 192.168.10.0 mask 255.255.255.0
dns-list 114.114.114.114
#
dhcp server ip-pool vlan20
gateway-list 192.168.20.254
network 192.168.20.0 mask 255.255.255.0
dns-list 114.114.114.114
#
dhcp server ip-pool vlan30
gateway-list 192.168.0.254
network 192.168.30.0 mask 255.255.255.0
dns-list 114.114.114.114
#
interface NULL0
#
interface Vlan-interface10
ip address 192.168.10.254 255.255.255.0
#
interface Vlan-interface20
ip address 192.168.20.254 255.255.255.0
#
interface Vlan-interface30
ip address 192.168.30.254 255.255.255.0
#
interface Vlan-interface40
ip address 192.168.40.254 255.255.255.0
#
interface FortyGigE1/0/29
port link-mode bridge
#
interface FortyGigE1/0/30
port link-mode bridge
#
interface GigabitEthernet1/0/24
port link-mode route
#
interface GigabitEthernet1/0/1
port link-mode bridge
port access vlan 10
#
interface GigabitEthernet1/0/2
port link-mode bridge
port access vlan 10
#
interface GigabitEthernet1/0/3
port link-mode bridge
port access vlan 10
#
interface GigabitEthernet1/0/4
port link-mode bridge
port access vlan 10
#
interface GigabitEthernet1/0/5
port link-mode bridge
port access vlan 20
#
interface GigabitEthernet1/0/6
port link-mode bridge
port access vlan 20
#
interface GigabitEthernet1/0/7
port link-mode bridge
port access vlan 20
#
interface GigabitEthernet1/0/8
port link-mode bridge
port access vlan 20
#
interface GigabitEthernet1/0/9
port link-mode bridge
port access vlan 30
#
interface GigabitEthernet1/0/10
port link-mode bridge
port access vlan 30
#
interface GigabitEthernet1/0/11
port link-mode bridge
port access vlan 30
#
interface GigabitEthernet1/0/12
port link-mode bridge
port access vlan 30
#
interface GigabitEthernet1/0/13
port link-mode bridge
#
interface GigabitEthernet1/0/14
port link-mode bridge
#
interface GigabitEthernet1/0/15
port link-mode bridge
#
interface GigabitEthernet1/0/16
port link-mode bridge
#
interface GigabitEthernet1/0/17
port link-mode bridge
#
interface GigabitEthernet1/0/18
port link-mode bridge
#
interface GigabitEthernet1/0/19
port link-mode bridge
#
interface GigabitEthernet1/0/20
port link-mode bridge
#
interface GigabitEthernet1/0/21
port link-mode bridge
#
interface GigabitEthernet1/0/22
port link-mode bridge
#
interface GigabitEthernet1/0/23
port link-mode bridge
port link-type trunk
port trunk permit vlan 1
mdix-mode mdi
speed 1000
duplex full
#
interface M-GigabitEthernet0/0/0
#
interface M-GigabitEthernet0/0/1
#
interface Ten-GigabitEthernet1/0/25
port link-mode bridge
#
interface Ten-GigabitEthernet1/0/26
port link-mode bridge
#
interface Ten-GigabitEthernet1/0/27
port link-mode bridge
#
interface Ten-GigabitEthernet1/0/28
port link-mode bridge
#
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 4
authentication-mode scheme
user-role network-operator
#
line vty 5 63
user-role network-operator
#
ip route-static 0.0.0.0 24 192.168.0.1
#
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$euITtpDSJpCHOrDc$OrYGQdNg+qmI7wUFqkq8bn0CfLoBoMBSmao68f46wixsqH4RyQqMEqVxL6MMOOAkP4Gvcy9qVQ6kFpF/gPAEsw==
service-type telnet http https
authorization-attribute user-role level-15
authorization-attribute user-role network-admin
authorization-attribute user-role network-operator
#
local-user test class manage
password hash $h$6$bj3K7CrfUB/g9UMY$rV0zwSF7qArAKUCPX7hqcTHC3Re7Pvc2q++fqNqSh2Wu2dCtqi/7p5/DF72iyGnQYwrkjChP0+o6NRdaUv71WA==
service-type telnet
authorization-attribute user-role network-operator
#
ip http enable
ip https enable
#
(0)
最佳答案
interface GigabitEthernet1/0/24这个接口配置IP地址和路由器互通,比如交换机上配置1.1.1.1 ,路由上配置1.1.1.2
然后在交换机上配置默认路由ip rou 0.0.0.0 0 1.1.1.2
路由器上配置默认路由出公网,然后配置内网地址扔给1.1.1.1,例如:
ip rout 192.168.0.0 16 1.1.1.1,这样就可以了。
(0)
我是这种的路由器,该怎样去配置呢
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
我是这种的路由器,该怎样去配置呢