Configurazione Trunk 802.1q su router

Trunk 802.1q
 

   La configurazione che segue contiene un trunk 802.1q con dhcp che fornisce gli indirizzi corrispondenti alle vlan. L'access-list 199 permette di filtrare il traffico tra le VLAN per gli IP desiderati. Gli indirizzi IP di questa configurazione vanno ovviamente personalizzati. 802.1q e' uno standard pertanto e' possibile collegare l'interfaccia trunk (la FastEthernet 0/0 in questo caso) con uno switch di produttori differenti a Cisco:


version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
service password-encryption
!
hostname MioRouter_INTRANET
!
boot-start-marker
boot-end-marker
!
...snip...
!
ip dhcp excluded-address 192.168.115.1 192.168.115.25
ip dhcp excluded-address 192.168.20.1 192.168.20.25
ip dhcp excluded-address 192.168.30.1 192.168.30.25
ip dhcp excluded-address 192.168.40.1 192.168.40.25
ip dhcp excluded-address 192.168.60.1 192.168.60.25
ip dhcp excluded-address 192.168.70.1 192.168.70.25
!
ip dhcp pool MC_vlan6
network 192.168.20.0 255.255.255.0
default-router 192.168.20.254
dns-server 151.99.0.100
!
ip dhcp pool MC_vlan7
network 192.168.30.0 255.255.255.0
default-router 192.168.30.254
dns-server 151.99.0.100
!
ip dhcp pool MC_vlan8
network 192.168.40.0 255.255.255.0
default-router 192.168.40.254
dns-server 151.99.0.100
!
ip dhcp pool MC_vlan9
network 192.168.60.0 255.255.255.0
default-router 192.168.60.254
dns-server 151.99.0.100
!
ip dhcp pool MC_vlan10
network 192.168.70.0 255.255.255.0
default-router 192.168.70.254
dns-server 151.99.0.100
!
ip dhcp pool MC_vlan13
network 192.168.115.0 255.255.255.0
default-router 192.168.115.254
dns-server 151.99.0.100
!
no ip domain lookup
no ftp-server write-enable
!
!
!
!
interface FastEthernet0/0
no ip address
load-interval 30
speed auto
full-duplex
!
interface FastEthernet0/0.1
description -----------------> Vlan 13
encapsulation dot1Q 13
ip address 192.168.115.254 255.255.255.0
ip access-group 199 in
!
interface FastEthernet0/0.2
description -----------------> Vlan 6
encapsulation dot1Q 6
ip address 192.168.20.254 255.255.255.0
ip access-group 199 in
!
interface FastEthernet0/0.3
description -----------------> Vlan 7
encapsulation dot1Q 7
ip address 192.168.30.254 255.255.255.0
ip access-group 199 in
!
interface FastEthernet0/0.4
description -----------------> Vlan 8
encapsulation dot1Q 8
ip address 192.168.40.254 255.255.255.0
ip access-group 199 in
!
interface FastEthernet0/0.5
description -----------------> Vlan 9
encapsulation dot1Q 9
ip address 192.168.60.254 255.255.255.0
ip access-group 199 in
!
interface FastEthernet0/0.6
description -----------------> Vlan 10
encapsulation dot1Q 10
ip address 192.168.70.254 255.255.255.0
ip access-group 199 in
!
interface FastEthernet0/0.7
description --------------> Vlan 11
encapsulation dot1Q 11
ip address 192.168.150.254 255.255.255.0
ip access-group 199 in
!
interface FastEthernet0/0.8
description -----------------> Vlan 1
encapsulation dot1Q 1 native
ip address 192.168.250.254 255.255.255.0
ip access-group 199 in
!
interface FastEthernet0/0.9
description --------------> Vlan 3
encapsulation dot1Q 3
ip address 192.168.0.254 255.255.255.0
ip access-group 199 in
!
interface FastEthernet0/1
ip address 172.16.20.2 255.255.255.0
speed auto
full-duplex
!
ip classless
ip route 0.0.0.0 0.0.0.0 172.16.20.1
no ip http server
!
access-list 199 permit ip 192.168.0.0 0.0.0.255 192.168.115.0 0.0.0.255
access-list 199 permit ip 192.168.115.0 0.0.0.255 192.168.0.0 0.0.0.255
access-list 199 permit ip 192.168.0.0 0.0.0.255 host 192.168.0.3
access-list 199 permit ip 192.168.0.0 0.0.0.255 host 192.168.0.254
access-list 199 permit ip any host 192.168.60.1
access-list 199 permit ip host 192.168.60.1 any
access-list 199 permit ip 192.168.115.0 0.0.0.255 192.168.100.0 0.0.0.255
access-list 199 permit ip 192.168.100.0 0.0.0.255 192.168.115.0 0.0.0.255
access-list 199 deny ip any 192.168.0.0 0.0.255.255
access-list 199 permit ip any any
!
line con 0
line aux 0
line vty 0 4
password 7 030D4F0E4B0E224103041C011E1308090A3E2E36
login
!
!
!
end

