华为eth-trunk、dhcp实验

华为eth-trunk、dhcp实验_第1张图片
S1
vlan batch 2 to 3
dhcp enable

ip pool vlan2
gateway-list 10.0.10.1
network 10.0.10.0 mask 255.255.255.0

ip pool vlan3
gateway-list 10.0.20.1
network 10.0.20.0 mask 255.255.255.0

interface Vlanif2
ip address 10.0.10.1 255.255.255.0
dhcp select global

interface Vlanif3
ip address 10.0.20.1 255.255.255.0
dhcp select global

interface MEth0/0/1

interface Eth-Trunk5
port link-type trunk
port trunk allow-pass vlan 2 to 4094

interface GigabitEthernet0/0/23
eth-trunk 5

interface GigabitEthernet0/0/24
eth-trunk 5

S2
vlan batch 2 to 3
dhcp enable
interface Vlanif2
ip address 10.0.10.2 255.255.255.0
dhcp select global

interface Vlanif3
ip address 10.0.20.2 255.255.255.0
dhcp select global

interface Eth-Trunk5
port link-type trunk
port trunk allow-pass vlan 2 to 4094

interface GigabitEthernet0/0/1
port link-type trunk
port trunk pvid vlan 2
port trunk allow-pass vlan 2 to 4094

interface GigabitEthernet0/0/2
port link-type trunk
port trunk pvid vlan 3
port trunk allow-pass vlan 2 to 4094

interface GigabitEthernet0/0/23
eth-trunk 5

interface GigabitEthernet0/0/24
eth-trunk 5

S3
vlan batch 2
dhcp enable
interface Vlanif2
ip address 10.0.10.3 255.255.255.0
dhcp select global

interface GigabitEthernet0/0/1
port link-type access
port default vlan 2

interface GigabitEthernet0/0/2
port link-type access
port default vlan 2

interface GigabitEthernet0/0/24
port link-type trunk
port trunk pvid vlan 2
port trunk allow-pass vlan 2 to 4094

S4
dhcp enable
vlan batch 3

interface Vlanif3
ip address 10.0.20.3 255.255.255.0
dhcp select global

interface MEth0/0/1

interface GigabitEthernet0/0/1
port link-type access
port default vlan 3

interface GigabitEthernet0/0/2
port link-type access
port default vlan 3

interface GigabitEthernet0/0/24
port link-type trunk
port trunk pvid vlan 3
port trunk allow-pass vlan 2 to 4094

你可能感兴趣的:(网络)