Ucim, i naisao sam na problem kod vise VLAN-ova. Situacija je ovakva:
router - switch - radne stanice
router je ujedno i DHCP server. switch ima dva VLAN-a prvi na portovima fa0/1 - 0/4, a drugi na fa0/5 - 0/8. Povezan je sa ruterom preko porta fa0/24. taj port je trunk i prima sve VLAN-ove. Na ruteru su postavljeni subinterfejsi koji imaju IP adresu. Ono sto je problem jeste to sto hostovi na VLAN2 koji obuhvata portove od 1 do 4 lepo dobijaju IP adrese od DHCP servera, dok oni hostovi koji su na VLAN3, odnosno na portovima od 5 - 8 nikako ne mogu da dobiju adrese.
konfiguracija rutera:
Code:
Current configuration : 979 bytes
!
version 12.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Router
!
!
!
!
!
ip dhcp pool 1
network 192.168.0.0 255.255.255.0
ip dhcp pool VLAN2
network 192.168.1.0 255.255.255.0
default-router 192.168.1.1
ip dhcp pool VLAN3
network 192.168.2.0 255.255.255.0
default-router 192.168.2.1
!
ip cef
no ipv6 cef
!
!
!
!
!
!
!
!
!
!
!
!
spanning-tree mode pvst
!
!
!
!
!
!
interface FastEthernet0/0
no ip address
duplex auto
speed auto
!
interface FastEthernet0/0.1
encapsulation dot1Q 2
ip address 192.168.1.1 255.255.255.0
!
interface FastEthernet0/0.2
encapsulation dot1Q 3
no ip address
!
interface FastEthernet0/1
no ip address
duplex auto
speed auto
shutdown
!
interface Vlan1
no ip address
!
interface Vlan2
no ip address
!
interface Vlan3
no ip address
!
router rip
!
ip classless
!
ip flow-export version 9
!
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
login
!
!
!
end
Current configuration : 979 bytes
!
version 12.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Router
!
!
!
!
!
ip dhcp pool 1
network 192.168.0.0 255.255.255.0
ip dhcp pool VLAN2
network 192.168.1.0 255.255.255.0
default-router 192.168.1.1
ip dhcp pool VLAN3
network 192.168.2.0 255.255.255.0
default-router 192.168.2.1
!
ip cef
no ipv6 cef
!
!
!
!
!
!
!
!
!
!
!
!
spanning-tree mode pvst
!
!
!
!
!
!
interface FastEthernet0/0
no ip address
duplex auto
speed auto
!
interface FastEthernet0/0.1
encapsulation dot1Q 2
ip address 192.168.1.1 255.255.255.0
!
interface FastEthernet0/0.2
encapsulation dot1Q 3
no ip address
!
interface FastEthernet0/1
no ip address
duplex auto
speed auto
shutdown
!
interface Vlan1
no ip address
!
interface Vlan2
no ip address
!
interface Vlan3
no ip address
!
router rip
!
ip classless
!
ip flow-export version 9
!
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
login
!
!
!
end
konfiguracija switch-a:
Code:
Current configuration : 1320 bytes
!
version 12.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Switch
!
!
!
spanning-tree mode pvst
!
interface FastEthernet0/1
switchport access vlan 2
!
interface FastEthernet0/2
switchport access vlan 2
!
interface FastEthernet0/3
switchport access vlan 2
!
interface FastEthernet0/4
switchport access vlan 2
!
interface FastEthernet0/5
switchport access vlan 3
!
interface FastEthernet0/6
switchport access vlan 3
!
interface FastEthernet0/7
switchport access vlan 3
!
interface FastEthernet0/8
switchport access vlan 3
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface FastEthernet0/16
!
interface FastEthernet0/17
!
interface FastEthernet0/18
!
interface FastEthernet0/19
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface FastEthernet0/23
!
interface FastEthernet0/24
switchport mode trunk
!
interface Vlan1
no ip address
shutdown
!
interface Vlan2
ip address 192.168.1.7 255.255.255.0
!
interface Vlan3
ip address 192.168.2.7 255.255.255.0
!
!
!
!
line con 0
!
line vty 0 4
login
line vty 5 15
login
!
!
end
Current configuration : 1320 bytes
!
version 12.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Switch
!
!
!
spanning-tree mode pvst
!
interface FastEthernet0/1
switchport access vlan 2
!
interface FastEthernet0/2
switchport access vlan 2
!
interface FastEthernet0/3
switchport access vlan 2
!
interface FastEthernet0/4
switchport access vlan 2
!
interface FastEthernet0/5
switchport access vlan 3
!
interface FastEthernet0/6
switchport access vlan 3
!
interface FastEthernet0/7
switchport access vlan 3
!
interface FastEthernet0/8
switchport access vlan 3
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface FastEthernet0/16
!
interface FastEthernet0/17
!
interface FastEthernet0/18
!
interface FastEthernet0/19
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface FastEthernet0/23
!
interface FastEthernet0/24
switchport mode trunk
!
interface Vlan1
no ip address
shutdown
!
interface Vlan2
ip address 192.168.1.7 255.255.255.0
!
interface Vlan3
ip address 192.168.2.7 255.255.255.0
!
!
!
!
line con 0
!
line vty 0 4
login
line vty 5 15
login
!
!
end