S5120V2-28P-LI交换机划分了vlan 2,地址为192.168.2.1 把1-3号接口放到了vlan2,下面接pc设备。然后打算用24口接入运营商,就是24口直连电信光猫(EPON网关TEWA-708E),中间没有路由器。
配置如下:
[H3C]dis cu
#
version 7.1.070, Release 6308P01
#
sysname H3C
#
irf mac-address persistent timer
irf auto-update enable
undo irf link-delay
irf member 1 priority 1
#
lldp global enable
#
password-recovery enable
#
vlan 1
#
vlan 2 to 4
#
stp global enable
#
interface NULL0
#
interface Vlan-interface1
ip address dhcp-alloc
dhcp client identifier ascii 48bd3d4a6b6b-VLAN0001
#
interface Vlan-interface2
ip address 192.168.2.1 255.255.255.0
#
interface Vlan-interface3
ip address 192.168.3.1 255.255.255.0
#
interface Vlan-interface4
ip address 192.168.1.121 255.255.255.0
#
interface GigabitEthernet1/0/1
port access vlan 2
#
interface GigabitEthernet1/0/2
port access vlan 2
#
interface GigabitEthernet1/0/3
port access vlan 2
#
interface GigabitEthernet1/0/4
#
interface GigabitEthernet1/0/5
#
interface GigabitEthernet1/0/6
#
interface GigabitEthernet1/0/7
#
interface GigabitEthernet1/0/8
#
interface GigabitEthernet1/0/9
#
interface GigabitEthernet1/0/10
#
interface GigabitEthernet1/0/11
#
interface GigabitEthernet1/0/12
#
interface GigabitEthernet1/0/13
#
interface GigabitEthernet1/0/14
#
interface GigabitEthernet1/0/15
#
interface GigabitEthernet1/0/16
#
interface GigabitEthernet1/0/17
#
interface GigabitEthernet1/0/18
#
interface GigabitEthernet1/0/19
#
interface GigabitEthernet1/0/20
#
interface GigabitEthernet1/0/21
#
interface GigabitEthernet1/0/22
#
interface GigabitEthernet1/0/23
#
interface GigabitEthernet1/0/24
port access vlan 4
#
interface GigabitEthernet1/0/25
#
interface GigabitEthernet1/0/26
#
interface GigabitEthernet1/0/27
#
interface GigabitEthernet1/0/28
#
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 0.0.0.0 0 192.168.1.1
ip route-static 0.0.0.0 0 192.168.2.1
ip route-static 0.0.0.0 0 192.168.3.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
#
cloud-management server domain oasis.h3c.com
#
return
缺省路由要删掉两条,错误的配置: ip route-static 0.0.0.0 0 192.168.2.1 ip route-static 0.0.0.0 0 192.168.3.1 #