You are on page 1of 5

Hi All,

Ive set up laboratory for vlan, What i want to achieve share the internet connection to
the following vlans, vlan1,vlan2,vlan3.The vlan 1 can able to access internet connection
but the other vlans vlan2,vlan3 cant access the internet. Heres my configuration

CISCO 2800 Series

interface FastEthernet0/0
ip address 192.168.1.40 255.255.255.0
ip nat outside
ip virtual-reassembly
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 192.168.2.1 255.255.255.0
ip nat inside
ip virtual-reassembly
duplex auto
speed auto
!
interface Serial0/0/0
no ip address
shutdown
no fair-queue
clock rate 2000000
!
interface Serial0/0/1
no ip address
shutdown
clock rate 2000000
!
ip forward-protocol nd
ip route 0.0.0.0 0.0.0.0 192.168.1.99
no ip http server
no ip http secure-server
!
!
ip nat inside source list internet interface FastEthernet0/0 overload
!
ip access-list extended internet
permit ip 192.168.2.0 0.0.0.255 any
permit ip 20.20.20.0 0.0.0.255 any
permit ip 30.30.30.0 0.0.0.255 any
!
!
!
!
!
!
control-plane
!
!
line con 0
line aux 0
line vty 0 4
password cisco
logging synchronous
login
!
scheduler allocate 20000 1000
end

!
hostname Switch
!
enable password cisco
!
no aaa new-model
switch 1 provision ws-c3750g-24ts-1u
system mtu routing 1500
ip subnet-zero
ip routing
ip name-server 213.42.20.20
ip dhcp excluded-address 20.20.20.1
ip dhcp excluded-address 30.30.30.1
!
More
01:01:36: %SYS-5-CONFIG_I: Configured from console
ip dhcp pool pool1
network 20.20.20.0 255.255.255.0
dns-server 213.42.20.20
default-router 20.20.20.1
!

network 30.30.30.0 255.255.255.0


default-router 30.30.30.1
dns-server 213.42.20.20
!
!
!
!
no file verify auto
spanning-tree mode pvst
spanning-tree extend system-id
!
vlan internal allocation policy ascending
!
interface GigabitEthernet1/0/1
!
interface GigabitEthernet1/0/2
switchport access vlan 2
switchport mode access
spanning-tree portfast
!
interface GigabitEthernet1/0/3
switchport access vlan 3
switchport mode access
spanning-tree portfast
!
interface GigabitEthernet1/0/4
!
interface GigabitEthernet1/0/5
!
interface GigabitEthernet1/0/6
!
interface GigabitEthernet1/0/7
!
interface GigabitEthernet1/0/8
!
interface GigabitEthernet1/0/9
!
interface GigabitEthernet1/0/10
!
interface GigabitEthernet1/0/11
!
interface GigabitEthernet1/0/12
!
interface GigabitEthernet1/0/13
!
interface GigabitEthernet1/0/14
!
interface GigabitEthernet1/0/15
!
interface GigabitEthernet1/0/16
!
interface GigabitEthernet1/0/17
!
interface GigabitEthernet1/0/18
!
interface GigabitEthernet1/0/19
!
interface GigabitEthernet1/0/20
!
interface GigabitEthernet1/0/21
!
interface GigabitEthernet1/0/22
!
interface GigabitEthernet1/0/23
!
interface GigabitEthernet1/0/24
!
interface GigabitEthernet1/0/25
!
interface GigabitEthernet1/0/26
!
interface GigabitEthernet1/0/27
!
interface GigabitEthernet1/0/28
!
interface Vlan1
ip address 192.168.2.2 255.255.255.0
!
interface Vlan2
ip address 20.20.20.1 255.255.255.0
!
interface Vlan3
ip address 30.30.30.1 255.255.255.0
!
ip classless
ip route 0.0.0.0 0.0.0.0 192.168.2.1
ip http server
!
!
control-plane
!
!
line con 0
line vty 0 4
password cisco
logging synchronous
login
line vty 5 15
login
!
end

-
- -
1 default active Gi1/0/1, Gi1/0/4, Gi1/0/5
Gi1/0/6, Gi1/0/7, Gi1/0/8
Gi1/0/9, Gi1/0/10, Gi1/0/11
Gi1/0/12, Gi1/0/13, Gi1/0/14
Gi1/0/15, Gi1/0/16, Gi1/0/17
Gi1/0/18, Gi1/0/19, Gi1/0/20
Gi1/0/21, Gi1/0/22, Gi1/0/23
Gi1/0/24, Gi1/0/25, Gi1/0/26
Gi1/0/27, Gi1/0/28
2 test1 active Gi1/0/2
3 test2 active Gi1/0/3
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup

VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
- - -
1 enet 100001 1500 0 0
2 enet 100002 1500 0 0

VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
- - -
3 enet 100003 1500 0 0
1002 fddi 101002 1500 0 0
1003 tr 101003 1500 0 0
1004 fdnet 101004 1500 ieee 0 0
1005 trnet 101005 1500 ibm 0 0

Remote SPAN VLANs

Primary Secondary Type Ports


-