MioRouter_INTRANET#show vlans

Virtual LAN ID: 1 (IEEE 802.1Q Encapsulation)

vLAN Trunk Interface: FastEthernet0/0.8

This is configured as native Vlan for the following interface(s) :

FastEthernet0/0

Protocols Configured: Address: Received: Transmitted:

IP                    192.168.250.254 0 0

Virtual LAN ID: 3 (IEEE 802.1Q Encapsulation)

vLAN Trunk Interface: FastEthernet0/0.9

Protocols Configured: Address: Received: Transmitted:

IP                    192.168.0.254 48308 72507

Virtual LAN ID: 6 (IEEE 802.1Q Encapsulation)

vLAN Trunk Interface: FastEthernet0/0.2

Protocols Configured: Address: Received: Transmitted:

IP                    192.168.20.254 10551492 6564874

Virtual LAN ID: 7 (IEEE 802.1Q Encapsulation)

vLAN Trunk Interface: FastEthernet0/0.3

Protocols Configured: Address: Received: Transmitted:

IP                    192.168.30.254 1518749 1453500

Virtual LAN ID: 8 (IEEE 802.1Q Encapsulation)

vLAN Trunk Interface: FastEthernet0/0.4

Protocols Configured: Address: Received: Transmitted:

IP                    192.168.40.254 291501 423778

Virtual LAN ID: 9 (IEEE 802.1Q Encapsulation)

vLAN Trunk Interface: FastEthernet0/0.5

Protocols Configured: Address: Received: Transmitted:

IP                    192.168.60.254 570531 159890

Virtual LAN ID: 10 (IEEE 802.1Q Encapsulation)

vLAN Trunk Interface: FastEthernet0/0.6

Protocols Configured: Address: Received: Transmitted:

IP                    192.168.70.254 258785 312793

Virtual LAN ID: 11 (IEEE 802.1Q Encapsulation)

vLAN Trunk Interface: FastEthernet0/0.7

Protocols Configured: Address: Received: Transmitted:

IP                    192.168.150.254 103037 3

Virtual LAN ID: 13 (IEEE 802.1Q Encapsulation)

vLAN Trunk Interface: FastEthernet0/0.1

Protocols Configured: Address: Received: Transmitted:

IP                    192.168.115.254 860744 1130355

MioRouter_INTRANET#


Altre letture

Consiglio di consultare l’enorme documentazione disponibile on-line nel sito della cisco http://www.cisco.com/. E’ possibile trovare sempre tutto cio’ che si cerca.


6bone

Copyright 2002-2003 – ITESYS srl –

Il materiale di questa pagina non e’ sponsorizzato o sottoscritto da Cisco Systems, Inc. Ciscoâ e’ un trademark di Cisco Systems, Inc. negli Stati Uniti e in altri stati. L’autore di questa pagina non si assume nessuna responsabilita’ e non da nessuna garanzia riguardante l’accuratezza e la completezza delle informazioni presenti nonche’ da conseguenze sull’uso delle informazioni presenti in questa pagina.
Il sito web ufficiale della Cisco e’ http://www.cisco.com/. Nel caso si volesse utilizzare il contenuto di questa pagina nella forma in cui e’ presentato rivolgersi all’autore scrivendo a gianrico.fichera itesys.it.

This material is not sponsored by, endorsed by, or affiliated with Cisco Systems, Inc., Cisco, Cisco Systems, and the Cisco Systems logo are trademarks or registered trade marks of Cisco Systems, Inc. or its affiliates. All other trademarks are trademarks of their respective owners.





1
1