天天看点

思科设备VLAN之间通信配置

思科设备VLAN之间通信配置
思科设备VLAN之间通信配置

S0#conf t

S0(config)#int fa 0/1

S0(config-if)#switchport trunk encapsulation dot1q

S0(config-if)#switchport mode trunk

S0(config-if)#exit

S0(config)#int fa 0/2

S0(config)#int fa 0/3

思科设备VLAN之间通信配置

S1#conf t

S1(config)#int fa 0/1

S1(config-if)#switchport mode trunk

思科设备VLAN之间通信配置

S2#conf t

S2(config)#int fa 0/1

S2(config-if)#switchport mode trunk

思科设备VLAN之间通信配置

S3#conf t

S3(config)#int fa 0/1

S3(config-if)#switchport mode trunk

S1#vlan database

S1(vlan)#vtp domain liu

Changing VTP domain name from a to liu

R1(vlan)#vlan 2

VLAN 2 added:

Name: VLAN0002

R1(vlan)#vlan 3

VLAN 3 added:

Name: VLAN0003

R1(vlan)#vlan 4

VLAN 4 added:

Name: VLAN0004

R1(vlan)#vlan 5

VLAN 5 added:

Name: VLAN0005

R1(vlan)#vlan 6

VLAN 6 added:

Name: VLAN0006

R1(vlan)#vlan 7

VLAN 7 added:

Name: VLAN0007

思科设备VLAN之间通信配置

S1(config)#int fa 0/2

S1(config-if)#switchport mode access

S1(config-if)#switchport access vlan 2

S1(config)#int fa 0/3

S1(config-if)#switchport access vlan 3

思科设备VLAN之间通信配置

S2(config)#int fa 0/3

S2(config-if)#switchport mode access

S2(config-if)#switchport access vlan 4

S2(config)#int fa 0/2

S2(config-if)#switchport access vlan 5

思科设备VLAN之间通信配置

S3(config)#int fa 0/2

S3(config-if)#switchport mode access

S3(config-if)#switchport access vlan 6

S3(config)#int fa 0/3

S3(config-if)#switchport access vlan 7

思科设备VLAN之间通信配置

S0(config)#int vlan 2

S0(config-if)#ip address 192.168.2.1 255.255.255.0

S0(config)#int vlan 3

S0(config-if)#ip address 192.168.3.1 255.255.255.0

S0(config)#int vlan 4

S0(config-if)#ip address 192.168.4.1 255.255.255.0

S0(config)#int vlan 5

S0(config-if)#ip address 192.168.5.1 255.255.255.0

S0(config)#int vlan 6

S0(config-if)#ip address 192.168.6.1 255.255.255.0

S0(config)#int vlan 7

S0(config-if)#ip address 192.168.7.1 255.255.255.0

S0(config)#ip dhcp pool 2

S0(dhcp-config)#network 192.168.2.0 255.255.255.0

S0(dhcp-config)#default-router 192.168.2.1

S0(config)#ip dhcp pool 3

S0(dhcp-config)#network 192.168.3.0 255.255.255.0

S0(dhcp-config)#default-router 192.168.3.1

S0(config)#ip dhcp pool 4

S0(dhcp-config)#network 192.168.4.0 255.255.255.0

S0(dhcp-config)#default-router 192.168.4.1

S0(config)#ip dhcp pool 5

S0(dhcp-config)#network 192.168.5.0 255.255.255.0

S0(dhcp-config)#default-router 192.168.5.1

S0(config)#ip dhcp pool 6

S0(dhcp-config)#network 192.168.6.0 255.255.255.0

S0(dhcp-config)#default-router 192.168.6.1

S0(config)#ip dhcp pool 7

S0(dhcp-config)#network 192.168.7.0 255.255.255.0

S0(dhcp-config)#default-router 192.168.7.1

S0(config)#ip routing

S0#show ip route

思科设备VLAN之间通信配置
思科设备VLAN之间通信配置
思科设备VLAN之间通信配置
思科设备VLAN之间通信配置

继续阅读