.


:




:

































 

 

 

 


VLAN




1. VLAN , IOS .

VLAN c VLAN Cisco 2950

Switch# vlan database

Switch(vlan)# vlan VLAN

Switch(vlan)# exit

,

Switch# vlan database

Switch(vlan)# vlan 33

Switch(vlan)# exit

VLAN 33 VLAN VLAN0033.

, .

switchport mode , (trunk).

Switch(config-if )#switchport mode [access | dynamic | trunk]

, , , . switchport mode access.

VLAN

Switch(config-if)# switchport mode access

Switch(config-if)# switchport access vlan number

number VLAN.

interface range . , VLAN 10

Switch(config)# interface range fa0/1 6

Switch(config-if-range)# switchport access vlan 10

VLAN show runningconfig,

show vlan show vlan brief.

VLAN ,

VLAN 1.

VLAN

Switch(config-if)# switchport mode trunk

VLAN . , VLAN. . VLAN. VLAN

. VLAN, .

VLAN , VLAN . VLAN .

Switch(config-if)# switchport trunk allowed vlan vlan-list

,

Switch(config-if)# switchport trunk allowed vlan 3

Switch(config-if)# switchport trunk allowed vlan 6-10

VLAN 3 VLAN 6 10. ,

VLAN show runningconfig.

VLANs VLAN, .

SwitchA(config-if)# switchport mode access

SwitchA(config-if)# switchport mode trunk

1. 5. GigabitEthernet (gi1/1 gi1/2) . 1. , 1. 172.16.0.0

255.255.0.0. .

.

VLAN. 20_1 20_2 VLAN 20, 30_1 30_2 VLAN 30.

Switch1(conf)# interface fa0/2

Switch1(conf-if)# switchport access vlan 20

Switch1 (conf-if ) # interface fa0/3

Switch1(conf-if)# switchport access vlan 30

Switch2 (conf)# interface fa0/2

Switch2(conf-if)# switchport access vlan 20

Switch2 (conf-if)# interface fa0/3

Switch2(conf-if)# switchport access vlan 30

5.

1.

Switch1 Switch2
20_1 Fa0/2   172.16.20.1/16
30_1 Fa0/3   172.16.20.2/16
20_2   Fa0/2 172.16.30.1/16
30_2   Fa0/3 172.16.30.2/16
  Gi1/1 Gi1/1  

 

VLAN, Switch1# sh vl name 20

VLAN , .

.

GigabitEthernet

Switch1(conf)# interface gi1/1

Switch1 (conf-if)# switchport trunk allowed vlan add 20

Switch1 (conf-if)# switchport trunk allowed vlan add 30

Switch1 (conf-if)# no shutdown

Switch2 (conf)# interface gi1/1

Switch2 (conf-if)# switchport trunk allowed vlan add 20

Switch2 (conf-if)# switchport trunk allowed vlan add 30

Switch2 (conf-if)# no shut

VLAN ,

, VLAN (.

2).

2.

Ping / 20_1 30_1 20_2 30_2
20_1
30_1
20_2
30_2

 

.

2. . fa0/1 ( 6). , VLAN , , VLAN .

6.

. 172.16.0.0/16 172.16.20.0/24 172.16.30.1/24. 255.255.255.0.

VLAN IP , .

,

Switch1(conf)# interface fa0/1

Switch1(conf-if)# switchport access vlan 20

Switch2(conf)# interface fa0/1

Switch2(conf-if)# switchport access vlan 30

IP

Router(conf)# interface fa0/0

Router(conf-if)# ip address 172.16.20.254 255.255.255.0

Router(conf-if)# no shutdown

Router(conf-if)# interface fa1/0

Router(conf-if)# ip address 172.16.30.254 255.255.255.0

Router(conf-if )#no shutdown

172.16.20.0/24 172.16.30.1/24. .

Host Gataway
20_1 172.16.20.254
20_2 172.16.20.254
30_1 172.16.30.254
30_2 172.16.30.254

 

IP .

3. , , .

, gi1/2 fa0/0 ( 7). . , , . , Switch2 gi1/2 ,

.

7.

fa0/0 fa0/0.20 fa0/0.30. dot1q 20 30, .

Router(conf)# interface FastEthernet0/0.20

Router(conf-subif)# encapsulation dot1q 20

Router(conf-subif)# ip address 172.16.20.254 255.255.255.0

Router(conf-subif)# interface FastEthernet0/0.30

Router(conf-subif)# encapsulation dot1q 30

Router(conf-subif)# ip address 172.16.30.254 255.255.255.0

Router# show ip route

, .

Router 172.16.20.1 20_1 VLAN 20, Switch1 172.16.30.2 30_2 VLAN 30, Switch2

:

1. , ?

2. ?

3. ?

4. ?

5. ?

6. ?

7. ?

8. ?

9. VLAN?

10. VLAN?

11. ?

12. VLAN ?

13. VLAN ?

14. VLAN ?

 

IP , . 172.16.0.0/16.

, .

 

 

14





:


: 2016-03-28; !; : 1404 |


:

:

, ; , .
==> ...

1700 - | 1483 -


© 2015-2024 lektsii.org - -

: 0.023 .